| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
information (GH-31710) (GH-31724)
When an exception is created in a nested call to PyObject_GetAttr, any
external calls will override the context information of the
AttributeError that we have already placed in the most internal call.
This will cause the suggestions we create to nor work properly as the
attribute name and object that we will be using are the incorrect ones.
To avoid this, we need to check first if these attributes are already
set and bail out if that's the case..
(cherry picked from commit 3b3be05a164da43f201e35b6dafbc840993a4d18)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
|
|
|
|
|
| |
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 81d968b7c30d5b41f3f28b297b7ee5345d569509)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
|
|
|
|
| |
(GH-31354)
|
|
|
|
|
| |
(cherry picked from commit e0433c1e70254d4d0357a9e14596929a04bdf769)
Co-authored-by: Brandt Bucher <brandt@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
importlib.invalidate_cache (GH-29384) (GH-30922)
Consider the following directory structure:
.
└── PATH1
└── namespace
└── sub1
└── __init__.py
And both PATH1 and PATH2 in sys path:
$ PYTHONPATH=PATH1:PATH2 python3.11
>>> import namespace
>>> import namespace.sub1
>>> namespace.__path__
_NamespacePath(['.../PATH1/namespace'])
>>> ...
While this interpreter still runs, PATH2/namespace/sub2 is created:
.
├── PATH1
│ └── namespace
│ └── sub1
│ └── __init__.py
└── PATH2
└── namespace
└── sub2
└── __init__.py
The newly created module cannot be imported:
>>> ...
>>> namespace.__path__
_NamespacePath(['.../PATH1/namespace'])
>>> import namespace.sub2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'namespace.sub2'
Calling importlib.invalidate_caches() now newly allows to import it:
>>> import importlib
>>> importlib.invalidate_caches()
>>> namespace.__path__
_NamespacePath(['.../PATH1/namespace'])
>>> import namespace.sub2
>>> namespace.__path__
_NamespacePath(['.../PATH1/namespace', '.../PATH2/namespace'])
This was not previously possible.
|
| |
|
|
|
|
|
|
| |
First introduced in 0332e569c12d3dc97171546c6dc10e42c27de34b
(cherry picked from commit 607d8a838f29ad3c4c4e85b39f338dade5f9cafe)
Co-authored-by: Yury Selivanov <yury@edgedb.com>
|
|
|
|
|
|
| |
Automerge-Triggered-By: GH:isidentical
(cherry picked from commit d382f7ee0b98e4ab6ade9384268f25c06be462ad)
Co-authored-by: Batuhan Taskaya <batuhan@python.org>
|
|
|
|
|
|
|
| |
Automerge-Triggered-By: GH:benjaminp
(cherry picked from commit ba00f0d93a4aea85ae8089f139856a7c450584d7)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
|
|
|
|
|
|
|
|
|
| |
(GH-30064)
(cherry picked from commit 59435eea08d30796174552c0ca03c59b41adf8a5)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-29986). (GH-29988)
* [3.10] bpo-46009: Do not exhaust generator when send() method raises (GH-29986).
(cherry picked from commit 69806b9516dbe092381f3ef884c7c64bb9b8414a)
Co-authored-by: Mark Shannon <mark@hotpy.org>
* Rename variable after cherry-pick.
* Add NULL check.
|
|
|
|
|
| |
(GH-29726) (GH-29826)
(cherry picked from commit 4dfae6f38e1720ddafcdd68043e476ecb41cb4d5)
|
|
|
|
|
|
|
| |
(GH-29646) (GH-29661)
(cherry picked from commit fdcc46d9554094994f78bedf6dc9220e5d5ee668)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
|
|
|
|
|
|
| |
(GH-27857) (GH-29152)
(cherry picked from commit 2396fa6537d79554ac694dbd2b0b30eeb3476c80)
Co-authored-by: Florin Spătar <florin.spatar@gmail.com>
|
|
|
|
|
|
|
| |
None` (GH-29590) (GH-29602)
(cherry picked from commit 5d90c467c02ffefdb13c1abc83a171db1a99ffad)
Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
| |
(GH-29598)
If the string is ASCII only and doesn't need to escape characters,
write the whole string with a single write() syscall.
(cherry picked from commit b919d8105c4d77f00509b6d3ab2073f09db640de)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
|
|
| |
(GH-29564)
Unlike the other locks reinitialized by _PyRuntimeState_ReInitThreads,
the "interpreters.main->id_mutex" is not freed by _PyRuntimeState_Fini
and should not force the default raw allocator.
(cherry picked from commit 736684b1bb67369a2e95a9f621752deead44e7ef)
Co-authored-by: Sam Gross <colesbury@gmail.com>
|
| |
|
|
|
| |
Co-authored-by: Christian Heimes <christian@python.org>
|
|
|
|
|
| |
(cherry picked from commit f79f3b41c8c1360d4e0ae884a52d0a486974ca53)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 560a79f94e94de66a18f2a5e4194c2fe51e2adf1)
Co-authored-by: Dong-hee Na <donghee.na@python.org>
|
|
|
|
|
|
|
| |
PySys_Audit() (GH-28862)
(cherry picked from commit 9883ca498d654a4792d530bd8d6d64fef4dc971c)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
| |
(cherry picked from commit db693df3e112c5a61f2cbef63eedce3a36520ded)
|
|
|
|
|
|
|
|
| |
sub-interpreters. (GH-27794) (GH-28738)
Automerge-Triggered-By: GH:encukou
(cherry picked from commit b9bb74871b27d9226df2dd3fce9d42bda8b43c2b)
Co-authored-by: Hai Shi <shihai1992@gmail.com>
|
|
|
|
| |
(cherry picked from commit 252b7bcb236dc261f3af1275bc90f9a303d9648f)
|
|
|
|
|
|
| |
of the code unit (GH-28711). (GH-28718)
(cherry picked from commit 60b9e040c9cf40e69f42c0008e564458aa0379e8)
|
| |
|
|
|
|
|
|
|
|
|
| |
On Unix, if the sem_clockwait() function is available in the C
library (glibc 2.30 and newer), the threading.Lock.acquire() method
now uses the monotonic clock (time.CLOCK_MONOTONIC) for the timeout,
rather than using the system clock (time.CLOCK_REALTIME), to not be
affected by system clock changes.
configure now checks if the sem_clockwait() function is available.
|
|
|
|
| |
size of each opocde in interpreter. (GH-28475)
|
|
|
|
|
|
|
|
| |
_PyImport_FindExtensionObject() (GH-28594)
py2exe and PyOxidizer rely on this API.
It will be removed in Python 3.11.
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
|
|
|
|
|
|
|
| |
zipimport.zipimporter.find_spec() when the zip file is missing and the internal cache has been reset (GH-28435) (#28438)
This can occur when the zip file gets deleted, you call zipimport.zipimporter.invalidate_cache(), and then try to use zipimport.zipimporter.find_spec() (i.e. you left the zip file path on sys.path).
(cherry picked from commit 209b7035f714dcc41df054b0b023e0b955d7e1a2)
Co-authored-by: Brett Cannon <brett@python.org>
|
|
|
|
|
|
|
| |
(GH-27309) (GH-28280)
(cherry picked from commit be9de8721d63b9d8e032d508069daf88c06542c6)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
|
|
|
|
|
|
| |
Release the GIL while performing isatty() system calls on arbitrary
file descriptors. In particular, this affects os.isatty(),
os.device_encoding() and io.TextIOWrapper. By extension,
io.open() in text mode is also affected.
(cherry picked from commit 06148b1870fceb1a21738761b8e1ac3bf654319b)
Co-authored-by: Vincent Michel <vxgmichel@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
exception (GH-28119) (GH-28134)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
(cherry picked from commit b4b6342848ec0459182a992151099252434cc619)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* Use a private version of _PyType_GetQualName
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
|
|
|
|
| |
(GH-28125)
(cherry picked from commit 55c4a92fc1abfe388335071f1d64b3addfa5793f)
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
|
|
|
|
|
|
|
| |
(GH-28199)
Fix PyAiter_Check to only check for the `__anext__` presense (not for
`__aiter__`). Rename `PyAiter_Check()` to `PyAIter_Check()`,
`PyObject_GetAiter()` -> `PyObject_GetAIter()`.
|
|
|
|
|
|
|
| |
ADDOP_O(c, LOAD_CONST,...) (GH-28015)
(cherry picked from commit 70ccee418d1f9d34ed15cfe7104221f9cfd27d03)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Fix indentation of <no Python frame> message in a faulthandler
traceback or a Fatal Python error traceback. Example:
Current thread 0x00007f03896fb740 (most recent call first):
Garbage-collecting
<no Python frame>
(cherry picked from commit 888d4cc06b887e77f281ba4d640e281cb4c61b7b)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
| |
Fix a crash in the signal handler of the faulthandler module: no
longer modify the reference count of frame objects.
|
|
|
| |
(cherry picked from commit 551da597a0996b0fb3af425f48aa5bc63ea6b963)
|
|
|
|
|
|
|
|
| |
in its context chain (GH-27626)
Co-authored-by: Dennis Sweeney 36520290+sweeneyde@users.noreply.github.com
(cherry picked from commit d5c217475c4957a8084ac3f92ae012ece5edc7cb)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
|
| |
|
|
|
|
|
| |
after CFG optimization. (GH-27656) (#27673)
(cherry picked from commit b854557b49083d8625a433eb36aacb0c87d67c52)
|
|
|
|
|
|
|
| |
__build_class__ (GH-27647)
(cherry picked from commit a40675c659cd8c0699f85ee9ac31660f93f8c2f5)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
|
|
|
|
|
|
|
| |
Fix the os.set_inheritable() function on FreeBSD 14 for file
descriptor opened with the O_PATH flag: ignore the EBADF error on
ioctl(), fallback on the fcntl() implementation.
(cherry picked from commit c24896c0e3b32c8a9f614ef51366007b67d5c665)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
| |
The threading debug (PYTHONTHREADDEBUG environment variable) is
deprecated in Python 3.10 and will be removed in Python 3.12. This
feature requires a debug build of Python.
(cherry picked from commit 4d77691172aae81bdcbb0ea75839d0e896c43781)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
| |
gen.throw. (GH-17658) (GH-27572)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
(cherry picked from commit 83ca46b7784b7357d82ec47b33295e09ed7380cb)
Co-authored-by: Noah <33094578+coolreader18@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
| |
This commit stores the _PyRuntime structure in a section of the same name. This allows a debugging or crash reporting tool to quickly locate this structure at runtime without requiring the symbol table.
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
(cherry picked from commit 35002aa8f62dda1f79035e9904abdf476683e9be)
Co-authored-by: Max Bélanger <aeromax@gmail.com>
Co-authored-by: Max Bélanger <aeromax@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
validator (GH-27432) (GH-27435)
(cherry picked from commit 8d0647485db5af2a0f0929d6509479ca45f1281b)
Co-authored-by: Brandt Bucher <brandt@python.org>
Automerge-Triggered-By: GH:brandtbucher
|
|
|
|
|
|
|
|
| |
(GH-27380)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 11749e2dc20ad6a76e9a39e948853e89b2b4bbed)
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|