[issue40591] \r broken in IDLE

2020-05-11 Thread wyz23x2
New submission from wyz23x2 : When you run this code: import time for i in range(10): print(f"\r{i}", end='', flush=True) time.sleep(1) print('\n') On CMD it prints 0 at the first time, then it will erase it and print the increased i. But on IDLE it just prints "0123456789" -- that is

[issue29587] Generator/coroutine 'throw' discards exc_info state, which is bad

2020-05-11 Thread Chris Jerdonek
Chris Jerdonek added the comment: Would someone be able to approve / take a look at this small PR addressing another aspect of this issue? https://github.com/python/cpython/pull/19858 I'm hoping it can be part of 3.9, and the deadline is just a week away. It builds on the already merged PR to

[issue40257] Improve the use of __doc__ in pydoc

2020-05-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: help(1) as well as help(int) output the help for int. The only difference is that the former has the first line "Help on int object:", and the latter -- "Help on class int in module builtins:". If IPython wants to output the help on the instance, it should

[issue40503] PEP 615: Add zoneinfo module

2020-05-11 Thread Thomas Wouters
Thomas Wouters added the comment: The normal way to do this (for make/autoconf) is to add a --with-tzpath argument to configure.ac, and a make variable to pass it to the compilation of anything that needs it. You can then access it from Python code with sysconfig.get_config_var(). In config

[issue40592] `Shutil.which` incosistent with windows's `where`

2020-05-11 Thread Dawid Gosławski
New submission from Dawid Gosławski : Shutil's which implementation does not work correctly when someone set's empty item in `PATHEXT` environment variable. Example: set PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.RB;.RBW; I'm not 100% sure how I got this in my PATHEXT confi

[issue40584] PyType_FromModuleAndSpec function should add the process of tp_vectorcall_offset

2020-05-11 Thread Petr Viktorin
Petr Viktorin added the comment: That seems reasonable. See the discussion around https://bugs.python.org/issue38140 for context. Note that __dictoffset__ and __weaklistoffset__ are also exposed as members (in PyMemberDef type_members) and documented (Doc/c-api/structures.rst). A new __vect

[issue40592] `Shutil.which` incosistent with windows's `where`

2020-05-11 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___ __

[issue40593] Improve error reporting for invalid character in source code

2020-05-11 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Currently you get SyntaxError with message "invalid character in identifier" in two cases: 1. The source code contains some non-ASCII non-identifier character. Usually it happens when you copy code from internet page or PDF file which was "improved" by s

[issue40593] Improve error reporting for invalid character in source code

2020-05-11 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +19342 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20033 ___ Python tracker ___

[issue40594] urljoin since 3.5 incorrectly filters out double slashes

2020-05-11 Thread David Bell
New submission from David Bell : In Python 3.5 the urljoin function was rewritten to be RFC 3986 compliant and fix long standing issues. In the initial rewrite duplicate slashes were added by accident, and so code was added to prevent that. The discussion is here: https://bugs.python.org/issu

[issue40546] Inconsistencies between PEG parser and traceback SyntaxErrors

2020-05-11 Thread Lysandros Nikolaou
Lysandros Nikolaou added the comment: Guido: > I wonder if this is the fix we're looking for? I think this is the most sensible thing to do, yes. I guess, we also have to change both parsers to match this behaviour, right? -- ___ Python tracker <

[issue40546] Inconsistencies between PEG parser and traceback SyntaxErrors

2020-05-11 Thread Guido van Rossum
Guido van Rossum added the comment: I would carefully think about the meaning of that line and see if there are other permutations, e.g. min(Len(blah), offset - 1) ? It would,be nice to specify what we need here from both parsers and from both code chunks for error printing. -- ___

[issue40477] Launcher on Catalina

2020-05-11 Thread Glenn Travis
Glenn Travis added the comment: I tried to report this concern under Documentation, but got shot down as duplicate. I have the same results. I tried to make Launcher the default "Open With" application for a script, also tried dragging (and Option dragging) the script to the Launcher, neith

[issue40495] compileall: option to hardlink duplicate optimization levels bytecode cache files

2020-05-11 Thread STINNER Victor
STINNER Victor added the comment: Is it possible that the PYC file of optimization level 0 content is modified if the PY file content changed, with would make PYC files or optimization level 1 and 2 inconsistent? Christian Heimes: > Python's import system is fully compatible with this approac

[issue40495] compileall: option to hardlink duplicate optimization levels bytecode cache files

2020-05-11 Thread STINNER Victor
STINNER Victor added the comment: While reviewing PR 19901, I was confused by py_compile and compileall documentation which is outdated: it doesn't mention that optimize argument can be a list of integers. https://docs.python.org/dev/library/py_compile.html#py_compile.compile "optimize contr

[issue40495] compileall: option to hardlink duplicate optimization levels bytecode cache files

2020-05-11 Thread Miro Hrončok
Miro Hrončok added the comment: > Is it possible that the PYC file of optimization level 0 content is modified > if the PY file content changed, with would make PYC files or optimization > level 1 and 2 inconsistent? ... Note that there is a test exactly for this, in case the implementation i

[issue40495] compileall: option to hardlink duplicate optimization levels bytecode cache files

2020-05-11 Thread STINNER Victor
STINNER Victor added the comment: Currently, it's possible to implement this optimization using the Unix command "hardlink". Example: hardlink -c -v /usr/lib64/python3.8/__pycache__/*.pyc On my Fedora 32, this command says: Directories: 1 Objects: 520 Regular files

[issue40495] compileall: option to hardlink duplicate optimization levels bytecode cache files

2020-05-11 Thread STINNER Victor
STINNER Victor added the comment: > Currently, it's possible to implement this optimization using the Unix > command "hardlink". PR 19901 avoids the dependency on external "hardlink" command. In practice, PR 19901 only impacts newly written PYC files, whereas using manually the "hardlink" c

[issue40257] Improve the use of __doc__ in pydoc

2020-05-11 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: > Can you all please decide which issue to use? We can stay here, I opened the other issue before figuring out this was the cause. > If IPython wants to output the help on the instance, it should change the > implementation of `?` and `??`. It would be

[issue40584] PyType_FromModuleAndSpec function should add the process of tp_vectorcall_offset

2020-05-11 Thread hai shi
hai shi added the comment: > Note that __dictoffset__ and __weaklistoffset__ are also exposed as members > (in PyMemberDef type_members) and documented (Doc/c-api/structures.rst). A > new __vectorcalloffset__ should have that as well. Thanks for your comment, petr. And I updated the doc in P

[issue40503] PEP 615: Add zoneinfo module

2020-05-11 Thread Paul Ganssle
Change by Paul Ganssle : -- pull_requests: +19343 pull_request: https://github.com/python/cpython/pull/20034 ___ Python tracker ___

[issue40503] PEP 615: Add zoneinfo module

2020-05-11 Thread Paul Ganssle
Paul Ganssle added the comment: Thanks Thomas, that was super helpful. I've created GH-20034 to add in the compile-time arguments on POSIX systems at least, do you mind having a look? For the moment I have made it non-configurable on Windows, but I think the right thing to do is to add an ar

[issue40536] Addition of a "list of available time zones" function to zoneinfo

2020-05-11 Thread Paul Ganssle
Change by Paul Ganssle : -- keywords: +patch pull_requests: +19344 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19909 ___ Python tracker ___ ___

[issue40536] Addition of a "list of available time zones" function to zoneinfo

2020-05-11 Thread Paul Ganssle
Change by Paul Ganssle : -- pull_requests: -19344 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue40595] AttributeError from type annotation

2020-05-11 Thread Taylor Robie
New submission from Taylor Robie : Consider the following: ``` import re class MyClass(object): def re(self): pass def foo(self, m: re.Match): pass ``` Even though `re` and `MyClass.re` are distinct namespaces, the type annotation misses that fact (presumably there is

[issue40591] \r broken in IDLE

2020-05-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: This is known, has been discussed on previous issues (can't find numbers now), and is not a bug. Your code outputs a stream of 21 characters to 'file' sys.stdout, which for code executed by IDLE is, by default, directed to Shell. The effect of outputting Asc

[issue40596] str.isidentifier() does not work with non-BMP non-canonicalized strings on Windows

2020-05-11 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : >>> import _testcapi >>> u = '\U0001d580\U0001d593\U0001d58e\U0001d588\U0001d594\U0001d589\U0001d58a' >>> u.isidentifier() True >>> _testcapi.unicode_legacy_string(u).isidentifier() False -- components: Interpreter Core messages: 368637 nosy: serhi

[issue40596] str.isidentifier() does not work with non-BMP non-canonicalized strings on Windows

2020-05-11 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +19345 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20035 ___ Python tracker ___

[issue28577] ipaddress.ip_network(...).hosts() returns nothing for an IPv4 /32

2020-05-11 Thread Pete Wicken
Pete Wicken added the comment: The patch for this has been merged - I guess this can be closed now? -- ___ Python tracker ___ ___ P

[issue40561] Add docstrings for webbrowser open functions

2020-05-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset ef7973a981ff8f4687ef3fdb85a69fa15aa11fe5 by Brad Solomon in branch 'master': bpo-40561: Add docstrings for webbrowser open functions (GH-1) https://github.com/python/cpython/commit/ef7973a981ff8f4687ef3fdb85a69fa15aa11fe5 -- _

[issue40561] Add docstrings for webbrowser open functions

2020-05-11 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +19346 pull_request: https://github.com/python/cpython/pull/20036 ___ Python tracker _

[issue40561] Add docstrings for webbrowser open functions

2020-05-11 Thread miss-islington
Change by miss-islington : -- pull_requests: +19347 pull_request: https://github.com/python/cpython/pull/20037 ___ Python tracker ___ __

[issue40595] AttributeError from type annotation

2020-05-11 Thread Eric V. Smith
Eric V. Smith added the comment: This is not an annotations-only issue. This is no different from: import re class MyClass(object): def re(self): pass m = re.Match Which gives the same error. It's being evaluated at class scope. -- nosy: +eric.smith __

[issue40597] generated email message exceeds RFC-mandated limit of 998 characters

2020-05-11 Thread Arkadiusz Hiler
New submission from Arkadiusz Hiler : RFC5322[0] in section 2.1.1 mandates that the line cannot be longer than 998 characters and should not be longer than 78 characters (excluding CRLF). When we use raw_data_manager (default for EmailPolicy, EmailMessage) it does the correct thing as long as

[issue40561] Add docstrings for webbrowser open functions

2020-05-11 Thread miss-islington
miss-islington added the comment: New changeset 61b49a00e755136586e991c971c47f38bb5e4d23 by Miss Islington (bot) in branch '3.7': bpo-40561: Add docstrings for webbrowser open functions (GH-1) https://github.com/python/cpython/commit/61b49a00e755136586e991c971c47f38bb5e4d23 --

[issue40561] Add docstrings for webbrowser open functions

2020-05-11 Thread miss-islington
miss-islington added the comment: New changeset a63c61168588937c482435d0432c753de4844c46 by Miss Islington (bot) in branch '3.8': bpo-40561: Add docstrings for webbrowser open functions (GH-1) https://github.com/python/cpython/commit/a63c61168588937c482435d0432c753de4844c46 --

[issue40597] generated email message exceeds RFC-mandated limit of 998 characters

2020-05-11 Thread Arkadiusz Hiler
Change by Arkadiusz Hiler : -- keywords: +patch pull_requests: +19348 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20038 ___ Python tracker ___

[issue40561] Add docstrings for webbrowser open functions

2020-05-11 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue40595] AttributeError from type annotation

2020-05-11 Thread Taylor Robie
Taylor Robie added the comment: Ah, I see. If this is intended behavior (which is sounds like it is?) feel free to close. Thanks! -- ___ Python tracker ___ __

[issue40334] PEP 617: new PEG-based parser

2020-05-11 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +19349 pull_request: https://github.com/python/cpython/pull/20039 ___ Python tracker ___ ___

[issue40480] "fnmatch" exponential execution time

2020-05-11 Thread Ned Batchelder
Ned Batchelder added the comment: This change has caused a problem for coverage.py. The full details are here: https://github.com/nedbat/coveragepy/issues/988#issuecomment-626926513 Coverage.py combines fnmatch-produced regexes by joining them with pipes into one larger regex. The \ group

[issue40597] generated email message exceeds RFC-mandated limit of 998 characters

2020-05-11 Thread R. David Murray
R. David Murray added the comment: The PR looks good to me, but I describe the change differently. I'm not sure how I missed this in the original implementation, since I obviously checked it for the 8bit case. Too long ago to remember :) -- ___

[issue19956] inspect.getsource(obj.foo) fails when foo is an injected method constructed from another method

2020-05-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am working on an explanation of why I paused the PR. -- versions: +Python 3.9 -Python 3.5 ___ Python tracker ___ __

[issue40553] Python 3.8.2 Mac freezing/not responding when saving new programs

2020-05-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: Mat Wichmann responded "we had three of these in the last few weeks sent to webmas...@python.org. I just went back and pinged those folks with a request to look in on the issue, and contribute to it if they had anything new/useful to add." -- ___

[issue40503] PEP 615: Add zoneinfo module

2020-05-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Do we need the C implementation if there is the Python implementation? -- nosy: +serhiy.storchaka ___ Python tracker ___ __

[issue40553] Python 3.8.2 Mac freezing/not responding when saving new programs

2020-05-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: Raymond, can you run the tests I suggested above? -- ___ Python tracker ___ ___ Python-bugs-list

[issue40596] str.isidentifier() does not work with non-BMP non-canonicalized strings on Windows

2020-05-11 Thread STINNER Victor
STINNER Victor added the comment: It's maybe time to speed up the deprecation of the legacy C API using Py_UNICODE... -- ___ Python tracker ___ __

[issue40596] str.isidentifier() does not work with non-BMP non-canonicalized strings on Windows

2020-05-11 Thread STINNER Victor
STINNER Victor added the comment: My previous change on this function: commit f3e7ea5b8c220cd63101e419d529c8563f9c6115 Author: Victor Stinner Date: Tue Feb 11 14:29:33 2020 +0100 bpo-39500: Document PyUnicode_IsIdentifier() function (GH-18397) PyUnicode_IsIdentifier() does not

[issue36346] Prepare for removing the legacy Unicode C API

2020-05-11 Thread STINNER Victor
STINNER Victor added the comment: > bpo-36346: array: Don't use deprecated APIs (GH-19653) Thanks INADA-san! Another nail into Py_UNICODE coffin! -- ___ Python tracker ___ __

[issue40598] round() does not return an integer when given a numpy float64

2020-05-11 Thread Michael Garbutt
New submission from Michael Garbutt : The round() helptext states "The return value is an integer if ndigits is omitted or None. Otherwise the return value has the same type as the number." When given a numpy float64, the return type is also float64, rather than the expected int. >>> import

[issue40480] "fnmatch" exponential execution time

2020-05-11 Thread Tim Peters
Tim Peters added the comment: Ned, would it be possible to rewrite code of the form: if giant pasted regexp matches: to: if any(p matches for p in patterns): That should work under any version of Python. There's no guarantee that regexps _can_ be pasted together and still work,

[issue40503] PEP 615: Add zoneinfo module

2020-05-11 Thread Paul Ganssle
Paul Ganssle added the comment: I mean, theoretically we don't "need" it, but it's much, much faster, and without it nearly every operation that needs time zone offsets will be slower than pytz (which has a mechanism for caching). Also, I've already written it, so I see no reason why not use

[issue40574] segfault causing regression from PEP 573 implementation (PyQt5)

2020-05-11 Thread STINNER Victor
STINNER Victor added the comment: > I think I have figured out the problem. I had a locally built and cached > wheel of PyQt5-sip from before PEP573 went in. If that wheel is used for > later commits I get the segfault, if I rebuilt the wheel from source it works. Hum, I'm not sure that I

[issue40503] PEP 615: Add zoneinfo module

2020-05-11 Thread Paul Ganssle
Paul Ganssle added the comment: Here are some benchmarks run using the latest implementation. The pure Python code is pretty optimized, but the C code is still ~4-5x faster. Running from_utc in zone Europe/Paris c_zoneinfo: mean: 494.82 ns ± 3.80 ns; min: 489.23 ns (k=5, N=50) py_zoneinfo:

[issue40584] PyType_FromModuleAndSpec function should add the process of tp_vectorcall_offset

2020-05-11 Thread STINNER Victor
STINNER Victor added the comment: New changeset 86d69444e7cfe758212956df0be0ec7b8a4251a6 by Hai Shi in branch 'master': bpo-40584: Update PyType_FromModuleAndSpec() to process tp_vectorcall_offset (GH-20026) https://github.com/python/cpython/commit/86d69444e7cfe758212956df0be0ec7b8a4251a6

[issue40584] PyType_FromModuleAndSpec function should add the process of tp_vectorcall_offset

2020-05-11 Thread STINNER Victor
STINNER Victor added the comment: Thanks Hai Shi! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue40584] PyType_FromModuleAndSpec function should add the process of tp_vectorcall_offset

2020-05-11 Thread STINNER Victor
Change by STINNER Victor : -- stage: resolved -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40500] test_multiprocessing_fork leaks processes on PPC64LE RHEL8 LTO + PGO 3.x

2020-05-11 Thread STINNER Victor
STINNER Victor added the comment: PPC64LE RHEL8 LTO + PGO 3.x: https://buildbot.python.org/all/#/builders/450/builds/361 0:02:28 load avg: 6.47 [398/423/1] test_multiprocessing_spawn failed (env changed) (2 min 3 sec) -- running: test_asyncio (51.1 sec), test_peg_generator (47.7 sec), test_c

[issue40553] Python 3.8.2 Mac freezing/not responding when saving new programs

2020-05-11 Thread Ned Deily
Ned Deily added the comment: >To debug, and test Raymond's hypothesis, someone please try this minimal >(IDLE-free) code to show the dialog and print the return. >This does not display a preview, even after selecting a location, such as >Documents, on the 3rd line. Terry, I'm not sure I kn

[issue40334] PEP 617: new PEG-based parser

2020-05-11 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 27c0d9b54abaa4112d5a317b8aa78b39ad60a808 by Shantanu in branch 'master': bpo-40334: produce specialized errors for invalid del targets (GH-19911) https://github.com/python/cpython/commit/27c0d9b54abaa4112d5a317b8aa78b39ad60a808 -- _

[issue40599] Improve error messages with expected keywords

2020-05-11 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +19350 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20039 ___ Python tracker __

[issue40599] Improve error messages with expected keywords

2020-05-11 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : Using the new parser, we could improve the plain "syntax error" messages with the tokens/keywords that would have made the parser advance. There is a proof of concept in https://github.com/python/cpython/pull/20039 you can play with. I would like to

[issue40288] atexit module should not be loaded more than once per interpreter

2020-05-11 Thread STINNER Victor
STINNER Victor added the comment: I created bpo-40600: "Add an option to disallow creating more than one instance of a module". -- ___ Python tracker ___

[issue40600] Add an option to disallow creating more than one instance of a module

2020-05-11 Thread STINNER Victor
New submission from STINNER Victor : When a C extension module is created with PyModuleDef_Init(), it becomes possible to create more than one instance of the module. It would take significant effort to modify some extensions to make their code fully ready to have two isolated module. For ex

[issue40334] PEP 617: new PEG-based parser

2020-05-11 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: -19349 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue40077] Convert static types to PyType_FromSpec()

2020-05-11 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-40601: [C API] Hide static types from the limited C API. -- ___ Python tracker ___ _

[issue40601] [C API] Hide static types from the limited C API

2020-05-11 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-40077: "Convert static types to PyType_FromSpec()". -- ___ Python tracker ___ ___ Py

[issue40601] [C API] Hide static types from the limited C API

2020-05-11 Thread STINNER Victor
New submission from STINNER Victor : "Statically allocated types" prevents to get per-interpreter GIL: bpo-40512. These types are currently shared by all interpreters. Eric Snow proposed the idea of creating a heap allocated type in subintepreters. But we should take care of direct usage of t

[issue40512] Meta issue: per-interpreter GIL

2020-05-11 Thread STINNER Victor
STINNER Victor added the comment: "Static" types are shared by all interpreters. We should convert them to heap allocated types using PyType_FromSpec(), see: * bpo-40077: Convert static types to PyType_FromSpec() * bpo-40601: [C API] Hide static types from the limited C API -- _

[issue40598] round() does not return an integer when given a numpy float64

2020-05-11 Thread Eric V. Smith
Eric V. Smith added the comment: Wouldn't float64's __round__ method be in complete control of this? For python's float: >>> x = 3.4 >>> type(x.__round__(1)) >>> type(x.__round__()) And Decimal: >>> from decimal import Decimal >>> x = Decimal('3.4') >>> type(x.__round__(1)) >>> type(x.__

[issue40598] round() does not return an integer when given a numpy float64

2020-05-11 Thread STINNER Victor
STINNER Victor added the comment: > The round() helptext states "The return value is an integer if ndigits is > omitted or None. Otherwise the return value has the same type as the number." round(number) is documented to call number.__round__: https://docs.python.org/dev/library/functions.h

[issue40257] Improve the use of __doc__ in pydoc

2020-05-11 Thread Guido van Rossum
Guido van Rossum added the comment: I'm making this a release blocker -- please everybody come to an agreement or ask on python-dev. -- priority: normal -> release blocker resolution: fixed -> remind ___ Python tracker

[issue38078] IDLE: Don't run internal code in user namespace.

2020-05-11 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch nosy: +ZackerySpytz nosy_count: 1.0 -> 2.0 pull_requests: +19351 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20040 ___ Python tracker

[issue40599] Improve error messages with expected keywords

2020-05-11 Thread Guido van Rossum
Guido van Rossum added the comment: Hmm... The errors get long, and by focusing only on keywords they can be misleading. E.g. >>> from x import a b c File "", line 1 from x import a b c ^ SyntaxError: Invalid syntax. Expected one of: as >>> But the most likely erro

[issue40574] segfault causing regression from PEP 573 implementation (PyQt5)

2020-05-11 Thread Thomas Caswell
Thomas Caswell added the comment: The path is - on a commit prior to e1becf46b4e3ba6d7d32ebf4bbd3e0804766a423 install pyqt-sip. pip will build a wheel for you called PyQt5_sip-12.7.2-cp39-cp39-linux_x86_64.whl - on a commit after e1becf46b4e3ba6d7d32ebf4bbd3e0804766a423 if you do `pip in

[issue40601] [C API] Hide static types from the limited C API

2020-05-11 Thread STINNER Victor
STINNER Victor added the comment: > I propose to break the limited C API backward compatibility on purpose by > removing these type definitions form the limited C API. Hum. How would a C extension subclass the Python int type (PyLong_Type) if it's no longer exposed? One option is to add one

[issue31436] test_socket.SendfileUsingSendfileTest.testWithTimeoutTriggeredSend fails due to sendfile completing before timeout

2020-05-11 Thread Thomas Chan
Change by Thomas Chan : -- nosy: +tchan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.o

[issue36702] test_dtrace failed

2020-05-11 Thread Thomas Chan
Change by Thomas Chan : -- nosy: +tchan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.o

[issue40599] Improve error messages with expected keywords

2020-05-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > SyntaxError: Invalid syntax. Expected one of: for, pass, lambda, False, > global, True, __new_parser__, if, raise, continue, not, break, while, None, > del, nonlocal, import, assert, return, class, with, def, try, from, yield Haha, that is a good po

[issue40599] Improve error messages with expected keywords

2020-05-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > (Huh, where did it get __new_parser__?) >From here: https://github.com/python/cpython/blob/master/Parser/pegen/parse.c#L67 -- ___ Python tracker _

[issue40599] Improve error messages with expected keywords

2020-05-11 Thread Guido van Rossum
Guido van Rossum added the comment: I had hoped that error labels would get us closer to error recovery, but it appears that is still quite elusive. :-( -- ___ Python tracker ___

[issue40599] Improve error messages with expected keywords

2020-05-11 Thread Lysandros Nikolaou
Lysandros Nikolaou added the comment: I also concur with Guido here. I have played around with other languages and I dislike getting a long list of expected tokens, that are not helpful, if not actually confusing sometimes. I think that the current generic SyntaxError description together wi

[issue39465] Design a subinterpreter friendly alternative to _Py_IDENTIFIER

2020-05-11 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +19352 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20043 ___ Python tracker ___ _

[issue40599] Improve error messages with expected keywords

2020-05-11 Thread Guido van Rossum
Guido van Rossum added the comment: In response to my PEG blogs last year someone showed me an entirely different algorithm, based on first looking for matching parentheses (and other matching things), then for operators by priority, and so on. The approach was designed with C in mind but lo

[issue40599] Improve error messages with expected keywords

2020-05-11 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue39465] Design a subinterpreter friendly alternative to _Py_IDENTIFIER

2020-05-11 Thread STINNER Victor
STINNER Victor added the comment: New changeset 4804b5b3df82e7892ca0550b02f902bcfc16bb48 by Victor Stinner in branch 'master': bpo-39465: Don't access directly _Py_Identifier members (GH-20043) https://github.com/python/cpython/commit/4804b5b3df82e7892ca0550b02f902bcfc16bb48 -- ___

[issue40480] "fnmatch" exponential execution time

2020-05-11 Thread Anthony Sottile
Anthony Sottile added the comment: one way might be to give the groups "unique" names (perhaps hashing the input string?) ((this is what I attempted to do in a little bit of code which tried to "backport" (group)*+ and (group)++)) -- nosy: +Anthony Sottile _

[issue40571] Make lru_cache(maxsize=None) more discoverable

2020-05-11 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue40571] Make lru_cache(maxsize=None) more discoverable

2020-05-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 21cdb711e3b1975398c54141e519ead02670610e by Raymond Hettinger in branch 'master': bpo-40571: Make lru_cache(maxsize=None) more discoverable (GH-20019) https://github.com/python/cpython/commit/21cdb711e3b1975398c54141e519ead02670610e ---

[issue40602] Move Modules/hashtable.h to Include/internal/pycore_hashtable.h

2020-05-11 Thread STINNER Victor
New submission from STINNER Victor : Python/mashal.c uses Modules/hashtable.h. Python/mashal.c indirectly gets Modules/hashtable.c implementation via Modules/_tracemalloc.c which is built as a builtin module. I propose to make the "hashtable" more standard: * Move Modules/hashtable.h to Incl

[issue40480] "fnmatch" exponential execution time

2020-05-11 Thread Tim Peters
Tim Peters added the comment: I don't want something probabilistic. Fix it or don't ;-) One thing that would work, but at the cost of non-determinism: do the same as now, but obtain the number part of the group name by applying next() to a module-global private instance of itertools.count(

[issue40602] Move Modules/hashtable.h to Include/internal/pycore_hashtable.h

2020-05-11 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +19353 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20044 ___ Python tracker ___ _

[issue40574] segfault causing regression from PEP 573 implementation (PyQt5)

2020-05-11 Thread STINNER Victor
STINNER Victor added the comment: The stable ABI should not change between Python 3.8 and 3.9. In practice, it seems like something changed. But without any gdb traceback, I cannot tell what. I suggest to try again when beta1 will be released. The ABI should be way more stable after beta1.

[issue39465] Design a subinterpreter friendly alternative to _Py_IDENTIFIER

2020-05-11 Thread STINNER Victor
STINNER Victor added the comment: I created bpo-40602: "Move Modules/hashtable.h to Include/internal/pycore_hashtable.h". -- ___ Python tracker ___ __

[issue39481] Implement PEP 585 (Type Hinting Generics In Standard Collections)

2020-05-11 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- pull_requests: +19354 pull_request: https://github.com/python/cpython/pull/20045 ___ Python tracker ___ _

[issue40602] Move Modules/hashtable.h to Include/internal/pycore_hashtable.h

2020-05-11 Thread STINNER Victor
STINNER Victor added the comment: New changeset b617993b7c0b0f6f679ef7003a62d0318b6d6af9 by Victor Stinner in branch 'master': bpo-40602: Rename hashtable.h to pycore_hashtable.h (GH-20044) https://github.com/python/cpython/commit/b617993b7c0b0f6f679ef7003a62d0318b6d6af9 -- ___

[issue40602] Move Modules/hashtable.h to Include/internal/pycore_hashtable.h

2020-05-11 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +19355 pull_request: https://github.com/python/cpython/pull/20046 ___ Python tracker ___ __

[issue38872] Document exec symbol for codeop.compile_command

2020-05-11 Thread Joannah Nanjekye
Change by Joannah Nanjekye : -- keywords: +patch nosy: +nanjekyejoannah nosy_count: 4.0 -> 5.0 pull_requests: +19356 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20047 ___ Python tracker

[issue39465] Design a subinterpreter friendly alternative to _Py_IDENTIFIER

2020-05-11 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +19357 pull_request: https://github.com/python/cpython/pull/20048 ___ Python tracker ___ __

[issue40602] Move Modules/hashtable.h to Include/internal/pycore_hashtable.h

2020-05-11 Thread STINNER Victor
STINNER Victor added the comment: New changeset d0919f0d6bb757b6bcfd7b2e15656d318c9d5cd9 by Victor Stinner in branch 'master': bpo-40602: _Py_hashtable_new() uses PyMem_Malloc() (GH-20046) https://github.com/python/cpython/commit/d0919f0d6bb757b6bcfd7b2e15656d318c9d5cd9 --

  1   2   >