cpython
cpython copied to clipboard
The Python programming language
# Bug report ### Bug description: https://github.com/python/cpython/pull/121162/files#r1664259401 ### CPython versions tested on: 3.13, CPython main branch ### Operating systems tested on: _No response_ ### Linked PRs * gh-121334
`__getattribute__` does not propagate `AttributeError` error-message if `__getattr__` fails as well
This problem only appears when `__getattr__` is implemented: **EDIT:** Updated MWE ```python import pandas as pd class MWE: @property def foo(self): s = pd.Index([1,2,3]) return s.iloc[0] # actual bug! pd.Index...
There are two aims here: 1. Make `*args: *Ts` valid. 2. Make starred expression valid in the context of `subscription`, such that `Generic[*a]` and `list[*a]` are valid. 1 is straightforward,...
Reference implementation of the following C-API functinons: * `PyType_GetBaseByToken()` * ~`PyType_GetToken()`~ Discussion: https://discuss.python.org/t/55598 ---- 📚 Documentation preview 📚: https://cpython-previews--121079.org.readthedocs.build/
`deepcopy()` can be surprisingly slow when called with empty containers like lists, tuples, dicts, sets or frozensets. This adds a fast path for this case similar to #114266 which speeds...
# Bug report ### Bug description: ```python import collections global count count = 0 class Evil(): def __eq__(self, other): global count print(count) if count == 1: l.clear() print("cleared l") count...
# Bug report ### Bug description: ```python ().index(0) # outputs "tuple.index(x): x not in tuple" [].index(0) # outputs "0 is not in list" ``` i think it'd be useful to...
# Bug report ### Bug description: As discussed in https://discuss.python.org/t/python-3-13-0-beta-3-now-available/56847/7 and https://github.com/python/cpython/issues/120766#issuecomment-2200251720 When I updated from Python 3.13.0b2 to b3 and started the REPL for the first time, pressing arrow...
# Bug report ### Bug description: python3.9 without uvloop doesn't leaks memory (or noticeably smaller). python3.11+ (and others?) leaks memory A LOT under load (with or without uvloop) - up...
As reported in gh-121246, the following Python code: ```python def func(x): return True if x else False ``` would be compiled into the following bytecode: ``` 2 LOAD_FAST 0 (x)...