[issue12782] Multiple context expressions do not support parentheses for continuation across lines

2013-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is a discussion about this on Python-Ideas: http://comments.gmane.org/gmane.comp.python.ideas/17597 http://mail.python.org/pipermail/python-ideas/2012-October/017610.html -- nosy: +serhiy.storchaka ___

[issue13169] Regular expressions with 0 to 65536 repetitions raises OverflowError

2013-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: (In the latter case, why is it in decimal?) Because SRE_MAXREPEAT is generated (as all sre_constants.h) from sre_constants.py (note changes at the end of sre_constants.py). I agree, that SRE_MAXREPEAT is imposed by the C code limitation and it will be

[issue16208] getaddrinfo returns wrong results if IPv6 is disabled

2013-01-24 Thread Ralf Schmitt
Ralf Schmitt added the comment: Marc, I think you'll have to bring this up on the mailing list if you want to have anything changed. The developers on the nosy list have already closed this as wont fix. They don't care anymore. -- ___ Python

[issue17022] Inline assignation uses the newly created object

2013-01-24 Thread Gabriel Nistor
New submission from Gabriel Nistor: I am using Lubuntu x64 version and python 3.2.3 I have a tree search method: node = self while xpaths: xpath = xpaths.popleft() for path, child in node.childrens.items(): if path == xpath: node = child break else:

[issue17022] Inline assignation uses the newly created object

2013-01-24 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17022 ___ ___ Python-bugs-list

[issue9669] regexp: zero-width matches in MIN_UNTIL

2013-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Can you please provide the tests? -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9669 ___

[issue17023] Subprocess does not find executable on Windows if it is PATH with quotes

2013-01-24 Thread Pekka Klärck
New submission from Pekka Klärck: If you add a directory into PATH on Windows so that the directory is in quotes, subprocess does not find executables in it. They are found by the operating system, though, at least when run on the command prompt. To reproduce: C:\python --version Python

[issue13169] Regular expressions with 0 to 65536 repetitions raises OverflowError

2013-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Patch updated for addressing Ezio's and Matthew's comments. MAXREPEAT now defined in the C code. It lowered to 2G on 32-bit platform to fit repetition numbers into Py_ssize_t. The condition for raising of an exception now more complex: if the repetition

[issue13169] Regular expressions with 0 to 65536 repetitions raises OverflowError

2013-01-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file28810/re_maxrepeat2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13169 ___

[issue17022] Inline assignment uses the newly created object

2013-01-24 Thread R. David Murray
R. David Murray added the comment: I agree that this is somewhat surprising, but it is working as intended. a = b = c is equivalent to a = c b = c except that the RHS is evaluated only once, which can be important. You were either expecting it to be equivalent to b = c a = c

[issue15340] OSError with import random when /dev/urandom doesn't exist (regression from 2.6)

2013-01-24 Thread Richard Wall
Richard Wall added the comment: This bug also causes problems when you try to install Python in a Linux chroot environment or systemd-nspawn - before mounting devtmpfs. For example, this Redhat bug yum traceback with python-2.6.6-29.el6_2.2 and higher + missing /dev/urandom *

[issue12323] ElementPath 1.3 expressions

2013-01-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 56a4561600ad by Eli Bendersky in branch 'default': Issue #12323: Strengthen error checking of the position XPath selectors http://hg.python.org/cpython/rev/56a4561600ad -- nosy: +python-dev ___ Python

[issue12323] ElementPath 1.3 expressions

2013-01-24 Thread Eli Bendersky
Eli Bendersky added the comment: Agreed. I strengthened the error checking when parsing the path, so now hopefully many non-sensical positions will be rejected. Note that this is only for the default branch (the future Python 3.4), because I don't think this is important enough to warrant

[issue17024] cElementTree calls end() on parser taget even if start() fails

2013-01-24 Thread Stefan Behnel
New submission from Stefan Behnel: The following compatibility unit test fails for me in lxml since Py3.3. etree = xml.etree.ElementTree def test_parser_target_error_in_start(self): assertEqual = self.assertEqual events = [] class Target(object):

[issue17024] cElementTree calls end() on parser taget even if start() fails

2013-01-24 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17024 ___

[issue9708] cElementTree iterparse does not support parser argument

2013-01-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset cce526a28f81 by Eli Bendersky in branch '3.3': Issue #9708: Fix support for iterparse(parser=...) argument per documentation. http://hg.python.org/cpython/rev/cce526a28f81 New changeset 0c9268ac3ffa by Eli Bendersky in branch 'default': Issue

[issue9708] cElementTree iterparse does not support parser argument

2013-01-24 Thread Eli Bendersky
Eli Bendersky added the comment: Support added in 3.3 and default Documentation patches should be done for 2.7 and 3.2 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9708 ___

[issue9708] cElementTree iterparse does not support parser argument

2013-01-24 Thread Eli Bendersky
Eli Bendersky added the comment: Fix to 3.2 committed in 5b02d622d625 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9708 ___ ___

[issue14462] In re's named group the name cannot contain unicode characters

2013-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch which make re to use for groups the same rule as for Python 3 identifiers. In Python 2 the implementation confirms the documentation. -- keywords: +patch nosy: +serhiy.storchaka stage: needs patch - patch review versions: +Python 3.4

[issue9708] cElementTree iterparse does not support parser argument

2013-01-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8f2edea69d5d by Eli Bendersky in branch '2.7': Issue #9708: clarify doc of iterparse - cElementTree doesn't support the parser argument http://hg.python.org/cpython/rev/8f2edea69d5d -- ___ Python

[issue9708] cElementTree iterparse does not support parser argument

2013-01-24 Thread Eli Bendersky
Changes by Eli Bendersky eli...@gmail.com: -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9708 ___

[issue17025] reduce multiprocessing.Queue contention

2013-01-24 Thread Charles-François Natali
New submission from Charles-François Natali: Here's an implementation of the idea posted on python-ideas (http://mail.python.org/pipermail/python-ideas/2013-January/018846.html). The principle is really simple, we just serialize/unserialize the objects before/after holding the locks. This

[issue17025] reduce multiprocessing.Queue contention

2013-01-24 Thread Charles-François Natali
Changes by Charles-François Natali cf.nat...@gmail.com: Added file: http://bugs.python.org/file28813/multi_queue.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17025 ___

[issue17025] reduce multiprocessing.Queue contention

2013-01-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here's an implementation of the idea posted on python-ideas (http://mail.python.org/pipermail/python-ideas/2013-January/018846.html). The principle is really simple, we just serialize/unserialize the objects before/after holding the locks. This leads to

[issue16993] shutil.which() should preserve path case

2013-01-24 Thread Stefan Krah
Stefan Krah added the comment: Serhiy, test_pathext_checking still fails on many Windows buildbots: http://buildbot.python.org/all/waterfall?category=3.x.stablecategory=3.x.unstable -- nosy: +skrah status: closed - open ___ Python tracker

[issue17026] pdb frames accessible after the termination occurs on uncaught exception

2013-01-24 Thread Xavier de Gaye
New submission from Xavier de Gaye: The following test illustrates the problem. script.py contains the line 1 / 0. The 'bt' command is also wrong. $ python3 -m pdb script.py /tmp/script.py(1)module() - 1 / 0 (Pdb) continue Traceback (most recent call last): File

[issue16954] Add docstrings for ElementTree module

2013-01-24 Thread Ezio Melotti
Ezio Melotti added the comment: I would suggest to adapt the comments to follow PEP 257, and in particular: The docstring is a phrase ending in a period. It prescribes the function or method's effect as a command (Do this, Return that), not as a description; e.g. don't write Returns the

[issue16795] Patch: some changes to AST to make it more useful for static language analysis

2013-01-24 Thread Sven Brauch
Sven Brauch added the comment: I have signed the contributor agreement and sent a scan to the specified mail address (received no reply so far, but I guess that's okay). Did anyone happen to find the time to look at the patches yet? Greetings, Sven --

[issue16954] Add docstrings for ElementTree module

2013-01-24 Thread Eli Bendersky
Eli Bendersky added the comment: On Thu, Jan 24, 2013 at 10:02 AM, Ezio Melotti rep...@bugs.python.orgwrote: Ezio Melotti added the comment: I would suggest to adapt the comments to follow PEP 257, and in particular: The docstring is a phrase ending in a period. It prescribes the

[issue16993] shutil.which() should preserve path case

2013-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you, Stefan. This relates to issue16957. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16993 ___

[issue16954] Add docstrings for ElementTree module

2013-01-24 Thread Ezio Melotti
Ezio Melotti added the comment: The docs should use return too, even though I'm not sure this is enforced. Consistency within the doc page is more important, but I don't think that consistency between comments and docstrings in the code or between docstrings and documentation is so

[issue16701] Docs missing the behavior of += (in-place add) for lists.

2013-01-24 Thread benrg
benrg added the comment: AFAIK in C x += 1 is equivalent to x++, and both are semantically more about incrementing (mutating) the value of x than about creating a new value that gets assigned to x. Likewise it seems to me more natural to interpret x += y as add the value of y to the object x

[issue16795] Patch: some changes to AST to make it more useful for static language analysis

2013-01-24 Thread Benjamin Peterson
Benjamin Peterson added the comment: Thanks for signing the agreement. I'll try to look at the patches by the end of this weekend. Sorry for the delay. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16795

[issue13169] Regular expressions with 0 to 65536 repetitions raises OverflowError

2013-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Patch updated for addressing Ezio's comments. Tests simplified and optimized a little as Ezio suggested. Added a test for implementation dependent behavior (I hope it will gone away at some day). -- Added file:

[issue16954] Add docstrings for ElementTree module

2013-01-24 Thread David Lam
David Lam added the comment: I had an innocent question about the format to use when listing function arguments in docstrings. In the PEP 257 doc, there's a single example: def complex(real=0.0, imag=0.0): Form a complex number. Keyword arguments: real -- the real

[issue16954] Add docstrings for ElementTree module

2013-01-24 Thread Ezio Melotti
Ezio Melotti added the comment: (or maybe this is just a use-your-common-sense thing) That's probably the best thing. I don't think we follow any specific convention for args in the docstring. Mostly they are just described in the text, without having lists of args. --

[issue10156] Initialization of globals in unicodeobject.c

2013-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is a set of updated patches. -- Added file: http://bugs.python.org/file28815/unicode_globals-2.7_2.patch Added file: http://bugs.python.org/file28816/unicode_globals-3.2_2.patch Added file:

[issue10156] Initialization of globals in unicodeobject.c

2013-01-24 Thread Nick Coghlan
Nick Coghlan added the comment: Serhiy's general approach here looks good to me (although there seem to be some unrelated changes to the re module in the current 3.2 patch). For PEP 432, I want to try to rearrange things so that _PyUnicode_Init is one of the *first* calls made in

[issue12323] ElementPath 1.3 expressions

2013-01-24 Thread Stefan Behnel
Stefan Behnel added the comment: I agree that [0] should be treated as a visible error as it's easy to get wrong. It's certainly too late to change this to 0-based indexing and I think it's ok to keep it 1-based for XPath compatibility (or at least similarity) as that's what people will

[issue12323] ElementPath 1.3 expressions

2013-01-24 Thread Eli Bendersky
Eli Bendersky added the comment: I agree that [0] should be treated as a visible error as it's easy to get wrong. It's certainly too late to change this to 0-based indexing and I think it's ok to keep it 1-based for XPath compatibility (or at least similarity) as that's what people will

[issue12323] ElementPath 1.3 expressions

2013-01-24 Thread Stefan Behnel
Stefan Behnel added the comment: Yes, I think it makes sense to be rigid now and *maybe* add a new feature later. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12323 ___

[issue16968] Fix test discovery for test_concurrent_futures.py

2013-01-24 Thread Zachary Ware
Zachary Ware added the comment: I'm at a loss on this one. I tried a few different methods of wrapping the tests in load_tests(), I tried doing support.threading_setup() in setUpModule and support.threading_cleanup() in tearDownModule, tried the same in each test class (following the example

[issue16335] Integer overflow in unicode-escape decoder

2013-01-24 Thread Stefan Krah
Stefan Krah added the comment: I just ran the 2.7 tests while dealing with another issue, and I'm getting a memory error or excessive swapping in test_ucn: The statement x = b'\\N{SPACE' + b'x' * int(_testcapi.UINT_MAX + 1) + b'}' uses over 8GB on my system, so I think that

[issue17020] random.random() generating values = 1.0

2013-01-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: Can you show how you determined that you got a value = 1.0 or provide a seed that reproduces the problem? I'm not seeing an issue on the 2.7.3 64-bit Mac build: from itertools import starmap, repeat from random import random, seed

[issue17027] support for drag and drop of files to tkinter application

2013-01-24 Thread Sarbjit singh
New submission from Sarbjit singh: It would be nice to have a support to drop the files (files from the file explorer i.e. from outside the application) to the tkinter application which could then set the file path/ directory path depending upon the configuration set in the module. This

[issue17020] random.random() generating values = 1.0

2013-01-24 Thread Floris van Manen
Floris van Manen added the comment: It is in the combination with jumpahead(), getstate(), setstate() that you'll experience random() to produce values = 1.0 .F On 25 Jan 2013, at 06:24, Raymond Hettinger wrote: Raymond Hettinger added the comment: Can you show how you determined that