cpython icon indicating copy to clipboard operation
cpython copied to clipboard

The Python programming language

Results 1387 cpython issues
Sort by recently updated
recently updated
newest added

While working on https://github.com/python/cpython/pull/99283 I've noticed this piece of code: https://github.com/python/cpython/blob/0124b5dd28eff7bb80eb7244e97e402a036db13b/Modules/_ctypes/stgdict.c#L360-L364 https://github.com/python/cpython/blob/0124b5dd28eff7bb80eb7244e97e402a036db13b/Modules/_ctypes/stgdict.c#L382-L383 I've never seen this before, so I went and searched for this on the internet: https://cs.github.com/?scopeName=All+repos&scope=&q=_use_broken_old_ctypes_structure_semantics_ Looks like...

type-bug
expert-ctypes

# Bug report No exception set but raise SystemError when setting `_fields_` of ctypes.Structure in `__init_subclass__` Reproduce code: ``` import ctypes class ParentStructure(ctypes.Structure): def __init_subclass__(cls, **kwargs): cls._fields_ =[('v1',ctypes.c_uint),('v2',ctypes.c_uint),] super().__init_subclass__(**kwargs) class...

type-bug
expert-ctypes

During `__initsubclass__` not all parts required by `PyType_stgdict` are ready. This PR just sets a better error message, without changing the semantics of the type creation. * Issue: gh-99275

awaiting review

The following small script works on 3.9.13 but when tested on 3.10.7 or 3.11.0rc1 will cause a crash. PyQt version is 6.3.1. I hope this is the right place, and...

type-crash

# Bug report ``` class Example1: str: str = 'text' Example1.__annotations__ >>> {'str': 'text'} ``` ``` class Example2: attr1: str = 'text' int: int = 5 str: str = 'some...

type-bug
expert-typing
pending

These lines assume that there might be `NameError` in some cases while accessing `complex`: https://github.com/python/cpython/blob/0124b5dd28eff7bb80eb7244e97e402a036db13b/Lib/csv.py#L168-L172 I don't think that it is true today (the code itself is 20 years old)....

type-bug
stdlib