[issue19580] Got resource warning when running test_base_events (test_asyncio)

2013-11-14 Thread Vajrasky Kok

New submission from Vajrasky Kok:

$ ./python Lib/test/test_asyncio/test_base_events.py 
./home/ethan/Documents/code/python/cpython3.4/Lib/unittest/case.py:158:
 ResourceWarning: unclosed 
  callable_obj(*args, **kwargs)
..
--
Ran 43 tests in 0.219s

OK
sys:1: ResourceWarning: unclosed 
sys:1: ResourceWarning: unclosed 
sys:1: ResourceWarning: unclosed 

Attached the patch to close the leak in the test.

--
components: Tests
files: resource_warning_test_base_events_asyncio.patch
keywords: patch
messages: 202820
nosy: vajrasky
priority: normal
severity: normal
status: open
title: Got resource warning when running test_base_events (test_asyncio)
type: resource usage
versions: Python 3.4
Added file: 
http://bugs.python.org/file32608/resource_warning_test_base_events_asyncio.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19579] test_asyncio: test__run_once timings should be relaxed

2013-11-14 Thread STINNER Victor

Changes by STINNER Victor :


--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19576] "Non-Python created threads" documentation doesn't mention PyEval_InitThreads()

2013-11-14 Thread STINNER Victor

STINNER Victor added the comment:

> Perhaps we can fix PyGILState to call PyEval_InitThreads automatically?

Yes, I had the same idea. Here is a patch to call PyEval_InitThreads() in 
PyGILState_Ensure() for new threads.

--
keywords: +patch
Added file: http://bugs.python.org/file32609/PyGILState_Ensure.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14432] Bug in generator if the generator in created in a temporary C thread

2013-11-14 Thread STINNER Victor

Changes by STINNER Victor :


--
title: Bug in generator if the generator in created in a C  thread -> Bug 
in generator if the generator in created in a temporary C thread

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6208] path separator output ignores shell's path separator: / instead of \

2013-11-14 Thread Tim Golden

Tim Golden added the comment:

On 14/11/2013 00:21, Laurent Birtz wrote:
> Is it reasonable to believe that most Python programs don't care
> about the legacy shell API? 

No more than it is to believe that most Python programs don't care about
MSys or Cygwin ;)

For information, cmd.exe will happily run, eg, "c:/windows/notepad.exe".
The problem is that command-line programs built in to cmd.exe (such as
"type" and "dir") expect the slash to prefix a command-line switch. And
they don't seem to have particularly good escape- or quote-handling.
External command-line tools, like "xcopy", will happily act on
forward-slash pathnames as long as they're double-quoted.

Now certain of the Windows shell API (and here "shell" means: the visual
elements, *not* the cmd/PS command shell) will only operate on
backslash-separated paths. For example: SHILCreateFromPath:

http://msdn.microsoft.com/en-us/library/windows/desktop/bb762210(v=vs.85).aspx

I'm not exactly how much that affects the current discussion, but my
point is that there *are* places in Windows where the backslash is the
only acceptable separator.

Changing os.sep globally is real no-no. it has the potential to break a
*lot* of code and we're in no position to assess how it's been used.
Applying a change conditionally might be acceptable, but somone would
have to work out how we knew what environment we were in.

TJG

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19291] Add docs for asyncio package (Tulip, PEP 3156)

2013-11-14 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19581] PyUnicodeWriter: change the overallocation factor for Windows

2013-11-14 Thread STINNER Victor

New submission from STINNER Victor:

PyUnicodeWriter currently overallocates the internal buffer by 25%. On Windows, 
PyUnicodeWriter is slower than PyAccu API. With an overallocation factor of 
50%, PyUnicodeWriter is fastter.

See this message for the benchmark:
http://bugs.python.org/issue19513#msg202312

We might also change the factor on all platform, performances are almost the 
same with a factor of 25% or 50% on Linux.

--
components: Windows
files: writer_overallocate_factor.patch
keywords: patch
messages: 202823
nosy: haypo, pitrou, serhiy.storchaka
priority: normal
severity: normal
status: open
title: PyUnicodeWriter: change the overallocation factor for Windows
type: performance
versions: Python 3.4
Added file: http://bugs.python.org/file32610/writer_overallocate_factor.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19513] Use PyUnicodeWriter instead of PyAccu in repr(tuple) and repr(list)

2013-11-14 Thread STINNER Victor

STINNER Victor added the comment:

> Please open a separate issue for the overallocation factor patch.

Ok, here you have: #19581.

I consider this issue has a dependency of this one, because without a better 
overallocation factor on Windows, list_repr_writer-2.patch makes repr(list) 
less efficient in some cases on Windows.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19582] Tkinter is not working with Py_SetPath

2013-11-14 Thread Debarshi Goswami

New submission from Debarshi Goswami:

Tkinter is not working when I set PYTHONPATH using Py_SetPath before 
Initialization in an application embedding Python interpreter.

Any call to Py_SetPath is screwing up Tkinter with an error traceback -
-
'Line 1789: Traceback (most recent call last):
  File "TestTK.py", line 33, in 
  File "C:\Python33\Lib\tkinter\__init__.py", line 1789, in __init__
self.tk = _tkinter.create(screenName, baseName, className, interactive, 
wantobjects, useTk, sync, use)
_tkinter.TclError: Can't find a usable init.tcl in the following directories: 
C:/Python33/lib/tcl8.5  and so on

This probably means that Tcl wasn't installed properly. 
-
But if set the 2 environment variable it works fine
set TCL_LIBRARY=C:\Python33\tcl\tcl8.5\
set TK_LIBRARY=C:\tcl\tk8.5\

If Py_SetPath is not called tkinter works well and tkwindow can be launched.

I am using Windows7 64 and Python 3.3.2

--
components: Tkinter
messages: 202825
nosy: Debarshi.Goswami
priority: normal
severity: normal
status: open
title: Tkinter is not working with Py_SetPath
versions: Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19582] Tkinter is not working with Py_SetPath

2013-11-14 Thread Debarshi Goswami

Changes by Debarshi Goswami :


--
components: +Interpreter Core
type:  -> compile error

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19550] PEP 453: Windows installer integration

2013-11-14 Thread Martin v . Löwis

Martin v. Löwis added the comment:

I'm currently blocked on a discrepancy of this request and PEP 453.

You are asking me to run "ensurepip --upgrade", whereas the PEP asks for an 
option to install the bundled pip (i.e. a mere ensurepip). Which of these 
should be done?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19582] Tkinter is not working with Py_SetPath

2013-11-14 Thread Debarshi Goswami

Debarshi Goswami added the comment:

Is there any way to run Tkinter adding some changes from interpreter?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16487] Allow ssl certificates to be specified from memory rather than files.

2013-11-14 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

Update the latest patch to the current state of python.

--
Added file: http://bugs.python.org/file32611/ssl2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16487] Allow ssl certificates to be specified from memory rather than files.

2013-11-14 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

The patch should be valid, please try it out.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19550] PEP 453: Windows installer integration

2013-11-14 Thread Nick Coghlan

Nick Coghlan added the comment:

After a CPython installation with the option checked, the installed pip
should be at least as recent as the bundled one:
http://www.python.org/dev/peps/pep-0453/#invocation-from-the-cpython-installers

You're right the prompt may be better as something like "Install/upgrade
pip?", since a previously installed pip may be upgraded when installing a
CPython maintenance release.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19577] memoryview bind (the opposite of release)

2013-11-14 Thread Stefan Krah

Stefan Krah added the comment:

-1 on complicating the code further. It would be possible to pass
an existing memoryview to mbuf_add_view(). That would save the line

   mv = memory_alloc().

But:

  a) You need to check that ndim is correct (shape, strides and
 suboffsets are allocated via the struct hack).

  b) You need to check for existing exports of the memoryview.


  c) ... probably other things that would surface on closer examination.

--
nosy: +skrah

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16487] Allow ssl certificates to be specified from memory rather than files.

2013-11-14 Thread Christian Heimes

Christian Heimes added the comment:

Your patch looks like Benjamin's fix for issue #17828 and not like a SSL 
improvement. :)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19580] Got resource warning when running test_base_events (test_asyncio)

2013-11-14 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +gvanrossum

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19581] PyUnicodeWriter: change the overallocation factor for Windows

2013-11-14 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Your patch implies that the two only supported OSes are Linux and Windows :-) 
To be honest I think we should have one single overallocation factor for all 
OSes. If 50% is ok on Linux too, then let it be 50%.

(did you run stringbench to see if it made a difference?)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16487] Allow ssl certificates to be specified from memory rather than files.

2013-11-14 Thread Kristján Valur Jónsson

Changes by Kristján Valur Jónsson :


Removed file: http://bugs.python.org/file32611/ssl2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19577] memoryview bind (the opposite of release)

2013-11-14 Thread Stefan Krah

Stefan Krah added the comment:

You could experiment with multiple freelists, one for each ndim.
I'm skeptical however that the gain will be substantial. I've tried
freelists for _decimal and the gain was in the order of 2% (not worth
it).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16487] Allow ssl certificates to be specified from memory rather than files.

2013-11-14 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

Haha, indeed.  what nonsense.
Here is the correct one.

--
Added file: http://bugs.python.org/file32612/ssl2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19577] memoryview bind (the opposite of release)

2013-11-14 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Yes, I also doubt this would actually bring anything significant, which is why 
I asked for numbers :-) Python creates many objects in a very intensive 
fashion, and memoryview are not, by far, the most common object type.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19446] Integer division for negative numbers

2013-11-14 Thread Mark Dickinson

Mark Dickinson added the comment:

Nitin:

> Is there any operator for integer division in python?

Yes, there is: the '//' operator.  :-)

There's no universally agreed upon definition for 'integer division' when 
negative numbers enter the mix, but I'm guessing that in this case you need 
something that rounds towards 0 instead of towards -infinity.  There's no 
dedicated operator for that, but you can simply do (assuming that b is 
positive):

   -(-a // b) if a < 0 else a // b

References:

[1] 
http://python-history.blogspot.co.uk/2010/08/why-pythons-integer-division-floors.html
[2] http://docs.python.org/2/faq/programming.html#why-does-22-10-return-3

--
nosy: +mark.dickinson

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19568] bytearray_setslice_linear() leaves the bytearray in an inconsistent state on memory allocation failure

2013-11-14 Thread Stefan Krah

Stefan Krah added the comment:

> With the patch, the deletion succeeded even if you get a MemoryError. The 
> bytearray object is consistent. It's just that its buffer could be smaller 
> (it wastes memory).

I think intuitively I'd expect the object to be unmodified if there
is any error.

--
nosy: +skrah

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close

2013-11-14 Thread Bernt Røskar Brenna

Bernt Røskar Brenna added the comment:

Another script, another test case.

Four different tasks are run:

subprocess_redirfile: Popen(stdout=file)
subprocess_devnull: Popen(stdout=DEVNULL)
subprocess_noredirect: Popen()
nosubprocess: No Popen() call

Judging from the output it looks as if it is the redirection that triggers this 
behavior.

Here's the output from my Win XP computer:

Platform: Windows-XP-5.1.2600-SP3

task_type #threads   result
subprocess_redirfile  2  4 errors  
subprocess_redirfile  1  OK
subprocess_devnull2  5 errors  
subprocess_devnull1  OK
subprocess_noredirect 2  OK
subprocess_noredirect 1  OK
nosubprocess  2  OK
nosubprocess  1  OK

--
Added file: http://bugs.python.org/file32613/testcase3.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9291] mimetypes initialization fails on Windows because of non-Latin characters in registry

2013-11-14 Thread adamhj

adamhj added the comment:

> The encoding is wrong. We should read the registry using Unicode, or at least 
> use the correct encoding. The correct encoding is the ANSI code page: 
> sys.getfilesystemencoding().

> Can you please try with: default_encoding = sys.getfilesystemencoding() ?

This does not work. In fact it doesn't matter what default_encoding is. The 
variable ctype, which is returned by _winreg.EnumKey(), is a byte 
string(b'blahblah'), at least on my computer(win2k3sp2, python 2.7.6). Because 
the interpreter is asked to encode a byte string, it tries to convert the byte 
string to unicode string first, by calling decode implicitly with 'ascii' 
encoding, so the exception UnicodeDecodeError.

the variable ctype, which is read from registry key name, can be decoded 
correctly with sys.getfilesystemencoding()(which returns 'mbcs'), but in fact 
what we need is a byte string, so there should be neither encoding nor decoding 
here.

if there is a case that _winreg.EnumKey() returns unicode string, then a type 
check should be added before the encode. Or maybe the case is that the return 
type of _winreg.EnumKey() is different in 2.x and 3.x?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16487] Allow ssl certificates to be specified from memory rather than files.

2013-11-14 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19568] bytearray_setslice_linear() leaves the bytearray in an inconsistent state on memory allocation failure

2013-11-14 Thread STINNER Victor

STINNER Victor added the comment:

>> With the patch, the deletion succeeded even if you get a MemoryError. The 
>> bytearray object is consistent. It's just that its buffer could be smaller 
>> (it wastes memory).

>I think intuitively I'd expect the object to be unmodified 
>if there is any error.

It would be possible to have a fully atomic operation, but it would kill 
performances: you have to allocate a temporary buffer to store the removed 
bytes. I prefer to not kill performances for a very rare case.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19577] memoryview bind (the opposite of release)

2013-11-14 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19563] Changing barry's email to ba...@python.org

2013-11-14 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On Nov 14, 2013, at 01:44 AM, Antoine Pitrou wrote:

>Do we want to cut a new release quickly in order to spread the fix?

I am working on a 2.6.10 right now.  IMHO this is the only critical security
fix to warrant the two digit last version number.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close

2013-11-14 Thread Bernt Røskar Brenna

Bernt Røskar Brenna added the comment:

Similar result on Windows Server 2008:

Platform: Windows-2008ServerR2-6.1.7600

task_type #threads   result
subprocess_redirfile  2  9 errors
subprocess_redirfile  1  OK
subprocess_devnull2  9 errors
subprocess_devnull1  OK
subprocess_noredirect 2  OK
subprocess_noredirect 1  OK
nosubprocess  2  OK
nosubprocess  1  OK

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19568] bytearray_setslice_linear() leaves the bytearray in an inconsistent state on memory allocation failure

2013-11-14 Thread Stefan Krah

Stefan Krah added the comment:

Can you suppress the MemoryError if deletion succeeds? That would be ok IMO.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19583] time.strftime fails to use %:z time formatter of the underlying C library

2013-11-14 Thread Mathieu Dupuy

New submission from Mathieu Dupuy:

function time.strftime fails to use '%:z' time formatter of the underlying 
library. Passing it does not format time accordingly but returns it as if it 
was a non-formatting string.

Simple reproduction, on Linux:
$ date +%:z
+01:00
$ python -c 'import time;print time.strftime("%:z")'
%:z

%z works fine, any of the other middle-colon variant (glibc also have %::z, 
%:::z) have the same problem.

Reproduced with python 2.7 and 3.3

--
components: Library (Lib)
messages: 202845
nosy: mdupuy
priority: normal
severity: normal
status: open
title: time.strftime fails to use %:z time formatter of the underlying C library
type: behavior
versions: Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19568] bytearray_setslice_linear() leaves the bytearray in an inconsistent state on memory allocation failure

2013-11-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> With the patch, the deletion succeeded even if you get a MemoryError. The 
> bytearray object is consistent. It's just that its buffer could be smaller 
> (it wastes memory).

Yes, but if a MemoryError occurred during slice assignment b[3:6] = b'ab', the 
bytearray will be not consistent. For consistency we should copy replacement 
bytes.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19583] time.strftime fails to use %:z time formatter of the underlying C library

2013-11-14 Thread Mathieu Dupuy

Mathieu Dupuy added the comment:

But in fact "date" was not the right reference to look at, C strftime has 
exactly the same behaviour than python, so I'm marking this bug as invalid and 
closing it.

--
resolution:  -> invalid
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19583] time.strftime fails to use %:z time formatter of the underlying C library

2013-11-14 Thread STINNER Victor

STINNER Victor added the comment:

According to Mathieu on IRC, it's not a bug: date behaves differently than the 
C function strftime().

--
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19581] PyUnicodeWriter: change the overallocation factor for Windows

2013-11-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Many collections in other programming languages use overallocating rate 100%. 
Perhaps overallocating rate 12.5% for Python lists is good compromise between 
speed and memory usage (as far as Python lists have no explicit resize method), 
but for short-living objects we can use larger overallocating rate.

In theory for overallocating rate r long list needs in average O(1/log(1+r)) 
reallocations and O((r+1)/r) copyings per element. I.e. 50% overallocating rate 
is 3-3.4 times more efficient than current 12.5% overallocating rate and 100% 
overallocating rate is 1.5-1.7 times more efficient than 50% overallocating 
rate (in terms of numbers of reallocations and copyings).

I'm interesting what will happened when increase overallocating rate (50% or 
100%) for PyAccu.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19513] Use PyUnicodeWriter instead of PyAccu in repr(tuple) and repr(list)

2013-11-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

And what will be PyAccu vs PyUnicodeWriter comparison when increase PyAccu 
overallocating rate too?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19581] PyUnicodeWriter: change the overallocation factor for Windows

2013-11-14 Thread STINNER Victor

STINNER Victor added the comment:

I chose 25% on Linux after some micro-benchmarks on str%args and 
str.format(args). If the buffer is too large, the final resize (because 
PyUnicodeObject must have the exact size) is slow. I suppose that realloc() can 
avoid copying data if the new is is very close, but has to allocate a new 
memory block and copy data if the new size is higher than a threshold. It's how 
_PyObject_Realloc() for example.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close

2013-11-14 Thread R. David Murray

R. David Murray added the comment:

Unfortunately I currently lack a windows environment on which to test this.  
I've added some people to nosy who might be able to help out with this.

--
nosy: +gps, tim.golden

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1507224] sys.path issue if sys.prefix contains a colon

2013-11-14 Thread Ronald Oussoren

Ronald Oussoren added the comment:

AFAIK this still is a problem, although as Brett mentioned you have to do some 
work to end up with a non-functional install.

I ran into this in the context of py2app, that output of py2app basically 
contains a "portable" python installation and users can change the value of 
sys.prefix by dragging the application into a different folder. When 
applications are launched from a folder whose name contains a colon the 
application currently does not launch due to this problem.

I have no idea yet as to how to cleanly the py2app problem. I'll probably end 
up with a symlink hack for that ;-(

It should be easy enough to provide a patch for 3.5 that uses an array of path 
elements instead of the raw $PYTHONPATH value, but that requires changes to 
Python's startup code and I'll probably just try to contribute to Nick's plans 
to cleanup the APIs for interpreter configuration (PEP 432) instead of 
providing a patch here.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14432] Bug in generator if the generator in created in a temporary C thread

2013-11-14 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
versions: +Python 3.4 -Python 2.6, Python 3.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close

2013-11-14 Thread Charles-François Natali

Charles-François Natali added the comment:

I think it's simply due to file descriptor inheritance (files being
inherited by other subprocess instance): since Windows can't remove open
files, kaboom. It doesn't have anything to do with threads.

--
nosy: +neologix

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19581] PyUnicodeWriter: change the overallocation factor for Windows

2013-11-14 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Did you find a difference for small strings vs. large strings?

--
nosy: +tim.peters

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19584] IDLE fails - Python V2.7.6 - 64b on Win7 64b

2013-11-14 Thread Bob Wake

New submission from Bob Wake:

IDLE won't start on Python 2.7.6, 64 bit running on Windows 7, 64 bit.  It 
crashes in less than 1 second, before opening a window.  Python appears to work 
from the command line.  The CPU is a quad core i7 with 8GB memory and 2TB disk 
space.

--
components: IDLE
messages: 202856
nosy: bob7wake
priority: normal
severity: normal
status: open
title: IDLE fails - Python V2.7.6 - 64b on Win7 64b
type: crash
versions: Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19513] Use PyUnicodeWriter instead of PyAccu in repr(tuple) and repr(list)

2013-11-14 Thread STINNER Victor

STINNER Victor added the comment:

2013/11/14 Serhiy Storchaka :
> And what will be PyAccu vs PyUnicodeWriter comparison when increase PyAccu 
> overallocating rate too?

PyAccu doesn't use a Unicode buffer, but a list of strings.
PyUnicode_Join() is used to compact the list. PyAccu uses an hardcoded
limit of 100,000 items before compacting.

PyUnicodeWriter has a different design, it gives access to the buffer.
So functions like PyUnicode_WRITE() can be used directly. The design
allows a little bit optimizations. Example:

-s = PyUnicode_FromString("[");
-if (s == NULL || _PyAccu_Accumulate(&acc, s))
+if (_PyUnicodeWriter_WriteChar(&writer, '[') < 0)

In list_repr(), it shouldn't make a big difference.

But it helps me in str%args and str.format(args) to avoid large
temporary strings. For example, "%.100s" writes directly padding into
the buffer, instead of having to allocate a long string, copy
characters, and then destroy the padding string.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6208] path separator output ignores shell's path separator: / instead of \

2013-11-14 Thread Laurent Birtz

Laurent Birtz added the comment:

Thank you for the clarifications on the usage of cmd.exe and shell=True. I tend 
to forget that the shell support in subprocess isn't just about UNIX.

The point of running msys is getting programs to work as if they were in a 
limited UNIX environment without the emulation layer provided by Cygwin. It's 
nice if programs unaware of msys work out-of-the-box, but for use cases like 
mine what is needed is the possibility to write a program that works correctly 
on msys with a minimum of fuss.

Given that, conditionally setting os.dep on program entry and wrapping the 
calls to cmd.exe manually seems to fit the bill. I haven't tested if SCons 
plays nice with that change, so I may be in for a disappointment. Even if it 
doesn't work right, it would still be useful for me to temporarily change 
os.dep and join my paths correctly until I return control to SCons.

On my system, print os.environ["MSYSTEM"] yields MINGW32. That's all I need for 
detecting msys currently. If that ever break I'll find another method.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close

2013-11-14 Thread R. David Murray

R. David Murray added the comment:

That was my initial thought, too, but the subprocess context manager waits for 
the subprocess to end, so those file descriptors should be closed by the time 
the deletion attempt happens, shouldn't they?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14432] Bug in generator if the generator in created in a temporary C thread

2013-11-14 Thread STINNER Victor

STINNER Victor added the comment:

> versions: +Python 3.4 -Python 2.6, Python 3.2

It would be interesting to fix the issue in Python 2.7 and 3.3:
generator.patch should fix it and the patch is simple (update
frame->f_tstate before each execution of a generator).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19581] PyUnicodeWriter: change the overallocation factor for Windows

2013-11-14 Thread STINNER Victor

STINNER Victor added the comment:

> Did you find a difference for small strings vs. large strings?

When I replaced PyAccu with PyUnicodeWriter for str%args and str.format(args), 
I ran a lot of benchmarks with short, medium and large strings. See for example:
http://bugs.python.org/file25687/REPORT_64BIT_2.7_3.2_writer

See issues #14716 and #14744 for old benchmark results. If I remember 
correctly, this is the script used to run the benchmark:

https://bitbucket.org/haypo/misc/src/7c2deb7a37353b41a45564ce6a98e07bbe0c691b/python/bench_str.py

The script should be run using:

https://bitbucket.org/haypo/misc/src/7c2deb7a37353b41a45564ce6a98e07bbe0c691b/python/benchmark.py?at=default

I was concerned by performances on short strings because most calls to str%args 
are short strings.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19585] Frame annotation

2013-11-14 Thread Walter Dörwald

New submission from Walter Dörwald:

This patch adds frame annotations, i.e. it adds an attribute f_annotation to 
frame objects, a decorator to set this attribute on exceptions and extensions 
to the traceback machinery that display the annotation in the traceback.

--
components: Interpreter Core
files: frame-annotation.diff
hgrepos: 214
keywords: patch
messages: 202862
nosy: doerwalter
priority: normal
severity: normal
status: open
title: Frame annotation
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file32614/frame-annotation.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19586] distutils: Remove assertEquals and assert_ deprecation warnings

2013-11-14 Thread STINNER Victor

Changes by STINNER Victor :


--
title: Remove assertEquals and assert_ deprecation warnings -> distutils: 
Remove assertEquals and assert_ deprecation warnings

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19586] Remove assertEquals and assert_ deprecation warnings

2013-11-14 Thread Gregory Salvan

New submission from Gregory Salvan:

Replace assertEquals by assertEqual and assert_ by assertTrue to remove tests 
deprecation warning.

It's few, but it's a first step to make contributions.

--
components: Distutils, Distutils2
files: distutil.patch
keywords: patch
messages: 202863
nosy: Gregory.Salvan, alexis
priority: normal
severity: normal
status: open
title: Remove assertEquals and assert_ deprecation warnings
type: compile error
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file32615/distutil.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19585] Frame annotation

2013-11-14 Thread STINNER Victor

STINNER Victor added the comment:

What is the use case of frame annotations?

--
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19586] distutils: Remove assertEquals and assert_ deprecation warnings

2013-11-14 Thread Ezio Melotti

Changes by Ezio Melotti :


--
assignee:  -> ezio.melotti
nosy: +ezio.melotti

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2259] Poor support other than 44.1khz, 16bit audio files?

2013-11-14 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
status: pending -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19585] Frame annotation

2013-11-14 Thread Walter Dörwald

Walter Dörwald added the comment:

See http://bugs.python.org/issue18861 and the discussion started here: 
https://mail.python.org/pipermail/python-dev/2013-November/130155.html.

Basically it allows to add context information to a traceback without changing 
the type of the exception.

In the following example:

   import itertools
   ', '.join(itertools.chain((str(i) for i in range(100)), [42]))

the join method itself adds context information to the TypeError:

   Traceback (most recent call last):
 File "hurz.py", line 2, in 
   ', '.join(itertools.chain((str(i) for i in range(100)), [42]))
   TypeError: sequence item 100: expected str instance, int found

i.e. the "sequence item 100" is context information.

However when the exception occurs higher up in the call chain, no such context 
information is added:

   import itertools

   def foo(x):
  return str(x+1)

   ', '.join(foo(x) for x in itertools.chain(range(100), [None]))

This gives:

   Traceback (most recent call last):
 File "hurz.py", line 6, in 
   ', '.join(foo(x) for x in itertools.chain(range(100), [None]))
 File "hurz.py", line 6, in 
   ', '.join(foo(x) for x in itertools.chain(range(100), [None]))
 File "hurz.py", line 4, in foo
   return str(x+1)
  TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'

With frame annotations the traceback might look like this:

   Traceback (most recent call last):
 File "hurz.py", line 6, in 
   ', '.join(foo(x) for x in itertools.chain(range(100), [None]))
 File "hurz.py", line 6, in : sequence item 100
   ', '.join(foo(x) for x in itertools.chain(range(100), [None]))
 File "hurz.py", line 4, in foo
   return str(x+1)
  TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19587] Remove test_bytes.FixedStringTest

2013-11-14 Thread Zachary Ware

New submission from Zachary Ware:

The attached patch removes test_bytes.FixedStringTest and its subclasses, as 
they report success when they don't actually test anything at all.

--
components: Tests
files: test_bytes.diff
keywords: patch
messages: 202866
nosy: serhiy.storchaka, zach.ware
priority: normal
severity: normal
status: open
title: Remove test_bytes.FixedStringTest
type: enhancement
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file32616/test_bytes.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19580] Got resource warning when running test_base_events (test_asyncio)

2013-11-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset df50f73f03ca by Guido van Rossum in branch 'default':
asyncio: Avoid ResourceWarning. Fix issue 19580 by Vajrasky Kok.
http://hg.python.org/cpython/rev/df50f73f03ca

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19587] Remove test_bytes.FixedStringTest

2013-11-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

ByteArrayAsStringTest and BytesAsStringTest inherit tests from 
test.string_tests.BaseTest.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19580] Got resource warning when running test_base_events (test_asyncio)

2013-11-14 Thread Guido van Rossum

Guido van Rossum added the comment:

Thanks for the fix!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19586] distutils: Remove assertEquals and assert_ deprecation warnings

2013-11-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

See also issue16510.

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19587] Remove test_bytes.FixedStringTest

2013-11-14 Thread Zachary Ware

Zachary Ware added the comment:

So they do, I failed to notice that.  New patch just removes the empty test 
methods.

--
Added file: http://bugs.python.org/file32617/test_bytes.v2.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19587] Remove empty tests in test_bytes.FixedStringTest

2013-11-14 Thread Zachary Ware

Changes by Zachary Ware :


--
title: Remove test_bytes.FixedStringTest -> Remove empty tests in 
test_bytes.FixedStringTest

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close

2013-11-14 Thread Richard Oudkerk

Richard Oudkerk added the comment:

Note that on Windows if you redirect the standard streams then *all* 
inheritable handles are inherited by the child process.

Presumably the handle for f_w file object (and/or a duplicate of it) created in 
one thread is accidentally "leaked" to the other child process.  This means 
that shutil.rmtree() cannot succeed until *both* child processes have exited.

PEP 446 might fix this, although there will still be a race condition.

--
nosy: +sbt

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19540] PEP339: Fix link to Zephyr ASDL paper

2013-11-14 Thread anatoly techtonik

anatoly techtonik added the comment:

It conflicts. =(

https://bitbucket.org/rirror/peps/pull-request/1/pep-0339txt-fix-link-to-zephyr-asdl-paper/diff

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19587] Remove empty tests in test_bytes.FixedStringTest

2013-11-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This LGTM, but the purpose of suppressing these tests is not absolutely clear 
to me. I suppose they were suppressed in times when bytes and batearray had no 
the lower() and upper() methods and the __contains__() methods accepted only 
integers. It will be good if developers which touched this code in past will 
made a review.

--
nosy: +georg.brandl, nnorwitz
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19586] distutils: Remove assertEquals and assert_ deprecation warnings

2013-11-14 Thread Gregory Salvan

Gregory Salvan added the comment:

Do I suggest the patch to issue16510 and close this one ?

--
components: +Tests

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close

2013-11-14 Thread Bernt Røskar Brenna

Bernt Røskar Brenna added the comment:

@neologix: How can it not have anything to do with threads? 

- It always works with max_workers == 1
- When max_workers == 2, shutil.rmtree sometimes fails

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close

2013-11-14 Thread Bernt Røskar Brenna

Changes by Bernt Røskar Brenna :


--
nosy: +astrand

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close

2013-11-14 Thread Charles-François Natali

Charles-François Natali added the comment:

> Bernt Røskar Brenna added the comment:
>
> @neologix: How can it not have anything to do with threads?
>
> - It always works with max_workers == 1
> - When max_workers == 2, shutil.rmtree sometimes fails

It has nothing to do with threads.
You could reproduce it by opening your files, spawning two child
processes, wait until the first one returns, and then try to remove
the files used by the first subprocess.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19588] Silently skipped test in test_random

2013-11-14 Thread Zachary Ware

New submission from Zachary Ware:

See: http://hg.python.org/cpython/file/87099/Lib/test/test_random.py#l241

This test (and its match in MersenneTwister_TestBasicOps) is nearly always 
skipped by the 'if stop <= start: return' check; in a test with adding 
"print('skipped', i)" before the return and running test_random via regrtest 
with -F, i was 40 when the test returned about 21 out of 25 times.  It seems to 
have been this way since the test was added.

Was this intended?  It looks to me like perhaps the start and stop assignments 
are swapped; Serhiy suggested that perhaps stop was meant to have been added to 
start.  How is this test meant to work?

--
components: Tests
messages: 202879
nosy: rhettinger, serhiy.storchaka, zach.ware
priority: normal
severity: normal
status: open
title: Silently skipped test in test_random
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19589] Use specific asserts in test_asyncio

2013-11-14 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

The proposed patch makes test_asyncio use more specific asserts. This will 
provide more useful failure report.

--
components: Tests
files: test_asyncio_asserts.patch
keywords: patch
messages: 202880
nosy: gvanrossum, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Use specific asserts in test_asyncio
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file32618/test_asyncio_asserts.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16510] Using appropriate checks in tests

2013-11-14 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
dependencies: +Use specific asserts in test_asyncio

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19590] Use specific asserts in test_email

2013-11-14 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

The proposed patch makes test_email use more specific asserts. This will 
provide more useful failure report.

--
components: Tests, email
files: test_email_asserts.patch
keywords: patch
messages: 202881
nosy: barry, r.david.murray, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Use specific asserts in test_email
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file32619/test_email_asserts.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19589] Use specific asserts in test_asyncio

2013-11-14 Thread Guido van Rossum

Guido van Rossum added the comment:

Looks good -- please commit.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16510] Using appropriate checks in tests

2013-11-14 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
dependencies: +Use specific asserts in test_email

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19591] Use specific asserts in ctype tests

2013-11-14 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +amaury.forgeotdarc, belopolsky, meador.inge

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19591] Use specific asserts in ctype tests

2013-11-14 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

The proposed patch makes the ctypes package tests use more specific asserts. 
This will provide more useful failure report.

--
components: Tests, ctypes
files: test_ctypes_asserts.patch
keywords: patch
messages: 202883
nosy: serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Use specific asserts in ctype tests
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file32620/test_ctypes_asserts.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19586] distutils: Remove assertEquals and assert_ deprecation warnings

2013-11-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

No. Issue16510 enhances tests while your patch fixes bugs.

LGTM.

--
stage:  -> commit review
type: compile error -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19592] Use specific asserts in lib2to3 tests

2013-11-14 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

The proposed patch makes the lib2to3 package tests use more specific asserts. 
This will provide more useful failure report.

--
components: 2to3 (2.x to 3.x conversion tool), Tests
files: test_lib2to3_asserts.patch
keywords: patch
messages: 202884
nosy: benjamin.peterson, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Use specific asserts in lib2to3 tests
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file32621/test_lib2to3_asserts.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19593] Use specific asserts in importlib tests

2013-11-14 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

The proposed patch makes the importlib package tests use more specific asserts. 
This will provide more useful failure report.

--
components: Tests
files: test_importlib_asserts.patch
keywords: patch
messages: 202885
nosy: brett.cannon, eric.snow, ncoghlan, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Use specific asserts in importlib tests
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file32622/test_importlib_asserts.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19594] Use specific asserts in unittest tests

2013-11-14 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

The proposed patch makes the unittest package tests use more specific asserts. 
This will provide more useful failure report.

--
components: Tests
files: test_unittest_asserts.patch
keywords: patch
messages: 202886
nosy: ezio.melotti, michael.foord, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Use specific asserts in unittest tests
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file32623/test_unittest_asserts.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19595] Silently skipped test in test_winsound

2013-11-14 Thread Zachary Ware

New submission from Zachary Ware:

In test_winsound, PlaySoundTest.test_alias_fallback has been commented out for 
quite some time but has been reported as 'ok' ever since.  Does anyone know 
what the current status of the test is?  Should it still be skipped 
(explicitly)?  Should it be marked as an expected failure?  Would it be 
dangerous to enable?  My own testing shows it to be harmless on my machine, but 
my range of test configurations is sorely limited at present.  My own 
suggestion is to mark it as an expected failure (or just enable it wholesale, 
and mark it if it does prove flaky) and see what the buildbots make of it, but 
I don't want to do that if it could cause anything worse than an exception.

Thoughts?

--
components: Tests, Windows
messages: 202887
nosy: brian.curtin, serhiy.storchaka, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Silently skipped test in test_winsound
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16510] Using appropriate checks in tests

2013-11-14 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
dependencies: +Use specific asserts in ctype tests, Use specific asserts in 
importlib tests, Use specific asserts in lib2to3 tests, Use specific asserts in 
unittest tests

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19589] Use specific asserts in test_asyncio

2013-11-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7e00bdada290 by Serhiy Storchaka in branch 'default':
Issue #19589: Use specific asserts in asyncio tests.
http://hg.python.org/cpython/rev/7e00bdada290

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19595] Silently skipped test in test_winsound

2013-11-14 Thread Zachary Ware

Changes by Zachary Ware :


--
stage:  -> test needed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19592] Use specific asserts in lib2to3 tests

2013-11-14 Thread Benjamin Peterson

Benjamin Peterson added the comment:

lgtm

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19596] Silently skipped tests in test_importlib

2013-11-14 Thread Zachary Ware

New submission from Zachary Ware:

Several tests in test_importlib are skipped by way of the test method 
consisting of a comment and a 'pass' statement.  The attached patch makes the 
skips explicit, using the removed comment as the reason.  Ideally these skipped 
tests should be removed from being 'tested' at all, since most of them are 
impossible to test, but I'm not sure how easy that would be to do.

--
components: Tests
files: skipped_importlib_tests.diff
keywords: patch
messages: 202890
nosy: brett.cannon, serhiy.storchaka, zach.ware
priority: normal
severity: normal
stage: patch review
status: open
title: Silently skipped tests in test_importlib
type: enhancement
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file32624/skipped_importlib_tests.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19592] Use specific asserts in lib2to3 tests

2013-11-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Should the patch be applied in maintenance releases?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19589] Use specific asserts in test_asyncio

2013-11-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Done.

--
assignee:  -> serhiy.storchaka
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19592] Use specific asserts in lib2to3 tests

2013-11-14 Thread Benjamin Peterson

Benjamin Peterson added the comment:

If you want.

2013/11/14 Serhiy Storchaka :
>
> Serhiy Storchaka added the comment:
>
> Should the patch be applied in maintenance releases?
>
> --
>
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close

2013-11-14 Thread Bernt Røskar Brenna

Bernt Røskar Brenna added the comment:

@neologix: But how do you explain this:

subprocess_devnull2  9 errors
subprocess_devnull1  OK

subprocess_devnull creates a file, then starts a subprocess (that redirects to 
DEVNULL, does not use the file), then tries to remove the directory containing 
the file. When running in parallel, it fails.

subprocess_noredirect 2  OK
subprocess_noredirect 1  OK

subprocess_noredirect creates a file, then starts a subprocess (that does not 
use the file), then tries to remove the directory containing the file. When 
running in parallel, it does not fail.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19588] Silently skipped test in test_random

2013-11-14 Thread Tim Peters

Tim Peters added the comment:

Nice catch!  That's insane.  `start` and `stop` should indeed be swapped, *and* 
the `return` should be `continue`.  I didn't write the test, but these things 
are obvious to my eyeballs ;-)

--
nosy: +tim.peters

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close

2013-11-14 Thread R. David Murray

R. David Murray added the comment:

neologix noted that *when redirection is used* the way that *all* windows file 
handles are inherited changes.  But that's about the end of *my* understanding 
of the issue :)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19595] Silently skipped test in test_winsound

2013-11-14 Thread R. David Murray

R. David Murray added the comment:

I believe that expected failure will give an error report if the test succeeds.

--
nosy: +r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19592] Use specific asserts in lib2to3 tests

2013-11-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c178d72e2f84 by Serhiy Storchaka in branch '2.7':
Issue #19592: Use specific asserts in lib2to3 tests.
http://hg.python.org/cpython/rev/c178d72e2f84

New changeset 46fc4fb2c8c5 by Serhiy Storchaka in branch '3.3':
Issue #19592: Use specific asserts in lib2to3 tests.
http://hg.python.org/cpython/rev/46fc4fb2c8c5

New changeset 1b9d8be8b07e by Serhiy Storchaka in branch 'default':
Issue #19592: Use specific asserts in lib2to3 tests.
http://hg.python.org/cpython/rev/1b9d8be8b07e

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19592] Use specific asserts in lib2to3 tests

2013-11-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It will be easier to backport fixes if tests are consistent.

--
assignee:  -> serhiy.storchaka
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed
versions: +Python 2.7, Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19437] More failures found by pyfailmalloc

2013-11-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c9efe992e9b2 by Victor Stinner in branch 'default':
Issue #19437: Fix parse_save_field() of the csv module, handle PyList_Append()
http://hg.python.org/cpython/rev/c9efe992e9b2

New changeset 98ac18544722 by Victor Stinner in branch 'default':
Issue #19437: Fix parse_envlist() of the posix/nt module, don't call
http://hg.python.org/cpython/rev/98ac18544722

New changeset 61a712066770 by Victor Stinner in branch 'default':
Issue #19429, #19437: fix error handling in the OSError constructor
http://hg.python.org/cpython/rev/61a712066770

New changeset f7d401eaee0e by Victor Stinner in branch 'default':
Issue #19437: Fix init_builtin(), handle _PyImport_FindExtensionObject()
http://hg.python.org/cpython/rev/f7d401eaee0e

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >