[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.

The problem is that the code to generate the exception is quite generic, it 
creates an OSError exception object from an errno (int) and a filename (str). 
It's not trivial to change the exception message. Is it worth it?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 before.  This is also what we do for dictionaries.

$ python3.8 -m timeit -r 11 -s 's=set(range(10_000))' 'for i in range(10_000): 
(s.discard(i), s.add(10_000 - i))'
200 loops, best of 11: 1.72 msec per loop

$ python3.9 -m timeit -r 11 -s 's=set(range(10_000))' 'for i in range(10_000): 
(s.discard(i), s.add(10_000 - i))'
200 loops, best of 11: 1.09 msec per loop

Thank you for the report, but this was an intended change.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 
"py_version_nodot_plat". For example:

>>> sysconfig.get_path('purelib', 'nt_user', expand=False)
'{userbase}/Python{py_version_nodot_plat}/site-packages'

This variable is based on sys.winver (i.e. the version number of the Python 
DLL), which includes a "-32" suffix in 32-bit Python. For example:

>>> sys.winver
'3.10-32'
>>> sysconfig.get_config_var('py_version_nodot_plat')
'310-32'

--
nosy: +eryksun
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Relocate user site packages on Windows 32-bit

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 no longer reuse dummy entries. Instead, dummies accumulate 
until cleared by resizes. That is a good strategy because it tightens the inner 
search loop and it makes the code cleaner. Here, we do the same thing for 
sets"""


It looks like this was a deliberate change to speed up lookups, but it also 
looks like it adversely affected this case.  With dictionaries, mutation 
typically occurs as setting a different value for the same key---no dummy 
entries get created, so dummy entries are less common. But with sets, mutation 
can only come from adding/discarding, so maybe this optimization is less 
worthwhile for sets.

--
nosy: +Dennis Sweeney

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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) 
[GCC 9.3.0]
10 loops, best of 10: 0.0831 usec per loop
Python 3.6.11 (tags/v3.6.11:d56cd4006a, Jul  1 2020, 10:47:06) 
[GCC 9.3.0]
10 loops, best of 10: 0.0968 usec per loop
Python 3.7.9 (tags/v3.7.9:13c94747c7, Oct 19 2020, 23:50:03) 
[GCC 9.3.0]
10 loops, best of 10: 0.0935 usec per loop
Python 3.9.0 (tags/v3.9.0:9cf6752276, Nov 14 2020, 15:41:20) 
[GCC 9.3.0]
10 loops, best of 10: 50.2 usec per loop

--
nosy: +rhettinger, zach.ware

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 information.
>>> from timeit import timeit
>>> S = set(range(10_000))
>>> timeit('S.remove(5000); S.add(5000)', globals=globals(), number=100_000)
0.0193329169984

$ python3.9
Python 3.9.1 (default, Dec  8 2020, 13:10:53) 
[Clang 12.0.0 (clang-1200.0.32.27)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from timeit import timeit
>>> S = set(range(10_000))
>>> timeit('S.remove(5000); S.add(5000)', globals=globals(), number=100_000)
3.851722548998

--
components: Interpreter Core
messages: 386815
nosy: eamartin
priority: normal
severity: normal
status: open
title: Operations on sets more than hundred times less efficient with python3.9 
than with previous versions
type: performance
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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)
https://github.com/python/cpython/commit/ea46579067fd2d4e164d6605719ffec690c4d621


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
Exception ignored in: .Mutating.__del__ at 0x100d35c10>
Traceback (most recent call last):
  File "/Users/methane/work/python/cpython/PC/xxx.py", line 5, in __del__
Fatal Python error: _Py_CheckRecursiveCall: Cannot recover from stack overflow.
Python runtime state: initialized

Current thread 0x00010072bd40 (most recent call first):
  File "/Users/methane/work/python/cpython/xxx.py", line 9 in 
check_reentrant_insertion
  File "/Users/methane/work/python/cpython/xxx.py", line 13 in 
test_reentrant_insertion
  File "/Users/methane/work/python/cpython/xxx.py", line 18 in 
test_reentrant_insertion
...
```

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 subclassing and we don't make any promises about how the 
parent method is implemented.  At this point, the implementations happen to be 
the same, but that isn't guaranteed.  We could at some point change the 
implementation of the parent class method and wouldn't want the subclasses to 
break.

So, let's keep the loose coupling, the self-contained code that follows the 
rules, code that is slightly faster, and code that is easy to read.

Thank you for the suggestion, but this micro-factoring doesn't make us better 
off.

--
nosy: +rhettinger
resolution:  -> rejected
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
severity: normal
status: open
title: random.shuffle() returning None
type: behavior
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 to resolve this issue. 
I'm in favour of normalising the create_*() methods to be positional only (like 
create_collation() is now).

sqlite3.Cursor and sqlite3.Row methods seems to be ok as well.

--
title: Update sqlite3 docs and docstrings to reflect implementation -> sqlite3 
signature discrepancies between documentation and implementation

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 causes a 
BadFileDescriptor error when you try to use it:

--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib/python3.8/logging/handlers.py", line 940, in emit
self.socket.sendto(msg, self.address)
OSError: [Errno 9] Bad file descriptor
Call stack:
  File "/home/flyte/workspaces/python/test.py", line 18, in 
log.warning("Breaks")

Reproduce the error with the following code:

import logging.config
import socket
from logging.handlers import SysLogHandler

log = logging.getLogger("logtest")
syslog_handler = SysLogHandler(("127.0.0.1", 12345), socktype=socket.SOCK_DGRAM)
log.addHandler(syslog_handler)

log.warning("Works")

logging.config.dictConfig(
{
"version": 1,
"disable_existing_loggers": False,
}
)

log.warning("Breaks")

This causes issues such as https://github.com/benoitc/gunicorn/issues/2073 
where gunicorn sets up a SysLogHandler, then when any app (Django does it by 
default) calls dictConfig() it closes the socket used by gunicorn's 
SysLogHandler.

Assuming this also affects Python 3.9 and 3.10, but untested.

--
components: Library (Lib)
messages: 386805
nosy: flyte
priority: normal
severity: normal
status: open
title: logging.config.dictConfig shuts down socket for existing SysLogHandlers
type: crash
versions: Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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:

.\python.exe -m site --user-base
C:\Users\user\AppData\Roaming\Python

For example trying to import numpy from a 32bit Python when it was installed 
with 64bit:

>>> import numpy
Traceback (most recent call last):
  File "", line 1, in 
  File 
"C:\Users\user\AppData\Roaming\Python\Python39\site-packages\numpy\__init__.py",
 line 143, in 
from . import _distributor_init
  File 
"C:\Users\user\AppData\Roaming\Python\Python39\site-packages\numpy\_distributor_init.py",
 line 26, in 
WinDLL(os.path.abspath(filename))
  File "C:\Python39-32\lib\ctypes\__init__.py", line 374, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 is not a valid Win32 application

I guess this isn't a very common problem, but in MSYS2 we are facing this issue 
because users can easily switch between 32bit/64bit Python. We could patch 
things, but I'm wondering if there are any plans to fix this in CPython itself 
so we don't invent our own thing.

thanks

--
components: Windows
messages: 386804
nosy: lazka, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Same userbase for 32bit and 64bit install on Windows causing conflicts
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 
optional. It seems that required= and nargs='?'|'*' combinations could lead to 
conflicting requirements.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 './demo' not found.

But may be it's just me. Does anybody else feel that mentioning "the 
interpreter" is this way could be confusing in prevalent cases when the actual 
problem is missing './demo' itself? If we can come up with a good message, I 
can look into turning it into a PR.

The error message above also reads to me like there are no other possible 
reasons of ENOENT. On Linux, binfmt_misc[2] provides a way to run arbitrary 
code on execve(). This is used, for example, to transparently run binaries for 
foreign arches via qemu-user, so probably ENOENT would be returned if QEMU 
itself it missing. QEMU *may* be thought as a kind of interpreter here, though 
it's completely unrelated to a hash-bang or an ELF interpreter.

But I don't know about other POSIX platforms. As a theoretical example, if the 
dynamic library loader is implemented in the kernel, the system call could 
return ENOENT in case of a missing library. Do we need to worry about it? Does 
anybody know about the situation on macOS, where posix_spawn() is a system call 
too?

[1] https://bugs.python.org/issue43113#msg386210
[2] https://en.wikipedia.org/wiki/Binfmt_misc

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 continue to match the previous files, it may just 
match more).

Would this break something I did not foresee?

--
nosy: +mdk

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 reasons 
is a fool's errand, and there are cases where it might make things more 
confusing.

This reminds me of the old MS-DOS errors like "A duplicate file name exists, or 
the file cannot be found": as a user, I always wanted to scream "you know which 
one, tell me!". Sadly, you can't always get the OS to give you the info. Which 
is also like Windows "can't load DLL" errors: which one?!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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:  -> fixed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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, in _build_master
2020-12-25T17:42:03.0736279Z ws.require(__requires__)
2020-12-25T17:42:03.0737901Z   File 
"/opt/hostedtoolcache/Python/3.10.0-alpha.3/x64/lib/python3.10/site-packages/pkg_resources/__init__.py",
 line 901, in require
2020-12-25T17:42:03.0739330Z needed = 
self.resolve(parse_requirements(requirements))
2020-12-25T17:42:03.0742242Z   File 
"/opt/hostedtoolcache/Python/3.10.0-alpha.3/x64/lib/python3.10/site-packages/pkg_resources/__init__.py",
 line 792, in resolve
2020-12-25T17:42:03.0744366Z raise VersionConflict(dist, 
req).with_context(dependent_req)
2020-12-25T17:42:03.0747963Z pkg_resources.ContextualVersionConflict: (geoip2 
4.1.0 
(/opt/hostedtoolcache/Python/3.10.0-alpha.3/x64/lib/python3.10/site-packages), 
Requirement.parse('geoip2<3.0'), {'sopel'})
2020-12-25T17:42:03.0754140Z 
2020-12-25T17:42:03.0754883Z During handling of the above exception, another 
exception occurred:
2020-12-25T17:42:03.0755487Z 
2020-12-25T17:42:03.0756004Z Traceback (most recent call last):
2020-12-25T17:42:03.0757250Z   File 
"/opt/hostedtoolcache/Python/3.10.0-alpha.3/x64/bin/sopel", line 6, in 
2020-12-25T17:42:03.0758216Z from pkg_resources import load_entry_point
2020-12-25T17:42:03.0759775Z   File 
"/opt/hostedtoolcache/Python/3.10.0-alpha.3/x64/lib/python3.10/site-packages/pkg_resources/__init__.py",
 line 3262, in 
2020-12-25T17:42:03.0760984Z def _initialize_master_working_set():
2020-12-25T17:42:03.0762804Z   File 
"/opt/hostedtoolcache/Python/3.10.0-alpha.3/x64/lib/python3.10/site-packages/pkg_resources/__init__.py",
 line 3245, in _call_aside
2020-12-25T17:42:03.0763832Z f(*args, **kwargs)
2020-12-25T17:42:03.0765396Z   File 
"/opt/hostedtoolcache/Python/3.10.0-alpha.3/x64/lib/python3.10/site-packages/pkg_resources/__init__.py",
 line 3274, in _initialize_master_working_set
2020-12-25T17:42:03.078Z working_set = WorkingSet._build_master()
2020-12-25T17:42:03.0768222Z   File 
"/opt/hostedtoolcache/Python/3.10.0-alpha.3/x64/lib/python3.10/site-packages/pkg_resources/__init__.py",
 line 586, in _build_master
2020-12-25T17:42:03.0769460Z return 
cls._build_from_requirements(__requires__)
2020-12-25T17:42:03.0771154Z   File 
"/opt/hostedtoolcache/Python/3.10.0-alpha.3/x64/lib/python3.10/site-packages/pkg_resources/__init__.py",
 line 599, in _build_from_requirements
2020-12-25T17:42:03.0772389Z dists = ws.resolve(reqs, Environment())
2020-12-25T17:42:03.0773911Z   File 
"/opt/hostedtoolcache/Python/3.10.0-alpha.3/x64/lib/python3.10/site-packages/pkg_resources/__init__.py",
 line 787, in resolve
2020-12-25T17:42:03.0775227Z raise DistributionNotFound(req, requirers)
2020-12-25T17:42:03.0776843Z pkg_resources.DistributionNotFound: The 
'geoip2<3.0' distribution was not found and is required by sopel
2020-12-25T17:42:03.0924206Z ##[error]Process completed with exit code 1.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 documentation, alerts etc.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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(), os.execve() and subprocess, so it's not clear to me where such 
documentation should be placed. And, of course, this behavior is not specific 
to CPython.

The Linux man pages mention various causes of this error[1], though POSIX 
doesn't[2].

While ENOENT ambiguity is indeed confusing, one of the top results of my DDG 
search on "linux no such file or directory but script exists" is this link[3].

[1] https://man7.org/linux/man-pages/man2/execve.2.html
[2] https://pubs.opengroup.org/onlinepubs/9699919799/functions/execve.html
[3] 
https://stackoverflow.com/questions/3949161/no-such-file-or-directory-but-it-exists

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 posed the question as well on Stackoverflow with a slightly longer example. 
Feel free to check it out: 
https://stackoverflow.com/questions/66138235/multiprocessing-with-array-of-objects-in-shared-memory.
 

Thanks again. 

Cheers, 

Hannah

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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:
https://www.ecma-international.org/wp-content/uploads/ECMA_TR-98_1st_edition_june_2009.pdf
(Section 10.1 JFIF Extension APP0 Marker Segment)

--
components: Library (Lib)
messages: 386782
nosy: elbarkwon
priority: normal
pull_requests: 23291
severity: normal
status: open
title: Add JFXX as jpeg marker in imghdr module
type: enhancement
versions: Python 3.10, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 '*'.

--
nosy: +eric.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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):
... self.assertRaises(TypeError, f) 
... self.test_invalid_adpcm_state()
... 
>>> TestAudioop().test_invalid_adpcm_state()
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 4, in test_invalid_adpcm_state
  File "", line 4, in test_invalid_adpcm_state
  File "", line 4, in test_invalid_adpcm_state
  [Previous line repeated 992 more times]
  File "", line 3, in test_invalid_adpcm_state
  File "/home/mark/repos/cpython/Lib/unittest/case.py", line 730, in 
assertRaises
context = _AssertRaisesContext(expected_exception, self)
  File "/home/mark/repos/cpython/Lib/unittest/case.py", line 168, in __init__
_BaseTestCaseContext.__init__(self, test_case)
RecursionError: maximum recursion depth exceeded

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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) 
self.test_invalid_adpcm_state()

TestAudioop().test_invalid_adpcm_state()

--

--
nosy: +Mark.Shannon, iritkatriel

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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) {
PyOS_AfterFork_Child(); // Reinitializes stuff.
_exit(0); // Child process exits without cleanup.
}
PyOS_AfterFork_Parent();
Py_Finalize();
}

The call to `_exit()` happens in Lib/multiprocessing/popen_fork.py#L73

My attempts at cleaning this up resulted in even more problems.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--
components: Windows
messages: 386772
nosy: paul.moore, steve.dower, tim.golden, xmha97, zach.ware
priority: normal
severity: normal
status: open
title: Installer for All users
type: enhancement
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: error: the following arguments are required: foo

However if I specify nargs='*' this error goes away.

Maybe I'm missing something obvious, but this seems non-intuitive to me.

--
components: Library (Lib)
messages: 386770
nosy: Clint Olsen
priority: normal
severity: normal
status: open
title: Argparse complains argument required when default is provided
type: behavior
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 a minimal example. 

Many thanks for your help. I sincerely hope I have not overlooked that this 
issue has been raised by somebody else. I am happy to provide further input!

Cheers, 

Hannah

--
files: example.py
messages: 386769
nosy: hannahbusshoff
priority: normal
severity: normal
status: open
title: Shared Memory for array of object
type: crash
versions: Python 3.8
Added file: https://bugs.python.org/file49801/example.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

class UnicodeTest(unittest.TestCase):
pass

def test_free_after_iterating():
ut = UnicodeTest()
test.support.check_free_after_iterating(ut, iter, str)
test.support.check_free_after_iterating(str, test_free_after_iterating(), 
str)

test_free_after_iterating()
+

System Info: Ubuntu 16.04
Python Version:  Python 3.9.1

--
components: Library (Lib)
messages: 386768
nosy: CharlesFengY
priority: normal
severity: normal
status: open
title: < test.support > check_free_after_iterating( ) causes core dump in 
handling iteration.
type: crash
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

@run_with_locale('LC_NUMERIC', 'en_US.UTF8')
def test_float__format__locale():
test_float__format__locale()
test_float__format__locale()
+

System Info: Ubuntu 16.04
Python Version:  Python 3.9.1

--
components: Tests
messages: 386767
nosy: CharlesFengY
priority: normal
severity: normal
status: open
title:  decorator function run_with_locale() crashes Python 
interpreter
type: crash
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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:
def __del__(self):
mutate(d)

d = {k: Mutating() for k in 'abcdefghijklmnopqr'}
for k in list(d):
d[k] = k

def test_reentrant_insertion():

check_reentrant_insertion("s")

def mutate(d):
d.update(DictTest.__dict__)
d.clear()
check_reentrant_insertion(test_reentrant_insertion())

test_reentrant_insertion()
+

System Info: Ubuntu 16.04
Python Version:  Python 3.9.1

--
components: Interpreter Core
messages: 386766
nosy: CharlesFengY
priority: normal
severity: normal
status: open
title:  multiple operations of dict causes core dump of Python 
interpreter.
type: crash
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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):
dict_b.clear()

def __eq__(DictTest, other):
dict_a.clear()
return True

def __hash__(DictTest):
return 13
dict_d = {X(): 0}

class Y():

def __eq__(DictTest, other):
dict_d.clear()
return True
dict_d = {0: Y()}
# dict_c = {0: set()}
test_equal_operator_modifying_operand()

test_equal_operator_modifying_operand()
+

--
components: Interpreter Core
messages: 386765
nosy: CharlesFengY
priority: normal
severity: normal
status: open
title: Dict creation in recursive function cause interpreter crashes.
type: crash
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
+++
class StrError(str):
pass

class MyString:

def __init__(self, istr):
self.__mystr__ = istr

def __getattr__(self, content):
with self:
return MyString(getattr(self.__mystr__, content))

def __setattr__(self, content, sstr):
setattr(self.__mystr__, content)

def __enter__(self):
return self

def __exit__(self, exc_type, exc_val, exc_tb):
 raise StrError(self.__mystr__) 
 return True

MyString("hello")
+

--
components: Library (Lib)
messages: 386764
nosy: CharlesFengY
priority: normal
severity: normal
status: open
title: Recursive call causes core dump in assertRaises
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 audioop

class TestAudioop(unittest.TestCase):
 pass

def test_invalid_adpcm_state():
 TestAudioop.assertRaises(TypeError, audioop.lin2adpcm, b'\x00', 1, 555)
 TestAudioop.assertRaises(test_invalid_adpcm_state(), 
audioop.adpcm2lin, b'\x00', 1, (0, (- 1)))

TestAudioop = TestAudioop()
test_invalid_adpcm_state()

+++

System Info: Ubuntu 16.04
Python Version:  Python 3.9.1

--
components: Library (Lib)
messages: 386763
nosy: CharlesFengY
priority: normal
severity: normal
status: open
title:  AssertRaises() causes core dump in handling recursion
type: crash
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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:
https://docs.python.org/3.6/library/logging.html#logging.LoggerAdapter

--
assignee: docs@python
components: Documentation
messages: 386762
nosy: docs@python, yoavp10
priority: normal
severity: normal
status: open
title: Missing docs for LoggerAdapter manager and name property
versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com