| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
PyErr_SetExcInfo (#103157)
|
|
|
| |
The code works without this change, but it does cause C tooling to complain less about undeclared variables.
|
|
|
| |
Improve performance of `isinstance()` checks against runtime-checkable protocols
|
|
|
|
| |
(GH-103149)
|
|
|
|
|
| |
This involves 3 changes: some general cleanup, checks to match the kind of module, and switch from testing against sys to _imp.
This is a precursor to gh-103150, though the changes are meant to stand on their own.
|
|
|
|
|
| |
Decref the key in the right interpreter in _extensions_cache_set().
This is a follow-up to gh-103084. I found the bug while working on gh-101660.
|
|
|
|
|
| |
`_ProtocolMeta.__instancecheck__` (#103141)
Speed up `isinstance()` calls against runtime-checkable protocols
|
| |
|
| |
|
|
|
|
|
|
| |
Will Bradshaw contributed original patch on bpo-40603.
---------
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
|
|
| |
Reported by Damian Dureck: https://mail.python.org/archives/list/docs@python.org/thread/UZTWBJIXC3MBKTHXVTIBPGDPKBNWZ5LN/
|
|
|
|
|
|
|
|
|
|
|
| |
Follow on from https://github.com/python/cpython/pull/103116.
Expand list of clean docs files from 3 to 181. These files have no Sphinx warnings, and their presence in this list means that any new warnings introduced will fail the build.
The list was created by subtracting the list of files with warnings from a list of all files.
I tested with all of those, but found that `touch`ing two clean files (https://github.com/python/cpython/blob/main/Doc/includes/wasm-notavail.rst and https://github.com/python/cpython/blob/main/Doc/whatsnew/changelog.rst) caused a cascade effect and resulted in a number of dirty files being rebuilt too, and failing the build. So those two have been omitted.
Automerge-Triggered-By: GH:hugovk
|
| |
|
| |
|
|
|
|
|
| |
Added missing descriptions of some tools.
Automerge-Triggered-By: GH:hugovk
|
|
|
| |
Signed-off-by: Brian Haley <haleyb.dev@gmail.com>
|
|
|
|
| |
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
|
|
|
|
| |
(gh-103086)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(gh-103084)
Sharing mutable (or non-immortal) objects between interpreters is generally not safe. We can work around that but not easily.
There are two restrictions that are critical for objects that break interpreter isolation.
The first is that the object's state be guarded by a global lock. For now the GIL meets this requirement, but a granular global lock is needed once we have a per-interpreter GIL.
The second restriction is that the object (and, for a container, its items) be deallocated/resized only when the interpreter in which it was allocated is the current one. This is because every interpreter has (or will have, see gh-101660) its own object allocator. Deallocating an object with a different allocator can cause crashes.
The dict for the cache of module defs is completely internal, which simplifies what we have to do to meet those requirements. To do so, we do the following:
* add a mechanism for re-using a temporary thread state tied to the main interpreter in an arbitrary thread
* add _PyRuntime.imports.extensions.main_tstate`
* add _PyThreadState_InitDetached() and _PyThreadState_ClearDetached() (pystate.c)
* add _PyThreadState_BindDetached() and _PyThreadState_UnbindDetached() (pystate.c)
* make sure the cache dict (_PyRuntime.imports.extensions.dict) and its items are all owned by the main interpreter)
* add a placeholder using for a granular global lock
Note that the cache is only used for legacy extension modules and not for multi-phase init modules.
https://github.com/python/cpython/issues/100227
|
| |
|
|
|
| |
https://github.com/python/cpython/issues/90110
|
|
|
|
|
|
| |
On content update, builds `python` and the docs. Also adds a Dockerfile that should include everything but autoconf 2.69 that's necessary to build CPython and the entire stdlib on Fedora.
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Co-authored-by: Dusty Phillips <dusty@phillips.codes>
|
|
|
|
|
|
|
| |
(#103113)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Éric <merwok@netwok.org>
|
|
|
|
| |
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Artem Mukhin <ortem00@gmail.com>
|
| |
|
|
|
|
| |
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Eclips4 <80244920+Eclips4@users.noreply.github.com>
|
|
|
| |
See https://developercommunity.visualstudio.com/t/Regression-in-MSVC-1433-1434-ARM64-co/10224361 for details of the issue. It only applies to version 14.34.
|
|
|
|
|
| |
We can revisit the options for keeping it global later, if desired. For now the approach seems quite complex, so we've gone with the simpler isolation solution in the meantime.
https://github.com/python/cpython/issues/100227
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are some warnings if build python via clang:
Parser/pegen.c:812:31: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
_PyPegen_clear_memo_statistics()
^
void
Parser/pegen.c:820:29: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
_PyPegen_get_memo_statistics()
^
void
Fix it to make clang happy.
Signed-off-by: Chenxi Mao <chenxi.mao@suse.com>
|
| |
|
|
|
|
| |
(GH-103062)
|
|
|
| |
Co-authored-by: Simeon Visser <svisser@users.noreply.github.com>
|
|
|
|
|
|
|
| |
for Isolated Interpreters" (gh-103063)
This reverts commit 87be8d9.
This approach to keeping the interned strings safe is turning out to be too complex for my taste (due to obmalloc isolation). For now I'm going with the simpler solution, making the dict per-interpreter. We can revisit that later if we want a sharing solution.
|
|
|
|
| |
entries (#103047)
|
|
|
| |
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
|
| |
warning in `bytes_methods.c` (#102942)
|
|
|
| |
It's a minor typo, but it makes for a misleading comment. Let's fix it.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#102032)
This commit prefixes `__dataclass` to several things in the locals dict:
- Names like `_dflt_` (which cause trouble, see first test)
- Names like `_type_` (not known to be able to cause trouble)
- `_return_type` (not known to able to cause trouble)
- `_HAS_DEFAULT_FACTORY` (which causes trouble, see second test)
In addition, this removes `MISSING` from the locals dict. As far as I can tell, this wasn't needed even in the initial implementation of dataclasses.py (and tests on that version passed with it removed). This makes me wary :-)
This is basically a continuation of #96151, where fixing this was welcomed in https://github.com/python/cpython/pull/98143#issuecomment-1280306360
|
| |
|
| |
|
|
|
| |
* gh-103027: Update `dataclass.make_dataclass` docstring
|
| |
|
| |
|
|
|
| |
gh-101100: Filter only Doc/ files
|
|
|
|
|
|
|
| |
(#100132)
Add optional delete parameter to tempfile.TemporaryDirectory().
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
| |
|
|
|
|
|
| |
(#102875)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
|
|
|
|
| |
In PEM, we need to parse until error and then suppress `PEM_R_NO_START_LINE`, because PEM allows arbitrary leading and trailing data. DER, however, does not. Parsing until error and suppressing `ASN1_R_HEADER_TOO_LONG` doesn't quite work because that error also covers some cases that should be rejected.
Instead, check `BIO_eof` early and stop the loop that way.
Automerge-Triggered-By: GH:Yhg1s
|
|
|
|
|
| |
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|