[issue22434] Use named constants internally in the re module

2014-11-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset fc7dbba57869 by Serhiy Storchaka in branch 'default': Issue #22434: Constants in sre_constants are now named constants (enum-like). https://hg.python.org/cpython/rev/fc7dbba57869 -- nosy: +python-dev ___

[issue22824] Update reprlib to use set literals

2014-11-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The repr of empty array() should be fixed too. -- nosy: +serhiy.storchaka Added file: http://bugs.python.org/file37165/issue22824_3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22824

[issue21301] pathlib missing Path.expandvars(env=os.environ)

2014-11-10 Thread Wolfgang Langner
Wolfgang Langner added the comment: expandvars(), and expanduser() is part of os.path. Boot functions are needed for path objects and very useful. And yes it is a simple string substitution but very common. -- nosy: +tds333 ___ Python tracker

[issue19767] pathlib: iterfiles() and iterdirs()

2014-11-10 Thread Wolfgang Langner
Wolfgang Langner added the comment: Why not implement this pattern with def dirs(pattern) and def files(pattern) where both are a simple shortcut for (p for p in mypath.glob(pattern) if p is_file()) or is_dir() ? -- nosy: +tds333 ___ Python

[issue22821] Argument of wrong type is passed to fcntl()

2014-11-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 61e99438c237 by Serhiy Storchaka in branch '2.7': Issue #22821: Fixed fcntl() with integer argument on 64-bit big-endian https://hg.python.org/cpython/rev/61e99438c237 New changeset 45e8aed69767 by Serhiy Storchaka in branch '3.4': Issue #22821:

[issue22821] Argument of wrong type is passed to fcntl()

2014-11-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Fixed in 3.5 as part of 6e6532d313a1 as it was easier to integrate it as part of the Clinic patch. 6e6532d313a1 has introduced other bug (l was parsed to int). Changed to I for reasons described in the comment in fcntl_ioctl_impl(). --

[issue22821] Argument of wrong type is passed to fcntl()

2014-11-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka resolution: - fixed stage: commit review - resolved status: open - closed versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org

[issue22490] Using realpath for __PYVENV_LAUNCHER__ makes Homebrew installs fragile

2014-11-10 Thread Ronald Oussoren
Ronald Oussoren added the comment: The environment variable itself cannot be removed from CPython, it is necessary to implement the correct behavior of pyvenv with framework builds of Python. That said, I do think that the environment variable should be unset as soon as possible in the

[issue22813] No facility for test randomisation

2014-11-10 Thread Michael Foord
Michael Foord added the comment: The point is that it is easy to have unintentional dependencies between tests. Test a sets up some state that test b relies on. This means that test b passes, so long as test a has already run. This is bad, tests should be isolated - it also means you can

[issue22827] Backport ensurepip to 2.7 (PEP 477)

2014-11-10 Thread Michael Foord
Michael Foord added the comment: mock in the Python standard library is licensed under the PSF license. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22827 ___

[issue22836] Broken Exception ignored in: message on exceptions in __repr__

2014-11-10 Thread Florian Bruhin
New submission from Florian Bruhin: When there's an unraisable exception (e.g. in __del__), and there's an exception in __repr__ as well, PyErr_WriteUnraisable returns after writing Exception ignored in: immediately. I'd expect it to fall back to the default __repr__ instead. See the

[issue12728] Python re lib fails case insensitive matches on Unicode data

2014-11-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4caa695af94c by Serhiy Storchaka in branch '2.7': Issue #12728: Different Unicode characters having the same uppercase but https://hg.python.org/cpython/rev/4caa695af94c New changeset 47b3084dd6aa by Serhiy Storchaka in branch '3.4': Issue #12728:

[issue12728] Python re lib fails case insensitive matches on Unicode data

2014-11-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This solution (with hardcoded table of equivalent lowercases) is temporary. In future re engine will be changed to support correct caseless matching of different lowercase forms internally. -- resolution: - fixed stage: patch review - resolved

[issue22578] Add additional attributes to re.error

2014-11-10 Thread Ezio Melotti
Ezio Melotti added the comment: LGTM. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22578 ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22837] getpass returns garbage when typing tilde on Windows with deadkeys

2014-11-10 Thread Florian Bruhin
New submission from Florian Bruhin: When using getpass.getpass() on Windows and typing a tilde (~) with a layout with dead keys (e.g. Swiss German), one would typically type ~ to get a single tilde. However, this returns '\x00\x83~' with getpass. It seems this is what msvcrt.getch()

[issue22836] Broken Exception ignored in: message on exceptions in __repr__

2014-11-10 Thread Martin Panter
Martin Panter added the comment: This is one that has often bugged me. When your repr() implementation is broken, it is quite confusing figuring out what is going wrong. Falling back to object.__repr__() is one option, however I would probably be happy with a simple “exception in repr()”

[issue21724] resetwarnings doesn't reset warnings registry

2014-11-10 Thread Robert Muil
Changes by Robert Muil robertm...@gmail.com: -- nosy: +robertmuil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21724 ___ ___ Python-bugs-list

[issue22836] Broken Exception ignored in: message on exceptions in __repr__

2014-11-10 Thread Florian Bruhin
Changes by Florian Bruhin python@the-compiler.org: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22836 ___ ___

[issue22837] getpass returns garbage when typing tilde on Windows with deadkeys

2014-11-10 Thread Florian Bruhin
Changes by Florian Bruhin python@the-compiler.org: -- nosy: +christian.heimes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22837 ___ ___

[issue22578] Add additional attributes to re.error

2014-11-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 292c4d853662 by Serhiy Storchaka in branch 'default': Issue #22578: Added attributes to the re.error class. https://hg.python.org/cpython/rev/292c4d853662 -- nosy: +python-dev ___ Python tracker

[issue22431] Change format of test runner output

2014-11-10 Thread Michael Foord
Michael Foord added the comment: I agree with Robert that the text output of the default runner should not be considered a part of the api that we make backwards compatible guarantees about. People who want to customise that should be customising the text runner/result. (Unfortunately it

[issue22578] Add additional attributes to re.error

2014-11-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 07f082b200a7 by Serhiy Storchaka in branch 'default': Fixed IDLE tests after changing re error messages (issue #22578). https://hg.python.org/cpython/rev/07f082b200a7 -- ___ Python tracker

[issue22198] Odd floor-division corner case

2014-11-10 Thread Petr Viktorin
Petr Viktorin added the comment: ping, could someone please review the patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22198 ___ ___

[issue22578] Add additional attributes to re.error

2014-11-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Ezio for your review. -- assignee: - serhiy.storchaka resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22578

[issue22837] getpass returns garbage when typing tilde on Windows with deadkeys

2014-11-10 Thread Florian Bruhin
Florian Bruhin added the comment: Maybe this is related: U+0083 is the no break here char: http://www.fileformat.info/info/unicode/char/0083/index.htm http://en.wikipedia.org/wiki/C0_and_C1_control_codes#C1_set From wikipedia: Follows the graphic character that is not to be broken. --

[issue22833] The decode_header() function decodes raw part to bytes or str, depending on encoded part

2014-11-10 Thread R. David Murray
R. David Murray added the comment: This is a duplicate of issue 6302. Re-reading that issue (again), I'm not quite sure why we didn't fix it, but it may be too late to fix it now for backward compatibility reasons. Since that issue strayed off into other topics, I'm going to leave this one

[issue22834] Unexpected FileNotFoundError when current directory is removed

2014-11-10 Thread R. David Murray
R. David Murray added the comment: Looks like importlib doesn't handle the case of a directory on the path being deleted? If so, I'm surprised this hasn't been reported before. -- nosy: +brett.cannon, eric.snow, r.david.murray ___ Python tracker

[issue22835] urllib2/httplib is rendering 400s for every authenticated-SSL request, suddenly

2014-11-10 Thread R. David Murray
R. David Murray added the comment: If you haven't updated Python, then it is hard to see how this could be a python bug. Not impossible, but you'll have to narrow down the problem before you'd be able to demonstrate it as a python bug, I'm afraid. If you want help diagnosing this, you might

[issue22836] Broken Exception ignored in: message on exceptions in __repr__

2014-11-10 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22836 ___ ___

[issue22364] Improve some re error messages using regex for hints

2014-11-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch which makes re error messages match regex. It doesn't look to me that all these changes are enhancements. -- keywords: +patch Added file: http://bugs.python.org/file37167/re_errors_regex.patch ___

[issue22838] Convert re tests to unittest

2014-11-10 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Current re tests consists of two parts. One part use unittest and other part import test cases from Lib/test/re_tests.py, checks conditions and prints messages to stdout if they are false. Proposed patch converts all test_re to using unittest. --

[issue11907] SysLogHandler can't send long messages

2014-11-10 Thread Domen Kožar
Domen Kožar added the comment: Note: same bug is relevant to DatagramHandler since it uses UDP transport. -- nosy: +iElectric ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11907 ___

[issue22839] Incorrect link to statistics in tracemalloc documentation

2014-11-10 Thread Jonathan Sharpe
New submission from Jonathan Sharpe: The link to statistics in the documentation for tracemalloc.Snapshot.compare_to (https://docs.python.org/3/library/tracemalloc.html#tracemalloc.Snapshot.compare_to) should be to the statistics method

[issue22800] IPv6Network constructor sometimes does not recognize legitimate netmask

2014-11-10 Thread pmoody
pmoody added the comment: # We only support CIDR for IPv6, because expanded netmasks are not # standard notation. Yes, that's correct. I can double check this, but when I wrote ipaddress, I had yet to encounter a v6 netmask in anything other than cider notation. --

[issue22800] IPv6Network constructor sometimes does not recognize legitimate netmask

2014-11-10 Thread pmoody
pmoody added the comment: Hey Chris, What's the usecase for this? the netmask notation doesn't appear to be common for v6 (at all), so I'm hesitant to add support for this if it's just something like an academic exercise. Cheers, peter -- ___

[issue22800] IPv6Network constructor sometimes does not recognize legitimate netmask

2014-11-10 Thread Chris PeBenito
Chris PeBenito added the comment: I understand the resistance; I'm fine closing this as won't implement, though this is not for academic use. In a nutshell, my package currently has a set of classes to represent an SELinux policy, and the SELinux policy language represents networks with

[issue22800] IPv6Network constructor sometimes does not recognize legitimate netmask

2014-11-10 Thread pmoody
pmoody added the comment: If you have the ability to use cidr, then closing this as wontfix is my preference. I've heard that there might be some network vendors that are starting support the mask notation for v6 addresses though, so this may end up getting implemented at some point in future

[issue22581] Other mentions of the buffer protocol

2014-11-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch which fixes remnants. It also corrects descriptions of parsing arguments format units. -- keywords: +patch stage: needs patch - patch review Added file: http://bugs.python.org/file37169/bytes_like.patch

[issue22839] Incorrect link to statistics in tracemalloc documentation

2014-11-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 387bbada31e8 by Berker Peksag in branch '3.4': Issue #22839: Fix Snapshot.statistics() link. https://hg.python.org/cpython/rev/387bbada31e8 New changeset 524a004e93dd by Berker Peksag in branch 'default': Issue #22839: Fix Snapshot.statistics()

[issue22839] Incorrect link to statistics in tracemalloc documentation

2014-11-10 Thread Berker Peksag
Berker Peksag added the comment: Fixed. Thanks for the report, Jonathan. -- nosy: +berker.peksag resolution: - fixed stage: - resolved status: open - closed type: - behavior versions: -Python 3.6 ___ Python tracker rep...@bugs.python.org

[issue22833] The decode_header() function decodes raw part to bytes or str, depending on encoded part

2014-11-10 Thread py.user
py.user added the comment: R. David Murray wrote: Is there a reason you are choosing not to use the new API? My program is for Python 3.x. I need to decode wild headers to pretty unicode strings. Now, I do it by decode_header() and try...except for AttributeError, since a unicode string has

[issue22840] strpdate('20141110', '%Y%m%d%H%S') returns wrong date

2014-11-10 Thread Doug Gorley
New submission from Doug Gorley: strptime() is returning the wrong date if I try to parse today's date (2014-11-10) as a string with no separators, and if I ask strpdate() to look for nonexistent hour and minute fields. datetime.datetime.strptime('20141110', '%Y%m%d').isoformat() '2014-11

[issue22835] urllib2/httplib is rendering 400s for every authenticated-SSL request, suddenly

2014-11-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: No upgrades on the server either? -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22835 ___ ___

[issue22840] strpdate('20141110', '%Y%m%d%H%S') returns wrong date

2014-11-10 Thread Ethan Furman
Ethan Furman added the comment: What result did you expect? -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22840 ___ ___

[issue22840] strpdate('20141110', '%Y%m%d%H%S') returns wrong date

2014-11-10 Thread Doug Gorley
Doug Gorley added the comment: I expected the second call to strpdate() to throw an exception, because %Y consumed '2014', %m consumed '11', and %d consumed '10', leaving nothing for %H and %M to match. That would be consistent with the first call. --

[issue22833] The decode_header() function decodes raw part to bytes or str, depending on encoded part

2014-11-10 Thread R. David Murray
R. David Murray added the comment: Certainly not with 3.0, but nobody in their right mind should be using that version any more :). The new API for decoding headers is available as of Python 3.3, with additional new API features in 3.4. See

[issue22719] os.path.isfile os.path.exists bug in while loop

2014-11-10 Thread Aaron
Aaron added the comment: Python 3.3.0, Windows 7, both 64 bit. Has it been resolved with the newer version, then? On Mon, Nov 3, 2014 at 11:15 PM, Zachary Ware rep...@bugs.python.org wrote: Zachary Ware added the comment: Aaron, what version of Python are you using on what version of

[issue22840] strpdate('20141110', '%Y%m%d%H%S') returns wrong date

2014-11-10 Thread Ethan Furman
Ethan Furman added the comment: The documentation certainly appears to say that %m, for example, will consume two digits, but it could just as easily be only for output (i.e. strftime). I suspect this is simply a documentation issue as opposed to a bug, but let's see what the others think.

[issue22841] Avoid to use coroutine with add_signal_handler()

2014-11-10 Thread Ludovic Gasc
New submission from Ludovic Gasc: Hi, Victor Stinner suggested me during PyCON-FR to send you this: It's a pico-patch to forbid a coroutine as parameter of add_signal_handler(). I've added a test for that, the patch is based on the latest commit in Tulip. Thanks for your feedback. Regards.

[issue22719] os.path.isfile os.path.exists bug in while loop

2014-11-10 Thread Zachary Ware
Zachary Ware added the comment: I haven't built 3.3.0 again yet to try to reproduce with it, but there have been enough bug and security fixes in the more recent 3.3 releases that I'd strongly advise updating on general principle and seeing if this issue goes away. If not to 3.4.2, at least to

[issue22840] strpdate('20141110', '%Y%m%d%H%S') returns wrong date

2014-11-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I have recently closed a similar issue (#5979) as won't fix. The winning argument there was that Python behavior was consistent with C. How does C strptime behave in this case? -- ___ Python tracker

[issue22840] strpdate('20141110', '%Y%m%d%H%S') returns wrong date

2014-11-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: With the following C code: #include time.h #include stdio.h #include stdlib.h #include string.h int main(){ char buf[255]; struct tm tm; memset(tm, 0, sizeof(tm)); strptime(20141110, %Y%m%d%H%M, tm); strftime(buf, sizeof(buf), %Y-%m-%d %H:%M

[issue22842] zipfile simultaneous open broken and/or needlessly(?) consumes unreasonable number of file descriptors

2014-11-10 Thread David Wilson
New submission from David Wilson: There is some really funky behaviour in the zipfile module, where, depending on whether zipfile.ZipFile() is passed a string filename or a file-like object, one of two things happens: a) Given a file-like object, zipfile does not (since it cannot) consume

[issue22840] strpdate('20141110', '%Y%m%d%H%S') returns wrong date

2014-11-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Here is the case that I think illustrates the current logic better: datetime.strptime(20141234, %Y%m%d%H%M) datetime.datetime(2014, 1, 2, 3, 4) -- ___ Python tracker rep...@bugs.python.org

[issue22842] zipfile simultaneous open broken and/or needlessly(?) consumes unreasonable number of file descriptors

2014-11-10 Thread David Wilson
David Wilson added the comment: As a random side-note, this is another case where I really wish Python had a .pread() function. It's uniquely valuable for coordinating positioned reads in a threaded app without synchronization (at user level anyway) or extraneous system calls. --

[issue22840] strpdate('20141110', '%Y%m%d%H%S') returns wrong date

2014-11-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Looking at the POSIX standard http://pubs.opengroup.org/onlinepubs/009695399/functions/strptime.html It appears that Python may be compliant: %H The hour (24-hour clock) [00,23]; leading zeros are permitted but not required. %m The month number

[issue22269] Resolve distutils option conflicts with priorities

2014-11-10 Thread Tim Smith
Tim Smith added the comment: Ping! Any chance for feedback here? This behavior took me by surprise again today. :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22269 ___

[issue22840] strpdate('20141110', '%Y%m%d%H%S') returns wrong date

2014-11-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Here is another interesting bit from the standard: The application shall ensure that there is white-space or other non-alphanumeric characters between any two conversion specifications. This is how they get away from not specifying whether parser of

[issue22843] doc error: 6.2.4. Match Objects

2014-11-10 Thread Clayton Kirkwood
New submission from Clayton Kirkwood: Documentation says: Match objects always have a boolean value of True. Since match() and search() return None when there is no match, you can test whether there was a match with a simple if statement: match = re.search(pattern, string) if match:

[issue22842] zipfile simultaneous open broken and/or needlessly(?) consumes unreasonable number of file descriptors

2014-11-10 Thread R. David Murray
R. David Murray added the comment: This is a duplicate of issue 16569 and issue 14099. Since the former links to the latter I'm using that as the superseder. -- nosy: +r.david.murray resolution: - duplicate stage: - resolved status: open - closed superseder: - Preventing errors of

[issue22843] doc error: 6.2.4. Match Objects

2014-11-10 Thread R. David Murray
R. David Murray added the comment: That's what have a boolean value of True means. (ie: bool(matchobject) is True). I'm neutral on whether or not it is worth changing the wording. -- nosy: +r.david.murray type: resource usage - behavior ___ Python

[issue22844] test_gdb failure on Debian Wheezy for Z

2014-11-10 Thread David Edelsohn
New submission from David Edelsohn: I added a Buildbot on another zLinux system running Debian Wheezy and it shows a different GDB error message: linux-vdso64.so. Can you please add something like the following to allow test_gdb to pass? diff -r 524a004e93dd Lib/test/test_gdb.py ---

[issue16569] Preventing errors of simultaneous access in zipfile

2014-11-10 Thread David Wilson
David Wilson added the comment: Compared to the cost of everything else ZipExtFile must do (e.g. 4kb string concatenation in a loop, zlib), its surprising that lseek() would measurable at all. The attached file 'patch' is the minimal change I tested. It represents, in terms of computation

[issue22813] No facility for test randomisation

2014-11-10 Thread sbspider
sbspider added the comment: Right makes sense. I'll see what I can do. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22813 ___ ___

[issue22719] os.path.isfile os.path.exists bug in while loop

2014-11-10 Thread Zachary Ware
Zachary Ware added the comment: I have had a chance to build 3.3.0 and I was able to reproduce the bug with it, so it is in fact fixed in later versions. -- resolution: - out of date stage: - resolved status: open - closed ___ Python tracker

[issue22835] urllib2/httplib is rendering 400s for every authenticated-SSL request, suddenly

2014-11-10 Thread Dustin Oprea
Dustin Oprea added the comment: I think I was getting mixed results by using requests and urllib2/3. After nearly being driven crazy, I performed the following steps: 1. Recreated client certificates, and verified that the correct CA was being used from Nginx. 2. Experimenting using an

[issue22823] Use set literals instead of creating a set from a list

2014-11-10 Thread Larry Hastings
Larry Hastings added the comment: Serhiy: set_literal_2.patch doesn't apply cleanly, so I don't get a review link. And apparently Raymond checked in some other changes separately. Could you redo your patch so it has the Clinic changes, and ensure I get a review link? --

[issue22845] Minor tweaks dis documentation

2014-11-10 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Proposed patch changes dis documentation: * formats the *file* parameter with stars, not ``backticks``. * adds missed links to opcodes. * fixes POP_STACK to POP_TOP. I hesitate about TOS and TOS1 words. Should they be highlighted in any manner? --

[issue22845] Minor tweaks dis documentation

2014-11-10 Thread Georg Brandl
Georg Brandl added the comment: LGTM. While at it, could you add a period after these: + Added *file* parameter -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22845 ___

[issue22823] Use set literals instead of creating a set from a list

2014-11-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is updated patch for clinic only. -- keywords: +patch Added file: http://bugs.python.org/file37174/set_literal_clinic.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22823