[issue42699] Use `.join(k for k in g)` instead of `.join([k for k in g])`

2020-12-20 Thread Samuel Marks


Samuel Marks  added the comment:

@eric.smith No benchmarks offhand, but I'd expect it to be a very minor 
improvement (if detectable).

If this gets accepted I'll probably do a bunch of little changes like this, to 
improve things, e.g., replace '%' with '.format' (or f-strings, whatever you 
prefer), ensure `.iterkeys()`/`.iteritems()` validity, and collapse some 
obvious `.append` cases with list comprehensions.

The idea I'm going off is that when one is debugging their Python code, and it 
goes across to the Python source, that that Python source code quality is 
better or equal to the one the higher-level Python developer is creating.

Constructing unnecessary lists is one such code quality issue.

--

___
Python tracker 

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



[issue42700] xml.parsers.expat.errors description of codes/messages is flipped

2020-12-20 Thread Michael Wayne Goodman


Change by Michael Wayne Goodman :


--
keywords: +patch
pull_requests: +22738
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/23876

___
Python tracker 

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



[issue42699] Use `.join(k for k in g)` instead of `.join([k for k in g])`

2020-12-20 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

This is a pessimization given the current implementation of str.join; it calls 
PySequence_Fast as the very first step, which is effectively free for a tuple 
or list input (just reference count manipulation), but must convert a generator 
expression to a list (which is slower than building the list with a listcomp in 
the first place).

It does this so it can do two passes, one to compute the final length (and max 
ordinal) of the string, allowing it to allocate just once, and one to build the 
new string.

In theory, it might be rewritten to use PyUnicodeWriter under-the-hood for 
single-pass operation, but as is, a generator expression is slower than a 
listcomp for this task.

--
nosy: +josh.r

___
Python tracker 

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



[issue42699] Use `.join(k for k in g)` instead of `.join([k for k in g])`

2020-12-20 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Sorry Samuel, but this would be a performance degradation.  The reason is that 
the algorithm of str.join makes two passes over the input, so it runs faster 
when the input is already a list; otherwise, it would have to do the additional 
work of creating a list.

--
nosy: +rhettinger
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



[issue42697] 3.8.7rc1 regression: 'free(): invalid pointer' after running backports-zoneinfo test suite

2020-12-20 Thread Brandt Bucher


Brandt Bucher  added the comment:

On my phone right now, but this looks a tad suspicious:

https://github.com/pganssle/zoneinfo/blob/07ec80ad5dc7e7e4b4f861ddbb61a9b71e9f27c7/lib/zoneinfo_module.c#L596-L600

--

___
Python tracker 

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



[issue42698] Deadlock in pysqlite_connection_dealloc()

2020-12-20 Thread hydroflask


hydroflask  added the comment:

This is also a problem in pysqlite_connection_close() as currently implemented.

--

___
Python tracker 

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



[issue42698] Deadlock in pysqlite_connection_dealloc()

2020-12-20 Thread hydroflask


hydroflask  added the comment:

Nevermind it seems that it's legal to call Py_BEGIN_ALLOW_THREADS in 
tp_dealloc. The fix is then to allow threads around sqlite3_close().

--

___
Python tracker 

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



[issue42691] macOS 11.1 + Homebrew 2.6.2 + Python 3.9.1 = "IDLE" crash

2020-12-20 Thread Пётр Сиренко

Пётр Сиренко  added the comment:

petr@air-anastasia ~ % python3 -c "import tkinter; tkinter.Tk()"   
macOS 11 or later required !
zsh: abort  python3 -c "import tkinter; tkinter.Tk()"

>>> tkinter.TclVersion
8.5
>>> tkinter.TkVersion
8.5

petr@air-anastasia ~ % brew install tcl-tk
Updating Homebrew...
==> Auto-updated Homebrew!
Updated Homebrew from f47c1eae3 to 1eff47766.
Updated 2 taps (homebrew/core and homebrew/cask).
==> New Formulae
xcb-util-image xcb-util-renderutilxcb-util-wm
==> Updated Formulae
Updated 29 formulae.
==> Updated Casks
Updated 18 casks.

==> Downloading https://homebrew.bintray.com/bottles/tcl-tk-8.6.10.big_sur.bottl
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/b7c942f7fc15b6a402bf4
 100.0%
==> Pouring tcl-tk-8.6.10.big_sur.bottle.1.tar.gz
==> Caveats
tcl-tk is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.

If you need to have tcl-tk first in your PATH run:
  echo 'export PATH="/usr/local/opt/tcl-tk/bin:$PATH"' >> ~/.zshrc

For compilers to find tcl-tk you may need to set:
  export LDFLAGS="-L/usr/local/opt/tcl-tk/lib"
  export CPPFLAGS="-I/usr/local/opt/tcl-tk/include"

==> Summary
  /usr/local/Cellar/tcl-tk/8.6.10: 3,037 files, 51.4MB

I have tried to update tcl-tk with the homebrew, but in command line I see 8.5
Could you please help me to fix this tcl-tk problem?

--

___
Python tracker 

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



[issue42698] Deadlock in pysqlite_connection_dealloc()

2020-12-20 Thread hydroflask


New submission from hydroflask :

pysqlite_connection_dealloc() calls sqlite3_close{,_v2}(). This can cause a 
deadlock if sqlite3_close() tries to acquire a lock that another thread  holds, 
due to a deadlock between the GIL and an internal sqlite3 lock.

This is especially common with sqlite3's "shared cache mode."

Since the GIL should not be released during a tp_dealloc function and python 
has no control over the behavior of sqlite3_close(), it is incorrect to call 
sqlite3_close() in pysqlite_connection_dealloc().

--
components: Library (Lib)
messages: 383471
nosy: hydroflask
priority: normal
severity: normal
status: open
title: Deadlock in pysqlite_connection_dealloc()
type: behavior
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



[issue42697] 3.8.7rc1 regression: 'free(): invalid pointer' after running backports-zoneinfo test suite

2020-12-20 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

The version in 3.9 is also different but also uses _PyLong_One:

https://github.com/python/cpython/blob/3.9/Modules/_zoneinfo.c#L571-L590

Although that is passed directly to PyDict_SetItemString so the refcount should 
be correct.

--

___
Python tracker 

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



[issue42697] 3.8.7rc1 regression: 'free(): invalid pointer' after running backports-zoneinfo test suite

2020-12-20 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I am quite sure that is the problem. I opened 
https://github.com/pganssle/zoneinfo/pull/97 to correct this in the backport.

The standard library versions are ok.

Brandt, if you agree that this is indeed the problem, let's close this as "not 
a bug".

--

___
Python tracker 

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



[issue42697] 3.8.7rc1 regression: 'free(): invalid pointer' after running backports-zoneinfo test suite

2020-12-20 Thread Brandt Bucher


Brandt Bucher  added the comment:

Almost certain. The number one is offset 192 bytes in small_ints on 3.8, which 
matches both of your backtraces:

>>> id(1) - id(-5)  
>>> 
>>> 
>>>   
192

--

___
Python tracker 

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



[issue42698] Deadlock in pysqlite_connection_dealloc()

2020-12-20 Thread hydroflask


Change by hydroflask :


--
components: +Extension Modules

___
Python tracker 

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



[issue42699] Use `.join(k for k in g)` instead of `.join([k for k in g])`

2020-12-20 Thread Samuel Marks

New submission from Samuel Marks :

This is an extremely minor improvement. Rather than create a `list`—using a 
comprehension—then have it consumed by `.join`, one can skip the list 
construction entirely.

(I remember this working from at least Python 2.7… probably earlier also)

--
messages: 383474
nosy: samuelmarks
priority: normal
pull_requests: 22737
severity: normal
status: open
title: Use `.join(k for k in g)` instead of `.join([k for k in g])`
type: performance
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



[issue42696] Duplicated unused bytecodes at end of function

2020-12-20 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
nosy: +rhettinger

___
Python tracker 

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



[issue42480] Python Tkinter crashes on macOS 11.1 beta

2020-12-20 Thread Ned Deily


Ned Deily  added the comment:

@fxcoudert: If you are trying to link with the Apple-provided system Tcl and Tk 
frameworks, don't.  They have been seriously broken since macOS 10.7 and stuck 
at Tk 8.5.9. The only visible Apple action has been to deprecate them. Any 
Python on macOS that claims to support tkinter (and, hence, IDLE) *must* be 
able to link with, and preferably supply, newer versions of Tcl and Tk. And for 
use on current versions of macOS, that also means Tcl/Tk 8.6.x, not 8.5.x.

https://www.python.org/download/mac/tcltk/

--

___
Python tracker 

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



[issue42691] macOS 11.1 + Homebrew 2.6.2 + Python 3.9.1 = "IDLE" crash

2020-12-20 Thread Ned Deily


Ned Deily  added the comment:

This is the same sort of crash of a Homebrew Python as reported in Issue42480 
and the root cause is the same: the Homebrew recipe is allowing building and 
linking with the known faulty and deprecated Apple-provided system Tcl and Tk 
8.5.9 frameworks. It needs to be modified to use a newer (8.6.x) version of Tcl 
and Tk.

--
nosy: +fxcoudert
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Python Tkinter crashes on macOS 11.1 beta

___
Python tracker 

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



[issue42699] Use `.join(k for k in g)` instead of `.join([k for k in g])`

2020-12-20 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

By the way, it is almost always wrong to write "k for k in iterable" when you 
can just write "iterable" or "list(iterable)".

Here are some micro-benchmarks:


[steve ~]$ python3.9 -m timeit -s "from string import ascii_letters" "''.join(k 
for k in ascii_letters)"
10 loops, best of 5: 2.3 usec per loop

[steve ~]$ python3.9 -m timeit -s "from string import ascii_letters" 
"''.join([k for k in ascii_letters])"
20 loops, best of 5: 1.57 usec per loop

[steve ~]$ python3.9 -m timeit -s "from string import ascii_letters" 
"''.join(list(ascii_letters))"
50 loops, best of 5: 749 nsec per loop

[steve ~]$ python3.9 -m timeit -s "from string import ascii_letters" 
"''.join(ascii_letters)"
50 loops, best of 5: 737 nsec per loop

--
nosy: +steven.daprano

___
Python tracker 

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



[issue42697] 3.8.7rc1 regression: 'free(): invalid pointer' after running backports-zoneinfo test suite

2020-12-20 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +p-ganssle

___
Python tracker 

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



[issue42697] 3.8.7rc1 regression: 'free(): invalid pointer' after running backports-zoneinfo test suite

2020-12-20 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Oh, wait. This looks incorrect:

https://github.com/pganssle/zoneinfo/blob/07ec80ad5dc7e7e4b4f861ddbb61a9b71e9f27c7/lib/zoneinfo_module.c#L619-L621

That

#ifndef ATLEAST_37

should be

#ifdef ATLEAST_37

--

___
Python tracker 

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



[issue42699] Use `.join(k for k in g)` instead of `.join([k for k in g])`

2020-12-20 Thread Ken Jin


Ken Jin  added the comment:

Sorry for intruding, but I thought I'd offer some rudimentary, non-scientific 
benchmarks for this:

[MSC v.1928 32 bit (Intel)] on win32  # a debug build of python, no compiler 
optimizations

import timeit
# gen comp
timeit.timeit("''.join(str(_) for _ in range(1000))", number=1)
11.15456029957

# list comp
timeit.timeit("''.join([str(_) for _ in range(1000)])", number=1)
9.98751089961

The list comp is slightly faster than the gen comp. Interestingly, if one were 
to use python -m timeit instead, the gen comp would show better results since 
it has a better 'best of 5' timing. IMO, total time is a more accurate 
representation than best of 5 since the latter gets skewed by outliers.

--
nosy: +kj

___
Python tracker 

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



[issue42698] Deadlock in pysqlite_connection_dealloc()

2020-12-20 Thread hydroflask


hydroflask  added the comment:

Another comment: if calling sqlite3_close() outside of GIL, then the associated 
SQL function destructors must take the GIL before calling Py_DECREF

--

___
Python tracker 

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



[issue42699] Use `.join(k for k in g)` instead of `.join([k for k in g])`

2020-12-20 Thread Eric V. Smith


Eric V. Smith  added the comment:

Do you have any benchmarks to show this is an actual improvement? Often times 
it is 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



[issue42697] 3.8.7rc1 regression: 'free(): invalid pointer' after running backports-zoneinfo test suite

2020-12-20 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Indeed. The module in the std lib is actually different:

https://github.com/python/cpython/blob/master/Modules/_zoneinfo.c#L570-L589

and uses _PyLong_GetOne() instead of _PyLong_One

--

___
Python tracker 

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



[issue42700] xml.parsers.expat.errors description of codes/messages is flipped

2020-12-20 Thread Michael Wayne Goodman


New submission from Michael Wayne Goodman :

The documentation for xml.parsers.expat.errors.codes says:

   A dictionary mapping numeric error codes to their string descriptions.

But this is backwards. It should say it maps the string descriptions to the 
error codes. Likewise, the docs for xml.parsers.expat.errors.messages is 
backwards.

The other references to these dictionaries appear correct. For instance, under 
ExpatError.code:

   The :mod:`~xml.parsers.expat.errors` module also provides error message
   constants and a dictionary :data:`~xml.parsers.expat.errors.codes` mapping
   these messages back to the error codes, see below.

This issue appears to be present in the docs for all available versions.

--
assignee: docs@python
components: Documentation
messages: 383481
nosy: docs@python, goodmami
priority: normal
severity: normal
status: open
title: xml.parsers.expat.errors description of codes/messages is flipped
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



[issue42697] 3.8.7rc1 regression: 'free(): invalid pointer' after running backports-zoneinfo test suite

2020-12-20 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
assignee:  -> pablogsal
priority: release blocker -> 
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



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2020-12-20 Thread miss-islington


miss-islington  added the comment:


New changeset 37a6d5f8027f969418fe53d0a73a21003a8e370d by Daniel Hahler in 
branch 'master':
[WIP/RFC] bpo-15872: tests: remove oddity from test_rmtree_errors (GH-22967)
https://github.com/python/cpython/commit/37a6d5f8027f969418fe53d0a73a21003a8e370d


--
nosy: +miss-islington

___
Python tracker 

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



[issue42690] Aiohttp fails when using intel ax200 wireless card

2020-12-20 Thread JasperTecHK


Change by JasperTecHK :


--
type:  -> behavior

___
Python tracker 

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



[issue42690] Aiohttp fails when using intel ax200 wireless card

2020-12-20 Thread JasperTecHK


[issue42529] CPython DLL initialization routine failed from PYC cache file

2020-12-20 Thread Steve Dower


Steve Dower  added the comment:

I doubt there's anything more we can do about Windows swallowing an access 
violation and turning it into a generic error. There's a very low chance you'd 
have found any notes about it in the docs, so this bug will probably stand as 
the best available reference for future.

We also can't really add more checks for every method that assumes the GIL is 
held, because that will hurt runtime performance for everyone. And I doubt even 
debug checks would help here - DLL load is pretty well protected, and there's 
really nothing but a debugger that can diagnose issues anyway. 

I've pushed back in the past on adding a "how to debug apps on Windows" section 
to our docs, because it is such a huge topic that we can't possibly cover well 
enough to be useful in all the cases that come up.

"Don't use functions that require the GIL without holding the GIL" is already 
documented generally enough. So I'm glad we got this figured out, but I'm not 
sure there's anything we can fix long-term to prevent it (other than entirely 
replacing the C API ;) ).

--

___
Python tracker 

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



[issue42525] Optimize class/module level annotation

2020-12-20 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> rejected
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



[issue22228] Adapt bash readline operate-and-get-next function

2020-12-20 Thread Lele Gaifax


Lele Gaifax  added the comment:

Hey, recompiling current master against readline 8.1 gives an interpreter where 
this is already working: rl_operate_and_get_next() is bound to Control-o in the 
standard emacs keymap!

http://git.savannah.gnu.org/cgit/readline.git/tree/emacs_keymap.c?h=readline-8.1-rc3=acb676c4a529f4147b3087e9e66d372cee2564ca#n50

(for some reason, they didn't tag 8.1 final yet).

--

___
Python tracker 

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



[issue42689] Installation

2020-12-20 Thread Steve Dower


Steve Dower  added the comment:

It sounds like you need administrative permissions on your device.

Can I suggest searching the Microsoft Store for Python 3.9 and getting it that 
way? That installer shouldn't have this issue.

--

___
Python tracker 

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



[issue42655] Fix subprocess extra_groups gid conversion

2020-12-20 Thread Jakub Kulik


Jakub Kulik  added the comment:

I checked and indeed there seems to be no reason as for why should we use `void 
*` rather than `gid_t *` and `uid_t *`. I changed that in the attached PR.

--

___
Python tracker 

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



[issue42688] ctypes memory error on Apple Silicon with external libffi

2020-12-20 Thread Ronald Oussoren


Change by Ronald Oussoren :


--
components: +macOS
nosy: +ned.deily, ronaldoussoren

___
Python tracker 

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



[issue42688] ctypes memory error on Apple Silicon with external libffi

2020-12-20 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Could you  please sign the CLA? (See the PR for details on that)

The PR looks sane.

Out of interest: why do you use an external version of libffi? AFAIK the system 
copy of libffi contains some magic sauce to work nicer with signed binaries.

--

___
Python tracker 

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



[issue42525] Optimize class/module level annotation

2020-12-20 Thread Yurii Karabas


Yurii Karabas <1998uri...@gmail.com> added the comment:

After several attempts to optimize class/module annotations, I didn't find a 
solution that won't break existing code and can cover all existing edge cases.

The root cause was mentioned by Inada, the problem that `__annotations__` is 
exposed to locals and can be dynamically modified and that can't be predicted 
at compilation time.

Sorry about this issue, when I was creating this issue, I didn't realize the 
whole problem state.

We can close this issue.

--

___
Python tracker 

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



[issue35943] PyImport_GetModule() can return partially-initialized module

2020-12-20 Thread Big Stone


Big Stone  added the comment:

Is this bug causing the Dask-Jupyterlab failure ? 
https://github.com/dask/distributed/issues/4168

--
nosy: +Big Stone

___
Python tracker 

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



[issue24792] zipimporter masks import errors

2020-12-20 Thread Irit Katriel


Change by Irit Katriel :


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



[issue42572] Better path handling with argparse

2020-12-20 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset b0398a4b7fb5743f6dbb72ac6b2926e0a0c11498 by Raymond Hettinger in 
branch 'master':
bpo-42572:  Improve argparse docs for the type parameter. (GH-23849)
https://github.com/python/cpython/commit/b0398a4b7fb5743f6dbb72ac6b2926e0a0c11498


--

___
Python tracker 

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



[issue42572] Better path handling with argparse

2020-12-20 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 5.0 -> 6.0
pull_requests: +22731
pull_request: https://github.com/python/cpython/pull/23869

___
Python tracker 

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



[issue42689] Installation

2020-12-20 Thread Josh Rosenberg


Change by Josh Rosenberg :


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



[issue42529] CPython DLL initialization routine failed from PYC cache file

2020-12-20 Thread Karl Nelson


Karl Nelson  added the comment:

Okay, well at least now googling Python + "A dynamic link library (DLL) 
initialization routine failed." give something which could point a user may be 
able to identify the issue.  It wasn't obvious to me that imports did not hold 
the GIL, but it is clear in retrospect that it should have been.

Thanks very much and sorry for the wild goose chase.

--
resolution:  -> third party
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



[issue42650] Can people use dest=argparse.SUPPRESS in custom Action classes?

2020-12-20 Thread hai shi


Change by hai shi :


--
nosy: +paul.j3, rhettinger

___
Python tracker 

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



[issue24792] zipimporter masks import errors

2020-12-20 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> fixed
versions:  -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



[issue42669] "except" documentation still suggests nested tuples are allowed

2020-12-20 Thread miss-islington


Change by miss-islington :


--
pull_requests: +22733
pull_request: https://github.com/python/cpython/pull/23871

___
Python tracker 

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



[issue42669] "except" documentation still suggests nested tuples are allowed

2020-12-20 Thread miss-islington


Change by miss-islington :


--
pull_requests: +22732
pull_request: https://github.com/python/cpython/pull/23870

___
Python tracker 

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



[issue42669] "except" documentation still suggests nested tuples are allowed

2020-12-20 Thread miss-islington


miss-islington  added the comment:


New changeset c95f8bc2700b42f4568886505a819816c9b0ba28 by Colin Watson in 
branch 'master':
bpo-42669: Document that `except` rejects nested tuples (GH-23822)
https://github.com/python/cpython/commit/c95f8bc2700b42f4568886505a819816c9b0ba28


--
nosy: +miss-islington

___
Python tracker 

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



[issue42693] "if 0:" lines are traced; they didn't use to be

2020-12-20 Thread Ned Batchelder


New submission from Ned Batchelder :

(Using CPython commit c95f8bc270.)

This program has an "if 0:" line that becomes a NOP bytecode.  It didn't used 
to in Python 3.9

print(1)
if 0:   # line 2
print(3)
print(4)

Using a simple trace program 
(https://github.com/nedbat/coveragepy/blob/master/lab/run_trace.py), it 
produces this output:

call  1 @-1
line  1 @0
1
line  2 @8
line  4 @10
4
return  4 @20

Using Python3.9 gives this output:

call  1 @-1
line  1 @0
1
line  4 @8
4
return  4 @18

Is this change intentional?

--
messages: 383452
nosy: Mark.Shannon, nedbat
priority: normal
severity: normal
status: open
title: "if 0:" lines are traced; they didn't use to be
type: behavior
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



[issue42694] Failed test_new_curses_panel in test_curses

2020-12-20 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

==
FAIL: test_new_curses_panel (test.test_curses.TestCurses)
--
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/test/test_curses.py", line 425, in 
test_new_curses_panel
self.assertRaises(TypeError, type(panel))
AssertionError: TypeError not raised by panel

--

The regression was introduced in 1baf030a902392fe92d934ed0fb6a385cf7d8869 
(issue1635741). It can lead to crash because creation of non-initialized object 
is allowed now. See issue23815 for details.

--
messages: 383453
nosy: serhiy.storchaka, vstinner
priority: normal
severity: normal
status: open
title: Failed test_new_curses_panel in test_curses
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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-12-20 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

These changes introduced a regression in test_curses (see issue42694). And I 
afraid then introduced regressions in other modules for which there were not 
purposed tests.

--

___
Python tracker 

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



[issue42693] "if 0:" lines are traced; they didn't use to be

2020-12-20 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

All NOP bytecodes should be removed. If any is left it is a regression.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue42691] macOS 11.1 + Homebrew 2.6.2 + python 3.9.1 = idle crash

2020-12-20 Thread Пётр Сиренко

New submission from Пётр Сиренко :

Process:   Python [3355]
Path:  /usr/local/Cellar/python@3.9/3.9.1_1/IDLE 
3.app/Contents/MacOS/Python
Identifier:org.python.IDLE
Version:   3.9.1 (3.9.1)
Code Type: X86-64 (Native)
Parent Process:??? [1]
Responsible:   Python [3355]
User ID:   502

Date/Time: 2020-12-20 21:22:43.045 +0300
OS Version:macOS 11.1 (20C69)
Report Version:12
Bridge OS Version: 5.1 (18P3030)
Anonymous UUID:0607359F-0422-4E24-D0EC-3FDFB0D5A17C


Time Awake Since Boot: 940 seconds

System Integrity Protection: enabled

Crashed Thread:0  Dispatch queue: com.apple.main-thread

Exception Type:EXC_CRASH (SIGABRT)
Exception Codes:   0x, 0x
Exception Note:EXC_CORPSE_NOTIFY

Application Specific Information:
abort() called

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib  0x7fff20307462 __pthread_kill + 10
1   libsystem_pthread.dylib 0x7fff20335610 pthread_kill + 263
2   libsystem_c.dylib   0x7fff20288720 abort + 120
3   Tcl 0x7fff6fe06b55 Tcl_PanicVA + 398
4   Tcl 0x7fff6fe06bd5 Tcl_Panic + 128
5   Tk  0x7fff6ff06ad5 TkpInit + 385
6   Tk  0x7fff6fe86788 0x7fff6fe55000 + 
202632
7   _tkinter.cpython-39-darwin.so   0x000101dbe701 Tcl_AppInit + 84
8   _tkinter.cpython-39-darwin.so   0x000101db99fa _tkinter_create + 975
9   org.python.python   0x0001018b11bb 
cfunction_vectorcall_FASTCALL + 203
10  org.python.python   0x000101928ff3 call_function + 403
11  org.python.python   0x000101926184 
_PyEval_EvalFrameDefault + 27452
12  org.python.python   0x000101929b3b _PyEval_EvalCode + 
1998
13  org.python.python   0x0001018815d8 
_PyFunction_Vectorcall + 248
14  org.python.python   0x000101880e28 
_PyObject_FastCallDictTstate + 149
15  org.python.python   0x000101881891 
_PyObject_Call_Prepend + 139
16  org.python.python   0x0001018c9e96 slot_tp_init + 87
17  org.python.python   0x0001018c36f7 type_call + 150
18  org.python.python   0x000101880fa3 _PyObject_MakeTpCall 
+ 266
19  org.python.python   0x000101929027 call_function + 455
20  org.python.python   0x0001019262ee 
_PyEval_EvalFrameDefault + 27814
21  org.python.python   0x000101929b3b _PyEval_EvalCode + 
1998
22  org.python.python   0x0001018815d8 
_PyFunction_Vectorcall + 248
23  org.python.python   0x000101928ff3 call_function + 403
24  org.python.python   0x000101926230 
_PyEval_EvalFrameDefault + 27624
25  org.python.python   0x000101929b3b _PyEval_EvalCode + 
1998
26  org.python.python   0x00010191f56d PyEval_EvalCode + 79
27  org.python.python   0x00010195a5b5 run_eval_code_obj + 
110
28  org.python.python   0x0001019599ad run_mod + 103
29  org.python.python   0x000101958871 PyRun_FileExFlags + 
241
30  org.python.python   0x000101957e61 
PyRun_SimpleFileExFlags + 271
31  org.python.python   0x00010196fd88 Py_RunMain + 1839
32  org.python.python   0x0001019700c1 pymain_main + 306
33  org.python.python   0x00010197010f Py_BytesMain + 42
34  libdyld.dylib   0x7fff20350621 start + 1

Thread 1:
0   libsystem_pthread.dylib 0x7fff20331458 start_wqthread + 0

Thread 2:
0   libsystem_pthread.dylib 0x7fff20331458 start_wqthread + 0

Thread 3:
0   libsystem_pthread.dylib 0x7fff20331458 start_wqthread + 0

Thread 4:
0   libsystem_pthread.dylib 0x7fff20331458 start_wqthread + 0

Thread 5:
0   libsystem_pthread.dylib 0x7fff20331458 start_wqthread + 0

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x  rbx: 0x00010a905e00  rcx: 0x7ffeee3c1068  
rdx: 0x
  rdi: 0x0307  rsi: 0x0006  rbp: 0x7ffeee3c1090  
rsp: 0x7ffeee3c1068
   r8: 0x000130a8   r9: 0x7fff889950e8  r10: 0x00010a905e00  
r11: 0x0246
  r12: 0x0307  r13: 0x7fb37d04b790  r14: 0x0006  
r15: 0x0016
  rip: 0x7fff20307462  rfl: 0x0246  cr2: 0x7fff8d152f70
  
Logical CPU: 0
Error Code:  0x02000148
Trap Number: 133

Thread 0 instruction stream not available.

Thread 0 last branch register state not 

[issue42669] "except" documentation still suggests nested tuples are allowed

2020-12-20 Thread Eric V. Smith


Eric V. Smith  added the comment:


New changeset 409ce4a09e4f96ca9b251c19f5819205aae9ae34 by Miss Islington (bot) 
in branch '3.9':
bpo-42669: Document that `except` rejects nested tuples (GH-23822) (GH-23870)
https://github.com/python/cpython/commit/409ce4a09e4f96ca9b251c19f5819205aae9ae34


--
nosy: +eric.smith

___
Python tracker 

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



[issue42669] "except" documentation still suggests nested tuples are allowed

2020-12-20 Thread Eric V. Smith


Eric V. Smith  added the comment:


New changeset 81f706d2db0f57c4fdd747df6e0a4cffcbc54704 by Miss Islington (bot) 
in branch '3.8':
bpo-42669: Document that `except` rejects nested tuples (GH-23822) (GH-23871)
https://github.com/python/cpython/commit/81f706d2db0f57c4fdd747df6e0a4cffcbc54704


--

___
Python tracker 

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



[issue42669] "except" documentation still suggests nested tuples are allowed

2020-12-20 Thread Eric V. Smith


Change by Eric V. Smith :


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



[issue42695] tkinter keysym_num value is incorrect

2020-12-20 Thread Justin

New submission from Justin :

Hi there.
On my MacOS 10.14.16 laptop with a qwerty keyboard I was testing tkinter 
keyboard listening for an azerty keyboard layout by switching the layout to 
`French - PC`
When I press qwerty keys Shift + \ I expect to see 'μ' printed.
When looking at the tkinter events for that key press we see:
```
down {'keysym': 'Shift_L', 'keysym_num': 65505, 'keycode': 131072, 'char': ''}
down {'keysym': 'tslash', 'keysym_num': 956, 'keycode': 956, 'char': 'μ'}
up {'keysym': 'asterisk', 'keysym_num': 42, 'keycode': 2753468, 'char': 'μ'}
up {'keysym': 'Shift_L', 'keysym_num': 65505, 'keycode': 131072, 'char': ''}
```
So the char value is correct but the keysym_num is not the expected 181 for mu.
Comparing this to pressing Shift + / to generate the section symbol (§) we see:
```
down {'keysym': 'Shift_L', 'keysym_num': 65505, 'keycode': 131072, 'char': ''}
down {'keysym': 'section', 'keysym_num': 167, 'keycode': 167, 'char': '§'}
up {'keysym': 'section', 'keysym_num': 167, 'keycode': 2883751, 'char': '§'}
up {'keysym': 'Shift_L', 'keysym_num': 65505, 'keycode': 131072, 'char': ''}
```
Which produces the expected keysym_num of 167.

TLDR: the kysym_num value when writing the mu character is incorrect. It should 
be 181 and logging shows values of 956 and 42. Can this be fixed?

Here is the keyboard listener program which can be used for verification:
```
from tkinter import *

params = ['keysym', 'keysym_num', 'keycode', 'char']

def keyup(e):
d = {p: getattr(e, p) for p in params}
print('up', d)
# print('up', e.__dict__)
def keydown(e):
d = {p: getattr(e, p) for p in params}
print('down', d)
# print('down', e.__dict__)
pass

root = Tk()
frame = Frame(root, width=100, height=100)
frame.bind("", keydown)
frame.bind("", keyup)
frame.pack()
frame.focus_set()
root.mainloop()
```
Note: my python version was installed from python.org and is:
```
Python 3.9.1 (v3.9.1:1e5d33e9b9, Dec  7 2020, 12:44:01) 
[Clang 12.0.0 (clang-1200.0.32.27)] on darwin
```

--
messages: 383458
nosy: spacether
priority: normal
severity: normal
status: open
title: tkinter keysym_num value is incorrect

___
Python tracker 

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



[issue42693] "if 0:" lines are traced; they didn't use to be

2020-12-20 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Confirmed.  There is bogus NOP in the code.

===

Python 3.10.0a3+ (heads/master:17ef4319a3, Dec 18 2020, 09:35:26)
[Clang 12.0.0 (clang-1200.0.32.28)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from textwrap import dedent
>>> from dis import dis
>>> s = '''
x = 10
if 0:
print('hello')
y = 20
'''
>>> code = compile(dedent(s), '', 'exec')
>>> list(code.co_code)
[100, 0, 90, 0, 9, 0, 100, 3, 90, 2, 100, 4, 83, 0]
>>> dis(code)
  2   0 LOAD_CONST   0 (10)
  2 STORE_NAME   0 (x)

  3   4 NOP

  5   6 LOAD_CONST   3 (20)
  8 STORE_NAME   2 (y)
 10 LOAD_CONST   4 (None)
 12 RETURN_VALUE

--
nosy: +rhettinger

___
Python tracker 

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



[issue42696] Duplicated unused bytecodes at end of function

2020-12-20 Thread Ned Batchelder


New submission from Ned Batchelder :

(Using CPython commit c95f8bc270.)

This program has extra bytecodes:

def f():
for i in range(10):
break
return 17

The dis output is:

  1   0 LOAD_CONST   0 ()
  2 LOAD_CONST   1 ('f')
  4 MAKE_FUNCTION0
  6 STORE_NAME   0 (f)
  8 LOAD_CONST   2 (None)
 10 RETURN_VALUE

Disassembly of :
  2   0 LOAD_GLOBAL  0 (range)
  2 LOAD_CONST   1 (10)
  4 CALL_FUNCTION1
  6 GET_ITER
  8 FOR_ITER 8 (to 18)
 10 STORE_FAST   0 (i)

  3  12 POP_TOP

  4  14 LOAD_CONST   2 (17)
 16 RETURN_VALUE
>>   18 LOAD_CONST   2 (17)
 20 RETURN_VALUE

The break has something to do with it, because if I change the Python to:

def f():
for i in range(10):
a = 1
return 17

then the dis output is:

  1   0 LOAD_CONST   0 ()
  2 LOAD_CONST   1 ('f')
  4 MAKE_FUNCTION0
  6 STORE_NAME   0 (f)
  8 LOAD_CONST   2 (None)
 10 RETURN_VALUE

Disassembly of :
  2   0 LOAD_GLOBAL  0 (range)
  2 LOAD_CONST   1 (10)
  4 CALL_FUNCTION1
  6 GET_ITER
>>8 FOR_ITER 8 (to 18)
 10 STORE_FAST   0 (i)

  3  12 LOAD_CONST   2 (1)
 14 STORE_FAST   1 (a)
 16 JUMP_ABSOLUTE8

  4 >>   18 LOAD_CONST   3 (17)
 20 RETURN_VALUE

--
messages: 383460
nosy: Mark.Shannon, nedbat
priority: normal
severity: normal
status: open
title: Duplicated unused bytecodes at end of function
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



[issue42695] tkinter keysym_num value is incorrect

2020-12-20 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Tkinter is just a wrapper around Tcl/Tk. Please report a bug in Tk on the 
corresponding bug tracker.

https://wiki.tcl-lang.org/page/How+do+I+report+a+bug+in+Tcl%2C+Tk%2C+...

--
nosy: +serhiy.storchaka
resolution:  -> third party
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



[issue42681] mistake in curses documentation

2020-12-20 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +22736
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/23874

___
Python tracker 

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



[issue42680] unicode identifiers not accessible or assignable through globals()

2020-12-20 Thread Eric V. Smith


Eric V. Smith  added the comment:

I think documenting this with globals() and locals() is a good idea. That's the 
place this is most likely to trip someone up.

--
nosy: +eric.smith

___
Python tracker 

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



[issue42695] tkinter keysym_num value is incorrect

2020-12-20 Thread Justin


Justin  added the comment:

TK bug ticket has been created at 
https://core.tcl-lang.org/tk/tktview/ffe6925b916caac02acae53f745e95dd1c557019

--

___
Python tracker 

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



[issue42697] 3.8.7rc1 regression: 'free(): invalid pointer' after running backports-zoneinfo test suite

2020-12-20 Thread Michał Górny

New submission from Michał Górny :

I'm still investigating the problem and I will include more information 
shortly.  However, I'm filing the bug early, as I'd like to prevent this 
regression from hitting 3.8.7 release.

When running backports-zoneinfo-0.2.1 test suite using cpython 3.8.7rc1, all 
tests pass, then python segfaults:

```
--
Ran 233 tests in 2.200s

OK (skipped=27)
free(): invalid pointer
/var/tmp/portage/dev-python/backports-zoneinfo-0.2.1/temp/environment: line 
3054:   167 Aborted (core dumped) "${EPYTHON}" -m unittest 
discover -v
```


The backtrace I got doesn't seem very useful:

#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
#1  0x7fd4b6c79536 in __GI_abort () at abort.c:79
#2  0x7fd4b6cd2bf7 in __libc_message (action=action@entry=do_abort, 
fmt=fmt@entry=0x7fd4b6de53b5 "%s\n") at ../sysdeps/posix/libc_fatal.c:155
#3  0x7fd4b6cdaa7a in malloc_printerr (str=str@entry=0x7fd4b6de3593 
"free(): invalid pointer") at malloc.c:5389
#4  0x7fd4b6cdbe5c in _int_free (av=, p=, 
have_lock=0) at malloc.c:4201
#5  0x7fd4b6f00aaa in ?? () from /usr/lib64/libpython3.8.so.1.0
#6  0x7fd4b6eb8745 in ?? () from /usr/lib64/libpython3.8.so.1.0
#7  0x7fd4b6ece115 in ?? () from /usr/lib64/libpython3.8.so.1.0
#8  0x7fd4b6ece2f2 in ?? () from /usr/lib64/libpython3.8.so.1.0
#9  0x562239cd1a60 in ?? ()
#10 0x7fd4b7086967 in ?? () from /usr/lib64/libpython3.8.so.1.0
#11 0x7fd4b7167e20 in ?? () from /usr/lib64/libpython3.8.so.1.0
#12 0x562239cd1a60 in ?? ()
#13 0x7fd4b6f05d26 in ?? () from /usr/lib64/libpython3.8.so.1.0
#14 0x7fd4b6fccf0d in ?? () from /usr/lib64/libpython3.8.so.1.0
#15 0x7fd4b6fcdc1d in PyGC_Collect () from /usr/lib64/libpython3.8.so.1.0
#16 0x56223996c670 in ?? ()
#17 0x7fd4b6f93e8a in PyImport_Cleanup () from 
/usr/lib64/libpython3.8.so.1.0
#18 0x7fd4b6faa55c in Py_NewInterpreter () from 
/usr/lib64/libpython3.8.so.1.0
#19 0x in ?? ()


I'm going to start by trying to bisect this, and let you know the results when 
I manage them.

--
components: Interpreter Core
messages: 383464
nosy: mgorny
priority: normal
severity: normal
status: open
title: 3.8.7rc1 regression: 'free(): invalid pointer' after running 
backports-zoneinfo test suite
type: crash
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



[issue42697] 3.8.7rc1 regression: 'free(): invalid pointer' after running backports-zoneinfo test suite

2020-12-20 Thread Arfrever Frehtes Taifersar Arahesis


Change by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue42697] 3.8.7rc1 regression: 'free(): invalid pointer' after running backports-zoneinfo test suite

2020-12-20 Thread Michał Górny

Michał Górny  added the comment:

aeb66c1abbf4ec214e2e80eb972546996d1a1571 is the first bad commit
commit aeb66c1abbf4ec214e2e80eb972546996d1a1571
Author: Miss Skeleton (bot) <31488909+miss-isling...@users.noreply.github.com>
Date:   Thu Oct 15 08:51:48 2020 -0700

bpo-41984: GC track all user classes (GH-22701/GH-22707)

(cherry picked from commit c13b847a6f913b72eeb71651ff626390b738d973)

 Lib/test/test_finalization.py  | 23 --
 Lib/test/test_gc.py|  6 +++---
 .../2020-10-14-16-19-43.bpo-41984.SEtKMr.rst   |  2 ++
 Modules/_testcapimodule.c  | 20 +++
 Objects/typeobject.c   | 22 ++---
 5 files changed, 52 insertions(+), 21 deletions(-)
 create mode 100644 Misc/NEWS.d/next/Core and 
Builtins/2020-10-14-16-19-43.bpo-41984.SEtKMr.rst

--

___
Python tracker 

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



[issue42697] 3.8.7rc1 regression: 'free(): invalid pointer' after running backports-zoneinfo test suite

2020-12-20 Thread Michał Górny

Michał Górny  added the comment:

A more complete backtrace:

#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
#1  0x7fa633b20536 in __GI_abort () at abort.c:79
#2  0x7fa633b79bf7 in __libc_message (action=action@entry=do_abort, 
fmt=fmt@entry=0x7fa633c8c3b5 "%s\n") at ../sysdeps/posix/libc_fatal.c:155
#3  0x7fa633b81a7a in malloc_printerr (str=str@entry=0x7fa633c8a593 
"free(): invalid pointer") at malloc.c:5389
#4  0x7fa633b82e5c in _int_free (av=, p=, 
have_lock=0) at malloc.c:4201
#5  0x55ea845c6170 in _PyMem_RawFree (ctx=0x0, ptr=0x55ea848c1a60 
) at Objects/obmalloc.c:127
#6  0x55ea845c6f46 in PyMem_RawFree (ptr=0x55ea848c1a60 ) 
at Objects/obmalloc.c:595
#7  0x55ea845c7fa0 in _PyObject_Free (ctx=0x0, p=0x55ea848c1a60 
) at Objects/obmalloc.c:1898
#8  0x55ea845c726e in PyObject_Free (ptr=0x55ea848c1a60 ) 
at Objects/obmalloc.c:709
#9  0x55ea845dda33 in object_dealloc (self=0x55ea848c1a60 ) 
at Objects/typeobject.c:3784
#10 0x55ea845c60a5 in _Py_Dealloc (op=0x55ea848c1a60 ) at 
Objects/object.c:2215
#11 0x55ea845d3b55 in _Py_DECREF (filename=0x55ea847a8de0 
"./Include/object.h", lineno=541, op=0x55ea848c1a60 )
at ./Include/object.h:478
#12 0x55ea845d3b83 in _Py_XDECREF (op=0x55ea848c1a60 ) at 
./Include/object.h:541
#13 0x55ea845d4627 in tupledealloc (op=0x7fa63195d6c0) at 
Objects/tupleobject.c:247
#14 0x55ea845c60a5 in _Py_Dealloc (op=0x7fa63195d6c0) at 
Objects/object.c:2215
#15 0x55ea84743afb in _Py_DECREF (filename=0x55ea8482b9a0 
"./Include/object.h", lineno=541, op=0x7fa63195d6c0) at ./Include/object.h:478
#16 0x55ea84743b29 in _Py_XDECREF (op=0x7fa63195d6c0) at 
./Include/object.h:541
#17 0x55ea84745b5a in code_dealloc (co=0x7fa631b68450) at 
Objects/codeobject.c:552
#18 0x55ea845c60a5 in _Py_Dealloc (op=0x7fa631b68450) at 
Objects/object.c:2215
#19 0x55ea847525d2 in _Py_DECREF (filename=0x55ea8482e47c 
"Objects/funcobject.c", lineno=576, op=0x7fa631b68450) at ./Include/object.h:478
#20 0x55ea84753b6a in func_clear (op=0x7fa631b768b0) at 
Objects/funcobject.c:576
#21 0x55ea84753de0 in func_dealloc (op=0x7fa631b768b0) at 
Objects/funcobject.c:597
#22 0x55ea845c60a5 in _Py_Dealloc (op=0x7fa631b768b0) at 
Objects/object.c:2215
#23 0x55ea845addff in _Py_DECREF (filename=0x55ea847a3320 
"./Include/object.h", lineno=541, op=0x7fa631b768b0) at ./Include/object.h:478
#24 0x55ea845ade4f in _Py_XDECREF (op=0x7fa631b768b0) at 
./Include/object.h:541
#25 0x55ea845aeed8 in free_keys_object (keys=0x55ea84e72580) at 
Objects/dictobject.c:584
#26 0x55ea845ae524 in dictkeys_decref (dk=0x55ea84e72580) at 
Objects/dictobject.c:324
#27 0x55ea845b1c9c in PyDict_Clear (op=0x7fa63198b740) at 
Objects/dictobject.c:1729
#28 0x55ea845dd683 in type_clear (type=0x55ea84e12ba0) at 
Objects/typeobject.c:3594
#29 0x55ea845d8720 in subtype_clear (self=0x55ea84e12ba0) at 
Objects/typeobject.c:1147
#30 0x55ea846ac4aa in delete_garbage (state=0x55ea848dd6f8 
<_PyRuntime+344>, collectable=0x7fff13eb2e10, old=0x55ea848dd740 
<_PyRuntime+416>)
at Modules/gcmodule.c:948
#31 0x55ea846aca23 in collect (state=0x55ea848dd6f8 <_PyRuntime+344>, 
generation=2, n_collected=0x0, n_uncollectable=0x0, nofail=1)
at Modules/gcmodule.c:1123
#32 0x55ea846ae0da in _PyGC_CollectNoFail () at Modules/gcmodule.c:1866
#33 0x55ea846616da in PyImport_Cleanup () at Python/import.c:599
#34 0x55ea8467df93 in Py_FinalizeEx () at Python/pylifecycle.c:1233
#35 0x55ea84577e8a in Py_RunMain () at Modules/main.c:691
#36 0x55ea84577f22 in pymain_main (args=0x7fff13eb2ff0) at 
Modules/main.c:719
#37 0x55ea84577fe2 in Py_BytesMain (argc=6, argv=0x7fff13eb3138) at 
Modules/main.c:743
#38 0x55ea84576785 in main (argc=6, argv=0x7fff13eb3138) at 
./Programs/python.c:16

--

___
Python tracker 

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



[issue42640] tkinter throws exception when key is pressed

2020-12-20 Thread Justin


Justin  added the comment:

Thank you very much. I understand and just wanted to let you know.
In brew I opened up this 
ticket(https://github.com/Homebrew/homebrew-core/issues/67327) with that team.

--

___
Python tracker 

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



[issue3722] print followed by exception eats print with doctest

2020-12-20 Thread Chris Withers


Change by Chris Withers :


--
keywords:  -easy

___
Python tracker 

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



[issue3722] print followed by exception eats print with doctest

2020-12-20 Thread Chris Withers


Chris Withers  added the comment:

@iritkatriel - if Tim thinks this is hard, it probably is hard ;-)

--

___
Python tracker 

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



[issue25478] Consider adding a normalize() method to collections.Counter()

2020-12-20 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Here's what I propose to add:

def total(self):
return sum(self.values())

def scaled_by(self, factor):
return Counter({elem : count * factor for elem, count in self.items()})

def scaled_to(self, target_total=1.0):
ratio = target_total / self.total()
return self.scaled_by(ratio)

These cover the common cases and they don't mutate the counter.

--
versions: +Python 3.10 -Python 3.8

___
Python tracker 

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



[issue42688] ctypes memory error on Apple Silicon with external libffi

2020-12-20 Thread Eli Rykoff


Eli Rykoff  added the comment:

Thanks for your quick feedback!  I signed the CLA after submitting the PR, but 
I think it takes a bit of time to percolate through the system.

As for the "why", until 3.9.1 conda-forge had been successfully using an 
external ffi (with 3.9.0 + osx-arm64 patches) and then suddenly it broke.  For 
the time being conda-forge is using the system ffi, which does have other 
advantages as well, having all the latest patches.  However, I was curious as 
to _why_ it broke, and that led me to discover this bug, and it seemed 
straightforward to fix.  When/if conda-forge will switch back to external ffi 
is TBD, but if that decision is made this issue (at least) will be taken care 
of.

--

___
Python tracker 

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



[issue42634] Incorrect line number in bytecode for try-except-finally

2020-12-20 Thread Ned Batchelder


Ned Batchelder  added the comment:

(Rather: line 8 isn't executed, and so should not be traced.)

--

___
Python tracker 

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



[issue25478] Consider adding a normalize() method to collections.Counter()

2020-12-20 Thread Allen Downey


Allen Downey  added the comment:

This API would work well for my use cases.

And looking back at previous comments in this thread, I think this proposal 
avoids the most objectionable pitfalls.

--
nosy: +AllenDowney

___
Python tracker 

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



[issue42691] macOS 11.1 + Homebrew 2.6.2 + Python 3.9.1 = "IDLE" crash

2020-12-20 Thread Пётр Сиренко

Change by Пётр Сиренко :


--
title: macOS 11.1 + Homebrew 2.6.2 + python 3.9.1 = idle crash -> macOS 11.1 + 
Homebrew 2.6.2 + Python 3.9.1 = "IDLE" crash

___
Python tracker 

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



[issue42692] Build fails on macOS when compiler doesn't define __has_builtin

2020-12-20 Thread Joshua Root


New submission from Joshua Root :

The line in posixmodule.c that checks for __builtin_available is rejected by 
compilers that don't have __has_builtin. The second check needs to be in a 
nested #if.

--
components: Build, macOS
messages: 383437
nosy: jmr, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: Build fails on macOS when compiler doesn't define __has_builtin
type: compile error
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



[issue42589] doc: Wrong "from" keyword link in Exceptions doc

2020-12-20 Thread Stéphane Blondon

Change by Stéphane Blondon :


--
keywords: +patch
nosy: +sblondon
nosy_count: 2.0 -> 3.0
pull_requests: +22734
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/23872

___
Python tracker 

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



[issue42692] Build fails on macOS when compiler doesn't define __has_builtin

2020-12-20 Thread Joshua Root


Change by Joshua Root :


--
keywords: +patch
pull_requests: +22735
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/23873

___
Python tracker 

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



[issue42640] tkinter throws exception when key is pressed

2020-12-20 Thread Justin


Justin  added the comment:

FYI, I just brew installed python and with:
```
Python 3.9.1 (default, Dec 17 2020, 03:56:09) 
[Clang 11.0.0 (clang-1100.0.33.17)] on darwin
```
This issue still happens

--

___
Python tracker 

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



[issue42572] Better path handling with argparse

2020-12-20 Thread Raymond Hettinger


Change by Raymond Hettinger :


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



[issue42640] tkinter throws exception when key is pressed

2020-12-20 Thread Ned Deily

Ned Deily  added the comment:

As explained above, this crash will happen with any Python that links to the 
deprecated Apple-supplied system Tk framework in macOS versions from macOS 10.7 
to 11 Big Sur. If you want to use tkinter, you need to use a Python that links 
to a newer version of Tk. If Homebrew’s Python is not doing that, you should 
bring it up with the Homebrew project.

--

___
Python tracker 

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



[issue42572] Better path handling with argparse

2020-12-20 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 40b4c405f98f2d35835ef5d183f0327c0c55da6f by Miss Islington (bot) 
in branch '3.9':
bpo-42572:  Improve argparse docs for the type parameter. (GH-23849) (GH-23869)
https://github.com/python/cpython/commit/40b4c405f98f2d35835ef5d183f0327c0c55da6f


--

___
Python tracker 

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



[issue31861] add aiter() and anext() functions

2020-12-20 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

I don't have anything to add to this beside the name choice is safe and won't 
clash with anything (but honestly I would prefer it to be discussed on the ML 
before implementing something after 3 years). I checked a limited dataset to 
search for aiter and only found examples from 2 different projects. Elastic 
have something for themselves and the other usages are coming from the tests of 
aioitertools.
https://github.com/elastic/elasticsearch-py/blob/5fe9ff721ce493fbf2fc8b94d5ab02fc7e55fd5a/elasticsearch/_async/helpers.py#L85-L96

--
nosy: +BTaskaya

___
Python tracker 

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



[issue42650] Can people use dest=argparse.SUPPRESS in custom Action classes?

2020-12-20 Thread paul j3


paul j3  added the comment:

I'd have to study the code (and docs), but I'm not sure setting the `dest` to 
'SUPPRESS' does anything meaningful.

default=argparse.SUPPRESS

is useful, keeping the default out of the namespace.  That argument appears 
only if the user has used the option.

But with `dest` (in a default 'store'), I get a namespace like

Namespace(**{'==SUPPRESS==': 'foo'})

'help' and 'version' exit right after displaying their message, so I'm no sure 
the 'SUPPRESS' is doing anything.  The parser doesn't return a namespace.

It appears that the 'dest' is passed to the Action.  A custom Action could act 
on that 'dest'.  The default 'store' just uses it as the attribute for storing 
the value in the namespace.

Anyways, this is not the kind of thing that we'll be tweaking in the source.  I 
don't recall any bug/issue touching on this behavior (but we could do a search).

--

___
Python tracker 

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



[issue39158] ast.literal_eval() doesn't support empty sets

2020-12-20 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
resolution:  -> fixed
stage: needs patch -> 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



[issue18163] Add a 'key' attribute to KeyError

2020-12-20 Thread Stéphane Blondon

Stéphane Blondon  added the comment:

Orian: your patch formats the error message but the original suggested  
solution is to store the missing key in a new attribute. 

I don't know if you go in the good direction.

Adding an attribute is also suggested by issue #614557.

--
nosy: +sblondon
versions:  -Python 3.4

___
Python tracker 

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



[issue42634] Incorrect line number in bytecode for try-except-finally

2020-12-20 Thread Ned Batchelder


Ned Batchelder  added the comment:

I checked on this with CPython commit c95f8bc270.  The code above is fixed, but 
this code has a similar problem:

a, b, c = 1, 1, 1
try:
try:
a = 4/0 # ZeroDivisionError
except ValueError:
b = 6
except IndexError:
a = 8   # Line 8
finally:
c = 10
except ZeroDivisionError:
pass
assert a == 1 and b == 1 and c == 10


Using a simple trace program 
(https://github.com/nedbat/coveragepy/blob/master/lab/run_trace.py), it 
produces this output:

call  1 @-1
line  1 @0
line  2 @10
line  3 @12
line  4 @16
exception  4 @20
line  5 @28
line  7 @48
line  8 @68
line  10 @78
line  11 @88
line  12 @100
line  13 @106
return  13 @136

Line 8 should never be executed.

--
status: closed -> open

___
Python tracker 

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



[issue42691] macOS 11.1 + Homebrew 2.6.2 + Python 3.9.1 = "IDLE" crash

2020-12-20 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

This is a 'ancient, buggy tcl/tk 8.5.9 on OS11' issue, not an IDLE issue.  Only 
8.6.10 has a chance with OS11, and even that is a bit flakey.  But I have no 
issues so far running 3.9.1 and IDLE with the Universal2 OS11 build from 
python.org on Mohave.

What happens if you run 'python3.9' on a command line?  What about 'python 3.9 
-c "import tkinter; tkinter.Tk()"'?

Ned & Ronald: I expect we should close this as 3rd party (Apple, Active State 
(tcl/tk), and homebrew).  Do either of you want to add anything?

--
assignee: terry.reedy -> 
components: +Tkinter, macOS -IDLE
nosy: +ned.deily, ronaldoussoren

___
Python tracker 

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



[issue31904] Python should support VxWorks RTOS

2020-12-20 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset ab74c014ae514fde7487542ec96ef45235aa86b0 by pxinwr in branch 
'master':
bpo-31904: Fix site and sysconfig modules for VxWorks RTOS (GH-21821)
https://github.com/python/cpython/commit/ab74c014ae514fde7487542ec96ef45235aa86b0


--

___
Python tracker 

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



[issue16535] json encoder unable to handle decimal

2020-12-20 Thread mike bayer


Change by mike bayer :


--
nosy: +zzzeek

___
Python tracker 

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



[issue42584] Upgrade macOS and Windows installers to use SQLite 3.34.0

2020-12-20 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

See attached proof-of-concept CI check. This GitHub Workflow extracts the 
SQLite version information, downloads the amalgamation source code, and does a 
simple `cmp` on each file.

Example run: 
https://github.com/erlend-aasland/cpython-source-deps/runs/1586069119?check_suite_focus=true

--
Added file: 
https://bugs.python.org/file49694/0001-Add-simple-validation-CI.patch

___
Python tracker 

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



[issue42697] 3.8.7rc1 regression: 'free(): invalid pointer' after running backports-zoneinfo test suite

2020-12-20 Thread Arfrever Frehtes Taifersar Arahesis


Change by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +brandtbucher, nascheme, pablogsal, tim.peters

___
Python tracker 

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



[issue42697] 3.8.7rc1 regression: 'free(): invalid pointer' after running backports-zoneinfo test suite

2020-12-20 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Raising this to a release blocker

--
priority: normal -> release blocker
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



[issue42697] 3.8.7rc1 regression: 'free(): invalid pointer' after running backports-zoneinfo test suite

2020-12-20 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

The symptom is that we are now trying to free something in the small integer 
cache that we shouldn't. Running this under the address sanitizer shows a bit 
more of the problem:

==190303==ERROR: AddressSanitizer: attempting free on address which was not 
malloc()-ed: 0x564456357fe0 in thread T0
#0 0x7f18ad2200e9 in __interceptor_free 
/build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:123
#1 0x564455b03283 in _PyMem_RawFree Objects/obmalloc.c:127
#2 0x564455b0538d in PyObject_Free Objects/obmalloc.c:709
#3 0x564455b3b820 in object_dealloc Objects/typeobject.c:3797
#4 0x564455b03180 in _Py_Dealloc Objects/object.c:2215
#5 0x564455b21308 in _Py_DECREF Include/object.h:478
#6 0x564455b21336 in _Py_XDECREF Include/object.h:541
#7 0x564455b2305f in tupledealloc Objects/tupleobject.c:247
#8 0x564455b03180 in _Py_Dealloc Objects/object.c:2215
#9 0x564455f1ef6b in _Py_DECREF Include/object.h:478
#10 0x564455f1ef99 in _Py_XDECREF Include/object.h:541
#11 0x564455f24ed4 in code_dealloc Objects/codeobject.c:552
#12 0x564455b03180 in _Py_Dealloc Objects/object.c:2215
#13 0x564455a85e3c in _Py_DECREF Include/object.h:478
#14 0x564455a892f7 in func_clear Objects/funcobject.c:579
#15 0x564455a89704 in func_dealloc Objects/funcobject.c:600
#16 0x564455b03180 in _Py_Dealloc Objects/object.c:2215
#17 0x564455ac025d in _Py_DECREF Include/object.h:478
#18 0x564455ac02ad in _Py_XDECREF Include/object.h:541
#19 0x564455ac3178 in free_keys_object Objects/dictobject.c:584
#20 0x564455ac1f41 in dictkeys_decref Objects/dictobject.c:324
#21 0x564455acb293 in PyDict_Clear Objects/dictobject.c:1729
#22 0x564455b3b00b in type_clear Objects/typeobject.c:3607
#23 0x564455d9afa6 in delete_garbage Modules/gcmodule.c:948
#24 0x564455d9b9c3 in collect Modules/gcmodule.c:1123
#25 0x564455d9ee3a in _PyGC_CollectNoFail Modules/gcmodule.c:1866
#26 0x564455ce0fe3 in PyImport_Cleanup Python/import.c:599
#27 0x564455d29245 in Py_FinalizeEx Python/pylifecycle.c:1229
#28 0x564455a29e99 in Py_RunMain Modules/main.c:691
#29 0x564455a2a236 in pymain_main Modules/main.c:719
#30 0x564455a2a5e5 in Py_BytesMain Modules/main.c:743
#31 0x564455a269b8 in main Programs/python.c:16
#32 0x7f18ace5a151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
#33 0x564455a268cd in _start 
(/home/pablogsal/github/python/3.8/python+0x1d48cd)

0x564456357fe0 is located 192 bytes inside of global variable 'small_ints' 
defined in 'Objects/longobject.c:43:21' (0x564456357f20) of size 8384
SUMMARY: AddressSanitizer

Still unclear how we have reached this situation

--

___
Python tracker 

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