[issue22401] argparse: 'resolve' conflict handler damages the actions of the parent parser

2014-09-18 Thread paul j3
Changes by paul j3 ajipa...@gmail.com: Added file: http://bugs.python.org/file36648/sample3.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22401 ___ ___

[issue22401] argparse: 'resolve' conflict handler damages the actions of the parent parser

2014-09-18 Thread paul j3
Changes by paul j3 ajipa...@gmail.com: Removed file: http://bugs.python.org/file36635/sample3.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22401 ___

[issue22430] Build failure if configure flags --prefix or --exec-prefix is set

2014-09-18 Thread diff 812
diff 812 added the comment: Found problem. After generating Makefile if comment string, contain LD_CONFIG_PATH all build success. Operating system Gentooo, python version 2.7.8 from ebuild and downloaded from origin site. # gcc -v Using built-in specs.

[issue19380] Optimize parsing of regular expressions

2014-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Actually if x: is slightly faster than if x is not None: on current implementation. -- Added file: http://bugs.python.org/file36649/re_parse_3.patch ___ Python tracker rep...@bugs.python.org

[issue22410] Locale dependent regexps on different locales

2014-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, it is possible to build full property table for bytes regexps at regexp compile time. But it is impossible for unicode regexps (issue22407). And in any case this doesn't solve original problem: re.match(pattern, string, re.L|re.I) can return unexpected

[issue22415] Fix re debugging output

2014-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If there are no objections I'll commit the patch soon. -- assignee: - serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22415 ___

[issue22434] Use named constants internally in the re module

2014-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If there are no objections I'll commit the patch soon. -- assignee: - serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22434 ___

[issue22362] Warn about octal escapes 0o377 in re

2014-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Warning or exception? This is a question. -- assignee: - serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22362 ___

[issue20678] re does not allow back references in {} matching operator

2014-09-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - not a bug stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20678 ___

[issue1519638] Unmatched Group issue - workaround

2014-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch which make unmatched groups to be replaced by empty string. These changes looks rather as new feature than bug fix and therefore can be applied only to 3.5. -- components: +Library (Lib) keywords: +patch nosy: +serhiy.storchaka

[issue22410] Locale dependent regexps on different locales

2014-09-18 Thread Matthew Barnett
Matthew Barnett added the comment: When you lookup the pattern in the cache, include the current locale as part of the key if the pattern is locale-sensitive (you can let it be None if the pattern is not locale-sensitive). -- ___ Python tracker

[issue22362] Warn about octal escapes 0o377 in re

2014-09-18 Thread STINNER Victor
STINNER Victor added the comment: Warning or exception? This is a question. Using -Werror, warnings raise exceptions :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22362 ___

[issue22382] sqlite3 connection built from apsw connection should raise IntegrityError, not DatabaseError

2014-09-18 Thread william tonkin
Changes by william tonkin wmton...@gmail.com: -- nosy: +ghaering ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22382 ___ ___ Python-bugs-list

[issue22362] Warn about octal escapes 0o377 in re

2014-09-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: This is an error, so it should really be an exception. There's no use case for being lenient, IMO. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22362

[issue22435] socketserver.TCPSocket leaks socket to garbage collector if server_bind() fails

2014-09-18 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22435 ___ ___ Python-bugs-list mailing

[issue19380] Optimize parsing of regular expressions

2014-09-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: is not None is more readable, though. When using plain boolean testing, it's never obvious whether you can have a zero-length string, a null number, etc. -- ___ Python tracker rep...@bugs.python.org

[issue16827] Remove the relatively advanced content from section 2 in tutorial

2014-09-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2e3a81a0fa14 by Senthil Kumaran in branch '2.7': Issue #16827: Make Interpreter introduction section of the tutorial more https://hg.python.org/cpython/rev/2e3a81a0fa14 New changeset 1e81c7a261a7 by Senthil Kumaran in branch '3.4': Issue #16827:

[issue16827] Remove the relatively advanced content from section 2 in tutorial

2014-09-18 Thread Senthil Kumaran
Senthil Kumaran added the comment: I addressed Berker Peksag's review comments on Jame's patch, tested the local building of docs, verified the content and looks. Committed this in 2.7, 3.4 and 3.5. Thank you all! -- assignee: docs@python - orsenthil resolution: - fixed stage: patch

[issue22410] Locale dependent regexps on different locales

2014-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch which implements Matthew's suggestion. It significant slow down the use of locale-sensitive regular expressions, there is a possibility for race condition between compiling and matching, and it doesn't solve the issue for explicitly cached

[issue22410] Locale dependent regexps on different locales

2014-09-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Rather than introduce a perf regression in 2.7 and 3.4, I would suggest to simply fix the issue in 3.5. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22410

[issue22410] Locale dependent regexps on different locales

2014-09-18 Thread Matthew Barnett
Matthew Barnett added the comment: @Serhiy: You're overlooking that the LOCALE flag could be inline, e.g. r'(?L)\w+'. Basically, if you've seen the pattern before, you know whether it has an inline LOCALE flag; if you haven't seen the pattern before, you'll need to parse it anyway, and then

[issue22436] logging geteffectivelevel does not document its return value

2014-09-18 Thread R. David Murray
New submission from R. David Murray: https://docs.python.org/3/library/logging.html#logging.Logger.getEffectiveLevel This says the logging level is returned, but it doesn't mention that what is returned is an integer, nor does it link to whatever method is needed to convert the integer return

[issue22278] urljoin duplicate slashes

2014-09-18 Thread Demian Brecht
Demian Brecht added the comment: Antoine: On (finally) getting back to this and re-reading your test case, the current behaviour is incorrect and is corrected by the patch. I've added a few more test cases to ensure trailing slashes are handled correctly. -- Added file:

[issue22434] Use named constants internally in the re module

2014-09-18 Thread Guido van Rossum
Guido van Rossum added the comment: Hm. Could you not use the new Enum class? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22434 ___ ___

[issue22410] Locale dependent regexps on different locales

2014-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Good catch Matthew! After fixing this and yet one bug (LC_CTYPE should be used instead of LC_ALL), and adding more optimizations, the performance is increased. Now the result of above microbenchmark is 18.5 usec per loop. -- Added file:

[issue22434] Use named constants internally in the re module

2014-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Answering Guido's question about the Enum class. No, it is not appropriate here. It has too cumbersome repr (OPCODES.IN_IGNORE: 16 instead of IN_IGNORE). Enum function syntax can't by used because it enumerates values from 1. We need three Enum subclasses

[issue22410] Locale dependent regexps on different locales

2014-09-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file36651/re_locale_caching.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22410 ___

[issue22436] logging geteffectivelevel does not document its return value

2014-09-18 Thread Vinay Sajip
Vinay Sajip added the comment: Users generally use integer values when specifying logging levels, unless they are e.g. using the configuration machinery, when they will specify strings (just because the configuration is in text files). I will update the documentation to try to make things

[issue19380] Optimize parsing of regular expressions

2014-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Well, then please look at re_parse_2.patch (it is still applied cleanly). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19380 ___

[issue22436] logging geteffectivelevel does not document its return value

2014-09-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset dd17c3eda73c by Vinay Sajip in branch '2.7': Issue #22436: Improved documentation for getEffectiveLevel() and getLevelName(). https://hg.python.org/cpython/rev/dd17c3eda73c New changeset 72a91df86b07 by Vinay Sajip in branch '3.4': Issue #22436:

[issue22437] re module: number of named groups is limited to 100 max

2014-09-18 Thread Yury Selivanov
New submission from Yury Selivanov: While writing a lexer for javascript language, I managed to hit the limit of named groups in one regexp, it's 100. The check is in sre_compile.py:compile() function, and there is even an XXX comment on this. Unfortunately, I'm not an expert in this module,

[issue22436] logging geteffectivelevel does not document its return value

2014-09-18 Thread R. David Murray
R. David Murray added the comment: Ah, yes, I was just being dense, because the context I was in was exactly that context: configuration via strings. Probably no change is required, but if can think of way of making it obvious to someone thinking crooked like I was that would be great.

[issue22436] logging geteffectivelevel does not document its return value

2014-09-18 Thread R. David Murray
R. David Murray added the comment: Woops, should have looked at the rest of my email. Yes, that change looks great. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22436 ___

[issue22437] re module: number of named groups is limited to 100 max

2014-09-18 Thread R. David Murray
R. David Murray added the comment: It is 100 to avoid a syntactic ambiguity between numbered groups and octal numbers, if I remember correctly. I can't remember if that constraint still applies in python3, where the octal notation was made more strict in general. -- nosy:

[issue22427] TemporaryDirectory attempts to clean up twice

2014-09-18 Thread Jakub Wilk
Changes by Jakub Wilk jw...@jwilk.net: -- nosy: +jwilk ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22427 ___ ___ Python-bugs-list mailing list

[issue22417] PEP 476: verify HTTPS certificates by default

2014-09-18 Thread Jakub Wilk
Changes by Jakub Wilk jw...@jwilk.net: -- nosy: +jwilk ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22417 ___ ___ Python-bugs-list mailing list

[issue22434] Use named constants internally in the re module

2014-09-18 Thread Guido van Rossum
Guido van Rossum added the comment: I think you are too casual in rejecting a standard approach over a custom clever hack. Making the values enums gives them a standard interface that goes beyond what you implemented, and just the fact that we can say these are IntEnum instances specifies a lot

[issue22437] re module: number of named groups is limited to 100 max

2014-09-18 Thread Matthew Barnett
Matthew Barnett added the comment: In the regex module, I borrowed the \g... escape from .sub's replacement string to provide an alternative way to refer to a group in a pattern, and that let me remove the limit. -- ___ Python tracker

[issue21308] PEP 466: backport ssl changes

2014-09-18 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Note that this change broke eventlet: https://github.com/eventlet/eventlet/issues/135 -- nosy: +barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21308

[issue22430] Build failure if configure flags --prefix or --exec-prefix is set

2014-09-18 Thread Ned Deily
Ned Deily added the comment: Sorry, I don't see where you have shown exactly what Python ./configure and make commands you are using and it is not at all obvious to me what you mean by After generating Makefile if comment string, contain LD_CONFIG_PATH all build success. But, if it is the

[issue22437] re module: number of named groups is limited to 100 max

2014-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is two reasons for this limitation. First reason is mentioned by David. There is no syntax to backreference a group with number 99 (but there is a syntax for conditional groups and for substitutions). Second reason is that current implementation of

[issue22437] re module: number of named groups is limited to 100 max

2014-09-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka stage: - patch review versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22437 ___

[issue22437] re module: number of named groups is limited to 100 max

2014-09-18 Thread Yury Selivanov
Yury Selivanov added the comment: Serhiy, This is awesome! Is is possible to split the patch in two, and commit the one that just increases the groups limit to 3.4 as well? Thank you -- ___ Python tracker rep...@bugs.python.org

[issue22364] Unify error messages of re and regex

2014-09-18 Thread Mark Lawrence
Mark Lawrence added the comment: How can anything that's in the stdlib be unified with something that's not in the stdlib and currently has no prospects of getting in the stdlib? -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org

[issue22437] re module: number of named groups is limited to 100 max

2014-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is definitely not a bug fix. May be Matthew will commit it to the regex module and then you could use regex instead of re. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22437

[issue21308] PEP 466: backport ssl changes

2014-09-18 Thread Alex Gaynor
Alex Gaynor added the comment: Filed http://bugs.python.org/issue22438 to track it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21308 ___ ___

[issue22438] eventlet broke by python 2.7.x

2014-09-18 Thread Alex Gaynor
New submission from Alex Gaynor: https://github.com/eventlet/eventlet/issues/135 -- components: Library (Lib) messages: 227067 nosy: alex, benjamin.peterson, christian.heimes, dstufft, giampaolo.rodola, janssen, pitrou priority: normal severity: normal status: open title: eventlet

[issue22438] eventlet broke by python 2.7.x

2014-09-18 Thread Alex Gaynor
Alex Gaynor added the comment: It looks like something was removed from the `_ssl` module; is that considered an implementation detail, or does it need to be added back? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22438

[issue22438] eventlet broke by python 2.7.x

2014-09-18 Thread Alex Gaynor
Alex Gaynor added the comment: (It didn't have any direct tests as far as I can tell, which is why I didn't catch the regression) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22438 ___

[issue22438] eventlet broke by python 2.7.x

2014-09-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Certainly not an official API anyway. Let eventlet get their stuff straight. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22438 ___

[issue16007] Improved Error message for failing re expressions

2014-09-18 Thread Mark Lawrence
Mark Lawrence added the comment: The original try/except that leads to the raise does not exist in the latest 3.5 code. I'd be inclined to close this as out of date for compatibility reasons if nothing else. -- nosy: +BreamoreBoy ___ Python

[issue22378] SO_MARK support for Linux

2014-09-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset ca0aa0d89273 by Charles-François Natali in branch 'default': Issue #22378: socket module: add SO_MARK. https://hg.python.org/cpython/rev/ca0aa0d89273 -- nosy: +python-dev ___ Python tracker

[issue22378] SO_MARK support for Linux

2014-09-18 Thread Charles-François Natali
Charles-François Natali added the comment: Thanks, I committed a simpler version of the patch. -- resolution: - fixed stage: test needed - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22378

[issue22378] SO_MARK support for Linux

2014-09-18 Thread STINNER Victor
STINNER Victor added the comment: Patch for python 2.7 and 3.4 Only Python 3.5 accept new features. -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22378 ___

[issue19380] Optimize parsing of regular expressions

2014-09-18 Thread Josh Rosenberg
Changes by Josh Rosenberg shadowranger+pyt...@gmail.com: -- nosy: +josh.rosenberg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19380 ___ ___

[issue22439] subprocess.PIPE.stdin.flush() causes to hang while subprocess.PIPE.stdin.close() not

2014-09-18 Thread Sworddragon
New submission from Sworddragon: On sending something to stdin of a process that was called with subprocess (for example diff) I have figured out that all is working fine if stdin is closed but flushing stdin will cause a hang (the same as nothing would be done). In the attachments is a

[issue22366] urllib.request.urlopen shoudl take a context (SSLContext) argument

2014-09-18 Thread Alex Gaynor
Alex Gaynor added the comment: Just wanted to ping you on this Senthil about committing this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22366 ___

[issue22439] subprocess.PIPE.stdin.flush() causes to hang while subprocess.PIPE.stdin.close() not

2014-09-18 Thread R. David Murray
R. David Murray added the comment: This has nothing to do with subprocess. If you call a (blocking and unlimited) read() on a file, the read will not return until the file is closed. -- nosy: +r.david.murray resolution: - not a bug stage: - resolved status: open - closed

[issue22438] eventlet broke by python 2.7.x

2014-09-18 Thread Barry A. Warsaw
Changes by Barry A. Warsaw ba...@python.org: -- nosy: +barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22438 ___ ___ Python-bugs-list mailing

[issue22438] eventlet broke by python 2.7.x

2014-09-18 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I tend to agree. I don't even think it was documented. I wonder though if it makes sense to at least mention this in the PEP and/or release notes for 2.7.9. -- ___ Python tracker rep...@bugs.python.org

[issue22438] eventlet broke by python 2.7.x

2014-09-18 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22438 ___