[issue43113] os.posix_spawn errors with wrong information when shebang points to not-existing file

2021-02-10 Thread STINNER Victor
STINNER Victor added the comment: > Note that ENOENT is ambiguous, but the exception message is very specific > about what file is not found. And it is not always correct. If you want to be extra nice, you can try to check if the file exists. If it exists, add a message about the shebang.

[issue43001] python3.9.1 test_embed test_tabnanny failed

2021-02-10 Thread STINNER Victor
STINNER Victor added the comment: Try to run directly the two failing tests in verbose mode, copy/paste the output into a file and attach the file here: python -m test test_embed test_tabnanny -v -- ___ Python tracker

[issue43198] Operations on sets more than hundred times less efficient with python3.9 than with previous versions

2021-02-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: This only affects the contrived case of adding and removing exactly the same element in a tight loop, when the set is large. Optimizing that one corner case came at the expense of all other cases. The code is now simpler and slightly faster than

[issue43195] Same userbase for 32bit and 64bit install on Windows causing conflicts

2021-02-10 Thread Eryk Sun
Eryk Sun added the comment: The conflict between 32-bit and 64-bit user site-packages was resolved in issue 41627, starting with Python 3.10. It's not practical to backport this change to existing 3.9 installations. The "nt_user" install scheme was changed to use the config variable

[issue43198] Operations on sets more than hundred times less efficient with python3.9 than with previous versions

2021-02-10 Thread Dennis Sweeney
Dennis Sweeney added the comment: I bisected the change to here: https://github.com/python/cpython/pull/19881 commit 3dd2157febae5087cad24f69b6de9cbd13cd Author: Raymond Hettinger Date: Sun May 3 04:51:05 2020 -0700 Simplify set entry insertion logic. (GH-19881) """Dictionaries

[issue43198] Operations on sets more than hundred times less efficient with python3.9 than with previous versions

2021-02-10 Thread Zachary Ware
Zachary Ware added the comment: Can reproduce on Linux: $ for python in /usr/bin/python3.? /usr/local/bin/python3.? do $python -VV $python -m timeit -r 10 -n 100_000 -u usec -s 'S = set(range(10_000))' 'S.remove(5000);S.add(5000)' done Python 3.8.5 (default, Jul 28 2020, 12:59:40)

[issue43198] Operations on sets more than hundred times less efficient with python3.9 than with previous versions

2021-02-10 Thread Eric Martin
New submission from Eric Martin : Run on a MacBook Pro (15-inch, 2019) 2.3 GHz 8-Core Intel Core i9 16 GB 2400 MHz DDR4 Python 3.8.7 (default, Dec 24 2020, 19:07:18) [Clang 12.0.0 (clang-1200.0.32.27)] on darwin Type "help", "copyright", "credits" or "license" for more

[issue40956] Use Argument Clinic in sqlite3

2021-02-10 Thread Berker Peksag
Berker Peksag added the comment: New changeset ea46579067fd2d4e164d6605719ffec690c4d621 by Erlend Egeberg Aasland in branch 'master': bpo-40956: Fix segfault when Connection.backup is called without target (GH-24503)

[issue43094] sqlite3 signature discrepancies between documentation and implementation

2021-02-10 Thread Berker Peksag
Berker Peksag added the comment: The problem is that sqlite3 isn't the only module where there are discrepancies between documentation and implementation. If we are going to change public sqlite3 APIs in to be positional-only, I'd prefer writing a PEP and fix all modules once and for all.

[issue43188] multiple operations of dict causes core dump of Python interpreter.

2021-02-10 Thread Inada Naoki
Inada Naoki added the comment: Is this the crash you are reporting? ``` Exception ignored in: .Mutating.__del__ at 0x100d35af0> Traceback (most recent call last): File "/Users/methane/work/python/cpython/PC/xxx.py", line 5, in __del__ mutate(d) TypeError: 'str' object is not callable

[issue43188] multiple operations of dict causes core dump of Python interpreter.

2021-02-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: I can confirm this crashes. -- nosy: +methane, rhettinger ___ Python tracker ___ ___

[issue43178] Redundant method overrides in queue

2021-02-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: I prefer to keep the code as-is. It is microscopically faster than than just inheriting the methods, but more importantly it makes it easier to read the code and know that it is correct. We're instructing people to override all four methods when

[issue43197] random.shuffle() returning None

2021-02-10 Thread Pablo
Pablo added the comment: random shuffle is supposed to change the list in place. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue43197] random.shuffle() returning None

2021-02-10 Thread Pablo
Pablo added the comment: ``` import random mylist = ["apple", "banana", "cherry"] print(random.shuffle(mylist)) ``` Result: None Expected result: A shuffled list It works in Python 3.7.3 but it fails in Python 3.8.5 (Ubuntu 20.04.2) -- ___ Python

[issue43197] random.shuffle() returning None

2021-02-10 Thread Pablo
New submission from Pablo : import random mylist = ["apple", "banana", "cherry"] print(random.shuffle(mylist)) Result: None Expected result: A shuffle list It works in Python 3.7.3 but it fails in Python 3.8.5 (Ubuntu 20.04.2) -- messages: 386807 nosy: pablonana priority: normal

[issue43094] sqlite3 signature discrepancies between documentation and implementation

2021-02-10 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: sqlite3.Connection.set_progress_handler() docs: set_progress_handler(handler, n) impl: set_progress_handler(progress_handler, n) Apart from that, the rest of sqlite3.Connection seems to be ok. There's an ongoing discussion at python-dev about how

[issue40956] Use Argument Clinic in sqlite3

2021-02-10 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +23293 pull_request: https://github.com/python/cpython/pull/24503 ___ Python tracker ___

[issue43196] logging.config.dictConfig shuts down socket for existing SysLogHandlers

2021-02-10 Thread Ellis Percival
New submission from Ellis Percival : Since https://github.com/python/cpython/commit/b6c1989168efeb8b6320bec958e7e339270ac0ce dictConfig (and presumably fileConfig) has called logging.shutdown() on the existing handlers. This causes existing SysLogHandlers' sockets to be closed, which then

[issue43195] Same userbase for 32bit and 64bit install on Windows causing conflicts

2021-02-10 Thread Christoph Reiter
New submission from Christoph Reiter : I'm sure this is already filed somewhere, but I couldn't find anything. Currently when installing packages with pip using a 64bit Python to --user and then starting a 32bit Python things fail because they look up packages from the same location:

[issue43191] Shared Memory for array of object

2021-02-10 Thread Eric V. Smith
Eric V. Smith added the comment: If you could demonstrate the problem without numpy, then we could probably help you here. I don't know much about numpy. -- ___ Python tracker

[issue43192] Argparse complains argument required when default is provided

2021-02-10 Thread Clint Olsen
Clint Olsen added the comment: I think your original suggestion makes sense: '?' My intuition is that nargs helps argparse discern whether it's dealing with single or multiple values. That may not be what was intended. There probably shouldn't be multiple ways of indicating an argument is

[issue43192] Argparse complains argument required when default is provided

2021-02-10 Thread Eric V. Smith
Eric V. Smith added the comment: Would you infer it to be ‘?’ or ‘*’? I’m not completely opposed, but I haven’t thought it through or looked at the code. -- ___ Python tracker

[issue43155] PyCMethod_New not defined in python3.lib

2021-02-10 Thread Barry Alan Scott
Barry Alan Scott added the comment: Is there a test suite that checks that the limited API functions can all be linked against? -- ___ Python tracker ___

[issue43192] Argparse complains argument required when default is provided

2021-02-10 Thread Clint Olsen
Clint Olsen added the comment: Do you think it's unreasonable/unintuitive to infer nargs from the default value? -- ___ Python tracker ___

[issue43113] os.posix_spawn errors with wrong information when shebang points to not-existing file

2021-02-10 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: I generally agree, but getting a good, short error message seems to be the hard part here. I previously complained[1] about the following proposal by @hroncok: FileNotFoundError: [Errno 2] No such file or directory: Either './demo' or the interpreter of

[issue43112] SOABI on Linux does not distinguish between GNU libc and musl libc

2021-02-10 Thread Natanael Copa
Natanael Copa added the comment: I created a PR for this https://github.com/python/cpython/pull/24502 -- ___ Python tracker ___

[issue43112] SOABI on Linux does not distinguish between GNU libc and musl libc

2021-02-10 Thread Natanael Copa
Change by Natanael Copa : -- keywords: +patch pull_requests: +23292 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24502 ___ Python tracker ___

[issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py

2021-02-10 Thread Irit Katriel
Irit Katriel added the comment: Marking as blocker because these are 3.10 regressions. -- priority: normal -> release blocker ___ Python tracker ___

[issue29249] Pathlib glob ** bug

2021-02-10 Thread Julien Palard
Julien Palard added the comment: I'm +1 on adding ** to match. My first bet would be to add it to match, not adding a new method, nor a flag, as it should not break compatibility: It would only break iif someone have a `**` in a match AND does *not* expect it to be recursive (as it would

[issue42744] pkg_resources seems to treat python 3.10 as python 3.1

2021-02-10 Thread RhinosF1
RhinosF1 added the comment: Thanks. Very likely! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43113] os.posix_spawn errors with wrong information when shebang points to not-existing file

2021-02-10 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with @hroncok, and maybe we could tweak the message to say FileNotFoundError: [Errno 2] No such file or directory: while executing './demo'. Maybe bad shebang, or missing file? Or something to that effect. I realize that listing all possible error

[issue42744] pkg_resources seems to treat python 3.10 as python 3.1

2021-02-10 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: setuptools and pip were upgraded in alpha 5 which could have fixed this : https://github.com/python/cpython/commit/4d11ecbb5ed78e6259ee27289c7638aad795f473 -- nosy: +xtreak ___ Python tracker

[issue43113] os.posix_spawn errors with wrong information when shebang points to not-existing file

2021-02-10 Thread Miro Hrončok
Miro Hrončok added the comment: Note that ENOENT is ambiguous, but the exception message is very specific about what file is not found. And it is not always correct. -- ___ Python tracker

[issue42744] pkg_resources seems to treat python 3.10 as python 3.1

2021-02-10 Thread RhinosF1
Change by RhinosF1 : -- type: compile error -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42744] pkg_resources seems to treat python 3.10 as python 3.1

2021-02-10 Thread RhinosF1
RhinosF1 added the comment: Can't seem to reproduce on alpha 5. https://github.com/MirahezeBots/MirahezeBots/pull/431/checks?check_run_id=1873007567 https://github.com/python/cpython/compare/v3.10.0a3...v3.10.0a5 doesn't load for me so not sure when it was fixed. -- resolution: ->

[issue42744] pkg_resources seems to treat python 3.10 as python 3.1

2021-02-10 Thread RhinosF1
RhinosF1 added the comment: Adding log before it gets cleaned up as too old. 2020-12-25T17:42:03.0730305Z Traceback (most recent call last): 2020-12-25T17:42:03.0733282Z File "/opt/hostedtoolcache/Python/3.10.0-alpha.3/x64/lib/python3.10/site-packages/pkg_resources/__init__.py", line 584,

[issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-02-10 Thread Senthil Kumaran
Senthil Kumaran added the comment: I meant, "I did some research, but couldn't come away conclusively". -- ___ Python tracker ___

[issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-02-10 Thread Senthil Kumaran
Senthil Kumaran added the comment: Sorry for that, Ned. I will take a decision on this by Saturday (13-Feb). I did some research, but could come way conclusively. I have not heard any opinions (+ves or -ves) on this. This will be a breaking change, so necessary to support it with

[issue43113] os.posix_spawn errors with wrong information when shebang points to not-existing file

2021-02-10 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: How do you propose to approach documentation of such behavior? The underlying cause is the ambiguity of ENOENT error code from execve() returned by the kernel, so it applies to all places where Python can call execve(), including os.posixspawn(),

[issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-02-10 Thread Ned Deily
Ned Deily added the comment: Ping. This issue has been delaying 3.7.x and 3.6.x security releases. I would prefer to have it resolved before releasing. -- ___ Python tracker

[issue43190] < test.support > check_free_after_iterating( ) causes core dump in handling iteration.

2021-02-10 Thread Irit Katriel
Irit Katriel added the comment: This looks similar to 43185. -- nosy: +iritkatriel ___ Python tracker ___ ___ Python-bugs-list

[issue43191] Shared Memory for array of object

2021-02-10 Thread Hannah Busshoff
Hannah Busshoff added the comment: Hi Eric, Thanks for your quick reply. The numpy operation was only an attempt to serialize the nested list and make it available as a shared memory object. As is written in the documentation, the SharedList() does not take nested lists as an input. I

[issue43194] Add JFXX as jpeg marker in imghdr module

2021-02-10 Thread JiKwon Kim
New submission from JiKwon Kim : Currently imghdr module only finds "JFIF" or "Exif" in specific position. However there's some jpeg images with "JFXX" marker. I had some image with this marker and imghdr.what() returned None. Refer to:

[issue43192] Argparse complains argument required when default is provided

2021-02-10 Thread Eric V. Smith
Eric V. Smith added the comment: Providing a default value does not imply setting nargs, so you need to specify both. I think it's not clear what nargs would default to, if you wanted to change the behavior if default= is supplied.. In your example you probably want nargs='?', not '*'.

[issue43185] AssertRaises() causes core dump in handling recursion

2021-02-10 Thread Mark Shannon
Change by Mark Shannon : -- assignee: -> Mark.Shannon components: +Interpreter Core -Library (Lib) versions: -Python 3.10 ___ Python tracker ___

[issue43191] Shared Memory for array of object

2021-02-10 Thread Eric V. Smith
Eric V. Smith added the comment: This looks like a numpy usage question, not a python bug. I suggest you ask on Stackoverflow or a numpy user forum. -- nosy: +eric.smith ___ Python tracker

[issue42500] crash with unbounded recursion in except statement

2021-02-10 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +23290 pull_request: https://github.com/python/cpython/pull/24501 ___ Python tracker ___

[issue43185] AssertRaises() causes core dump in handling recursion

2021-02-10 Thread Mark Shannon
Mark Shannon added the comment: I think this was fixed by https://github.com/python/cpython/pull/23568 The root cause seems to be the same as #42500, so I'm going to backport https://github.com/python/cpython/pull/23568 to 3.9 -- ___ Python

[issue43185] AssertRaises() causes core dump in handling recursion

2021-02-10 Thread Irit Katriel
Irit Katriel added the comment: Yang - no secret really, just trial and error. Mark - right I wasn't on master, sorry. -- ___ Python tracker ___

[issue43185] AssertRaises() causes core dump in handling recursion

2021-02-10 Thread Mark Shannon
Mark Shannon added the comment: 3.9 crashes. On master, I'm not seeing a crash, just a RecursionError. >>> import unittest >>> >>> def f(): ... raise TypeError ... >>> class TestAudioop(unittest.TestCase): ... def test_invalid_adpcm_state(self): ...

[issue43185] AssertRaises() causes core dump in handling recursion

2021-02-10 Thread Yang Feng
Yang Feng added the comment: Could you please tell me your secret method of getting the minimal script? I will try to provide minimal ones in our following work. -- ___ Python tracker

[issue43185] AssertRaises() causes core dump in handling recursion

2021-02-10 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43185] AssertRaises() causes core dump in handling recursion

2021-02-10 Thread Irit Katriel
Irit Katriel added the comment: Reproduced on master as well. Simplified script: -- import unittest def f(): raise TypeError class TestAudioop(unittest.TestCase): def test_invalid_adpcm_state(self): self.assertRaises(TypeError, f)

[issue43145] Leak of locks from multiprocessing.Process

2021-02-10 Thread Boris Staletic
Boris Staletic added the comment: The `multiprocessing.Process`, on Linux, ends up doing something like this: pid = os.fork() if pid == 0: os._exit() Translated to C: int main() { Py_Initialize(); PyOS_BeforeFork(); pid_t pid = fork(); if (pid == 0) {

[issue43155] PyCMethod_New not defined in python3.lib

2021-02-10 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch nosy: +ZackerySpytz nosy_count: 1.0 -> 2.0 pull_requests: +23289 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24500 ___ Python tracker

[issue43112] SOABI on Linux does not distinguish between GNU libc and musl libc

2021-02-10 Thread h-vetinari
Change by h-vetinari : -- nosy: +h-vetinari ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43113] os.posix_spawn errors with wrong information when shebang points to not-existing file

2021-02-10 Thread Tomas Orsava
Tomas Orsava added the comment: I agree that at least documenting the behaviour is a good idea. This bug has seriously confused our QE person with years of experience, and then me when debugging with him. Chances are it's going to confuse somebody else too. --

[issue43193] Installer for All users

2021-02-10 Thread Muhammad Hussein Ammari
New submission from Muhammad Hussein Ammari : I installed Python for All users Installer make below file to %LocalAppData% (Instead of %ProgramData%) "%LocalAppData%\Package Cache\{b2be55ad-3177-42aa-a6c2-53004684e4ea}" Now other user can't unistalling Python. Please fix this issue. --

[issue43192] Argparse complains argument required when default is provided

2021-02-10 Thread Clint Olsen
Clint Olsen added the comment: Sorry, I meant to say args.foo should be 'bar'. -- ___ Python tracker ___ ___ Python-bugs-list

[issue43192] Argparse complains argument required when default is provided

2021-02-10 Thread Clint Olsen
New submission from Clint Olsen : When I run the following program, I expect args.run to be 'foo' if no argument is specified on the command-line. parser = argparse.ArgumentParser() parser.add_argument('foo', default='bar') args = parser.parse_args() $ ./test usage: test [-h] foo test:

[issue43183] Asyncio can't close sockets properly on Linux cause CLOSE_WAIT

2021-02-10 Thread Bob
Change by Bob : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43191] Shared Memory for array of object

2021-02-10 Thread Hannah Busshoff
New submission from Hannah Busshoff : Dear all, When seeking to put an object of type -- Array of object -- into shared memory when doing multiprocessing via starmap, I am encountering problems -- in that sense that the program does not finish running but apparently gets stuck. I attached

[issue43190] < test.support > check_free_after_iterating( ) causes core dump in handling iteration.

2021-02-10 Thread Yang Feng
New submission from Yang Feng : In the following program, we call check_free_after_iterating( ) twice, in the second time, we recursively call function test_free_after_iterating(). Python interpreter crashes. +++ import unittest import test.support

[issue43189] decorator function run_with_locale() crashes Python interpreter

2021-02-10 Thread Yang Feng
New submission from Yang Feng : We use run_with_locale() as decorator function, then we recursively call test_float__format__locale in the following example. Python interpreter crashes. +++ from test.support import run_with_locale

[issue43188] multiple operations of dict causes core dump of Python interpreter.

2021-02-10 Thread Yang Feng
New submission from Yang Feng : In the following programs, we call check_reentrant_insertion("s") twice, after multiple of update and clear of dict, the Python interpreter crashes. +++ def check_reentrant_insertion(mutate): class Mutating:

[issue43187] Dict creation in recursive function cause interpreter crashes.

2021-02-10 Thread Yang Feng
New submission from Yang Feng : In the following programs, dict is created in recursive calls. Then a core dump is reported by Python interpreter. +++ def test_equal_operator_modifying_operand(): class X(): def __del__(DictTest):

[issue43186] Recursive call causes core dump in assertRaises

2021-02-10 Thread Yang Feng
New submission from Yang Feng : In following teststr.py, class MyString is nestedly instanced in method __getattr__(). This script will lead to a "core dump" in Python interpreter. My Python version is 3.9.1 and my operating system is Ubuntu 16.04. teststr.py

[issue43145] Leak of locks from multiprocessing.Process

2021-02-10 Thread Gregory P. Smith
Change by Gregory P. Smith : -- title: Leak of locks in a subprocess -> Leak of locks from multiprocessing.Process ___ Python tracker ___

[issue43185] AssertRaises() causes core dump in handling recursion

2021-02-10 Thread Yang Feng
New submission from Yang Feng : Seeing the following program, in the second assertRaises(), function "test_invalid_adpcm_state()" is recursively called. Then a fatal Python error shows up and the Python interpreter crashes. ++ import unittest import

[issue43184] Missing docs for LoggerAdapter manager and name property

2021-02-10 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43184] Missing docs for LoggerAdapter manager and name property

2021-02-10 Thread Yoav Palti
New submission from Yoav Palti : I found the following issue which added manager and name properties to logging.LoggerAdapter on version 3.6: https://bugs.python.org/issue31457 However the current docs don't have them documented: