[issue19525] Strict indentation in Python3

2013-11-08 Thread Sworddragon
Sworddragon added the comment: Thanks for the example, this is what I had in mind. Python 3 does also still provide the -t option (I'm assuming for compatibility reasons) but python3 -h and the manpage aren't saying about this. -- ___ Python tracker

[issue19518] Add new PyRun_xxx() functions to not encode the filename

2013-11-08 Thread Nick Coghlan
Nick Coghlan added the comment: PEP 432 doesn't really touch the PyRun_* APIs - it's all about refactoring Py_Initialize so you can use most of the C API during the latter parts of the configuration process (e.g. setting up the path for the import system). pythonrun.c is just a monstrous beast t

[issue19526] Review additions to the stable ABI of Python 3.4

2013-11-08 Thread STINNER Victor
New submission from STINNER Victor: Example: http://hg.python.org/cpython/rev/69071054b42f PyAPI_FUNC(int) _PyDict_DelItemId(PyObject *mp, struct _Py_Identifier *key); New functions added in this issue should also be reviewed (should them be part of the stable ABI?): http://bugs.python.org/is

[issue19526] Review additions to the stable ABI of Python 3.4

2013-11-08 Thread STINNER Victor
STINNER Victor added the comment: "Priority: release blocker" means that it should be done at least before Python 3.4 final. It may be delayed after the beta1. -- nosy: +larry priority: normal -> release blocker ___ Python tracker

[issue19527] Test failures with COUNT_ALLOCS

2013-11-08 Thread Bohuslav "Slavek" Kabrda
New submission from Bohuslav "Slavek" Kabrda: When Python is compiled with COUNT_ALLOCS, some tests in test_gc and test_module fail. I'm attaching the patch that skips 3 of them and modifies assertions in one of them, so that the tests pass. I'm however still unsure about one of the skipped te

[issue19527] Test failures with COUNT_ALLOCS

2013-11-08 Thread Bohuslav "Slavek" Kabrda
Bohuslav "Slavek" Kabrda added the comment: And the patch... -- keywords: +patch Added file: http://bugs.python.org/file32540/00141-fix-tests_with_COUNT_ALLOCS.patch ___ Python tracker

[issue19527] Test failures with COUNT_ALLOCS

2013-11-08 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue19524] ResourceWarning when urlopen() forgets the HTTPConnection object

2013-11-08 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue19526] Review additions to the stable ABI of Python 3.4

2013-11-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset bf9c77bac36d by Victor Stinner in branch 'default': Issue #19512, #19526: Exclude the new _PyDict_DelItemId() function from the http://hg.python.org/cpython/rev/bf9c77bac36d -- nosy: +python-dev ___ Pytho

[issue19512] Avoid temporary Unicode strings, use identifiers to only create the string once

2013-11-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset bf9c77bac36d by Victor Stinner in branch 'default': Issue #19512, #19526: Exclude the new _PyDict_DelItemId() function from the http://hg.python.org/cpython/rev/bf9c77bac36d -- ___ Python tracker

[issue19515] Share duplicated _Py_IDENTIFIER identifiers in C code

2013-11-08 Thread Martin v . Löwis
Martin v. Löwis added the comment: I'd be +0 on extracting common identifiers. I see a slight increase of readability, and expect a slight reduction of memory usage, and a tiny reduction in runtime. It's not really worth the effort, but I fail to see that it causes harm. I see no point in rev

[issue8799] Hang in lib/test/test_threading.py

2013-11-08 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Here is an updated patch that only adds the necessary safety delay to the main thread. It also explains these in the comments. -- Added file: http://bugs.python.org/file32541/lock_tests.patch ___ Python trac

[issue19515] Share duplicated _Py_IDENTIFIER identifiers in C code

2013-11-08 Thread STINNER Victor
STINNER Victor added the comment: 2013/11/8 Martin v. Löwis : > I'd be +0 on extracting common identifiers. I (...) expect a slight reduction > of memory usage, and a tiny reduction in runtime. Only duplicated Py_IDENTIFIER structures would be removed in memory, but these structures are very sm

[issue18861] Problems with recursive automatic exception chaining

2013-11-08 Thread Nick Coghlan
Nick Coghlan added the comment: I actually think Nikratio is right about the way this *should* work (intuitively). I'm just not sure it's feasible to *implement* those semantics in CPython without significant changes to the way exception handling works - I don't believe the exception chaining

[issue19528] logger.config.fileConfig cant cope with files starting with an 'r' on windows

2013-11-08 Thread Eric V. Smith
Eric V. Smith added the comment: It looks like you need to use double-backslashes everywhere in your path, or use single backslashes and raw strings (r""). -- nosy: +eric.smith resolution: -> invalid status: open -> closed ___ Python tracker

[issue19528] logger.config.fileConfig cant cope with files starting with an 'r' on windows

2013-11-08 Thread Simon Naish
Simon Naish added the comment: I am using double backslashes in my path. But logger\config.py is losing them, please re-read the issue description, logger\config.py is part of the python libraries! -- ___ Python tracker

[issue19528] logger.config.fileConfig cant cope with files starting with an 'r' on windows

2013-11-08 Thread Eric V. Smith
Eric V. Smith added the comment: Apologies for reading too quickly. I've reopened this. -- resolution: invalid -> status: closed -> open ___ Python tracker ___ _

[issue19528] logger.config.fileConfig cant cope with files starting with an 'r' on windows

2013-11-08 Thread Simon Naish
New submission from Simon Naish: When attempting to use a config file with logging to set up a series of loggers in a script, when running on windows, if the config file name starts with an 'r' then the script fails with the following error:- File "C:\Users\simon\Documents\python dev\Reposito

[issue18235] _sysconfigdata.py wrong on AIX installations

2013-11-08 Thread Michael Haubenwallner
Michael Haubenwallner added the comment: Actually, ld_so_aix is autogenerated from ld_so_aix.in into builddir, while makexp_aix is not. Attached patch eventually might fix the test too? -- nosy: +haubi Added file: http://bugs.python.org/file32542/python-tip-aix-absbuilddir.patch _

[issue19528] logger.config.fileConfig cant cope with files starting with an 'r' on windows

2013-11-08 Thread Eric V. Smith
Eric V. Smith added the comment: Can you provide a small, stand-alone program that demonstrates the problem? In particular, I want to see how this filename is provided to logging. -- ___ Python tracker ___

[issue19528] logger.config.fileConfig cant cope with files starting with an 'r' on windows

2013-11-08 Thread Simon Naish
Simon Naish added the comment: Example proggie. It writes its own config file (really_cool_logging.conf), then attempts to read it, all to ~/testlog If you inherit from the class FileLogger with any other class you get instant access to self.log. which will write debug and above to ~/testlog

[issue19529] Fix unicode_aswidechar() with 4byte unicode and 2byte wchar_t, for AIX

2013-11-08 Thread Michael Haubenwallner
New submission from Michael Haubenwallner: The problem raises during build already when trying to run setup.py, where ./python is unavailable to locate the 'encodings' module and aborts. It turns out that (some of) the filenames searched for are broken due to wrong conversion from unicode (acr

[issue19528] logger.config.fileConfig cant cope with files starting with an 'r' on windows

2013-11-08 Thread Simon Naish
Simon Naish added the comment: Updated TestFileLogger, missed a line out in my rush to get you something, sorry! -- Added file: http://bugs.python.org/file32545/TestFileLogger.py ___ Python tracker ___

[issue19528] logger.config.fileConfig cant cope with files starting with an 'r' on windows

2013-11-08 Thread Simon Naish
Simon Naish added the comment: And again. Damn! -- Added file: http://bugs.python.org/file32546/TestFileLogger.py ___ Python tracker ___ _

[issue19528] logger.config.fileConfig cant cope with files starting with an 'r' on windows

2013-11-08 Thread Eric V. Smith
Changes by Eric V. Smith : -- resolution: invalid -> status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue16803] Make test_import & test_importlib run tests under both _frozen_importlib and importlib._bootstrap

2013-11-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset b26e6e3e8037 by Brett Cannon in branch 'default': Issue #16803: test.test_importlib.frozen now runs both frozen and source code http://hg.python.org/cpython/rev/b26e6e3e8037 -- ___ Python tracker

[issue19528] logger.config.fileConfig cant cope with files starting with an 'r' on windows

2013-11-08 Thread Peter Otten
Peter Otten added the comment: Simon, in your code you build the config file with '''... args=('{0}', 'a', 131072, 10) ... '''.format(filename) The logging module uses eval() to process the args tuple, and a filename containing a bashlash will not roundtrip that way. Have a look at the .conf

[issue18235] _sysconfigdata.py wrong on AIX installations

2013-11-08 Thread David Edelsohn
David Edelsohn added the comment: +1 -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org

[issue19529] Fix unicode_aswidechar() with 4byte unicode and 2byte wchar_t, for AIX

2013-11-08 Thread David Edelsohn
David Edelsohn added the comment: LGTM -- nosy: +David.Edelsohn ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue19521] parallel build race condition on AIX since python-3.2

2013-11-08 Thread David Edelsohn
David Edelsohn added the comment: +1 -- nosy: +David.Edelsohn ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue19528] logger.config.fileConfig cant cope with files starting with an 'r' on windows

2013-11-08 Thread Simon Naish
Simon Naish added the comment: Hi Peter, Oh well spotted! Fair enough, but that is seriously not obvious, thanks. Si -- ___ Python tracker ___

[issue18874] Add a new tracemalloc module to trace memory allocations

2013-11-08 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file32494/022955935ba3.patch ___ Python tracker ___ ___ Python-bugs-list mail

[issue18874] Add a new tracemalloc module to trace memory allocations

2013-11-08 Thread STINNER Victor
STINNER Victor added the comment: Patch updated to the latest version of the PEP 454. -- Added file: http://bugs.python.org/file32547/69fd2d766005.patch ___ Python tracker ___ __

[issue19528] logger.config.fileConfig cant cope with files starting with an 'r' on windows

2013-11-08 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks, Peter. -- resolution: -> invalid stage: -> committed/rejected status: open -> closed type: -> behavior ___ Python tracker ___

[issue16803] Make test_import & test_importlib run tests under both _frozen_importlib and importlib._bootstrap

2013-11-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6c998d72553a by Brett Cannon in branch 'default': Issue #16803: test.test_importlib.import_ now tests frozen and source code http://hg.python.org/cpython/rev/6c998d72553a -- ___ Python tracker

[issue18923] Use the new selectors module in the subprocess module

2013-11-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 71b618f0c8e9 by Charles-François Natali in branch 'default': Issue #18923: Update subprocess to use the new selectors module. http://hg.python.org/cpython/rev/71b618f0c8e9 -- nosy: +python-dev ___ Python

[issue16803] Make test_import & test_importlib run tests under both _frozen_importlib and importlib._bootstrap

2013-11-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset b0f570aef6fd by Brett Cannon in branch 'default': Issue #16803: test.test_importlib.source now tests frozen and source code http://hg.python.org/cpython/rev/b0f570aef6fd -- ___ Python tracker

[issue16261] Fix bare excepts in various places in std lib

2013-11-08 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue16803] Make test_importlib run tests under both _frozen_importlib and importlib._bootstrap

2013-11-08 Thread Brett Cannon
Brett Cannon added the comment: test_importlib now runs both frozen and source code for all relevant tests. Should allow for making changes in the source w/o recompiling and making sure any source tests pass. Also makes sure the pure Python implementation of import that mirrors what import.c d

[issue19437] More failures found by pyfailmalloc

2013-11-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 08c81db35959 by Victor Stinner in branch '3.3': Issue #19437: Fix convert_op_cmp() of decimal.Decimal rich comparator, handle http://hg.python.org/cpython/rev/08c81db35959 New changeset 3ff670a83c73 by Victor Stinner in branch '3.3': Issue #19437: F

[issue17621] Create a lazy import loader mixin

2013-11-08 Thread Brett Cannon
Brett Cannon added the comment: Shifting this to Python 3.5 to rework using the forthcoming PEP 451 APIs which have been designed to explicitly allow for a lazy loader. -- versions: +Python 3.5 -Python 3.4 ___ Python tracker

[issue17630] Create a pure Python zipfile importer

2013-11-08 Thread Brett Cannon
Brett Cannon added the comment: This is going to need a touch-up for PEP 451 to make the whole thing work more smoothly, so repositioning for Python 3.5. When that happens I can look into the 2 second issue that Amaury pointed out and Paul's review. Although I do wonder about the utility of th

[issue19523] logging.FileHandler - using of delay argument case handle leaks

2013-11-08 Thread Vinay Sajip
Changes by Vinay Sajip : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue16803] Make test_importlib run tests under both _frozen_importlib and importlib._bootstrap

2013-11-08 Thread Eric Snow
Eric Snow added the comment: Hurray! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org

[issue16261] Fix bare excepts in various places in std lib

2013-11-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: The earlier #15313 is about removing bare excepts in Idle code. These should be handled separately for two reasons. 1. Changes can and in most cases should be backported. 2. As with any other Python-coded application, uncaught exceptions cause Idle to quit. Cur

[issue15313] IDLE - remove all bare excepts

2013-11-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: RA's patch for #16261 suggests diff -r b76d2d8db81f Lib/idlelib/PyShell.py --- a/Lib/idlelib/PyShell.pyMon Dec 17 13:43:14 2012 +0530 +++ b/Lib/idlelib/PyShell.pyWed Jan 09 19:10:26 2013 +0530 @@ -152,7 +152,7 @@ lineno = int(float(text.index("i

[issue10197] subprocess.getoutput fails on win32

2013-11-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: Is this ready to be reclosed? -- nosy: +terry.reedy ___ Python tracker ___ ___ Python-bugs-list mail

[issue19479] textwrap.dedent doesn't work properly with strings containing CRLF

2013-11-08 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +georg.brandl, terry.reedy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue19486] Bump up version of Tcl/Tk in building Python in Windows platform

2013-11-08 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +loewis ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue19491] Python Crashing When Saving Documents

2013-11-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: Exactly what are people doing in the save dialog when they have problems? If they are saving to a standard path under Computer (on the left side bar), there should be no problem. If they are saving to some place listed under Libraries, such as Documents, then

[issue19491] Python Crashing When Saving Documents

2013-11-08 Thread STINNER Victor
STINNER Victor added the comment: > There doesn't seem to be a Pygame version for 3.3 on the pygame webpage? Can't you try just to reproduce the crash in IDLE without installing pygame? (I don't know if pygame is available for Python 3.3.) -- ___ Py

[issue19499] "import this" is cached in sys.modules

2013-11-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: The current ugly, implicit, complex ROT13? + custom decoder version of this.py violates the initial tenets that it prints. I suppose that is an intentional joke. If it were explicit and simple: text = ''' ...''' print(text) then people could follow up impo

[issue19529] Fix unicode_aswidechar() with 4byte unicode and 2byte wchar_t, for AIX

2013-11-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: By 'crash' ('abort'), do you mean segfault (or Windows equivalent) or an exit with traceback? 3.2 only gets security patches. Do you think this is a security issue? Does the problem exist with the latest 3.3 or 3.4? -- nosy: +georg.brandl, terry.reedy

[issue19529] Fix unicode_aswidechar() with 4byte unicode and 2byte wchar_t, for AIX

2013-11-08 Thread STINNER Victor
STINNER Victor added the comment: The bug is obvious and patch looks good to me. The problem is that Python 3.2 doesn't accept bugfixes anymore, any security fixes. http://www.python.org/dev/peps/pep-0392/ 3.2.5 schedule (regression fix release) 3.2.5 final: May 13, 2013 -- Only security

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

2013-11-08 Thread Eric Snow
Eric Snow added the comment: I've created a server-side clone for the implementation: http://hg.python.org/features/pep-451/ -- ___ Python tracker ___ __

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

2013-11-08 Thread mpb
New submission from mpb: I have a multi-threaded application. A background thread is blocked, having called recvfrom on a UDP socket. The main thread wants to cause the background thread to unblock. With TCP sockets, I can achieve this by calling: sock.shutdown (socket.SHUT_RD) When I try this w

[issue11849] glibc allocator doesn't release all free()ed memory

2013-11-08 Thread STINNER Victor
STINNER Victor added the comment: I just found this issue from this article: http://python.dzone.com/articles/diagnosing-memory-leaks-python Great job! Using mmap() for arenas is the best solution for this issue. I did something similar on a completly different project (also using its own dedi

[issue11849] glibc allocator doesn't release all free()ed memory

2013-11-08 Thread Tim Peters
Tim Peters added the comment: [@haypo] > http://python.dzone.com/articles/diagnosing-memory-leaks-python > Great job! Using mmap() for arenas is the best solution for this issue. ? I read the article, and they stopped when they found "there seemed to be a ton of tiny little objects around, lik

[issue19249] Enumeration.__eq__

2013-11-08 Thread Ethan Furman
Ethan Furman added the comment: Given that __eq__ isn't adding anything, I think removing it is a fine option. -- keywords: +patch Added file: http://bugs.python.org/file32548/issue19249.stoneleaf.01.patch ___ Python tracker

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

2013-11-08 Thread Eric Snow
Eric Snow added the comment: Okay, I've updated the pep451 branch in the clone to include as much of the implementation as I've completed, which is the bulk of the functional changes. It's enough to pass the test suite. Here's what I'd like to get done before the feature freeze (in this prior

[issue19531] Loading -OO bytecode files if -O was requested can lead to problems

2013-11-08 Thread Sworddragon
New submission from Sworddragon: The documentation says that -OO does remove docstrings so applications should be aware of it. But there is also a case where a valid declared docstring isn't accessible anymore if -O is given. First the testcase: test1.py: import test2 def test1(): """

[issue19532] compileall -f doesn't force to write bytecode files

2013-11-08 Thread Sworddragon
New submission from Sworddragon: The force-option from compileall seems not to rebuild the bytecode files if they already exist. Here is an example of 2 calls: root@ubuntu:~# python3 -m compileall -f Skipping current directory Listing '/usr/lib/python3.3'... Compiling '/usr/lib/python3.3/__phel

[issue18923] Use the new selectors module in the subprocess module

2013-11-08 Thread Charles-François Natali
Changes by Charles-François Natali : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

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

2013-11-08 Thread Charles-François Natali
Charles-François Natali added the comment: > When I try this with a UDP socket, the thread calling shutdown > raises an OS Error (transport end point not connected). Which is normal, since UDP sockets aren't connected. > In contrast, sock.close does not cause the blocked thread to unblock. > (

[issue18874] Add a new tracemalloc module to trace memory allocations

2013-11-08 Thread Charles-François Natali
Changes by Charles-François Natali : Added file: http://bugs.python.org/file32549/3bf73dcd0b42.diff ___ Python tracker ___ ___ Python-bugs-lis

[issue19533] Unloading docstrings from memory if -OO is given

2013-11-08 Thread Sworddragon
New submission from Sworddragon: Using -OO on a script will remove the __doc__ attributes but the docstrings will still be in the process memory. In the attachments is an example script which demonstrates this with a docstring of ~10 MiB (opening the file in an editor can need some time). Call