[issue44931] Add "bidimap" to collections library: a simple bidirectional map

2021-08-17 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Is BiDiMap included in the Java SDK?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue44930] super-Matlab-style ranged list literal initialization

2021-08-17 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I concur with Steven.

Before range() and enumerate() were introduced there were discussions about 
introducing dedicated syntax. But it was decided that builtin functions are 
more preferable. range() was improved in Python 3, so you do not need to waste 
memory and time for a temporary list if you do not need it. You can create a 
list only if you absolutely need a list, and you can do it with the list 
constructor.

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



[issue44931] Add "bidimap" to collections library: a simple bidirectional map

2021-08-17 Thread Jurjen N.E. Bos


Jurjen N.E. Bos  added the comment:

It is part of the Apache Common collections

--

___
Python tracker 

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



[issue44930] super-Matlab-style ranged list literal initialization

2021-08-17 Thread wang xuancong


wang xuancong  added the comment:

Another lazy explanation not wanting to improve anything

--

___
Python tracker 

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



[issue44924] logging.handlers.QueueHandler does not maintain the exc_text

2021-08-17 Thread Vinay Sajip


Vinay Sajip  added the comment:

It might be inadvisable to make your suggested change because of backward 
compatibility and breakage of existing code. However, I don't mind updating the 
logging cookbook to mention your suggested method of resolving the issue for 
this use case. I'll leave the issue open until I've done that.

--

___
Python tracker 

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



[issue44932] `issubclass` and `isinstance` doesn't check for all 2nd argument types

2021-08-17 Thread theeshallnotknowethme


New submission from theeshallnotknowethme :

When I tried using `isinstance` with a type (e.g. `bool`) as the 1st argument 
and a parameterized generic in a tuple (e.g. '(`bool`, `list[bool]`)') as the 
2nd argument, it raised a `TypeError`, 'isinstance() argument 2 cannot be a 
parameterized generic'. But when I did the same thing in `issubclass`, it 
returned a boolean and did not raise any `TypeError`s. Using `isinstance` with 
an object as the 1st argument and the same tuple 2nd argument also returned a 
boolean, and did not raise any `TypeError`s. Is this expected behaviour, or 
should this be fixed? This was tested in Python 3.10.0rc1 in a 64-bit system.

--
components: Tests, Windows
messages: 399717
nosy: February291948, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: `issubclass` and `isinstance` doesn't check for all 2nd argument types
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



[issue44931] Add "bidimap" to collections library: a simple bidirectional map

2021-08-17 Thread Vedran Čačić

Vedran Čačić  added the comment:

Your implementation has many problems. First, almost all your complexity claims 
are wrong, probably because you copied them from Java, which uses balanced 
trees instead of Python's hash tables.
(Also, the method names seem to be copied from Java, using camelCase which is 
unusual for Python stdlib.)

Second, shouldn't _inverse be a weakkey dictionary? Otherwise many operations 
(e.g. removeValue) will get two dicts out of sync quickly.

--
nosy: +veky

___
Python tracker 

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



[issue44903] [Doc] How does one to about getting onto the "Other Graphical User Interface Packages" page?

2021-08-17 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 6a358bb9482f7595b858ea7b800cbe66f0de5fa1 by Gautam Chaudhuri in 
branch 'main':
bpo-44903: Removed othergui.rst and list of GUI frameworks (GH-27762)
https://github.com/python/cpython/commit/6a358bb9482f7595b858ea7b800cbe66f0de5fa1


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue44903] [Doc] How does one to about getting onto the "Other Graphical User Interface Packages" page?

2021-08-17 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 7.0 -> 8.0
pull_requests: +26260
pull_request: https://github.com/python/cpython/pull/27790

___
Python tracker 

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



[issue44903] [Doc] How does one to about getting onto the "Other Graphical User Interface Packages" page?

2021-08-17 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26261
pull_request: https://github.com/python/cpython/pull/27791

___
Python tracker 

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



[issue38956] argparse.BooleanOptionalAction should not add the default value to the help string by default

2021-08-17 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 27fd31311097ab7326f084b5e0e5f388f8dc6b13 by Łukasz Langa in 
branch '3.9':
[3.9] bpo-38956: don't print BooleanOptionalAction's default twice (GH-27672) 
(GH-27788)
https://github.com/python/cpython/commit/27fd31311097ab7326f084b5e0e5f388f8dc6b13


--

___
Python tracker 

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



[issue44933] python3.9-intel64 hardened runtime not enabled

2021-08-17 Thread tester


New submission from tester :

When trying too build the python framework using the method below and you try 
to get it notarized you get the following error.

"path": "munkitools-5.5.0.4362.pkg/munkitools_python.pkg 
Contents/Payload/usr/local/munki/Python.framework/Versions/3.9/bin/python3.9-intel64",
"message": "The executable does not have the hardened runtime enabled.",

https://github.com/munki/munki/blob/main/code/tools/build_python_framework.sh


The package get built using this ttps://github.com/lifeunexpected/Scripts

This issue happens on python 3.9.5 and 3.9.6 earlier versions did not include 
python3.9-intel64.

--
components: macOS
messages: 399721
nosy: bettyrab, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: python3.9-intel64 hardened runtime not enabled
type: compile error
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



[issue44932] `issubclass` and `isinstance` doesn't check for all 2nd argument types

2021-08-17 Thread Ken Jin


Ken Jin  added the comment:

@Paul, Steve, Tim and Zach, I've removed y'all from nosy as this isn't a 
Windows issue (but a typing/builtin types one). If you feel that I shouldn't 
have done that: my apologies and please do tell me.

To summarize what OP said:

>>> isinstance(bool, (bool, list[bool]))
TypeError: isinstance() argument 2 cannot be a parameterized generic

>>> issubclass(bool, (bool, list[bool]))
True

@OP, this seems like a bug. issubclass should raise according to PEP 585. In 
this case it's short-circuiting so it doesn't check the 2nd arg. Swapping the 
arguments around gives the expected TypeError.

>>> issubclass(bool, (list[bool], bool))
TypeError: issubclass() argument 2 cannot be a parameterized generic

At the same time, I'm hesitant to run a check through everything in the types 
tuple first. That would hurt issubclass performance (I'm not sure by how much). 
What do you think, Guido and Serhiy?

--
components: +Library (Lib) -Tests, Windows
nosy: +gvanrossum, kj, serhiy.storchaka -paul.moore, steve.dower, tim.golden, 
zach.ware
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



[issue44914] tp_version_tag is not unique when test runs with -R :

2021-08-17 Thread Ken Jin


Ken Jin  added the comment:

Thanks Mark and Victor for the patch and reviews!

This issue also affects 3.10, but IMO we don't need to backport this as we 
don't have other code relying on this invariant in that version, so it won't 
affect anything there. If you feel otherwise, please let me know.

The fix and tests have landed, I'm closing this issue.

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



[issue38956] argparse.BooleanOptionalAction should not add the default value to the help string by default

2021-08-17 Thread miss-islington


miss-islington  added the comment:


New changeset 6f6648e436d02bce0e49ba82f4377c0d2f586f0f by Miss Islington (bot) 
in branch '3.10':
bpo-38956: don't print BooleanOptionalAction's default twice (GH-27672)
https://github.com/python/cpython/commit/6f6648e436d02bce0e49ba82f4377c0d2f586f0f


--

___
Python tracker 

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



[issue44933] python3.9-intel64 hardened runtime not enabled

2021-08-17 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I'm not sure what your question is. But to enable the hardened runtime you need 
to sign the binaries using ``--options runtime`` as one of the options.

--

___
Python tracker 

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



[issue44914] tp_version_tag is not unique when test runs with -R :

2021-08-17 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

The opcode cache for load attribute in 3.10 uses the tp_version_tag so unless I 
am missing something we can fall into the same problem, no?

--

___
Python tracker 

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



[issue44914] tp_version_tag is not unique when test runs with -R :

2021-08-17 Thread Ken Jin


Ken Jin  added the comment:

@Pablo yup the 3.10 opcache used tp_version_tag. But it also does identity 
(pointer) comparison of type/class object 
https://github.com/python/cpython/blob/3.10/Python/ceval.c#L3432. Which is why 
it doesn't fail.

I created this issue because we don't do type pointer comparisons anymore in 
3.11's new specialization infrastructure, and rely only on tp_version_tag and 
dict keys version.

--

___
Python tracker 

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



[issue44852] Add ability to wholesale silence DeprecationWarnings while running the test suite

2021-08-17 Thread Łukasz Langa

Change by Łukasz Langa :


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



[issue44852] Add ability to wholesale silence DeprecationWarnings while running the test suite

2021-08-17 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset bc98f981326d7cb30f939dedd04b91f378255d88 by Łukasz Langa in 
branch '3.10':
[3.10] bpo-44852: Support ignoring specific DeprecationWarnings wholesale in 
regrtest (GH-27634) (GH-27784)
https://github.com/python/cpython/commit/bc98f981326d7cb30f939dedd04b91f378255d88


--

___
Python tracker 

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



[issue38956] argparse.BooleanOptionalAction should not add the default value to the help string by default

2021-08-17 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks, Max for pushing this across the finish line! ✨ 🍰 ✨  

Closing this one. Further improvement of BooleanOptionalAction will be 
discussed in BPO-44587.

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



[issue44587] argparse BooleanOptionalAction displays default=SUPPRESS unlike other action types

2021-08-17 Thread Łukasz Langa

Łukasz Langa  added the comment:

Toshio, as I commented on GH-27672, that PR was merged because it's a rather 
trivial improvement over the status quo. I intend to also release this fix in 
3.9.7 on August 30th.

Your idea in this issue to further improve the situation while retaining 
displaying the default value (option 2 described above) is interesting. If you 
prepare a PR we can work with, I'll look into merging that as well.

--
nosy: +lukasz.langa

___
Python tracker 

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



[issue44587] argparse BooleanOptionalAction displays default=SUPPRESS unlike other action types

2021-08-17 Thread Łukasz Langa

Łukasz Langa  added the comment:

Oh, I forgot to say this explicitly: an important reason why the trivial fix 
was desirable is that it was a clear-cut bugfix, making it easy to backport all 
the way to the 3.9 branch where BooleanOptionalAction was introduced.

Having this in place, your potential PR here might be a cleaner refactor 
without having to worry about backporting. Of course, if we manage to keep it 
small and isolated, we can bring it to 3.9 and 3.10 as well.

--
versions: +Python 3.11 -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



[issue44903] [Doc] How does one to about getting onto the "Other Graphical User Interface Packages" page?

2021-08-17 Thread miss-islington


miss-islington  added the comment:


New changeset f6bd1ca166a9c8c9769fb23bc6d8f9c6dcc907ab by Miss Islington (bot) 
in branch '3.10':
bpo-44903: Removed othergui.rst and list of GUI frameworks (GH-27762)
https://github.com/python/cpython/commit/f6bd1ca166a9c8c9769fb23bc6d8f9c6dcc907ab


--

___
Python tracker 

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



[issue44903] [Doc] How does one to about getting onto the "Other Graphical User Interface Packages" page?

2021-08-17 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset e21b66b0446d119862d352b1eecc830fed4192ff by Miss Islington (bot) 
in branch '3.9':
bpo-44903: Removed othergui.rst and list of GUI frameworks (GH-27762) (GH-27790)
https://github.com/python/cpython/commit/e21b66b0446d119862d352b1eecc830fed4192ff


--

___
Python tracker 

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



[issue44903] [Doc] How does one to about getting onto the "Other Graphical User Interface Packages" page?

2021-08-17 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks all! ✨ 🍰 ✨

CPython docs are now out of the business of curating lists of GUI frameworks.

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



[issue44914] tp_version_tag is not unique when test runs with -R :

2021-08-17 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> But it also does identity (pointer) comparison of type/class object

Good point! Even if I wrote that code I forgot about all the guards that were 
needed for correctness. I now remember all the weird cases we discovered there 
:)

--

___
Python tracker 

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



[issue44933] python3.9-intel64 hardened runtime not enabled

2021-08-17 Thread tester


tester  added the comment:

This part of the script is used to notarize the python framework and it worked 
with python 3.9.4 and earlier but with 3.9.5 and 3.9.6 it stopped working 
because of "/python3.9-intel64",
"message": "The executable does not have the hardened runtime enabled.

#get current python version used in Munki build so that it doesn't have to be 
hardcoded
PYTHON_FRAMEWORK_VERSION=$(ls Python.framework/Versions | grep -v "Current")

find $MUNKIROOT/Python.framework/Versions/$PYTHON_FRAMEWORK_VERSION/lib/ -type 
f -perm -u=x -exec codesign --force --deep --verbose -s "$DevApp" {} \;
find $MUNKIROOT/Python.framework/Versions/$PYTHON_FRAMEWORK_VERSION/bin/ -type 
f -perm -u=x -exec codesign --force --deep --verbose -s "$DevApp" {} \;

find $MUNKIROOT/Python.framework/Versions/$PYTHON_FRAMEWORK_VERSION/lib/ -type 
f -name "*dylib" -exec codesign --force --deep --verbose -s "$DevApp" {} \;
find $MUNKIROOT/Python.framework/Versions/$PYTHON_FRAMEWORK_VERSION/lib/ -type 
f -name "*so" -exec codesign --force --deep --verbose -s "$DevApp" {} \;

/usr/libexec/PlistBuddy -c "Add 
:com.apple.security.cs.allow-unsigned-executable-memory bool true" 
$MUNKIROOT/entitlements.plist

codesign --force --options runtime --entitlements $MUNKIROOT/entitlements.plist 
--deep --verbose -s "$DevApp" 
$MUNKIROOT/Python.framework/Versions/$PYTHON_FRAMEWORK_VERSION/Resources/Python.app/

codesign --force --options runtime --entitlements $MUNKIROOT/entitlements.plist 
--deep --verbose -s "$DevApp" 
$MUNKIROOT/Python.framework/Versions/$PYTHON_FRAMEWORK_VERSION/bin/"python$PYTHON_FRAMEWORK_VERSION"
codesign --force --deep --verbose -s  "$DevApp" $MUNKIROOT/Python.framework

--

___
Python tracker 

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



[issue44934] Windows installer: Append Python to PATH instead of prepending it

2021-08-17 Thread Bastian Neuburger


New submission from Bastian Neuburger :

Hi there,

in our organization Python 3.9 is installed on Windows with the PrependPath 
option; as expected the Install and Scripts directories are prepended to path.

However if there are Python scripts with the same name as a system command 
(e.g. a script named ping.py vs. the included ping.exe), the Python script gets 
preferred if I run ping in cmd.exe or Powershell, which makes sense, since the 
Python script path is considered before e.g. C:\Windows\System32\. 

Is it possible to either change the option to append the Install and scripts 
directories to the systems PATH instead of prepending it or add an AppendPath 
option?

I searched for a discussion why prepending was chosen instead of appending but 
I didn't find anything.

--
components: Windows
messages: 399737
nosy: bn_append, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Windows installer: Append Python to PATH instead of prepending it
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



[issue44933] python3.9-intel64 hardened runtime not enabled

2021-08-17 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I don't know what creates "python3.9-intel64", but this is not created by the 
regular Python build process.  It might be created by one of the build scripts 
you use.

--

___
Python tracker 

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



[issue44895] refleak test failure in test_exceptions

2021-08-17 Thread Irit Katriel


Irit Katriel  added the comment:

However, if I replace the assignment with a gc.collect() call, it still leaks:

def test_no_hang_on_context_chain_cycle2():
while gc.collect():
pass
class A(Exception):
pass
class B(Exception):
pass
...


I also changed gc_collect in Lib/test/support/__init__.py (which is called by 
the refleak check) to loop until gc.collect() returns 0 (currently it calls 
gc.collect() 3 times).  Still leaks.

--

___
Python tracker 

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



[issue44895] refleak test failure in test_exceptions

2021-08-17 Thread Irit Katriel


Irit Katriel  added the comment:

But if I also add a gc loop at the beginning of 
test_recursion_in_except_handler, the leak goes away.

def test_recursion_in_except_handler():
while gc.collect(): 
   pass
def set_relative_recursion_limit(n):
...


So maybe test_recursion_in_except_handler is resurrecting something that 
test_no_hang_on_context_chain_cycle2 has let go of?

--

___
Python tracker 

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



[issue44932] `issubclass` and `isinstance` doesn't check for all 2nd argument types

2021-08-17 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

It is not specific to typing.

>>> isinstance(1, (int, 1))
True
>>> isinstance(1, (1, int))
Traceback (most recent call last):
  File "", line 1, in 
TypeError: isinstance() arg 2 must be a type or tuple of types
>>> issubclass(int, (int, 1))
True
>>> issubclass(int, (1, int))
Traceback (most recent call last):
  File "", line 1, in 
TypeError: issubclass() arg 2 must be a class or tuple of classes

isinstance() and issubclass() with tuples always stopped on first positive 
match. I don't think there is need to change this.

--

___
Python tracker 

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



[issue44933] python3.9-intel64 hardened runtime not enabled

2021-08-17 Thread tester


tester  added the comment:

oh i didn't now that so thank you so much i will look into that maybe thats 
where my problem is :)

--

___
Python tracker 

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



[issue44852] Add ability to wholesale silence DeprecationWarnings while running the test suite

2021-08-17 Thread Łukasz Langa

Change by Łukasz Langa :


--
pull_requests: +26262
pull_request: https://github.com/python/cpython/pull/27793

___
Python tracker 

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



[issue42560] Improve Tkinter Documentation

2021-08-17 Thread Łukasz Langa

Łukasz Langa  added the comment:

Mark, it's great to see you work on the documentation again. I would like you 
invite you to produce a number of smaller PRs, just like you did with GH-27717. 
Those tend to be much easier to include even as we are discussing larger-scale 
evolution of the documentation.

In particular, your cpython forks contains a number of commits, some tiny, some 
large. Taken in its entirety it will be hard to review because diffs aren't 
well suited for free-flowing text when semantic newlines aren't used [^1].

Reworking the tutorial seems like it could go in a separate PR. Same for 
updating literature to current versions, and so on.

[^1]: https://sembr.org/

--

___
Python tracker 

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



[issue33479] Document tkinter and threads

2021-08-17 Thread Łukasz Langa

Łukasz Langa  added the comment:

This is done. Thanks, Mark!

For remaining discussion on reworking Tkinter docs, please refer to BPO-42560.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue44932] `issubclass` and `isinstance` doesn't check for all 2nd argument types

2021-08-17 Thread Ken Jin


Ken Jin  added the comment:

Thank you for the examples Serhiy. I agree.

--
resolution:  -> wont fix
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



[issue44926] typing.get_type_hints() raises for type aliases with forward references

2021-08-17 Thread Maximilian Hils


Maximilian Hils  added the comment:

Thank you Ken and Guido for the super quick feedback!

> It's not fine if it were to look in the wrong namespace

That's a really good point. Here's another terrible example:


foo.py:
```
import typing

FooData: typing.TypeAlias = "Data"

class Data:
pass

```

bar.py:
```
import typing
import foo

BarData: typing.TypeAlias = "Data"

def func1(x: foo.FooData, y: BarData):
pass

class Data:
pass

print(typing.get_type_hints(func1))  # incorrectly uses bar.Data twice.

```


I don't see how we could distinguish FooData from BarData without static 
analysis. Changing get_type_hints to not pick the unrelated class with the same 
name would essentially mean not using func.__globals__, which breaks almost all 
ForwardRef evaluation. This doesn't seem viable.

Potential alternatives:

1. Accept the current state: get_type_hints does not work well with type 
aliases that use forward references.
2. Fix it at least for cases where a ForwardRef is constructed immediately 
(typing.List["Foo"], but not "Foo" or list["Foo"]), similar to how it's been 
done for #41249. I have made a very basic proof-of-concept at 
https://github.com/mhils/cpython/commit/4adbcf088d2857166b579f7dd2954ff9981fc7db,
 but it's a mess (see commit comments).
3. Deprecate/discourage use of forward references in type aliases and/or change 
the syntax for [forward references in] type aliases so that their origin can be 
tracked.

In summary, it seems like there are no really good solutions here. I'm fine if 
this ends up as a pragmatic wontfix, maybe with a comment added somewhere in 
the docs or in PEP 613.

--

___
Python tracker 

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



[issue44050] [subinterpreters] _PyImport_FixupExtensionObject() regression in Python 3.9

2021-08-17 Thread hai shi


Change by hai shi :


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

___
Python tracker 

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



[issue44050] [subinterpreters] _PyImport_FixupExtensionObject() regression in Python 3.9

2021-08-17 Thread Petr Viktorin


Petr Viktorin  added the comment:

> Maybe the old behavior was better: if an extension uses the old API, share 
> its state between all interpreters.

Yes, I think the old behavior was better: if an extension uses the old API, 
share its state between all interpreters.

This is obviously bad, but I don't see how skipping part of initialization (as 
done in 
https://github.com/python/cpython/commit/82c83bd907409c287a5bd0d0f4598f2c0538f34d#diff-28cfc3e2868980a79d93d2ebdc8747dcb9231f3dd7f2caef96e74107d1ea3bf3L721-R719
 ) is better.
(Note that the "def->m_size == -1" means that the module does not support 
sub-interpreters, because it has global state, per 
https://docs.python.org/3/c-api/module.html#c.PyModuleDef.m_size)

--
nosy: +petr.viktorin

___
Python tracker 

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



[issue44050] [subinterpreters] _PyImport_FixupExtensionObject() regression in Python 3.9

2021-08-17 Thread hai shi


hai shi  added the comment:

> Maybe the old behavior was better: if an extension uses the old API, share 
> its state between all interpreters.

+1. I create PR-27794, which use `def->m_slots` to identify the extension 
module created from `PyModule_Create()` or not. cc @petr

--

___
Python tracker 

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



[issue42035] [C API] PyType_GetSlot cannot get tp_name

2021-08-17 Thread Petr Viktorin


Petr Viktorin  added the comment:


New changeset 3e2c643ae0b21f9e596bfd9c8ec99ca546ea8d0f by Hai Shi in branch 
'main':
bpo-42035: Add PyType_GetQualName() to get a type's qualified name. (GH-27551)
https://github.com/python/cpython/commit/3e2c643ae0b21f9e596bfd9c8ec99ca546ea8d0f


--

___
Python tracker 

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



[issue44935] Solaris: enable posix_spawn in subprocess

2021-08-17 Thread Jakub Kulik


New submission from Jakub Kulik :

Solaris also provides posix_spawn() syscall that can/should be used in the 
subprocess module to spawn new processes.

--
components: Library (Lib)
messages: 399750
nosy: kulikjak
priority: normal
severity: normal
status: open
title: Solaris: enable posix_spawn in subprocess
versions: Python 3.10, 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



[issue42560] Improve Tkinter Documentation

2021-08-17 Thread Richard Sheridan


Change by Richard Sheridan :


--
nosy: +Richard Sheridan

___
Python tracker 

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



[issue44935] Solaris: enable posix_spawn in subprocess

2021-08-17 Thread Jakub Kulik


Change by Jakub Kulik :


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

___
Python tracker 

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



[issue44931] Add "bidimap" to collections library: a simple bidirectional map

2021-08-17 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

This has come up several times in the past and never moved forward.  Part of 
the reason is that the mapping API doesn't translate cleanly to bidirectional 
lookups and it leaves users trapped if two keys every end up needing to be 
mapped to the same value (i.e. libre->free and gratis->free). Mostly, folks are 
better-off with two separate dictionaries augmented by a single function to 
create the initial pairing.  Also note that there are several bimaps published 
on PyPi but they have very low uptake.

If you want to pursue this further, I suggest bringing this to python-ideas 
(but first scan the archives for previous discussions and scan github for cases 
where projects have used one of the existing implementations).

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



[issue26871] Change weird behavior of PyModule_AddObject()

2021-08-17 Thread Petr Viktorin


Petr Viktorin  added the comment:

Since https://github.com/python/cpython/pull/23122, there is 
PyModule_AddObjectRef doesn't steal a reference.
PyModule_AddObject is discouraged in the docs, but not formally deprecated. (As 
Stefan notes, the leaks are single references in case of a module 
initialization failure -- the cost of using the API incorrectly is very small; 
requiring everyone to change their code because it was possible to misuse it is 
overkill.)

See https://docs.python.org/3.10/c-api/module.html#c.PyModule_AddObjectRef

I think this is enough to close the issue.

--
nosy: +petr.viktorin
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



[issue44050] [subinterpreters] _PyImport_FixupExtensionObject() regression in Python 3.9

2021-08-17 Thread hai shi


hai shi  added the comment:

> (Note that the "def->m_size == -1" means that the module does not support 
> sub-interpreters, because it has global state.

Make Sense. It's more better and exact than my suggestion :)

--

___
Python tracker 

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



[issue44874] Deprecate Py_TRASHCAN_SAFE_BEGIN/END

2021-08-17 Thread Irit Katriel


Irit Katriel  added the comment:

Following discussion on python-dev I added a compile-time deprecation warning.

With this, and after reverting PR27683 I get the warning below. The build 
succeeds and the tests pass.


% make -s -j2
Objects/frameobject.c:622:5: warning: 'UsingDeprecatedTrashcanMacro' is 
deprecated [-Wdeprecated-declarations]
Py_TRASHCAN_SAFE_BEGIN(f)
^
./Include/cpython/object.h:545:9: note: expanded from macro 
'Py_TRASHCAN_SAFE_BEGIN'
UsingDeprecatedTrashcanMacro cond=1; \
^
./Include/cpython/object.h:542:1: note: 'UsingDeprecatedTrashcanMacro' has been 
explicitly marked deprecated here
Py_DEPRECATED(3.11) typedef int UsingDeprecatedTrashcanMacro;
^
./Include/pyport.h:509:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
 ^

--

___
Python tracker 

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



[issue44874] Deprecate Py_TRASHCAN_SAFE_BEGIN/END

2021-08-17 Thread Irit Katriel


Change by Irit Katriel :


--
nosy: +petr.viktorin

___
Python tracker 

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



[issue42035] [C API] PyType_GetSlot cannot get tp_name

2021-08-17 Thread Petr Viktorin


Petr Viktorin  added the comment:


New changeset fcd651d16fc5ac3d07dd3f57f1001a861a2e7d23 by Hai Shi in branch 
'main':
bpo-42035: Enhance test_get_type_name() of _testcapi (GH-27649)
https://github.com/python/cpython/commit/fcd651d16fc5ac3d07dd3f57f1001a861a2e7d23


--

___
Python tracker 

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



[issue44874] Deprecate Py_TRASHCAN_SAFE_BEGIN/END

2021-08-17 Thread Irit Katriel


Irit Katriel  added the comment:

Link to python-dev thread: 

https://mail.python.org/archives/list/python-...@python.org/message/LWP6MOLP5UW2TH3MROZQK4N64SX35N2B/

--

___
Python tracker 

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



[issue42035] [C API] PyType_GetSlot cannot get tp_name

2021-08-17 Thread Petr Viktorin


Petr Viktorin  added the comment:

Now, I wonder if we should also introduce PyType_GetModuleName for __module__, 
or stop and close this as fixed.

--

___
Python tracker 

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



[issue44934] Windows installer: Append Python to PATH instead of prepending it

2021-08-17 Thread Steve Dower


Steve Dower  added the comment:

Prepending is used because it makes the most recently installed version of 
Python the "active" one. It also ensures that a deliberate install is going to 
override any applications that may have put their own copy on PATH 
(deliberately or otherwise). There's no real mechanism for managing multiple 
Python entries on PATH, so it just works out better to prepend and let the 
latest install win.

However, we also disable this option by default because it can lead to 
confusion like what you've experienced. The best option here is to leave it 
disabled and update PATH yourself (or use "py.exe" which is always on PATH), 
since you've got the best awareness of your environment.

--

___
Python tracker 

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



[issue44889] Specialize LOAD_METHOD with PEP 659 adaptive interpreter

2021-08-17 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset 96346cb6d0593ef9ec122614347ccb053cd63433 by Ken Jin in branch 
'main':
bpo-44889: Specialize LOAD_METHOD with PEP 659 adaptive interpreter (GH-27722)
https://github.com/python/cpython/commit/96346cb6d0593ef9ec122614347ccb053cd63433


--
nosy: +Mark.Shannon

___
Python tracker 

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



[issue42035] [C API] PyType_GetSlot cannot get tp_name

2021-08-17 Thread hai shi


hai shi  added the comment:

> Now, I wonder if we should also introduce PyType_GetModuleName for 
> __module__, or stop and close this as fixed.

IMO, I suggest to close this bpo. We can get the `tp_name` by the C API now. If 
there have user want get `__module__`, we can open a new bpo to discuss :)

--

___
Python tracker 

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



[issue44889] Specialize LOAD_METHOD with PEP 659 adaptive interpreter

2021-08-17 Thread Ken Jin


Ken Jin  added the comment:

Some improvements can be made (see 
https://github.com/python/cpython/pull/27722#issuecomment-900369714), but for 
the most part we're done.

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



[issue42035] [C API] PyType_GetSlot cannot get tp_name

2021-08-17 Thread Petr Viktorin


Change by Petr Viktorin :


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



[issue44895] refleak test failure in test_exceptions

2021-08-17 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset c2c857b40f226575d64e0d56a759cbd799f51e62 by Dong-hee Na in branch 
'main':
bpo-44895: Introduce PYTHONDUMPREFSFILE variable for refcount dumping (GH-27767)
https://github.com/python/cpython/commit/c2c857b40f226575d64e0d56a759cbd799f51e62


--

___
Python tracker 

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



[issue44895] refleak test failure in test_exceptions

2021-08-17 Thread Irit Katriel


Irit Katriel  added the comment:

I'm pretty sure the frame locals is involved. 

This leaks (note that a is being re-raised, not b):

-
def test_no_hang_on_context_chain_cycle2():
class A(Exception): pass
class B(Exception): pass

try:
try:
raise A()
except A as _a:
a = _a
try:
raise B() 
except B as _b:
b = _b
raise a 
except A: 
pass
-

But this doesn't leak:

-
def test_no_hang_on_context_chain_cycle2():
class A(Exception): pass
class B(Exception): pass

try:
try:
raise A()
except A as _a:
a = _a
try:
raise B() 
except B as _b:
pass # b = _b  <== not saving b in a local
raise a 
except A: 
pass
-

--

___
Python tracker 

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



[issue44895] refleak test failure in test_exceptions

2021-08-17 Thread Irit Katriel


Change by Irit Katriel :


--
Removed message: https://bugs.python.org/msg399763

___
Python tracker 

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



[issue44895] refleak test failure in test_exceptions

2021-08-17 Thread Irit Katriel


Irit Katriel  added the comment:

I'm pretty sure the frame locals is involved. 

This leaks (not a is being re-raised, not b):

-
def test_no_hang_on_context_chain_cycle2():
class A(Exception): pass
class B(Exception): pass

try:
try:
raise A()
except A as _a:
a = _a
try:
raise B() 
except B as _b:
b = _b
raise a 
except A: 
pass
-

But this doesn't leak:

-
def test_no_hang_on_context_chain_cycle2():
class A(Exception): pass
class B(Exception): pass

try:
try:
raise A()
except A as _a:
a = _a
try:
raise B() 
except B as _b:
pass # b = _b  <== not saving b in a local
raise a 
except A: 
pass
-

--

___
Python tracker 

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



[issue42560] Improve Tkinter Documentation

2021-08-17 Thread Mark Roseman

Mark Roseman  added the comment:

Łukasz, I've got a bunch of individual branches for each of those sections. 
What I posted the link to was a merge of all of them just for overview 
purposes, but the PR's will be created from the individual branches. I can 
start creating those now or wait a bit, whatever is easiest workflow-wise.

--

___
Python tracker 

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



[issue24955] webbrowser broken on Mac OS X when using the BROWSER variable

2021-08-17 Thread Dong-hee Na


Change by Dong-hee Na :


--
versions: +Python 3.11 -Python 2.7, Python 3.5, Python 3.6

___
Python tracker 

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



[issue42255] webbrowser.MacOSX is unused, untested and undocumented

2021-08-17 Thread Dong-hee Na


Dong-hee Na  added the comment:

Let's deprecate it from 3.11 and remove it at 3.12 :)

--
nosy: +corona10

___
Python tracker 

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



[issue42255] webbrowser.MacOSX is unused, untested and undocumented

2021-08-17 Thread Dong-hee Na


Change by Dong-hee Na :


--
versions: +Python 3.11 -Python 3.10

___
Python tracker 

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



[issue44698] Undefined behaviour in Objects/complexobject.c's complex_pow

2021-08-17 Thread Mark Dickinson


Mark Dickinson  added the comment:


New changeset 4b9a2dcf19e5d13c3bc2afea2de1f65cd994c699 by Mark Dickinson in 
branch 'main':
bpo-44698: Restore complex pow behaviour for small integral exponents (GH-27772)
https://github.com/python/cpython/commit/4b9a2dcf19e5d13c3bc2afea2de1f65cd994c699


--

___
Python tracker 

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



[issue44698] Undefined behaviour in Objects/complexobject.c's complex_pow

2021-08-17 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26266
pull_request: https://github.com/python/cpython/pull/27797

___
Python tracker 

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



[issue44698] Undefined behaviour in Objects/complexobject.c's complex_pow

2021-08-17 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26265
pull_request: https://github.com/python/cpython/pull/27796

___
Python tracker 

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



[issue44936] test_concurrent_futures: test_cancel_futures_wait_false() and test_interpreter_shutdown() failed on GHA Windows x64

2021-08-17 Thread STINNER Victor


New submission from STINNER Victor :

GitHub Action Windows x64:
https://github.com/python/cpython/runs/3342514542

test_concurrent_futures failed when tests are run in parallel, but then passed 
then re-run in verbose mode.

==
FAIL: test_cancel_futures_wait_false 
(test.test_concurrent_futures.ThreadPoolShutdownTest)
--
Traceback (most recent call last):
  File "D:\a\cpython\cpython\lib\test\test_concurrent_futures.py", line 486, in 
test_cancel_futures_wait_false
rc, out, err = assert_python_ok('-c', """if True:
   ^^
  File "D:\a\cpython\cpython\lib\test\support\script_helper.py", line 160, in 
assert_python_ok
return _assert_python(True, *args, **env_vars)
   ^^^
  File "D:\a\cpython\cpython\lib\test\support\script_helper.py", line 145, in 
_assert_python
res.fail(cmd_line)
^^
  File "D:\a\cpython\cpython\lib\test\support\script_helper.py", line 72, in 
fail
raise AssertionError("Process return code is %d\n"
^^
AssertionError: Process return code is 3221225477
command line: ['D:\\a\\cpython\\cpython\\PCbuild\\amd64\\python.exe', '-X', 
'faulthandler', '-I', '-c', 'if True:\nfrom concurrent.futures 
import ThreadPoolExecutor\nfrom test.test_concurrent_futures import 
sleep_and_print\nif __name__ == "__main__":\nt = 
ThreadPoolExecutor()\nt.submit(sleep_and_print, .1, "apple")\n  
  t.shutdown(wait=False, cancel_futures=True)\n']

stdout:
---
apple
---

stderr:
---

---

==
FAIL: test_interpreter_shutdown 
(test.test_concurrent_futures.ThreadPoolShutdownTest)
0:01:59 load avg: 5.63 [100/428/1] test_lltrace passed -- running: 
test_regrtest (40.5 sec)
--
Traceback (most recent call last):
  File "D:\a\cpython\cpython\lib\test\test_concurrent_futures.py", line 307, in 
test_interpreter_shutdown
rc, out, err = assert_python_ok('-c', """if 1:
   ^^^
  File "D:\a\cpython\cpython\lib\test\support\script_helper.py", line 160, in 
assert_python_ok
return _assert_python(True, *args, **env_vars)
0:01:59 load avg: 5.63 [101/428/1] test_ucn passed -- running: test_regrtest 
(40.5 sec)
   ^^^
fetching http://www.pythontest.net/unicode/13.0.0/NamedSequences.txt ...
  File "D:\a\cpython\cpython\lib\test\support\script_helper.py", line 145, in 
_assert_python
res.fail(cmd_line)
^^
  File "D:\a\cpython\cpython\lib\test\support\script_helper.py", line 72, in 
fail
raise AssertionError("Process return code is %d\n"
^^
AssertionError: Process return code is 3221225477
command line: ['D:\\a\\cpython\\cpython\\PCbuild\\amd64\\python.exe', '-X', 
'faulthandler', '-I', '-c', 'if 1:\nfrom concurrent.futures import 
ThreadPoolExecutor\nfrom time import sleep\nfrom 
test.test_concurrent_futures import sleep_and_print\nif __name__ == 
"__main__":\ncontext = \'\'\nif context == 
"":\nt = ThreadPoolExecutor(5)\nelse:\n 
   from multiprocessing import get_context\n
context = get_context(context)\nt = ThreadPoolExecutor(5, 
mp_context=context)\nt.submit(sleep_and_print, 1.0, "apple")\n  
  ']

stdout:
---
apple
---

stderr:
---

---

--

Ran 226 tests in 109.440s

FAILED (failures=2, skipped=111)
test test_concurrent_futures failed
(...)
0:21:19 load avg: 0.02 Re-running test_concurrent_futures in verbose mode 
(matching: test_cancel_futures_wait_false, test_interpreter_shutdown)

test_interpreter_shutdown 
(test.test_concurrent_futures.ProcessPoolForkProcessPoolShutdownTest) ... 
skipped 'require unix system'
test_interpreter_shutdown 
(test.test_concurrent_futures.ProcessPoolForkserverProcessPoolShutdownTest) ... 
skipped 'require unix system'
test_interpreter_shutdown 
(test.test_concurrent_futures.ProcessPoolSpawnProcessPoolShutdownTest) ... 
1.33s ok
test_cancel_futures_wait_false 
(test.test_concurrent_futures.ThreadPoolShutdownTest) ... 0.27s ok
test_interpreter_shutdown (test.test_concurrent_futures.ThreadPoolShutdownTest) 
... 1.14s ok

--

Ran 5 tests in 2.756s

OK (skipped=2)

--
components: Tests
messages: 399768
nosy: lukasz.langa, pablogsal, vstinner
priority: normal
severity: no

[issue44937] test_regrest: test_tools_script_run_tests() failed on GHA Windows x64

2021-08-17 Thread STINNER Victor

New submission from STINNER Victor :

GitHub Action Windows x64 CI:
https://github.com/python/cpython/runs/3342514542

First, test_regrtest was killed after 20 minutes, while it was running 
test_tools_script_run_tests(). Then, re-running test_regrtest in verbose mode 
failed with a PermissionError.

2021-08-16T17:33:22.5453810Z 0:21:19 load avg: 0.02 [428/428/3] test_regrtest 
crashed (Exit code 1)
2021-08-16T17:33:22.5454836Z Timeout (0:20:00)!
2021-08-16T17:33:22.5456120Z Thread 0x0d2c (most recent call first):
2021-08-16T17:33:22.5457237Z   File "D:\a\cpython\cpython\lib\subprocess.py", 
line 1493 in _readerthread
2021-08-16T17:33:22.5459078Z   File "D:\a\cpython\cpython\lib\threading.py", 
line 946 in run
2021-08-16T17:33:22.5460342Z   File "D:\a\cpython\cpython\lib\threading.py", 
line 1009 in _bootstrap_inner
2021-08-16T17:33:22.5461365Z   File "D:\a\cpython\cpython\lib\threading.py", 
line 966 in _bootstrap
2021-08-16T17:33:22.5461983Z 
2021-08-16T17:33:22.5462583Z Thread 0x02e8 (most recent call first):
2021-08-16T17:33:22.5464628Z   File "D:\a\cpython\cpython\lib\threading.py", 
line 1099 in _wait_for_tstate_lock
2021-08-16T17:33:22.5466364Z   File "D:\a\cpython\cpython\lib\threading.py", 
line 1083 in join
2021-08-16T17:33:22.5468053Z   File "D:\a\cpython\cpython\lib\subprocess.py", 
line 1522 in _communicate
2021-08-16T17:33:22.5469685Z   File "D:\a\cpython\cpython\lib\subprocess.py", 
line 1148 in communicate
2021-08-16T17:33:22.5471344Z   File "D:\a\cpython\cpython\lib\subprocess.py", 
line 503 in run
2021-08-16T17:33:22.5473016Z   File 
"D:\a\cpython\cpython\lib\test\test_regrtest.py", line 521 in run_command
2021-08-16T17:33:22.5474852Z   File 
"D:\a\cpython\cpython\lib\test\test_regrtest.py", line 546 in run_python
2021-08-16T17:33:22.5476717Z   File 
"D:\a\cpython\cpython\lib\test\test_regrtest.py", line 600 in run_tests
2021-08-16T17:33:22.5478416Z   File 
"D:\a\cpython\cpython\lib\test\test_regrtest.py", line 647 in 
test_tools_script_run_tests
2021-08-16T17:33:22.5480110Z   File 
"D:\a\cpython\cpython\lib\unittest\case.py", line 549 in _callTestMethod
2021-08-16T17:33:22.5481748Z   File 
"D:\a\cpython\cpython\lib\unittest\case.py", line 592 in run
2021-08-16T17:33:22.5483362Z   File 
"D:\a\cpython\cpython\lib\unittest\case.py", line 652 in __call__
2021-08-16T17:33:22.5484975Z   File 
"D:\a\cpython\cpython\lib\unittest\suite.py", line 122 in run
2021-08-16T17:33:22.5486506Z   File 
"D:\a\cpython\cpython\lib\unittest\suite.py", line 84 in __call__
2021-08-16T17:33:22.5488012Z   File 
"D:\a\cpython\cpython\lib\unittest\suite.py", line 122 in run
2021-08-16T17:33:22.5489316Z   File 
"D:\a\cpython\cpython\lib\unittest\suite.py", line 84 in __call__
2021-08-16T17:33:22.5490786Z   File 
"D:\a\cpython\cpython\lib\unittest\suite.py", line 122 in run
2021-08-16T17:33:22.5492556Z   File 
"D:\a\cpython\cpython\lib\unittest\suite.py", line 84 in __call__
2021-08-16T17:33:22.5494071Z   File 
"D:\a\cpython\cpython\lib\unittest\runner.py", line 176 in run
2021-08-16T17:33:22.5495666Z   File 
"D:\a\cpython\cpython\lib\test\support\__init__.py", line 997 in _run_suite
2021-08-16T17:33:22.5496563Z test_curses test_dbm_gnu test_dbm_ndbm 
test_devpoll test_epoll
2021-08-16T17:33:22.5497530Z   File 
"D:\a\cpython\cpython\lib\test\support\__init__.py", line 1122 in run_unittest
2021-08-16T17:33:22.5498484Z test_fcntl test_fork1 test_gdb test_grp 
test_ioctl test_kqueue
2021-08-16T17:33:22.5499441Z   File 
"D:\a\cpython\cpython\lib\test\libregrtest\runtest.py", line 261 in _test_module
2021-08-16T17:33:22.5500545Z test_multiprocessing_fork 
test_multiprocessing_forkserver test_nis
2021-08-16T17:33:22.5501639Z   File 
"D:\a\cpython\cpython\lib\test\libregrtest\runtest.py", line 297 in 
_runtest_inner2
2021-08-16T17:33:22.5502797Z test_openpty test_ossaudiodev test_pipes 
test_poll test_posix
2021-08-16T17:33:22.5503867Z   File 
"D:\a\cpython\cpython\lib\test\libregrtest\runtest.py", line 335 in 
_runtest_inner
2021-08-16T17:33:22.5504886Z test_pty test_pwd test_readline test_resource 
test_spwd
2021-08-16T17:33:22.5505946Z   File 
"D:\a\cpython\cpython\lib\test\libregrtest\runtest.py", line 202 in _runtest
2021-08-16T17:33:22.5506925Z test_syslog test_threadsignals test_wait3 
test_wait4
2021-08-16T17:33:22.5507892Z   File 
"D:\a\cpython\cpython\lib\test\libregrtest\runtest.py", line 245 in runtest
2021-08-16T17:33:22.5508801Z test_xxtestfuzz test_zipfile64
2021-08-16T17:33:22.5509740Z   File 
"D:\a\cpython\cpython\lib\test\libregrtest\runtest_mp.py", line 83 in 
run_tests_worker
2021-08-16T17:33:22.5511140Z   File 
"D:\a\cpython\cpython\lib\test\libregrtest\main.py", line 675 in _main
2021-08-16T17:33:22.5512662Z   File 
"D:\a\cpython\cpython\lib\test\libregrtest\main.py", line 655 in main
2021-08-16T17:33:22.5513586Z test_asyncio test_concurrent_futures 
test_regrtest
2021-08-16T17:33:22.5514516Z   File 
"D:\a\cpython\cpython\lib\test\libregrtest\main.py", line 733 i

[issue41682] [Windows] test_asyncio: Proactor test_sendfile_close_peer_in_the_middle_of_receiving failure

2021-08-17 Thread STINNER Victor


STINNER Victor  added the comment:

Recent failure on GHA Windows x64:

https://github.com/python/cpython/runs/3342514542

2021-08-16T17:19:58.4338049Z 
==
2021-08-16T17:19:58.4339129Z FAIL: 
test_sendfile_close_peer_in_the_middle_of_receiving 
(test.test_asyncio.test_sendfile.ProactorEventLoopTests)
2021-08-16T17:19:58.4340315Z 
--
2021-08-16T17:19:58.4340937Z Traceback (most recent call last):
2021-08-16T17:19:58.4341846Z   File 
"D:\a\cpython\cpython\lib\test\test_asyncio\test_sendfile.py", line 457, in 
test_sendfile_close_peer_in_the_middle_of_receiving
2021-08-16T17:19:58.4342849Z with self.assertRaises(ConnectionError):
2021-08-16T17:19:58.4343398Z 
2021-08-16T17:19:58.4343982Z AssertionError: ConnectionError not raised

--

___
Python tracker 

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



[issue44936] test_concurrent_futures: test_cancel_futures_wait_false() and test_interpreter_shutdown() failed on GHA Windows x64

2021-08-17 Thread STINNER Victor


STINNER Victor  added the comment:

> AssertionError: Process return code is 3221225477
> (...)
> AssertionError: Process return code is 3221225477

This is STATUS_ACCESS_VIOLATION: the process crashed, not good :-(

Moreover, even if the process was run with -X faulthandler, stderr is empty :-(

--

___
Python tracker 

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



[issue44937] test_regrest: test_tools_script_run_tests() failed on GHA Windows x64

2021-08-17 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +erlendaasland, lukasz.langa, pablogsal

___
Python tracker 

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



[issue44936] test_concurrent_futures: test_cancel_futures_wait_false() and test_interpreter_shutdown() failed on GHA Windows x64

2021-08-17 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +erlendaasland

___
Python tracker 

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



[issue44937] test_regrest: test_tools_script_run_tests() failed on GHA Windows x64

2021-08-17 Thread STINNER Victor


STINNER Victor  added the comment:

In another commit of the same PR 27774, I don't even see test_regrtest in the 
list of the "10 slowest tests", so test_regrtest took less than "test_socket: 
46.4 sec".

If test_regrtest is killed after 20 minutes, it's likely that it was stuck 
somewhere.

test_tools_script_run_tests() runs Tools/scripts/run_tests.py with command line 
arguments.

In the past, I see many issues with PermissionError: something prevents to 
delete a directory on Windows. I never understood what.

regrtest creates a temporary directory, run a process in this directory, and 
then removes the directory. Here, something is stuck.

--

___
Python tracker 

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



[issue44936] test_concurrent_futures: test_cancel_futures_wait_false() and test_interpreter_shutdown() failed on GHA Windows x64

2021-08-17 Thread STINNER Victor


STINNER Victor  added the comment:

The machine was busy when test_concurrent_futures: system load of 5.59.

2021-08-16T17:14:01.3805500Z 0:01:58 load avg: 5.59 [ 93/428/1] 
test_concurrent_futures failed (2 failures) (1 min 49 sec) -- running: 
test_regrtest (39.2 sec)

--

___
Python tracker 

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



[issue44926] typing.get_type_hints() raises for type aliases with forward references

2021-08-17 Thread Guido van Rossum


Guido van Rossum  added the comment:

Maximilian, I think your last analysis is spot on. The problem is specific to 
type aliases and how at runtime they do not carry information about scope with 
them. The current type alias syntax (both the original form and the form using 
"x: TypeAlias = ...") was designed for static analysis only.

I suppose we could fix cases like

A = List["Foo"]

but we can't fix for example

A: TypeAlias = "Foo"

since at runtime this just ends up creating a variable A whose value is the 
string "Foo", and if you import and use that in another module, all you have is 
the value "Foo".

I think we have to accept this as a limitation of type aliases when combined 
with runtime access to types (it's not just get_type_hints(), but any mechanism 
that introspects types at runtime).

I'm reluctant to fix the List["Foo"] case, if only because that case is being 
phased out in favor of list["Foo"] anyway, and because it depends on 
typing.List being special -- we can't do the same kind of fixup for 
user-defined classes (e.g. C["Foo"]).

--

___
Python tracker 

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



[issue44698] Undefined behaviour in Objects/complexobject.c's complex_pow

2021-08-17 Thread Mark Dickinson


Mark Dickinson  added the comment:


New changeset 3f81e9628f6f104c103d0e38adb84c51e5261626 by Miss Islington (bot) 
in branch '3.10':
bpo-44698: Restore complex pow behaviour for small integral exponents 
(GH-27772) (GH-27796)
https://github.com/python/cpython/commit/3f81e9628f6f104c103d0e38adb84c51e5261626


--

___
Python tracker 

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



[issue44698] Undefined behaviour in Objects/complexobject.c's complex_pow

2021-08-17 Thread Mark Dickinson


Mark Dickinson  added the comment:


New changeset beb3a835dae3cd940b93e7caa32450890c4cd539 by Miss Islington (bot) 
in branch '3.9':
bpo-44698: Restore complex pow behaviour for small integral exponents 
(GH-27772) (GH-27797)
https://github.com/python/cpython/commit/beb3a835dae3cd940b93e7caa32450890c4cd539


--

___
Python tracker 

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



[issue44938] Expose PyErr_ChainExceptions in the stable API

2021-08-17 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

Currently, exception chaining in the C-API must be done by hand. This is a 
painstaking process that involves several steps and is very easy to do 
incorrectly.

We currently have a private function: _PyErr_ChainExceptions that does this 
job. Given that exception chaining is a very fundamental operation, this 
functionality must be exposed in the stable C-API

--
messages: 399777
nosy: pablogsal
priority: normal
severity: normal
status: open
title: Expose PyErr_ChainExceptions in the stable API

___
Python tracker 

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



[issue44938] Expose PyErr_ChainExceptions in the stable API

2021-08-17 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue44935] Solaris: enable posix_spawn in subprocess

2021-08-17 Thread Gregory P. Smith

Gregory P. Smith  added the comment:


New changeset b1930bf75f276cd7ca08c4455298128d89adf7d1 by Jakub Kulík in branch 
'main':
bpo-44935: enable posix_spawn() on Solaris (GH-27795)
https://github.com/python/cpython/commit/b1930bf75f276cd7ca08c4455298128d89adf7d1


--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue44935] Solaris: enable posix_spawn in subprocess

2021-08-17 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 2.0 -> 3.0
pull_requests: +26268
pull_request: https://github.com/python/cpython/pull/27800

___
Python tracker 

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



[issue44698] Undefined behaviour in Objects/complexobject.c's complex_pow

2021-08-17 Thread Mark Dickinson


Mark Dickinson  added the comment:

Re-closing; we should be good now.

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



[issue44935] Solaris: enable posix_spawn in subprocess

2021-08-17 Thread miss-islington


miss-islington  added the comment:


New changeset 826e059bb9b42e17bef2186938a2bd3f33610e69 by Miss Islington (bot) 
in branch '3.10':
[3.10] bpo-44935: enable posix_spawn() on Solaris (GH-27795) (GH-27800)
https://github.com/python/cpython/commit/826e059bb9b42e17bef2186938a2bd3f33610e69


--

___
Python tracker 

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



[issue44895] refleak test failure in test_exceptions

2021-08-17 Thread Guido van Rossum


Guido van Rossum  added the comment:

So there's code generated for an except clause with a variable that clears the 
variable at the end, so that this works:

try:
  ...
except Exception as err:
  ...
print(err)  # Should fail, since err was cleared when the except clause exited.

Maybe there's a bug here, either in the runtime or in the way that the code is 
generated?

--
nosy: +gvanrossum

___
Python tracker 

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



[issue42560] Improve Tkinter Documentation

2021-08-17 Thread E. Paine


E. Paine  added the comment:

> In particular, you added OS-specific info

I also deemed this very useful information. The issue is that it is not 
documented in the man pages and so those values are pulled straight from the 
source code. We would need to decide whether we keep such information in our 
docs, which is subject to change without warning.

> Did you exactly copy the tk manual wordings or rewrite in your own words?

All of the text was originally copied from the man pages. I have done a 
reasonable amount of rewording, reformatting and elaborating.

> Do you intend to contribute what you wrote?

If we conclude a complete doc is the way to go, I would finish documenting the 
canvas widget, make relevant reformatting changes (such as moving common widget 
options) and then open a PR.

--

___
Python tracker 

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



[issue44932] `issubclass` and `isinstance` doesn't check for all 2nd argument types

2021-08-17 Thread Guido van Rossum


Guido van Rossum  added the comment:

Agreed. Thanks, Serhiy.

--

___
Python tracker 

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



[issue38956] argparse.BooleanOptionalAction should not add the default value to the help string by default

2021-08-17 Thread Antony Lee


Change by Antony Lee :


--
nosy:  -Antony.Lee

___
Python tracker 

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



[issue36384] [security] CVE-2021-29921: ipaddress Should not reject IPv4 addresses with leading zeroes as ambiguously octal

2021-08-17 Thread Achraf Merzouki


Achraf Merzouki  added the comment:

Can we backport the security fix from this issue 
https://bugs.python.org/issue36384#msg392684 to version 3.8
The comment explicitly says that it was decided to not include in 3.8, I am not 
sure this is best, since it prevents using 3.8 because of this open 
vulnerability, and it does not seem to be a breaking change or too hard to port.

--
components:  -Documentation
nosy: +achraf.merzouki
versions: +Python 3.8 -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



[issue44895] refleak test failure in test_exceptions

2021-08-17 Thread Irit Katriel


Irit Katriel  added the comment:

It's probably not that because this leaks too, and it skips the cleanup:

try:
raise B()
except B:
b = sys.exc_info()[1]

--

___
Python tracker 

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



[issue44895] refleak test failure in test_exceptions

2021-08-17 Thread Irit Katriel


Irit Katriel  added the comment:

But this makes it not leak again, so now we know it's the traceback:

try:
raise B()
except B:
b = sys.exc_info()[1]
b.__traceback__ = None

--

___
Python tracker 

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



[issue44939] proposal: add support for regex in Literal type hint

2021-08-17 Thread Leon Mintz


New submission from Leon Mintz :

Could typing.Literal (or analogous) accept a regex pattern to match against?

For example, if I want a duration string,

duration: str  # allowed syntax: 3s, 3m, 3h etc.

vs

duration: LiteralPattern['[0-9]+[smh]']

--
messages: 399787
nosy: leon.mintz
priority: normal
severity: normal
status: open
title: proposal: add support for regex in Literal type hint

___
Python tracker 

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



[issue36384] [security] CVE-2021-29921: ipaddress Should not reject IPv4 addresses with leading zeroes as ambiguously octal

2021-08-17 Thread Roundup Robot


Change by Roundup Robot :


--
nosy: +python-dev
nosy_count: 17.0 -> 18.0
pull_requests: +26269
pull_request: https://github.com/python/cpython/pull/27801

___
Python tracker 

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



[issue44895] refleak test failure in test_exceptions

2021-08-17 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I am still amazed that I cannot reproduce the leaks on my machine. Maybe I am 
missing some steps.

Could you outline how are you reproducing the leaks?

--

___
Python tracker 

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



[issue44895] refleak test failure in test_exceptions

2021-08-17 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> But this makes it not leak again, so now we know it's the traceback:

The traceback is a very heavy gc object because it contains the frames, and in 
the locals of the frame is the traceback itself via the exception. This is a 
well known heavy cycle, but the gc should take care of it if the cycle becomes 
isolated

--

___
Python tracker 

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



[issue44921] dict subclassing is slow

2021-08-17 Thread Marco Sulla


Marco Sulla  added the comment:

Since my knowledge of this is very poor, I informed Monica about the issue. I'm 
quite sure that if there's a way to turn lemons into lemonade :)

--

___
Python tracker 

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



[issue44921] dict subclassing is slow

2021-08-17 Thread Marco Sulla


Marco Sulla  added the comment:

 I not finished my phrase. I'm sure that if there's a way to turn lemons 
into lemonade, she is **MUCH** more skilled than me to find one.

--

___
Python tracker 

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



  1   2   >