| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
set (GH-30456) (GH-137905)
(cherry picked from commit d8a9466e29f59f81aacf1959b835862bcd47b731)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
compilation (GH-124131) (#137914)
gh-123085: _compile_importlib: Avoid copying sources before compilation (GH-124131)
(cherry picked from commit 42c8b0556c02d29e32f4c7c95e7128a343716250)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
|
| |
|
|
| |
source (GH-123102) (#124024)
|
| |
|
|
|
|
|
|
| |
(GH-134117) (#134172)
gh-134100: Fix use-after-free in `PyImport_ImportModuleLevelObject` (GH-134117)
(cherry picked from commit 4e9005d32ff466925f40af410f2ea6bf2329bcf8)
Co-authored-by: Nico-Posada <102486290+Nico-Posada@users.noreply.github.com>
|
| |
|
|
|
|
|
| |
bigmem (GH-133456) (GH-133664)
(cherry picked from commit 26839eae2079bd797491dfdcc00eaca1dbcbf77c)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
| |
(GH-129052) (#129123)
(cherry picked from commit f7cc7d296c2cbb33d3f0bde4ace82e8569f7dbc3)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
| |
present (GH-124018) (#129319)
gh-123987: Fix NotADirectoryError in NamespaceReader when sentinel present (GH-124018)
(cherry picked from commit b543b32eff78ce214e68e8c5fc15a8c843fa8dec)
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(GH-128707) (GH-128815)
Add a mix-in class ExtraAssertions containing the following methods:
* assertHasAttr() and assertNotHasAttr()
* assertIsSubclass() and assertNotIsSubclass()
* assertStartsWith() and assertNotStartsWith()
* assertEndsWith() and assertNotEndsWith()
(cherry picked from commit 06cad77a5b345adde88609be9c3c470c5cd9f417)
|
| |
|
|
|
|
|
|
| |
GH-126606: don't write incomplete pyc files (GH-126627)
(cherry picked from commit c695e37a3f95c225ee08d1e882d23fa200b5ec34)
Co-authored-by: CF Bolz-Tereick <cfbolz@gmx.de>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Brett Cannon <brett@python.org>
|
| |
|
|
|
|
|
|
| |
non-module object (GH-125520) (#125768)
gh-125519: Improve traceback if `importlib.reload()` is called with a non-module object (GH-125520)
(cherry picked from commit c5c21fee7ae1ea689a351caa454c98e716a6e537)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#123986)
* gh-121735: Fix module-adjacent references in zip files (GH-123037)
* gh-116608: Apply style and compatibility changes from importlib_metadata.
* gh-121735: Ensure module-adjacent resources are loadable from a zipfile.
* gh-121735: Allow all modules to be processed by the ZipReader.
* Add blurb
* Remove update-zips script, unneeded.
* Remove unnecessary references to removed static fixtures.
* Remove zipdata fixtures, unused.
(cherry picked from commit ba687d9481c04fd160795ff8d8568f5c9f877128)
* gh-123994: Generate utf-16 file using little endian and BOM. (#123995)
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
|
| |
|
|
|
|
|
|
| |
importlib_resources. (GH-123028) (#123051)
gh-116608: Apply style and compatibility changes from importlib_metadata. (GH-123028)
(cherry picked from commit e913d2c87f1ae4e7a4aef5ba78368ef31d060767)
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
|
| |
|
|
|
| |
(#122513)
Update the expected bytecode magic number in test_importlib.test_util.
|
| |
|
|
|
| |
Delete attributes after getting them, so the warning is emitted again
when the test is run multiple times (ex: when checking for reference
leaks).
|
| |
|
|
|
|
|
| |
importlib.abc (#121281)
Fixup for 51724620e868512bbedb1547aca441bcd27bbe0c
Fixes https://github.com/python/cpython/issues/121279
|
| |
|
|
|
|
|
|
|
|
| |
(GH-120911) (#120917)
gh-120910: Fix issue resolving relative paths outside site-packages. (GH-120911)
Incorporates changes from importlib_metadata 7.2.1.
(cherry picked from commit 1ba0bb21ed4eb54023fdfccc9cb20be8fff946b1)
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
|
| |
|
|
|
|
|
|
|
|
| |
(#120014)
gh-106531: Apply changes from importlib_resources 6.3.2 (GH-117054)
Apply changes from importlib_resources 6.3.2.
(cherry picked from commit 8d63c8d47b9edd8ac2f0b395b2fa0ae5f571252d)
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
thread holds it (GH-118745) (#119474)
`drop_gil()` assumes that its caller is attached, which means that the current
thread holds the GIL if and only if the GIL is enabled, and the enabled-state
of the GIL won't change. This isn't true, though, because `detach_thread()`
calls `_PyEval_ReleaseLock()` after detaching and
`_PyThreadState_DeleteCurrent()` calls it after removing the current thread
from consideration for stop-the-world requests (effectively detaching it).
Fix this by remembering whether or not a thread acquired the GIL when it last
attached, in `PyThreadState._status.holds_gil`, and check this in `drop_gil()`
instead of `gil->enabled`.
This fixes a crash in `test_multiprocessing_pool_circular_import()`, so I've
reenabled it.
(cherry picked from commit be1dfccdf2c5c7671b8a549e969b8cf7d60d9936)
Co-authored-by: Brett Simmers <swtaarrs@users.noreply.github.com>
|
| |
|
|
|
|
|
| |
(#118732)
The `pool_in_threads.py` test file may crash in free-threaded builds,
which can lead to the Tsan test hanging. Skip it for now until we fix
the underlying issue.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This PR adds the ability to enable the GIL if it was disabled at
interpreter startup, and modifies the multi-phase module initialization
path to enable the GIL when loading a module, unless that module's spec
includes a slot indicating it can run safely without the GIL.
PEP 703 called the constant for the slot `Py_mod_gil_not_used`; I went
with `Py_MOD_GIL_NOT_USED` for consistency with gh-104148.
A warning will be issued up to once per interpreter for the first
GIL-using module that is loaded. If `-v` is given, a shorter message
will be printed to stderr every time a GIL-using module is loaded
(including the first one that issues a warning).
|
| |
|
| |
See https://discuss.python.org/t/pep-734-multiple-interpreters-in-the-stdlib/41147/26.
|
| |
|
|
|
|
|
|
|
|
| |
(#117651)
The free-threaded build does not currently support the combination of
single-phase init modules and non-isolated subinterpreters. Ensure that
`check_multi_interp_extensions` is always `True` for subinterpreters in
the free-threaded build so that importing these modules raises an
`ImportError`.
|
| | |
|
| |
|
|
|
|
|
| |
- re-enable test_fcntl_64_bit on Linux aarch64, but disable it on all
Android ABIs
- use support.setswitchinterval in all relevant tests
- skip test_fma_zero_result on Android x86_64
- accept EACCES when calling os.get_terminal_size on Android
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-117569)
gh-116609: Ignore UTF-16 BOM in importlib.resources._functional tests
To test the `errors` argument, we read a UTF-16 file as UTF-8
with "backslashreplace" error handling. However, the utf-16
codec adds an endian-specific byte-order mark, so on big-endian
machines the expectation doesn't match the test file (which was
saved on a little-endian machine).
Use endswith to ignore the BOM.
|
| |
|
|
| |
subdirectory support (GH-116609)
|
| |
|
|
| |
(#117341)
|
| |
|
| |
This eliminates the duplication of functionally identical helpers in the _testinternalcapi and _xxsubinterpreters modules.
|
| | |
|
| |
|
|
|
| |
* Apply changes from importlib_metadata 7.1.0
* Include the data sources in the makefile (even though they're not needed)
|
| |
|
|
|
|
|
|
|
| |
* Ensure importlib.metadata tests do not leak references in sys.modules.
* Move importlib.metadata tests to their own package for easier syncing with importlib_metadata.
* Update owners and makefile for new directories.
* Add blurb
|
| |
|
|
| |
Co-authored-by: Malcolm Smith <smith@chaquo.com>
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
|
| | |
|
| |
|
| |
gh-116307: Create a new import helper 'isolated modules' and use that instead of 'Clean Import' to ensure that tests from importlib_resources don't leave modules in sys.modules.
|
| |
|
| |
Setting the __class__ attribute of a lazy-loading module to ModuleType enables other threads to attempt to access attributes before the loading is complete. Now that is protected by a lock.
|
| |
|
|
|
| |
(#114108)
gh-114107: Fix symlink test if symlinks aren't supported
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Sync with importlib_metadata 7.0.0
* Add blurb
* Update docs to reflect changes.
* Link datamodel docs for object.__getitem__
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* Add what's new for removed __getattr__
* Link datamodel docs for object.__getitem__
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* Add exclamation point, as that seems to be used for other classes.
---------
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
| |
|
| |
This involves a number of changes for PEP 734.
|
| |
|
| |
Add also test.support.Py_GIL_DISABLED constant.
|
| |
|
|
|
| |
package (#112475)
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
|
| |
|
|
| |
imported with a custom loader (#112425)
|
| | |
|
| |
|
| |
Rename Py_NOGIL to Py_GIL_DISABLED
|
| |
|
| |
Use "t" in the expected tag for `--disable-gil` builds in test_tagged_suffix.
|
| |
|
|
|
|
|
|
|
| |
* Add context manager on Bunch class.
* Bunch now catchs exceptions on executed functions and re-raise them
at __exit__() as an ExceptionGroup.
* Rewrite BarrierProxy.test_default_timeout(). Use a single thread.
Only check that barrier.wait() blocks for at least default timeout
seconds.
* test_with(): inline _with() function.
|
| |
|
|
|
| |
---------
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
|
| | |
|
| |
|
|
| |
exception (#105874)
|
| | |
|