[issue44922] isinstance breaks on imported dataclasses

2021-08-15 Thread Oleg Baskakov
Oleg Baskakov added the comment: Sorry, I forgot to add if __name__ line: ``` import codegen from dataclasses import dataclass @dataclass class AtomX: my_symbol: str quantity: str = "" if __name__ == "__main__": codegen.inheritance_map(AtomX("qwerty")) ``` So the output: ```

[issue44888] ssl.OP_LEGACY_SERVER_CONNECT missing

2021-08-15 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch nosy: +python-dev nosy_count: 2.0 -> 3.0 pull_requests: +26248 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27776 ___ Python tracker

[issue44921] dict subclassing is slow

2021-08-15 Thread Jack DeVries
Jack DeVries added the comment: There was a thorough discussion about the concerns associated with supporting dict subclasses in general here: bpo-32615 If I understand correctly, allowing dict subclasses to inherit __contains__ and __getitem__ will be a step towards supporting dict

[issue44922] isinstance breaks on imported dataclasses

2021-08-15 Thread Eric V. Smith
Eric V. Smith added the comment: I get a circular import error: Traceback (most recent call last): File "main.py", line 1, in import codegen File "/cygdrive/c/home/eric/codegen.py", line 1, in from main import AtomX File "/cygdrive/c/home/eric/main.py", line 9, in

[issue42560] Improve Tkinter Documentation

2021-08-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: > Anyone have any big picture thoughts at this point? Yes. For years, I have wanted major changes in out tkinter docs, but making them myself has never become a top priority for me over working directly on IDLE. The latter has been hampered by the

[issue31256] xml.etree.ElementTree: add support for doctype in tostring method

2021-08-15 Thread Danya Sucharik
Danya Sucharik added the comment: May I aks, how it to add a doctype now? -- nosy: +sucharik versions: +Python 3.8 -Python 3.5 ___ Python tracker ___

[issue44922] isinstance breaks on imported dataclasses

2021-08-15 Thread Oleg Baskakov
New submission from Oleg Baskakov : Hey I was trying to import dataclasses from another file and somehow isinstance doesn't work anymore: main.py: ``` import codegen from dataclasses import dataclass @dataclass class AtomX: my_symbol: str quantity: str = ""

[issue42560] Improve Tkinter Documentation

2021-08-15 Thread Mark Roseman
Mark Roseman added the comment: Here's a very rough work-in-progress snapshot: https://github.com/roseman/cpython/blob/tkinter-docs-snapshot-20210815/Doc/library/tkinter.rst This includes: 1. Changes I'd mentioned to the intro, external resources, modules, architecture 2. Rewrite

[issue44897] Integrate trashcan mechanism into _Py_Dealloc

2021-08-15 Thread Neil Schemenauer
Change by Neil Schemenauer : Added file: https://bugs.python.org/file50220/perf-annotate-trash.txt ___ Python tracker ___ ___

[issue44897] Integrate trashcan mechanism into _Py_Dealloc

2021-08-15 Thread Neil Schemenauer
Neil Schemenauer added the comment: As I suspected, the performance impact is significant (although pretty small). Based on Linux perf, it looks like the extra test+branch in _Py_Dealloc adds about 1% overhead. pyperformance shows something similar, see attached reports

[issue44921] dict subclassing is slow

2021-08-15 Thread Marco Sulla
New submission from Marco Sulla : I asked on SO why subclassing dict makes the subclass much slower in some operations. This is the answer by Monica (https://stackoverflow.com/a/59914459/1763602): Indexing and in are slower in dict subclasses because of a bad interaction between a dict

[issue44920] Support UUIDv6, UUIDv7, and UUIDv8 from the new version of RFC4122

2021-08-15 Thread Steve Simmons
New submission from Steve Simmons : Three new types of UUIDs have been proposed in the latest draft of the next version of RFC4122. Full text of that draft is in [1] (published 21 April 2021; draft period ends 21 Oct 2021). Support for these should be included in uuid.py for Python 3.11,

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

2021-08-15 Thread Mark Shannon
Mark Shannon added the comment: PyType_ClearCache() is documented as: Clear the internal lookup cache. Return the current version tag. Modifying it to do what it is documented to do fixes this bug :) -- ___ Python tracker

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

2021-08-15 Thread Mark Shannon
Change by Mark Shannon : -- keywords: +patch pull_requests: +26247 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27773 ___ Python tracker ___

[issue44904] Erroneous behaviour for abstract class properties

2021-08-15 Thread Alex Waygood
Alex Waygood added the comment: This same bug (where classmethod properties are accidentally called by other parts of Python) is also present for non-abstract class properties, and has the side effect of causing doctest.py to crash with a fairly incomprehensible `AttributeError`: Script:

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

2021-08-15 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I'm keeping track to the 3.10 backports to the second rc so could you add me as a reviewer for the backport? -- ___ Python tracker

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

2021-08-15 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > GH-27772 reverts the behaviour change but keeps the fix for the undefined > behaviour. Can the backport of GH-27772 to the 3.10 branch go in before > 3.10.0 final? Thanks for checking with me! Given that this is fixing a bug that we introduced in

[issue44918] Unhandled Exception (Not Implemented) in HTMLParser().feed

2021-08-15 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Seems similar to https://bugs.python.org/issue38573 -- nosy: +xtreak ___ Python tracker ___

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

2021-08-15 Thread Ken Jin
Ken Jin added the comment: @Mark, agreed about properly defining the semantics. For the current bug: I've narrowed it down to a corner case in how the -R tests work: 1. On each run cleanup, libregrtest will clear the type cache

[issue44918] Unhandled Exception (Not Implemented) in HTMLParser().feed

2021-08-15 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: -pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44911] Leaked tasks cause IsolatedAsyncioTestCase to throw an exception

2021-08-15 Thread Bar Harel
Change by Bar Harel : -- nosy: +michael.foord ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35203] Windows Installer Ignores Launcher Installer Options Where The Python Launcher Is Already Present

2021-08-15 Thread Timothy Fleenor
Timothy Fleenor added the comment: I am also having this same problem with python 3.9.5.. I am currently in windows 11 preview but it has also occurred for me in the windows 20h2 with no updates and caused a lot of issues running python for me including saying the pip command was not

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

2021-08-15 Thread Mark Shannon
Mark Shannon added the comment: Thanks for putting in the effort to find this. I think the first step to fixing this is to formalize the semantics of `tp_version_tag`. Initially it was designed just for the method cache, but we have started using it as a unique identifier for the state of a

[issue44919] TypedDict subtypes ignore any other metaclasses in 3.9+

2021-08-15 Thread Nikita Sobolev
New submission from Nikita Sobolev : Some context. I have a `User` class defined as a `TypedDict`: ```python from typing import TypedDict class User(TypedDict): name: str registered: bool ``` Now, I want to check if some `dict` is an instance of `User` like so: `isinstance(my_dict,

[issue44917] interpreter hangs on recursion in both body and handler of a try block

2021-08-15 Thread Irit Katriel
Irit Katriel added the comment: Right, this is a duplicate of issue42951. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Random and infinite loop in dealing with recursion error for "try-except " ___ Python

[issue16580] [doc] Add examples to int.to_bytes and int.from_bytes

2021-08-15 Thread Mark Dickinson
Change by Mark Dickinson : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue16580] [doc] Add examples to int.to_bytes and int.from_bytes

2021-08-15 Thread Mark Dickinson
Mark Dickinson added the comment: Merged. Thank you for the contribution! -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue16580] [doc] Add examples to int.to_bytes and int.from_bytes

2021-08-15 Thread Mark Dickinson
Mark Dickinson added the comment: New changeset ad0a8a9c629a7a0fa306fbdf019be63c701a8028 by Gautam Chaudhuri in branch 'main': bpo-16580: [doc] Add examples to int.to_bytes and int.from_bytes (GH-27760) https://github.com/python/cpython/commit/ad0a8a9c629a7a0fa306fbdf019be63c701a8028

[issue44918] Unhandled Exception (Not Implemented) in HTMLParser().feed

2021-08-15 Thread Mark Deen
New submission from Mark Deen : The hexadecimal sequence '3c215b02634717' when passed as an argument to HTMLParser()'s feed function results in the exception noted below. The code example below illustrates this exception. from html.parser import HTMLParser parser = HTMLParser()

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

2021-08-15 Thread Mark Dickinson
Mark Dickinson added the comment: @Pablo: I'm adding you to the nosy list to get your opinion on whether (the backport of) GH-27772 can go into 3.10.0.rc2. Summary: GH-27278 (which I reviewed and approved) and its backports fixed some undefined behaviour in complex exponentiation, but also

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

2021-08-15 Thread Mark Dickinson
Change by Mark Dickinson : -- pull_requests: +26246 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/27772 ___ Python tracker ___

[issue44917] interpreter hangs on recursion in both body and handler of a try block

2021-08-15 Thread Mark Shannon
Mark Shannon added the comment: A recursion limit of 30 is effectively infinite. With a debug build of 3.11, the time to execute grows very fast indeed, probably super-exponentially. mark@nero:~/repos/cpython$ time ./python ~/test/test.py 15 real0m1.107s user0m1.099s sys

[issue44917] interpreter hangs on recursion in both body and handler of a try block

2021-08-15 Thread Irit Katriel
Irit Katriel added the comment: Not sure. Here we do set the recursion limit. -- ___ Python tracker ___ ___ Python-bugs-list

[issue16580] [doc] Add examples to int.to_bytes and int.from_bytes

2021-08-15 Thread Mark Dickinson
Mark Dickinson added the comment: @Gautam > I think it's out of scope for this issue. Agreed. It was just a note in passing. I don't think it's worth opening a new issue, though, unless this is genuinely causing problems for someone. Just let it lie. --

[issue44917] interpreter hangs on recursion in both body and handler of a try block

2021-08-15 Thread Mark Shannon
Mark Shannon added the comment: This looks like a duplicate of https://bugs.python.org/issue42951 -- nosy: +Mark.Shannon ___ Python tracker ___