[issue32206] Run modules with pdb

2018-01-04 Thread Nick Coghlan
Nick Coghlan added the comment: Linking back to the overall RFE for improved executable module support for standard library modules that run other scripts: https://bugs.python.org/issue9325 -- nosy: +ncoghlan ___ Python tracker

[issue9325] Add an option to pdb/trace/profile to run library module as a script

2018-01-04 Thread Nick Coghlan
Nick Coghlan added the comment: Issue 32206 covers doing this for `pdb`. It relies on directly accessing private APIs in the `runpy` module, but we can live with that, since `pdb` is part of the standard library. -- dependencies: +Run modules with pdb, cProfile command-line should acc

[issue29237] Create enum for pstats sorting options

2018-01-04 Thread Marcel Widjaja
Change by Marcel Widjaja : -- keywords: +patch pull_requests: +4972 stage: needs patch -> patch review ___ Python tracker ___ ___ Pyt

[issue32457] Windows Python cannot handle an early PATH entry containing ".." and python.exe

2018-01-04 Thread Steve Dower
Change by Steve Dower : -- stage: -> needs patch versions: +Python 3.7, Python 3.8 ___ Python tracker ___ ___ Python-bugs-list maili

[issue32457] Windows Python cannot handle an early PATH entry containing ".." and python.exe

2018-01-04 Thread Steve Dower
Steve Dower added the comment: I agree that explicitly normalizing in PC/getpathp.c is the correct approach. As far as I'm aware, GetModuleFileNameW(NULL) can never fail other than a buffer that is too small, so that whole function can probably be simplified to abort if it happens and just re

[issue32248] Port importlib_resources (module and ABC) to Python 3.7

2018-01-04 Thread David Bolen
David Bolen added the comment: Apologies if this is obvious and already in progress, but the issue with Windows and this change appears to be that the "utf-8.file" file is being treated as text rather than binary. So the line ending is expanding to CRLF. The working copy of utf-8.file on my

[issue32486] tail optimization for 'yield from'

2018-01-04 Thread Brett Cannon
Change by Brett Cannon : -- versions: +Python 3.7 -Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32486] tail optimization for 'yield from'

2018-01-04 Thread Brett Cannon
Change by Brett Cannon : -- type: resource usage -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27054] Python installation problem: No module named 'encodings'

2018-01-04 Thread Sabuj Pattanayek
Sabuj Pattanayek added the comment: I can confirm that this does happen if you don't install as admin. I confirmed that I didn't have PYTHONHOME or PYTHONPATH set and I still got a similar error (except it was for the site module) for the python 3.4.4 installer. setting pythonhome and pythonp

[issue32496] lib2to3 fails to parse a ** of a conditional expression

2018-01-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +benjamin.peterson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

[issue25095] test_httpservers hangs since Python 3.5

2018-01-04 Thread William Pickard
Change by William Pickard : -- title: test_httpservers hangs on 3.5.0, win 7 -> test_httpservers hangs since Python 3.5 type: crash -> performance ___ Python tracker ___ __

[issue32496] lib2to3 fails to parse a ** of a conditional expression

2018-01-04 Thread Gregory P. Smith
New submission from Gregory P. Smith : see the attached sample code demonstrating the problem. basically lib2to3 fails to parse: dummy(**kwargs if kwargs else dict()) with an error like: raise ParseError("bad input", type, value, context) lib2to3.pgen2.parse.ParseError: bad input: type=

[issue32495] Adding Timer to multiprocessing

2018-01-04 Thread Jay Crotts
New submission from Jay Crotts : I wanted to propose the addition of a Timer class to the multiprocessing library similar to the one that exists in the Threading module. Timer provides an example of how to extend the Process class that might be helpful to beginners. The current lack of a Tim

[issue32492] C Fast path for namedtuple's property/itemgetter pair

2018-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ah, right. property already is hardy optimized, and specialized version of itemgetter gives only around 35% of maximal speed up. -- ___ Python tracker

[issue32226] Implement PEP 560: Core support for typing module and generic types

2018-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Please don't forgot to document this feature. -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue32226] Implement PEP 560: Core support for typing module and generic types

2018-01-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +ned.deily priority: normal -> release blocker ___ Python tracker ___ ___ Python-bugs-list mail

[issue32226] Implement PEP 560: Core support for typing module and generic types

2018-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset ce5b0e9db1b9698e6ffc43ae41cf3a22ca5a6ba6 by Serhiy Storchaka in branch 'master': bpo-32226: Make __class_getitem__ an automatic class method. (#5098) https://github.com/python/cpython/commit/ce5b0e9db1b9698e6ffc43ae41cf3a22ca5a6ba6 --

[issue32494] interface to gdbm_count

2018-01-04 Thread sds
New submission from sds : gdbm offers a function to quickly find number of records: gdbm_count() http://www.gnu.org/software/gdbm/manual/html_node/Count.html It would be nice to be able to call it. -- components: Library (Lib) messages: 309483 nosy: sam-s priority: normal severity: norma

[issue12706] timeout sentinel in ftplib and poplib documentation

2018-01-04 Thread Greg
Greg added the comment: Completely forgot about this, please take my patch and submit a pr On Fri, Dec 29, 2017 at 10:55 AM, Marcel Widjaja wrote: > > Marcel Widjaja added the comment: > > Greg, I wonder if you are planning to submit a PR for your patch? If not, > I'm plan to take your patch

[issue32492] C Fast path for namedtuple's property/itemgetter pair

2018-01-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: Joe Jevnik at already worked through attempts optimize property/itemgetter. There isn't much fruit left there. What I've outlined here should be several times faster. The code will end-up being very similar to the __get__ for member objects which is cur

[issue25095] test_httpservers hangs on 3.5.0, win 7

2018-01-04 Thread Berker Peksag
Berker Peksag added the comment: Thank you for tracking down the problem, William! I just took a quick look at your patch and it seems reasonable to me. Setting protocol_version to 'HTTP/1.1' means setting the close_connection attribute of BaseHTTPRequestHandler to False which is expected and

[issue32493] UUID Module - FreeBSD build failure

2018-01-04 Thread David Carlier
New submission from David Carlier : UUID module build fails on FreeBSD since it supports uuid_create function. -- components: FreeBSD messages: 309479 nosy: David Carlier, koobs priority: normal pull_requests: 4970 severity: normal status: open title: UUID Module - FreeBSD build failure

[issue32492] C Fast path for namedtuple's property/itemgetter pair

2018-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Alternatively we could consider the way of optimizing property or itemgetter (or both). This may be more complex solution, but if the added complexity is not too large, this solution may be more preferable because it will speed up not only namedtuple.

[issue25095] test_httpservers hangs on 3.5.0, win 7

2018-01-04 Thread William Pickard
Change by William Pickard : -- keywords: +patch pull_requests: +4969 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-l

[issue32492] C Fast path for namedtuple's property/itemgetter pair

2018-01-04 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +4968 stage: -> patch review ___ Python tracker ___ ___ Python-bugs

[issue32492] C Fast path for namedtuple's property/itemgetter pair

2018-01-04 Thread Raymond Hettinger
New submission from Raymond Hettinger : Attribute access for named tuples can be made as fast as attribute access of instances of classes with slots. All that is needed is a C subclass of property with it own __get__ that directly look's up the tuple field using PyTuple_GET_ITEM using an inde

[issue32346] Speed up slot lookup for class creation

2018-01-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: > While I like faster startup time, I don't know 4% speed up is worth enough > for this complexity. There's no magic bullet that I know of to reduce startup time by a large amount. So we're left with optimizing progressively. For comparison, https://github

[issue31672] string.Template should use re.ASCII flag

2018-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Results. There are 4 cases: 1) default idpattern and flags 2) overridden only idpattern 3) overridden only flags 4) overridden both idpattern and flags The case 1 was the one that was broken when this issue was opened. The initial Inada's version fixed the

[issue32346] Speed up slot lookup for class creation

2018-01-04 Thread INADA Naoki
INADA Naoki added the comment: In my environment, python -X importtime -c 'import asyncio' speed up from 53.2ms to 51ms. While I like faster startup time, I don't know 4% speed up is worth enough for this complexity. -- ___ Python tracker

[issue25095] test_httpservers hangs on 3.5.0, win 7

2018-01-04 Thread William Pickard
William Pickard added the comment: Scratch the previous message about the possible cause, I found the true cause, getresponse() is waiting for a specific header, one that BaseHTTPRequestHandler.send_error sends and BaseHTTPRequestHandler.send_response() doesn't, that header is "Connection" w

[issue31672] string.Template should use re.ASCII flag

2018-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 87be28f4a1c5b76926c71a3d9f92503f9eb82d51 by Serhiy Storchaka in branch 'master': bpo-31672: Restore the former behavior when override flags in Template. (#5099) https://github.com/python/cpython/commit/87be28f4a1c5b76926c71a3d9f92503f9eb82d51

[issue31170] Update to expat 2.2.4 (expat: utf8_toUtf8 cannot properly handle exhausting buffer)

2018-01-04 Thread STINNER Victor
STINNER Victor added the comment: Ah yes, it can be closed. I was waiting 3.4 and 3.5 fixes to be fixed, which is now the case. -- resolution: -> fixed stage: patch review -> resolved status: pending -> closed ___ Python tracker

[issue25095] test_httpservers hangs on 3.5.0, win 7

2018-01-04 Thread WildCard65
WildCard65 added the comment: I believe I found the issue, might be an issue between sending the request + calling get_response() and the time it takes for server to process response, my print cases: test_err (test.test_httpservers.RequestHandlerLoggingTestCase) ... Creating a new connection

[issue31170] Update to expat 2.2.4 (expat: utf8_toUtf8 cannot properly handle exhausting buffer)

2018-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Can this issue be closed now? -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-

[issue31672] string.Template should use re.ASCII flag

2018-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 5099 reverts in 3.7 a subtle behavior change made by the fix for this issue. Before merging the fix setting flags to 0 in a Template subclass made the default pattern matching only lower case letters. Currently setting flags to 0 doesn't have any effect.

[issue31672] string.Template should use re.ASCII flag

2018-01-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +4967 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue25095] test_httpservers hangs on 3.5.0, win 7

2018-01-04 Thread WildCard65
WildCard65 added the comment: Adding onto this issue, I believe I tracked down the change that caused the issue: https://github.com/python/cpython/commit/c0a23e63207984304027f298eefc738b6b3c94b1 This issue also affects the test with Python 3.6 -- nosy: +WildCard65 __

[issue17972] inspect module docs omits many functions

2018-01-04 Thread R. David Murray
R. David Murray added the comment: I think adding an __all__ in 3.7 would be reasonable. You are right that we can't simply rename them for backward compatibility reasons. We could rename them, and leave a stub function (that calls the renamed function) but issues a deprecation warning. We

[issue32346] Speed up slot lookup for class creation

2018-01-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: I see, so I should be able to reuse tp_cache for this PR. -- ___ Python tracker ___ ___ Python-bug

[issue31506] Improve the error message logic for object_new & object_init

2018-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Error messages "object.__init__() takes no arguments" and "object.__new__() takes no arguments" are wrong. They contradicts the following error messages: >>> object.__init__() Traceback (most recent call last): File "", line 1, in TypeError: descriptor '_

[issue32226] Implement PEP 560: Core support for typing module and generic types

2018-01-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +4966 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue32211] Document the bug in re.findall() and re.finditer() in 2.7 and 3.6

2018-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset ca54740f257086393106d242644d450485180b96 by Serhiy Storchaka in branch '2.7': [2.7] bpo-32211: Document the existing bug in re.findall() and re.finditer(). (GH-4695). (#5096) https://github.com/python/cpython/commit/ca54740f257086393106d242644

[issue26528] NameError for built in function open when re-raising stored exception from yielded function

2018-01-04 Thread Maciej Urbański
Maciej Urbański added the comment: Reproduced in both v3.6.4 and v3.7.0a3 -- nosy: +rooter versions: +Python 3.6, Python 3.7 ___ Python tracker ___

[issue32482] Improve tests for syntax and grammar in 2.7

2018-01-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue32211] Document the bug in re.findall() and re.finditer() in 2.7 and 3.6

2018-01-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue32482] Improve tests for syntax and grammar in 2.7

2018-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset a70d5ff992e5e123a3fa6f0e7f672026db8ed1f7 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': bpo-32482: Fix suspicious code in tests for syntax and grammar. (GH-5086) (#5095) https://github.com/python/cpython/commit/a70d5ff992e5e123a3f

[issue32211] Document the bug in re.findall() and re.finditer() in 2.7 and 3.6

2018-01-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +4965 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue31778] ast.literal_eval supports non-literals in Python 3

2018-01-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue31778] ast.literal_eval supports non-literals in Python 3

2018-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset d8ac4d1d5ac256ebf3d8d38c226049abec82a2a0 by Serhiy Storchaka in branch 'master': bpo-31778: Make ast.literal_eval() more strict. (#4035) https://github.com/python/cpython/commit/d8ac4d1d5ac256ebf3d8d38c226049abec82a2a0 -- ___

[issue32211] Document the bug in re.findall() and re.finditer() in 2.7 and 3.6

2018-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 1e6d8525f9dd3dcdc83adb93b164082c8b95d17a by Serhiy Storchaka in branch '3.6': bpo-32211: Document the existing bug in re.findall() and re.finditer(). (#4695) https://github.com/python/cpython/commit/1e6d8525f9dd3dcdc83adb93b164082c8b95d17a --

[issue32308] Replace empty matches adjacent to a previous non-empty match in re.sub()

2018-01-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue32308] Replace empty matches adjacent to a previous non-empty match in re.sub()

2018-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset fbb490fd2f38bd817d99c20c05121ad0168a38ee by Serhiy Storchaka in branch 'master': bpo-32308: Replace empty matches adjacent to a previous non-empty match in re.sub(). (#4846) https://github.com/python/cpython/commit/fbb490fd2f38bd817d99c20c0512

[issue32482] Improve tests for syntax and grammar in 2.7

2018-01-04 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4964 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue32482] Improve tests for syntax and grammar in 2.7

2018-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 0cc99c8cd70d422e4b345837a907db30e9180ab9 by Serhiy Storchaka in branch 'master': bpo-32482: Fix suspicious code in tests for syntax and grammar. (#5086) https://github.com/python/cpython/commit/0cc99c8cd70d422e4b345837a907db30e9180ab9 ---

[issue32482] Improve tests for syntax and grammar in 2.7

2018-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 0bcba372bcd564555c98a65be4fb1309ff1ae5d5 by Serhiy Storchaka in branch '2.7': bpo-32482: Improve syntax and grammar tests. (#5085) https://github.com/python/cpython/commit/0bcba372bcd564555c98a65be4fb1309ff1ae5d5 -- _