[issue30260] sock_dealloc() may call __repr__ when socket class is already collected by GC

2021-06-15 Thread Irit Katriel

Irit Katriel  added the comment:

Since this is fixed in 3.6 and it’s too late for 3.5, I think this issue can be 
closed.

--
nosy: +iritkatriel
resolution:  -> out of date
status: open -> pending

___
Python tracker 

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



[issue44424] Decompress streaming bz2 file

2021-06-15 Thread Carlos Franzreb


Change by Carlos Franzreb :


--
components: Library (Lib)
nosy: carlosfranzreb
priority: normal
severity: normal
status: open
title: Decompress streaming bz2 file
type: behavior
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



[issue44424] Decompress streaming bz2 file

2021-06-15 Thread Carlos Franzreb


New submission from Carlos Franzreb :

I am trying to lazily load items from a compressed file that resides in Zenodo. 
My goal is to iteratively yield the items without storing the file in my 
computer. My problem is that an EOFerror occurs right after the first non-empty 
line is read. How can I overcome this issue?

Here is my code:

import requests as req
import json
from bz2 import BZ2Decompressor


def lazy_load(file_url):
dec = BZ2Decompressor()
with req.get(file_url, stream=True) as res:
for chunk in res.iter_content(chunk_size=1024):
data = dec.decompress(chunk).decode('utf-8')
# do something with 'data'


if __name__ == "__main__":
creds = json.load(open('credentials.json'))
url = 'https://zenodo.org/api/records/'
id = '4617285'
filename = '10.Papers.nt.bz2'
res = req.get(f'{url}{id}', params={'access_token': 
creds['zenodo_token']})
for file in res.json()['files']:
if file['key'] == filename:
for item in lazy_load(file['links']['self']):
# do something with 'item'

The error I become is the following:

Traceback (most recent call last):
File ".\mag_loader.py", line 51, in 
  for item in lazy_load(file['links']['self']):
File ".\mag_loader.py", line 18, in lazy_load
  data = dec.decompress(chunk)
EOFError: End of stream already reache

To run the code you need a Zenodo access token, for which you need an account. 
Once you have logged in, you can create the token here: 
https://zenodo.org/account/settings/applications/tokens/new/

--

___
Python tracker 

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



[issue44425] 'dirty' added to sys.version on Linux and Mac source builds depending on git version

2021-06-15 Thread Mark Final


New submission from Mark Final :

Hi,

We build Python 3.7 from source in-house for Windows, Linux and macOSX.

It's been noticed that 'dirty' has been appended to sys.version in our builds, 
even though the source tree has not been modified from a git clone. This only 
happens for Linux and macOSX.

I traced this to the following commands (which are unchanged in main):

https://github.com/python/cpython/blob/main/configure#L2833
https://github.com/python/cpython/blob/main/configure.ac#L50

> GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"

I further traced it to behaviours of different versions of git. In particular, 
when git is invoked outside of the working tree, and --git-dir is used alone, 
'dirty' is always appended.

It's been noticed in a number of places online, including 
https://www.reddit.com/r/git/comments/4edtlx/git_describe_in_makefile_always_dirty/

Additionally using --work-tree does avoid the 'dirty' flag for a clean source 
tree, for git v2.21.0+.

I believe that this was this fix 
https://github.com/git/git/commit/a1e19004e11dcbc0ceebd92c425ceb1770e52d0b

However, since we do have usage of older versions of git, we've had to go with 
a different solution, which was to use git -C, i.e.

GITTAG="git -C \$(srcdir) describe --all --always --dirty"

so that git's working directory is changed to $(srcdir).

The other git commands in the code linked to do not seem to have the same 
issue, but we haven't changed them.

I'm writing this up in case anyone else has seen the issue, and offer the 
solution we found if it is useful.

Many thanks,
Mark

--
components: Build
messages: 395866
nosy: mark.final
priority: normal
severity: normal
status: open
title: 'dirty' added to sys.version on Linux and Mac source builds depending on 
git version
type: enhancement
versions: Python 3.7

___
Python tracker 

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



[issue32322] Heap type with Py_TPFLAGS_HAVE_GC leads to segfault due to not incrementing type object refcout in PyObject_GC_New

2021-06-15 Thread Irit Katriel


Irit Katriel  added the comment:

Are you sure? It seems to me that they both incref the type object in 
_PyObject_Init:
https://github.com/python/cpython/blob/689a84475e7b1da79d5ae82df67ab8897316f98c/Include/internal/pycore_object.h#L43

--
nosy: +iritkatriel

___
Python tracker 

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



[issue32322] Heap type with Py_TPFLAGS_HAVE_GC leads to segfault due to not incrementing type object refcout in PyObject_GC_New

2021-06-15 Thread Irit Katriel


Irit Katriel  added the comment:

Do you still have the code that created the crash? It would help to understand 
what you are/were seeing.

--

___
Python tracker 

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



[issue37224] [subinterpreters] test__xxsubinterpreters fails randomly

2021-06-15 Thread hai shi


Change by hai shi :


--
pull_requests: +25320
pull_request: https://github.com/python/cpython/pull/26733

___
Python tracker 

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



[issue39217] GC of a ctypes object causes application crash

2021-06-15 Thread Irit Katriel


Irit Katriel  added the comment:

As Terry suggested, it would be better to establish whether this is a python 
bug by asking on python-list, where more people are likely to see your question.

A complete script reproducing the crash is *always* better than a verbal 
description that we may or may not understand correctly.

Please reopen this or create a new issue if you are still seeing this issue on 
a recent (3.9+) version and you can provide a complete script that reproduces 
it.

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



[issue40240] Expose public spelling of _PyGC_FINALIZED and _PyGC_SET_FINALIZED?

2021-06-15 Thread Irit Katriel


Irit Katriel  added the comment:

Can this be closed now? It seems that the query API was added and the set API 
was rejected.

--
nosy: +iritkatriel

___
Python tracker 

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



[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-06-15 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +25321
pull_request: https://github.com/python/cpython/pull/26734

___
Python tracker 

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



[issue32322] Heap type with Py_TPFLAGS_HAVE_GC leads to segfault due to not incrementing type object refcout in PyObject_GC_New

2021-06-15 Thread Rostislav Kondratenko


Rostislav Kondratenko  added the comment:

Hello, I don't have that code, as I worked around that issue at the time.
I checked with my project, using PyObject_GC_New works fine.
It seems that since then the issue has been fixed at some point since 2017.
Either that or I misinterpreted what was going on back then.
I think we can safely close this issue.

On Tue, 15 Jun 2021 at 14:18, Irit Katriel  wrote:

>
> Irit Katriel  added the comment:
>
> Do you still have the code that created the crash? It would help to
> understand what you are/were seeing.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue32322] Heap type with Py_TPFLAGS_HAVE_GC leads to segfault due to not incrementing type object refcout in PyObject_GC_New

2021-06-15 Thread Irit Katriel


Irit Katriel  added the comment:

Thanks!

--
resolution:  -> out of date
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



[issue44351] distutils.sysconfig.parse_makefile() regression in Python 3.10

2021-06-15 Thread Petr Viktorin


Petr Viktorin  added the comment:


New changeset 2f2ea96c4429b81f491aa1cdc4219ef2fd6d37fb by Miss Islington (bot) 
in branch '3.10':
bpo-44351: Restore back parse_makefile in distutils.sysconfig (GH-26637) 
(GH-26673)
https://github.com/python/cpython/commit/2f2ea96c4429b81f491aa1cdc4219ef2fd6d37fb


--

___
Python tracker 

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



[issue44426] Docs fail to build with Sphinx 4 due to Invalid C declaration

2021-06-15 Thread Karolina Surma


New submission from Karolina Surma :

Hello all,
I want to build Python 3.10~b2 documentation using Sphinx 4.0.2 (released in 
May 2021) as RPM in Fedora with aim to ship it in Fedora 35.

The build fails with the following error:

Warning, treated as error:
/builddir/build/BUILD/Python-3.10.0b2/Doc/c-api/complex.rst:49:Error in 
declarator or parameters
Error in declarator or parameters
Invalid C declaration: Expected identifier, got keyword: complex [error at 39]
  Py_complex _Py_c_neg(Py_complex complex)
  ---^
make: *** [Makefile:51: build] Error 2


The Sphinx changelog mentions in Bug fixes in 
https://www.sphinx-doc.org/en/master/changes.html#id21 the likely cause:
C, properly reject function declarations when a keyword is used as parameter 
name.

--
assignee: docs@python
components: Documentation
messages: 395874
nosy: docs@python, ksurma
priority: normal
severity: normal
status: open
title: Docs fail to build with Sphinx 4 due to Invalid C declaration
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



[issue44427] File extension for scripts on windows is unclear

2021-06-15 Thread Malte Kliemann


New submission from Malte Kliemann :

It is common practice to use no extension for python scripts on UNIX. In 
3.8.1.4., it is hinted that a script with a shebang line can be executed on 
windows only if the file extension of the script is associated with the python 
launcher.

I'm not sure where the right place is, but I suggest clearly stating that this 
is a critical requirement. As scripts on UNIX usually don't use file 
extensions, using these scripts without further modification is not possible 
cross-platform.

--
assignee: docs@python
components: Documentation
messages: 395875
nosy: docs@python, maltekliemann
priority: normal
severity: normal
status: open
title: File extension for scripts on windows is unclear
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



[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2021-06-15 Thread Petr Viktorin


Petr Viktorin  added the comment:


New changeset 10a5c806d4dec6c342dcc9888fbe4fa1fa9b7a1f by Erlend Egeberg 
Aasland in branch 'main':
bpo-42064: Move sqlite3 types to global state (GH-26537)
https://github.com/python/cpython/commit/10a5c806d4dec6c342dcc9888fbe4fa1fa9b7a1f


--
nosy: +petr.viktorin

___
Python tracker 

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



[issue40240] Expose public spelling of _PyGC_FINALIZED and _PyGC_SET_FINALIZED?

2021-06-15 Thread STINNER Victor


STINNER Victor  added the comment:

Pablo: "That is out of contract and goes against the guarantees on the GC and 
can (will) cause the finalizer of the object to be executed more than once. I 
don't think is a good idea to expose an API that allows breaking the guarantees 
that we give: every object is finalized once."

I concur with Pablo. We must not expose an API to "unfinalize" an object.

Irit Katriel: "Can this be closed now? It seems that the query API was added 
and the set API was rejected."

Right. I close the issue as rejected.

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



[issue30260] sock_dealloc() may call __repr__ when socket class is already collected by GC

2021-06-15 Thread asterite


Change by asterite :


--
stage:  -> resolved
status: pending -> closed

___
Python tracker 

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



[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-06-15 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25322
pull_request: https://github.com/python/cpython/pull/26735

___
Python tracker 

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



[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-06-15 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 1cd3d859a49b047dd08abb6f44f0539564d3525a by Victor Stinner in 
branch 'main':
bpo-42972: _thread.RLock implements the GH protocol (GH-26734)
https://github.com/python/cpython/commit/1cd3d859a49b047dd08abb6f44f0539564d3525a


--

___
Python tracker 

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



[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-06-15 Thread miss-islington


miss-islington  added the comment:


New changeset e30fe27dabbc6b48736c3c17d57f6fa542376e8f by Miss Islington (bot) 
in branch '3.10':
bpo-42972: _thread.RLock implements the GH protocol (GH-26734)
https://github.com/python/cpython/commit/e30fe27dabbc6b48736c3c17d57f6fa542376e8f


--

___
Python tracker 

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



[issue44422] threading.enumerate(): reentrant call during a GC collection hangs

2021-06-15 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 243fd01047ddce1a7eb0f99a49732d123e942c63 by Victor Stinner in 
branch 'main':
bpo-44422: Fix threading.enumerate() reentrant call (GH-26727)
https://github.com/python/cpython/commit/243fd01047ddce1a7eb0f99a49732d123e942c63


--

___
Python tracker 

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



[issue44422] threading.enumerate(): reentrant call during a GC collection hangs

2021-06-15 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 1.0 -> 2.0
pull_requests: +25323
pull_request: https://github.com/python/cpython/pull/26737

___
Python tracker 

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



[issue44422] threading.enumerate(): reentrant call during a GC collection hangs

2021-06-15 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25324
pull_request: https://github.com/python/cpython/pull/26738

___
Python tracker 

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



[issue44392] Py_GenericAlias is not documented

2021-06-15 Thread Ken Jin


Change by Ken Jin :


--
pull_requests: +25325
pull_request: https://github.com/python/cpython/pull/26739

___
Python tracker 

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



[issue44422] threading.enumerate(): reentrant call during a GC collection hangs

2021-06-15 Thread miss-islington


miss-islington  added the comment:


New changeset c3b776f83b4c765da6d7b8854e844e07bd33c375 by Miss Islington (bot) 
in branch '3.10':
bpo-44422: Fix threading.enumerate() reentrant call (GH-26727)
https://github.com/python/cpython/commit/c3b776f83b4c765da6d7b8854e844e07bd33c375


--

___
Python tracker 

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



[issue44407] A "Coroutines and Tasks" code example needs "asyncio.run(main())"

2021-06-15 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

I think it's clear that the modification of previous example is limited to 
`main()` because `say_after()` is also omitted. This is very common in Python 
code examples, - it seems to me this change is not needed.

--
nosy: +andrei.avk

___
Python tracker 

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



[issue43795] Implement PEP 652 -- Maintaining the Stable ABI

2021-06-15 Thread Petr Viktorin


Change by Petr Viktorin :


--
pull_requests: +25326
pull_request: https://github.com/python/cpython/pull/26740

___
Python tracker 

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



[issue38401] Make dataclass attribute docstrings accessible

2021-06-15 Thread 4-launchpad-kalvdans-no-ip-org


Change by 4-launchpad-kalvdans-no-ip-org :


--
nosy: +4-launchpad-kalvdans-no-ip-org

___
Python tracker 

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



[issue44422] threading.enumerate(): reentrant call during a GC collection hangs

2021-06-15 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 8fe57aacc7bf9d9af84803b69dbb1d66597934c6 by Miss Islington (bot) 
in branch '3.9':
bpo-44422: Fix threading.enumerate() reentrant call (GH-26727) (GH-26738)
https://github.com/python/cpython/commit/8fe57aacc7bf9d9af84803b69dbb1d66597934c6


--

___
Python tracker 

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



[issue44422] threading.enumerate(): reentrant call during a GC collection hangs

2021-06-15 Thread STINNER Victor


STINNER Victor  added the comment:

Ok, the deadlock on reentrant call to threading.enumerate() is now fixed in 
3.9, 3.10 and main (future 3.11) branches. I close the issue. Thanks for the 
reviews, as usual :-)

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



[issue44422] threading.enumerate(): reentrant call during a GC collection hangs

2021-06-15 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +25327
pull_request: https://github.com/python/cpython/pull/26741

___
Python tracker 

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



[issue44422] threading.enumerate(): reentrant call during a GC collection hangs

2021-06-15 Thread STINNER Victor


STINNER Victor  added the comment:

Oh, I reopen the issue for PR 26741.

--
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue23035] python -c: Line causing exception not shown for exceptions other than SyntaxErrors

2021-06-15 Thread Irit Katriel


Change by Irit Katriel :


--
type:  -> enhancement
versions: +Python 3.11 -Python 3.5

___
Python tracker 

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



[issue29126] Fix comments about _PyThreadState_Current

2021-06-15 Thread Irit Katriel


Irit Katriel  added the comment:

These comments have been removed in the meantime, here:
https://github.com/python/cpython/commit/59d3dce69b0a4f6ee17578ae68037cc7ae90936f

--
nosy: +iritkatriel
resolution:  -> out of date
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



[issue27607] Importing the main module twice leads to two incompatible instances

2021-06-15 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.11 -Python 3.6

___
Python tracker 

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



[issue44310] Document that lru_cache uses hard references

2021-06-15 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

See PR 26731 for a draft FAQ entry.  Let me know what you think.

--

___
Python tracker 

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



[issue44426] Docs fail to build with Sphinx 4 due to Invalid C declaration

2021-06-15 Thread Mark Dickinson


Mark Dickinson  added the comment:

Hmm. It's probably not the best name, and we can certainly change it.

But I'm a bit confused by the error message: `complex` isn't a keyword in 
either C or C++, so I'm not sure why Sphinx thinks it is.

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue44426] Docs fail to build with Sphinx 4 due to Invalid C declaration

2021-06-15 Thread Mark Dickinson


Mark Dickinson  added the comment:

As a test, gcc and clang both seem happy to treat this as valid C.  I think 
Sphinx is wrong to reject this.

mdickinson@mirzakhani Desktop % cat test.c
typedef struct {
double real;
double imag;
} Py_complex;

Py_complex _Py_c_neg(Py_complex complex);
mdickinson@mirzakhani Desktop % gcc -Wall -Wextra -std=c17 -c test.c
mdickinson@mirzakhani Desktop % clang -Wall -Wextra -std=c17 -c test.c
mdickinson@mirzakhani Desktop %

--

___
Python tracker 

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



[issue44037] Broad performance regression from 3.10a7 to 3.10b2 with python.org macOS binaries

2021-06-15 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

The problem is still present in Python 3.10b2.

--
title: Broad performance regression from 3.10a7 to 3.10b1 with python.org macOS 
binaries -> Broad performance regression from 3.10a7 to 3.10b2 with python.org 
macOS binaries

___
Python tracker 

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



[issue16663] Poor documentation for METH_KEYWORDS

2021-06-15 Thread Irit Katriel


Irit Katriel  added the comment:

This part of the documentation was reworded in issue28805, making this issue 
out of date.

--
nosy: +iritkatriel
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Add documentation for METH_FASTCALL and _PyObject_FastCall*()

___
Python tracker 

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



[issue43475] Worst-case behaviour of hash collision with float NaN

2021-06-15 Thread Mark Dickinson


Mark Dickinson  added the comment:


New changeset 1d10bf0bb9409a406c56b0de8870df998637fd0f by Mark Dickinson in 
branch 'main':
bpo-43475: Add what's new entry for NaN hash changes (GH-26725)
https://github.com/python/cpython/commit/1d10bf0bb9409a406c56b0de8870df998637fd0f


--

___
Python tracker 

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



[issue4277] asynchat's handle_error inconsistency

2021-06-15 Thread Irit Katriel


Irit Katriel  added the comment:

asynchat has been deprecated for a long time, it's unlikely we will do anything 
with it now.

--
nosy: +iritkatriel
resolution:  -> out of date
stage: test needed -> 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



[issue43475] Worst-case behaviour of hash collision with float NaN

2021-06-15 Thread Mark Dickinson


Change by Mark Dickinson :


--
pull_requests: +25328
pull_request: https://github.com/python/cpython/pull/26743

___
Python tracker 

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



[issue44426] Docs fail to build with Sphinx 4 due to Invalid C declaration

2021-06-15 Thread Mark Dickinson


Change by Mark Dickinson :


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

___
Python tracker 

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



[issue43475] Worst-case behaviour of hash collision with float NaN

2021-06-15 Thread Mark Dickinson


Mark Dickinson  added the comment:


New changeset 8d0b2ca493e236fcad8709a622c1ac8ad29c372d by Mark Dickinson in 
branch '3.10':
[3.10] bpo-43475: Add what's new entry for NaN hash changes (GH-26725) 
(GH-26743)
https://github.com/python/cpython/commit/8d0b2ca493e236fcad8709a622c1ac8ad29c372d


--

___
Python tracker 

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



[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2021-06-15 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
pull_requests: +25330
pull_request: https://github.com/python/cpython/pull/26745

___
Python tracker 

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



[issue29153] Test test.test_asynchat.TestAsynchat / test.test_asynchat.TestAsynchat_WithPoll fail test_close_when_done

2021-06-15 Thread Irit Katriel


Irit Katriel  added the comment:

asynchat is deprecated since version 3.6 so there won't be any more development 
related to it.

--
nosy: +iritkatriel
resolution:  -> out of date
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



[issue44342] enum with inherited type won't pickle

2021-06-15 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25331
pull_request: https://github.com/python/cpython/pull/26746

___
Python tracker 

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



[issue44428] _ProactorBasePipeTransport.abort() after _ProactorBasePipeTransport.close() does not cancel writes

2021-06-15 Thread Thomas Grainger


New submission from Thomas Grainger :

demo program:

import asyncio
import socket
import threading

async def amain():
family = socket.AddressFamily.AF_INET
sock = socket.socket(family, socket.SOCK_STREAM)
sock.settimeout(1)
sock.bind(('localhost', 0))
sock.listen()
host, port = sock.getsockname()[:2]

event = threading.Event()

def serve():
client, _ = sock.accept()
with client:
client.recv(1)
event.wait()

t = threading.Thread(target=serve, daemon=True)
t.start()

reader, writer = await asyncio.open_connection(host=host, port=port)
try:
while True:
writer.write(b"\x00" * 4096 * 682 * 2)
await asyncio.wait_for(writer.drain(), 2)
print("wrote")
except asyncio.TimeoutError:
print("timed out")

writer.close()
await asyncio.sleep(0)
writer.transport.abort()
print("waiting close")
await writer.wait_closed()  # never finishes on ProactorEventLoop
print("closed")
event.set()
t.join()

asyncio.run(amain())

it looks like it was fixed for the selector eventloop in 
https://github.com/python/cpython/commit/2546a177650264205e8a52b6836bc5b8c48bf085

but not for the proactor 
https://github.com/python/cpython/blame/8fe57aacc7bf9d9af84803b69dbb1d66597934c6/Lib/asyncio/proactor_events.py#L140

--
components: asyncio
messages: 395896
nosy: asvetlov, graingert, yselivanov
priority: normal
severity: normal
status: open
title: _ProactorBasePipeTransport.abort() after 
_ProactorBasePipeTransport.close() does not cancel writes
versions: Python 3.10, 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



[issue12458] Tracebacks should contain the first line of continuation lines

2021-06-15 Thread Edward Yang


Edward Yang  added the comment:

Supposing I like the old behavior (line number of the end of the statement), is 
there any way to recover that line number from the traceback after this change?

--
nosy: +ezyang

___
Python tracker 

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



[issue44342] enum with inherited type won't pickle

2021-06-15 Thread Ethan Furman


Ethan Furman  added the comment:


New changeset 0f99324f61d5a2edd8729be5eed6f172c892af24 by Miss Islington (bot) 
in branch '3.10':
bpo-44342: [Enum] fix data type search (GH-26667)
https://github.com/python/cpython/commit/0f99324f61d5a2edd8729be5eed6f172c892af24


--

___
Python tracker 

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



[issue44342] enum with inherited type won't pickle

2021-06-15 Thread Ethan Furman


Change by Ethan Furman :


--
pull_requests: +25332
pull_request: https://github.com/python/cpython/pull/26747

___
Python tracker 

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



[issue8772] sysconfig: _get_default_scheme can be made public?

2021-06-15 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.11 -Python 3.2

___
Python tracker 

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



[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-06-15 Thread Eric Snow


Eric Snow  added the comment:


New changeset ac38a9f2dfbba95f5d4338eb11a0221d38ef9328 by Eric Snow in branch 
'main':
bpo-43693: Eliminate unused "fast locals". (gh-26587)
https://github.com/python/cpython/commit/ac38a9f2dfbba95f5d4338eb11a0221d38ef9328


--

___
Python tracker 

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



[issue44429] Tkinter Flow Geometry Manager

2021-06-15 Thread Gary Davenport


New submission from Gary Davenport :

Hi there.  I love Python and Tkinter.  I know that there are geometry managers 
pack, place, and grid.  I think there should be a flow type management 
available, like what is done in Java or html/css.  This is more important as 
responsive GUI design is needed with different screen sizes.

I initially addressed this by inheriting from the Frame in tkinter to a 
'FlowFrame' object and anything in that Frame would have flow geometry.

But this is a little awkward because the syntax is widget.pack() or 
widget.grid(), etc, so the method is linked to the widget.

So I altered the tkinter __init__.py  wrapper to add the .flow method so you 
can use widget.flow() syntax.

The flow geometry manager uses the grid managers methods.

The changes are straight-forward and I have 3 related projects on github:

1) https://github.com/garydavenport73/tkinterFlow - 
there are only 2 versions so history will demonstrate the relatively simple 
changes.

2) https://github.com/garydavenport73/FlowFrame -
a related project, FlowFrame object

3) https://github.com/garydavenport73/cpython
the formal changes to the most recent

https://github.com/python/cpython/blob/3.9/Lib/tkinter/__init__.py file.

--
components: Tkinter
hgrepos: 405
messages: 395900
nosy: Gary73
priority: normal
severity: normal
status: open
title: Tkinter Flow Geometry Manager
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



[issue44430] [sqlite3] refactor threading tests

2021-06-15 Thread Erlend E. Aasland


New submission from Erlend E. Aasland :

The threading tests (ThreadTests) in Lib/sqlite3/test/dbapi.py has a lot of 
code duplication, and none of the test methods use the 
test.support.threading_helper.reap_threads helper. Also, some branches are not 
covered by this test class. Suggesting the following:

1. Rewrite ThreadTests with a _run_test() helper method that does the heavy 
lifting
2. Add test.support.threading_helper.reap_threads to _run_test()
3. Use _run_test() in all threading tests
4. Add test case for sqlite3.Connection.set_trace_callback
5. Add test case for sqlite3.Connection.create_collation

--
assignee: erlendaasland
components: Tests
messages: 395901
nosy: erlendaasland, pablogsal
priority: low
severity: normal
status: open
title: [sqlite3] refactor threading tests
type: enhancement
versions: Python 3.11

___
Python tracker 

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



[issue44430] [sqlite3] refactor threading tests

2021-06-15 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


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

___
Python tracker 

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



[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-06-15 Thread Guido van Rossum


Change by Guido van Rossum :


--
pull_requests: +25334
pull_request: https://github.com/python/cpython/pull/26749

___
Python tracker 

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



[issue44342] enum with inherited type won't pickle

2021-06-15 Thread Ethan Furman


Change by Ethan Furman :


--
pull_requests: +25335
pull_request: https://github.com/python/cpython/pull/26750

___
Python tracker 

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



[issue44425] 'dirty' added to sys.version on Linux and Mac source builds depending on git version

2021-06-15 Thread Ned Deily


Change by Ned Deily :


--
nosy: +ned.deily

___
Python tracker 

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



[issue44342] enum with inherited type won't pickle

2021-06-15 Thread Ethan Furman


Ethan Furman  added the comment:


New changeset 741b8ae1cfc507902eb57e20f003487af13e40c0 by Ethan Furman in 
branch 'main':
bpo-44342: [Enum] sync current docs to 3.10 (GH-26750)
https://github.com/python/cpython/commit/741b8ae1cfc507902eb57e20f003487af13e40c0


--

___
Python tracker 

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



[issue44342] enum with inherited type won't pickle

2021-06-15 Thread Ethan Furman


Ethan Furman  added the comment:


New changeset 41c2a4a727d3d559632598759433e0ec1bf594f5 by Ethan Furman in 
branch '3.10':
[3.10] bpo-44342: [Enum] improve test, add andrei kulakov to ACKS (GH-26726)
https://github.com/python/cpython/commit/41c2a4a727d3d559632598759433e0ec1bf594f5


--

___
Python tracker 

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



[issue43945] [Enum] standardize format() behavior

2021-06-15 Thread Ethan Furman


Ethan Furman  added the comment:

Thinking about this some more I am partially reversing course.  The idea behind 
`IntEnum` and `IntFlag` is to be, as close as possible, drop-in replacements 
for existing integer-based constants.  If the format() of those two change then 
they become much less attractive.

So it won't.  Instead, any user-mixed enumerations will get the new behavior:

class Grades(int, Enum):
A = 5
F = 0

will emit a DeprecationWarning now, and in 3.12 `format(Grades.A)` will product 
'A' instead of '5'.

--

___
Python tracker 

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



[issue44429] Tkinter Flow Geometry Manager

2021-06-15 Thread Zachary Ware


Zachary Ware  added the comment:

Hi Gary.

This sounds interesting.  However, Tkinter generally tries to be a pretty thin 
wrapper around Tcl/Tk; is there something like this already in Tk that could be 
used instead, or existing discussion to add such to Tk?  We certainly would not 
want to wind up in the situation of conflicting with Tcl/Tk if they later add 
something in the same vein :)

Also, the ship has long sailed for adding this to 3.9; 3.11 is the earliest 
this could happen at this point; I've adjusted the issue metadata accordingly.

--
nosy: +gpolo, serhiy.storchaka, zach.ware
type:  -> enhancement
versions: +Python 3.11 -Python 3.9

___
Python tracker 

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



[issue44431] Add command-line functionality to uuid module

2021-06-15 Thread Eric Phenix


New submission from Eric Phenix :

Suggested functionality:

> python -m uuid
> b9aa5a06-e2cd-4c26-b26b-1590f01ea996

--
messages: 395906
nosy: ephenix
priority: normal
severity: normal
status: open
title: Add command-line functionality to uuid module
type: enhancement
versions: Python 3.11

___
Python tracker 

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



[issue44431] Add command-line functionality to uuid module

2021-06-15 Thread Eric Phenix


Change by Eric Phenix :


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

___
Python tracker 

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



[issue43945] [Enum] standardize format() behavior

2021-06-15 Thread Ethan Furman


Change by Ethan Furman :


--
pull_requests: +25337
pull_request: https://github.com/python/cpython/pull/26752

___
Python tracker 

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



[issue44415] sys.stdout.flush and print() hanging

2021-06-15 Thread Rajeev Chaurasia


Rajeev Chaurasia  added the comment:

Thanks a lot Serhiy.
Your suggested fix resolved the issue.
-Rajeev

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



[issue44432] SourceFileLoader.load_module() is mixing content of previosly loaded files

2021-06-15 Thread Andrew Johnson


New submission from Andrew Johnson :

Hi,

I'm loading multiple files in same convention - same filename, as a part of 
creating a build system. I can compare the case to the loading multple 
configuration files for various plugins in the application, the file contents 
of multiple files from different directories are mixed together which looks 
dangerous.

Here is a reproducible case for Python 3.9.4 (running on Arch Linux)
https://github.com/blackandred/python-bug-sourcefileloader

--
hgrepos: 406
messages: 395908
nosy: blackandred
priority: normal
severity: normal
status: open
title: SourceFileLoader.load_module() is mixing content of previosly loaded 
files
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