[issue19590] Use specific asserts in test_email

2013-11-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch which includes only added changes.

Such small and straightforward changes are easier to review by looking at 
colorized `hg diff` output.

--
Added file: http://bugs.python.org/file32630/test_email_asserts_2_diff.patch

___
Python tracker 

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



[issue19530] cross thread shutdown of UDP socket exhibits unexpected behavior

2013-11-14 Thread mpb

mpb added the comment:

Someone wrote a kernel patch based on my bug report.

http://www.spinics.net/lists/netdev/msg257653.html

--

___
Python tracker 

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



[issue19597] Add decorator for tests not yet implemented

2013-11-14 Thread Zachary Ware

Zachary Ware added the comment:

This patch takes the idea a little further, adding a command line option to 
regrtest, '--failnoimpl' (it could use a better name).

With this option specified any test decorated by support.not_implemented will 
not be marked as an expected failure, allowing the NotImplementedError 
exception to fail the test.  The default under regrtest is to expect the 
failure, but the default for running a test file directly is to fail loudly.  
The idea is just to make it more obvious when a test is just in need of 
implementation, and could make it easier for new contributors to find something 
that needs doing.

--
Added file: http://bugs.python.org/file32629/support.not_implemented.v2.diff

___
Python tracker 

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



[issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec)

2013-11-14 Thread Eric Snow

Eric Snow added the comment:

Cool.  Roundup linked the revision hash to the feature clone. :)

--

___
Python tracker 

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



[issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec)

2013-11-14 Thread Eric Snow

Eric Snow added the comment:

FYI, as of cc7ebd952777 the bulk of the implementation in features/pep-451 is 
working.

There is a failing test on the Windows Server 2003 buildbot (which I'm trying 
to track down).  I haven't been able to reproduce the failure on other 
buildbots, on my local Ubuntu 12.10 workstation, or on my local Windows laptop. 
 See 
http://buildbot.python.org/all/builders/x86%20Windows%20Server%202003%20%5BSB%5D%20custom/builds/30/steps/test/logs/stdio.

--

___
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 R. David Murray

R. David Murray added the comment:

Any chance of getting a patch with the just the added changes?  I'd rather not 
fish through the stuff I've already looked at looking for the new stuff.

I'm of two minds about the advisability of backporting this.

--

___
Python tracker 

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



[issue19553] PEP 453: "make install" and "make altinstall" integration

2013-11-14 Thread Ned Deily

Changes by Ned Deily :


--
assignee:  -> ned.deily

___
Python tracker 

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



[issue19598] Timeout in test_popen() of test_asyncio.test_windows_utils.PopenTests

2013-11-14 Thread Guido van Rossum

Guido van Rossum added the comment:

Likely. Can you suggest a fix?

--

___
Python tracker 

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



[issue19599] Failure of test_async_timeout() of test_multiprocessing_spawn: TimeoutError not raised

2013-11-14 Thread STINNER Victor

New submission from STINNER Victor:

http://buildbot.python.org/all/builders/x86%20Windows%20Server%202003%20%5BSB%5D%203.x/builds/1716/steps/test/logs/stdio
and
http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/7529/steps/test/logs/stdio

==
FAIL: test_async_timeout (test.test_multiprocessing_spawn.WithManagerTestPool)
--
Traceback (most recent call last):
  File 
"E:\Data\buildslave\cpython\3.x.snakebite-win2k3r2sp2-x86\build\lib\test\_test_multiprocessing.py",
 line 1726, in test_async_timeout
self.assertRaises(multiprocessing.TimeoutError, get, timeout=TIMEOUT2)
AssertionError: TimeoutError not raised by 


--
components: Tests
messages: 202914
nosy: haypo, sbt
priority: normal
severity: normal
status: open
title: Failure of test_async_timeout() of test_multiprocessing_spawn: 
TimeoutError not raised
versions: Python 3.4

___
Python tracker 

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



[issue19598] Timeout in test_popen() of test_asyncio.test_windows_utils.PopenTests

2013-11-14 Thread STINNER Victor

New submission from STINNER Victor:

http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/7528/steps/test/logs/stdio

...
test_popen (test.test_asyncio.test_windows_utils.PopenTests) ... FAIL
test_winsocketpair (test.test_asyncio.test_windows_utils.WinsocketpairTests) 
... ok
test_winsocketpair_exc 
(test.test_asyncio.test_windows_utils.WinsocketpairTests) ... ok

==
FAIL: test_popen (test.test_asyncio.test_windows_utils.PopenTests)
--
Traceback (most recent call last):
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_asyncio\test_windows_utils.py",
 line 123, in test_popen
self.assertEqual(res, _winapi.WAIT_OBJECT_0)
AssertionError: 258 != 0

--

258 is the Windows error code for timeout: WAIT_TIMEOUT.

The timeout of 2 seconds if maybe too short for busy and slow Windows buildbots?

--
messages: 202913
nosy: gvanrossum, haypo
priority: normal
severity: normal
status: open
title: Timeout in test_popen() of test_asyncio.test_windows_utils.PopenTests
versions: Python 3.4

___
Python tracker 

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



[issue19466] Clear state of threads earlier in Python shutdown

2013-11-14 Thread STINNER Victor

STINNER Victor added the comment:

The fix raised a new issue: #19565.

I also saw a crash on Windows which is probably related:

http://buildbot.python.org/all/builders/x86 Windows Server 2003 [SB] 
3.x/builds/1717/steps/test/logs/stdio 

==
FAIL: test_4_daemon_threads (test.test_threading.ThreadJoinOnShutdown)
--
Traceback (most recent call last):
  File 
"E:\Data\buildslave\cpython\3.x.snakebite-win2k3r2sp2-x86\build\lib\test\test_threading.py",
 line 783, in test_4_daemon_threads
rc, out, err = assert_python_ok('-c', script)
  File 
"E:\Data\buildslave\cpython\3.x.snakebite-win2k3r2sp2-x86\build\lib\test\script_helper.py",
 line 69, in assert_python_ok
return _assert_python(True, *args, **env_vars)
  File 
"E:\Data\buildslave\cpython\3.x.snakebite-win2k3r2sp2-x86\build\lib\test\script_helper.py",
 line 55, in _assert_python
"stderr follows:\n%s" % (rc, err.decode('ascii', 'ignore')))
AssertionError: Process return code is 3221225477, stderr follows:


--

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

___
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 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



[issue19590] Use specific asserts in test_email

2013-11-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

And here is a patch for 2.7.

--
versions: +Python 2.7
Added file: http://bugs.python.org/file32628/test_email_asserts_2-2.7.patch

___
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

Serhiy Storchaka added the comment:

Here is larger patch (some asserts were aliased). It is applicable to 3.3 too.

--
versions: +Python 3.3
Added file: http://bugs.python.org/file32627/test_email_asserts_2.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 Terry J. Reedy

Terry J. Reedy added the comment:

I think there are two counterargument to leaving things alone.

1. The reason for the specialized checks is to change behavior when the test 
fails, to give more informative error messages. So the change is not purely 
cosmetic or stylistic. I believe there was a recent case where assertTrue(a == 
b), a and b strings, had to be changed to assertEqual(a, b) to find out why the 
assert failed. As I remember, nothing else in the test file obviously needed 
changing and it would not have been touched otherwise.

2. People adding tests may not review existing tests for modernization.

That said, it *is* possible to ignore 2. and not worry about 1. until a test 
fails. And I agree that the original patch is too much to review.

--

___
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 Nick Coghlan

Nick Coghlan added the comment:

Aye, it would. The improved exception chaining and frame hiding ideas in
issue 18861 are also related.

The part I particularly like in Walter's suggestion is the idea of a "frame
description" that is displayed in the traceback for that frame, without the
traceback module needing to know the details of other annotations.

--

___
Python tracker 

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



[issue19597] Add decorator for tests not yet implemented

2013-11-14 Thread Zachary Ware

New submission from Zachary Ware:

Some tests in the test suite are not implemented for one reason or another, and 
most of these are defined simply as "def test_thats_not_implemented(self): 
pass", possibly with a comment meant to be a reminder to implement it.  This 
patch adds a decorator to test.support which turns the non-test into an 
expected failure with a docstring.  This means that when run in verbose mode, 
instead of showing:

"""
test_thats_not_implemented (test.test_sometest.TestClass) ... ok
"""

it will instead show:

"""
Not Implemented: TestClass.test_thats_not_implemented ... expected failure
"""

This should make it more obvious that such a test needs some work.  The patch 
also applies the decorator in test_minidom as an example; there are a few other 
places that could use it as well.

--
components: Tests
files: support.not_implemented.diff
keywords: patch
messages: 202907
nosy: ezio.melotti, michael.foord, pitrou, serhiy.storchaka, zach.ware
priority: normal
severity: normal
stage: patch review
status: open
title: Add decorator for tests not yet implemented
type: enhancement
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file32626/support.not_implemented.diff

___
Python tracker 

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



[issue19572] Report more silently skipped tests as skipped

2013-11-14 Thread Zachary Ware

Zachary Ware added the comment:

Here's a new patch to address the reviews from Serhiy and Ezio (thanks to you 
both!).

--
versions: +Python 2.7
Added file: http://bugs.python.org/file32625/skiptest_not_return_or_pass.v3.diff

___
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 R. David Murray

R. David Murray added the comment:

Looks fine to me.

--

___
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

Zachary Ware added the comment:

It doesn't appear to; at least on 3.4 an unexpected success is silently ignored 
by regrtest in non-verbose mode and added to the report in verbose mode (e.g., 
"OK (skipped=1, unexpected successes=1)") or when run alone.

--

___
Python tracker 

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



[issue19429] OSError constructor does not handle errors correctly

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



[issue19596] Silently skipped tests in test_importlib

2013-11-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I use `test_spam = None` to skip the test in a subclass and remove it from the 
report.

The question is which of these tests should be removed because they are 
senseless in specified subclass and which of them are just not implemented yet 
and should be reported in the report for reminder.

--

___
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 Antoine Pitrou

Antoine Pitrou added the comment:

I think this would need a PEP.

--
nosy: +ncoghlan, pitrou

___
Python tracker 

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



[issue19429] OSError constructor does not handle errors correctly

2013-11-14 Thread Roundup Robot

Roundup Robot added the comment:

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

--
nosy: +python-dev

___
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



[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



[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



[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



[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



[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 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



[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



[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 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



[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



[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

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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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 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



[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



[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



[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



[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



[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



[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



[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



[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



[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 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 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



[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



[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



[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



[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 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 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



[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



[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



[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



[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



[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



[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



[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



[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



[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 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



[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



[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 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



[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



[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



[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

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 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



[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



[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



[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



[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



[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



[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



[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



[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



  1   2   >