[issue42213] Get rid of cyclic GC hack in sqlite3.Connection and sqlite3.Cache

2020-10-30 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- keywords: +patch pull_requests: +21965 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23046 ___ Python tracker _

[issue41835] Speed up dict vectorcall creation using keywords

2020-10-30 Thread Marco Sulla
Marco Sulla added the comment: Well, following your example, since split dicts seems to be no more supported, I decided to be more drastic. If you see the last push in PR 22346, I do not check anymore but always resize, so the dict is always combined. This seems to be especially good for the

[issue42208] Using logging or warnings during Python finalization does crash Python

2020-10-30 Thread STINNER Victor
STINNER Victor added the comment: New changeset eba5bf2f5672bf4861c626937597b85ac0c242b9 by Victor Stinner in branch 'master': bpo-42208: Call GC collect earlier in PyInterpreterState_Clear() (GH-23044) https://github.com/python/cpython/commit/eba5bf2f5672bf4861c626937597b85ac0c242b9 --

[issue42214] Parser/pegen.c:68: _PyPegen_check_barry_as_flufl: Assertion `t->type == NOTEQUAL' failed

2020-10-30 Thread STINNER Victor
STINNER Victor added the comment: Barry: what did you do? -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue42214] Parser/pegen.c:68: _PyPegen_check_barry_as_flufl: Assertion `t->type == NOTEQUAL' failed

2020-10-30 Thread STINNER Victor
New submission from STINNER Victor : When Python is built in debug mode, it fails with an assertion error on the following code: --- def func1(): if a != b: raise ValueError def func2(): try return 1 finally: pass --- Try attached pgen_bug.py: $ ./python p

[issue42214] Parser/pegen.c:68: _PyPegen_check_barry_as_flufl: Assertion `t->type == NOTEQUAL' failed

2020-10-30 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +BTaskaya ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue42214] Parser/pegen.c:68: _PyPegen_check_barry_as_flufl: Assertion `t->type == NOTEQUAL' failed

2020-10-30 Thread STINNER Victor
STINNER Victor added the comment: In release mode, there is no assertion error: $ python3.10 pgen_bug.py File "/home/vstinner/python/master/pgen_bug.py", line 6 try ^ SyntaxError: invalid syntax -- ___ Python tracker

[issue42214] Parser/pegen.c:68: _PyPegen_check_barry_as_flufl: Assertion `t->type == NOTEQUAL' failed

2020-10-30 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +21966 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23048 ___ Python tracker __

[issue42208] Using logging or warnings during Python finalization does crash Python

2020-10-30 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +21967 pull_request: https://github.com/python/cpython/pull/23047 ___ Python tracker _

[issue42208] Using logging or warnings during Python finalization does crash Python

2020-10-30 Thread miss-islington
Change by miss-islington : -- pull_requests: +21968 pull_request: https://github.com/python/cpython/pull/23049 ___ Python tracker ___ __

[issue42208] Using logging or warnings during Python finalization does crash Python

2020-10-30 Thread STINNER Victor
STINNER Victor added the comment: New changeset 09c6120be8c70366495b027ae3daa213609de3ed by Miss Skeleton (bot) in branch '3.9': bpo-42208: GitHub Action: Add gdb to posix dependencies (GH-23043) (GH-23047) https://github.com/python/cpython/commit/09c6120be8c70366495b027ae3daa213609de3ed -

[issue42173] Drop Solaris support

2020-10-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: Dear Solaris Python fans (about 20 so far here): Here is the situation. There are 1000s of open issues on this tracker and at least 100s of open cpython PRs, and only 20-30 core developers, mostly volunteers, actively (depending on definition) merging PRs a

[issue42210] float.hex discards sign from -nan

2020-10-30 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +tim.peters ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue42210] float.hex discards sign from -nan

2020-10-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: Having fromhex() support signed NaNs was reasonable because it is a valid possible input; however, the case isn't as clear-cut for output. Since applications are allowed to ignore the sign bit, no application should rely on seeing a particular sign for a

[issue42173] Drop Solaris support

2020-10-30 Thread STINNER Victor
STINNER Victor added the comment: Jakub: Would you mind to build the master branch of Python, run the test suite and post the tests results? In short: git clone https://github.com/python/cpython.git cd cpython ./configure ./python -m test -j0 -r If possible, try to install dependencies (read

[issue42196] Python Windows Installation Error 0x800705aa

2020-10-30 Thread Steve Dower
Steve Dower added the comment: That python.exe stub being there may be the reason it doesn't appear to do anything. If you aren't fully up to date on preview builds (which is likely), then running it with any arguments will silently exit. If you run it just as "python.exe" then it will pop o

[issue42208] Using logging or warnings during Python finalization does crash Python

2020-10-30 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +21969 pull_request: https://github.com/python/cpython/pull/23050 ___ Python tracker ___ __

[issue42162] The license page for Python 3.0.1 is messed up

2020-10-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: The docs pages interpret x.y as x.y.latest. So the 3.0 doc is for the 3.0.1 release, the last for 3.0. https://docs.python.org/release/3.0.1/license.html https://docs.python.org/release/3.0/license.html is fine. What's messed up is the license history table

[issue42184] pdb exits unexpectedly when calling args

2020-10-30 Thread Irit Katriel
Irit Katriel added the comment: This is true in 3.10 as well. The same happens if __repr__ raises an exception. do_args command doesn't handle exceptions from repr. See also issue37022. -- components: +Library (Lib) nosy: +iritkatriel versions: +Python 3.10, Python 3.8, Python 3.9 -P

[issue42192] Python Windows .exe Installer ignores /TargetDir if there is an existing installation

2020-10-30 Thread Steve Dower
Steve Dower added the comment: So for a manually managed install, your best bet is to just copy the install directory somewhere else (and then maybe remove the original? Up to you). That will break the MSI tracking that lets us do reliable upgrades and repairs, but shouldn't break Python its

[issue10936] Simple CSS fix for left margin at docs.python.org

2020-10-30 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker ___ _

[issue1509060] Interrupt/kill threads w/exception

2020-10-30 Thread Irit Katriel
Change by Irit Katriel : -- stage: test needed -> needs patch versions: +Python 3.10, Python 3.9 -Python 3.2 ___ Python tracker ___ __

[issue42177] Improving KeyError exception

2020-10-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: Printing an exception is defined as printing the exception message, which currently is e.args[0]. We will not change that as it would break code worldwide. To print more, the class name can be used directly or as a key into a dict of replacements or replac

[issue21078] multiprocessing.managers.BaseManager.__init__'s "serializer" argument is not documented

2020-10-30 Thread Irit Katriel
Change by Irit Katriel : -- components: +Library (Lib) type: -> behavior versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker

[issue5996] abstract class instantiable when subclassing built-in types

2020-10-30 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10, Python 3.9 -Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 ___ Python tracker __

[issue42214] Parser/pegen.c:68: _PyPegen_check_barry_as_flufl: Assertion `t->type == NOTEQUAL' failed

2020-10-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 06f8c3328dcd81c84d1ee2b3a57b5381dcb38482 by Pablo Galindo in branch 'master': bpo-42214: Fix check for NOTEQUAL token in the PEG parser for the barry_as_flufl rule (GH-23048) https://github.com/python/cpython/commit/06f8c3328dcd81c84d1ee

[issue42214] Parser/pegen.c:68: _PyPegen_check_barry_as_flufl: Assertion `t->type == NOTEQUAL' failed

2020-10-30 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +21970 pull_request: https://github.com/python/cpython/pull/23051 ___ Python tracker ___ ___

[issue42208] Using logging or warnings during Python finalization does crash Python

2020-10-30 Thread STINNER Victor
STINNER Victor added the comment: > This change renames collect() to gc_collect_main(). It broke test_gdb on > buildbots, whereas test_gdb passed on Travis CI on my PR 23038. Also, > test_gdb is skipped on the Ubuntu job of GitHub Action since gdb is not > installed. I created https://github

[issue42186] unittest overrides more serious warnings filter added before unittest.main()

2020-10-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: Nick and/or Victor: should this be closed in favor of #15626? or should the latter be closed as mostly fixed, with this being left open as a followup? -- nosy: +terry.reedy, vstinner versions: -Python 3.6, Python 3.7

[issue14845] list() != []

2020-10-30 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> out of date stage: needs patch -> resolved status: pending -> closed ___ Python tracker ___

[issue42208] Using logging or warnings during Python finalization does crash Python

2020-10-30 Thread STINNER Victor
STINNER Victor added the comment: New changeset 710e82630775774dceba5e8f24b1b10e6dfaf9b7 by Victor Stinner in branch 'master': bpo-42208: Add _Py_GetLocaleEncoding() (GH-23050) https://github.com/python/cpython/commit/710e82630775774dceba5e8f24b1b10e6dfaf9b7 --

[issue41803] Robots.txt

2020-10-30 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> rejected stage: -> resolved status: pending -> closed ___ Python tracker ___ ___ Python

[issue42208] Using logging or warnings during Python finalization does crash Python

2020-10-30 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +21971 pull_request: https://github.com/python/cpython/pull/23052 ___ Python tracker ___ __

[issue42215] urlparse with a Windows path returns the drive name as the scheme

2020-10-30 Thread Rangel Reale
New submission from Rangel Reale : Passing a Windows path to urllib.parse.urlparse, without file://, makes it detect the drive as the scheme even it having '\' after the ':', which makes it completelly wrong for a url. Probably this function shouldn't be used with non-uri paths, but it should

[issue42209] Incorrect line reported in syntax error

2020-10-30 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Pytho

[issue26789] logging: Trying to log during Python finalization with NameError: name 'open' is not defined

2020-10-30 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +21972 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23053 ___ Python tracker ___ _

[issue42208] Using logging or warnings during Python finalization does crash Python

2020-10-30 Thread STINNER Victor
STINNER Victor added the comment: New changeset b62bdf71ea0cd52041d49691d8ae3dc645bd48e1 by Victor Stinner in branch 'master': bpo-42208: Add _locale._get_locale_encoding() (GH-23052) https://github.com/python/cpython/commit/b62bdf71ea0cd52041d49691d8ae3dc645bd48e1 -- _

[issue42208] Using logging or warnings during Python finalization does crash Python

2020-10-30 Thread STINNER Victor
STINNER Victor added the comment: I fixed all issues which prevented to fix bpo-26789, I close thie issue. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker _

[issue26789] logging: Trying to log during Python finalization with NameError: name 'open' is not defined

2020-10-30 Thread STINNER Victor
STINNER Victor added the comment: Note: Attached error.py no longer works with a recent aiohttp version. -- ___ Python tracker ___

[issue42216] Optimize dict.popitem() & insert use case.

2020-10-30 Thread Inada Naoki
New submission from Inada Naoki : PyDict_DelItem stores DUMMY entry in the hash table. Without DUMMY, collision chain will be broken so proving will be not working. But `dict.popitem()` returns the last item in the insertion order. The item must be the last item of collision chain too. So `di

[issue42190] global declarations affect too much inside exec or compile

2020-10-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: exec with different global and local dicts is most like executing code in a class definition, where locals is different from globals. But mimicking your exec with an actual class statement does not produce the same result. >>> gdict = {} >>> class C:

[issue26789] logging: Trying to log during Python finalization with NameError: name 'open' is not defined

2020-10-30 Thread STINNER Victor
STINNER Victor added the comment: Attached PR 23053 fix the root issue of the infamous "NameError: name 'open' is not defined" error in the logging module. -- ___ Python tracker

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

2020-10-30 Thread STINNER Victor
STINNER Victor added the comment: Davide Rizzo: > I've just stumbled on the same thing happening on some code that attempts to > use logging on __del__. > (...) > File ".../logging/__init__.py", line 1121, in _open > NameError: name 'open' is not defined This is bpo-26789 which is unrelated t

[issue42214] Parser/pegen.c:68: _PyPegen_check_barry_as_flufl: Assertion `t->type == NOTEQUAL' failed

2020-10-30 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue42214] Parser/pegen.c:68: _PyPegen_check_barry_as_flufl: Assertion `t->type == NOTEQUAL' failed

2020-10-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset ddcd57e3ea75ab0ad370bbaaa6b76338edbca395 by Pablo Galindo in branch '3.9': [3.9] bpo-42214: Fix check for NOTEQUAL token in the PEG parser for the barry_as_flufl rule (GH-23048) (GH-23051) https://github.com/python/cpython/commit/ddcd57e

[issue42211] CRASH

2020-10-30 Thread STINNER Victor
STINNER Victor added the comment: This is a strange copy of my bpo-42208 issue... -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Using logging or warnings during Python finalization does crash Python ___ Pyt

[issue42216] Optimize dict.popitem() & insert use case.

2020-10-30 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +21973 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23054 ___ Python tracker ___

[issue42190] global declarations affect too much inside exec or compile

2020-10-30 Thread Guido van Rossum
Guido van Rossum added the comment: Looks like a bug. Maybe someone can bisect and find when this started happening? -- ___ Python tracker ___

[issue42190] global declarations affect too much inside exec or compile

2020-10-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Maybe someone can bisect and find when this started happening? As far as I understand, this has been the case since Python 2 at least: $cat code.py gdict = {} ldict = {} exec(''' x = 1 def f(): global x''', gdict, ldict) print(('x' in gdict, 'x' in l

[issue42160] unnecessary overhead in tempfile

2020-10-30 Thread STINNER Victor
STINNER Victor added the comment: The commit 8e409cebad42032bb7d0f2cadd8b1e36081d98af introduced a reference leak: https://buildbot.python.org/all/#/builders/320/builds/71 $ make && ./python -m test test_tempfile -R 3:3 ... test_tempfile leaked [49, 49, 49] references, sum=147 test_tempfile le

[issue42195] Inconsistent __args__ between typing.Callable and collections.abc.Callable

2020-10-30 Thread Guido van Rossum
Guido van Rossum added the comment: @corona10 Do I hear that you'd like to work on this? -- ___ Python tracker ___ ___ Python-bugs-

[issue42160] unnecessary overhead in tempfile

2020-10-30 Thread Inada Naoki
Inada Naoki added the comment: Oh, _RandomNameSequence is not true singleton. Instance is used in tests actually. Using `os.register_at_fork` was but idea. Let's reject it. -- ___ Python tracker ___

[issue42160] unnecessary overhead in tempfile

2020-10-30 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +21974 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/23055 ___ Python tracker ___ _

[issue41835] Speed up dict vectorcall creation using keywords

2020-10-30 Thread Inada Naoki
Inada Naoki added the comment: unpack_sequence is very sensitive benchmark. Speed is dramatically changed by code alignment. PGO+LTO will reduce the noise, but we see noise always. I believe there is no significant performance change in macro benchmarks when optimizing this part. Not signif

[issue42160] unnecessary overhead in tempfile

2020-10-30 Thread Inada Naoki
Inada Naoki added the comment: New changeset 43ca084c88d1e46a44199f347c72e26db84903c9 by Inada Naoki in branch 'master': Revert "bpo-42160: tempfile: Reduce overhead of pid check. (GH-22997)" https://github.com/python/cpython/commit/43ca084c88d1e46a44199f347c72e26db84903c9 -- _

[issue42160] unnecessary overhead in tempfile

2020-10-30 Thread Inada Naoki
Inada Naoki added the comment: @Deric-W Please create another PR to change from `choise` to `choises` if you want to optimize it. -- ___ Python tracker ___ __

[issue42216] Optimize dict.popitem() & insert use case.

2020-10-30 Thread Inada Naoki
Inada Naoki added the comment: > But `dict.popitem()` returns the last item in the insertion order. The item > must be the last item of collision chain too. This assumption was wrong. Inserting new item may overwrite dummy entry. In this case, the last item in the middle of collision chain.

[issue42201] Priority queue realization issue

2020-10-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: The previous example, PrioritizedItem, shows how to address the issue. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue42100] Add _PyType_GetModuleByDef

2020-10-30 Thread hai shi
Change by hai shi : -- nosy: +shihai1991 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue15626] unittest.main negates -bb option and programmatic warning configuration

2020-10-30 Thread Nick Coghlan
Change by Nick Coghlan : -- superseder: -> unittest overrides more serious warnings filter added before unittest.main() ___ Python tracker ___ ___

[issue15626] unittest.main negates -bb option and programmatic warning configuration

2020-10-30 Thread Nick Coghlan
Nick Coghlan added the comment: Issue #42186 now covers the request to have a way to tell unittest to leave the warnings filter alone even if it's set programmatically rather than by modifying ``sys.warnoptions``. (Changing version to 3.7 to indicate when the interaction with `-bb` was fixed

[issue42186] unittest overrides more serious warnings filter added before unittest.main()

2020-10-30 Thread Nick Coghlan
Nick Coghlan added the comment: Closing the old one as partially fixed, and linking here as a superseder makes sense to me, so I went ahead and did that. -- ___ Python tracker __

[issue42195] Inconsistent __args__ between typing.Callable and collections.abc.Callable

2020-10-30 Thread Dong-hee Na
Dong-hee Na added the comment: @gvanrossum Sorry, Not this time. I just add myself to observe how to solve this issue. Maybe Batuhan is the proper member to handle this issue. Just question to this issue. Since GenericAlias does not have a Py_TPFLAGS_BASETYPE flag, IMHO we have to add Py_TP

[issue42198] Clean up docs for Union and GenericAlias

2020-10-30 Thread miss-islington
miss-islington added the comment: New changeset bcbf758476c1148993ddf4b54d3f6169b973ee1c by kj in branch 'master': bpo-42198: Document __new__ for types.GenericAlias (GH-23039) https://github.com/python/cpython/commit/bcbf758476c1148993ddf4b54d3f6169b973ee1c -- _

[issue40956] Use Argument Clinic in sqlite3

2020-10-30 Thread Dong-hee Na
Dong-hee Na added the comment: New changeset 7d210271579ae31f43b32f73c2aff5bc4fe0d27f by Erlend Egeberg Aasland in branch 'master': bpo-40956: Convert _sqlite3 module level functions to Argument Clinic (GH-22484) https://github.com/python/cpython/commit/7d210271579ae31f43b32f73c2aff5bc4fe0d27

[issue40956] Use Argument Clinic in sqlite3

2020-10-30 Thread Dong-hee Na
Dong-hee Na added the comment: @erlendaasland Thank you erlendaasland for working on GH-22484. This time was a good time to review my AC knowledge ;) -- ___ Python tracker __

[issue42203] Unexpected behaviour NameError: name 'open' is not defined

2020-10-30 Thread Vinay Sajip
Vinay Sajip added the comment: > Should this be closed and pushed back to fixing logging? It's not particularly a logging issue, though it can surface in logging because that's a mechanism to notify users about stuff. After all, most parts of the stdlib would expect open() to always be avail

<    1   2