aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* gh-120602: Support LLVM_VERSION_SUFFIXgentoo-3.13.0b2_p7Xarblu2024-06-181-1/+1
| | | | | Pull-Request: https://github.com/python/cpython/pull/120604 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* Support disabling system site-packages via GENTOO_BUILD vargentoo-3.13.0b2_p6Michał Górny2024-06-181-0/+1
| | | | | | | | Do not add system site-packages directory to sys.path if GENTOO_BUILD variable is set. This solves multiple issues while building and testing CPython, particularly test suite issues from installed .pth files, Python modules (particularly docutils) and sandbox violations from attempting to write byte-compiled modules back.
* Add missing textwrap import to datetimetestergentoo-3.13.0b2_p3Michał Górny2024-06-151-0/+1
| | | | It was added by another change in 3.13 branch.
* Avoid a race on _PyRuntime.types.managed_static.types[i].interp_count.gentoo-3.13.0b2_p2Eric Snow2024-06-152-0/+5
| | | | Closes: https://github.com/python/cpython/pull/120529
* [3.13] gh-120161: Fix a Crash in the _datetime Module (gh-120518)Miss Islington (bot)2024-06-156-71/+133
| | | | | | | | | | | In gh-120009 I used an atexit hook to finalize the _datetime module's static types at interpreter shutdown. However, atexit hooks are executed very early in finalization, which is a problem in the few cases where a subclass of one of those static types is still alive until the final GC collection. The static builtin types don't have this probably because they are finalized toward the end, after the final GC collection. To avoid the problem for _datetime, I have applied a similar approach here. Also, credit goes to @mgorny and @neonene for the new tests. FYI, I would have liked to take a slightly cleaner approach with managed static types, but wanted to get a smaller fix in first for the sake of backporting. I'll circle back to the cleaner approach with a future change on the main branch. (cherry picked from commit b2e71ff4f8fa5b7d8117dd8125137aee3d01f015, AKA gh-120182) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.13] gh-120291: Fix a bashism in python-config.sh.in (GH-120292) (#120341)Miss Islington (bot)2024-06-122-4/+6
| | | | | | | | | | | | | | | gh-120291: Fix a bashism in python-config.sh.in (GH-120292) gh-120291: Fix bashisms in python-config.sh.in Replace the use of bash-specific `[[ ... ]]` with POSIX-compliant `[ ... ]` to make the `python-config` shell script work with non-bash shells again. While at it, use `local` in a safer way, since it is not in POSIX either (though universally supported). Fixes GH-120291 (cherry picked from commit 7d2447137e117ea9a6ee1493bce0b071c76b1bd7) Co-authored-by: Michał Górny <mgorny@gentoo.org>
* test_lzma: Skip tests requiring extra-filtersgentoo-3.13.0b2Michał Górny2024-06-061-0/+21
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* Prevent tests from detecting our fake tzdata packageMichał Górny2024-06-061-5/+2
| | | | | | | | Tests from test_zoneinfo assume that if `tzdata` package is installed, it provides standalone timezone data. Our `tzdata` package is just a shim, so force falsify that assumption. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* Skip tests which interact with invalid UTF-8 filesSam James2024-06-069-0/+14
| | | | | | | | | These tests fail on filesystems which disallow non-UTF8, like ZFS with 'utf8only' on. Bug: https://bugs.python.org/issue37584 Bug: https://github.com/python/cpython/issues/81765 Signed-off-by: Sam James <sam@gentoo.org>
* Skip sched/priority testsSam James2024-06-061-0/+2
| | | | | | | | These tests try to change the priority of the running process, but if e.g. PORTAGE_NICENESS=19, you can't spawn a process with lower (or higher!) niceness, as there's nowhere to go. Ditto priorities. Signed-off-by: Sam James <sam@gentoo.org>
* ssl: Hard-disable SSLv3 to avoid automagic depsMichał Górny2024-06-061-0/+4
| | | | Bug: https://bugs.gentoo.org/767886
* Skip RDS socket tests that hang frequentlyMichał Górny2024-06-061-0/+1
|
* Blacklist test_pickletools from __all__ test as it imports numpyMichał Górny2024-06-061-0/+2
| | | | | The test imports numpy, bringing its warnings along with it and causing the test to fail.
* Python 3.13.0b2v3.13.0b2Thomas Wouters2024-06-0583-201/+847
|
* [3.13] gh-120065: Increase `collect_in_thread` period to 5 ms. (GH-120068) ↵Miss Islington (bot)2024-06-051-1/+1
| | | | | | | | | | (#120110) This matches the default GIL switch interval. It greatly speeds up the free-threaded build: previously, it spent nearly all its time in `gc.collect()`. (cherry picked from commit 4bba1c9e6cfeaf69302b501a4306668613db4b28) Co-authored-by: Sam Gross <colesbury@gmail.com>
* [3.13] gh-119287: clarify doc on BaseExceptionGroup.derive and link to it ↵Miss Islington (bot)2024-06-052-2/+5
| | | | | | | | from contextlib.suppress (GH-119657) (#120105) gh-119287: clarify doc on BaseExceptionGroup.derive and link to it from contextlib.suppress (GH-119657) (cherry picked from commit 5c02ea8bae2287a828840f5734966da23dc573dc) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* [3.13] gh-119819: Update logging configuration to support joinable ↵Miss Islington (bot)2024-06-052-3/+9
| | | | | multiproc… (GH-120090) (GH-120093) (cherry picked from commit 983efcf15b2503fe0c05d5e03762385967962b33)
* [3.13] gh-120078: Fix struct_time attr typo tm_day -> tm_mday in ↵Miss Islington (bot)2024-06-051-1/+1
| | | | | | | Doc/library/time.rst (GH-120085) (cherry picked from commit b6b0dcbfc054f581b6f78602e4c2e9474e3efe21) Co-authored-by: shurj0 <60540027+shurj0@users.noreply.github.com>
* [3.13] gh-114616: Improve docs regarding changes to caches representation in ↵Miss Islington (bot)2024-06-042-3/+11
| | | | | | | | dis (GH-120033) (#120079) gh-114616: Improve docs regarding changes to caches representation in dis (GH-120033) (cherry picked from commit 770f3c1eadd3392c72fd55be47770234dd143a14) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* [3.13] gh-119553: Fix console when pressing Ctrl-C within a multiline block ↵Miss Islington (bot)2024-06-042-1/+3
| | | | | | | (GH-120075) (#120076) (cherry picked from commit 69b3e8ea569faabccd74036e3d0e5ec7c0c62a20) Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
* [3.13] gh-120048: Make `test_imaplib` faster (GH-120050) (#120069)Miss Islington (bot)2024-06-041-14/+8
| | | | | | | | | | | | | | The `test_imaplib` was taking 40+ minutes in the refleak build bots because the tests waiting on a client `self._setup()` was creating a client that prevented progress until its connection timed out, which scaled with the global timeout. We should set `connect=False` for the tests that don't want `_setup()` to create a client. (cherry picked from commit 710cbea6604d27c7d59ae4953bf522b997a82cc7) Co-authored-by: Sam Gross <colesbury@gmail.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.13] gh-119999: Fix potential race condition in ↵Miss Islington (bot)2024-06-041-8/+11
| | | | | | | | | | | `_Py_ExplicitMergeRefcount` (GH-120000) (#120073) We need to write to `ob_ref_local` and `ob_tid` before `ob_ref_shared`. Once we mark `ob_ref_shared` as merged, some other thread may free the object because the caller also passes in `-1` as `extra` to give up its only reference. (cherry picked from commit 4055577221f5f52af329e87f31d81bb8fb02c504) Co-authored-by: Sam Gross <colesbury@gmail.com>
* [3.13] gh-119819: Update test to skip if _multiprocessing is unavailable. ↵Miss Islington (bot)2024-06-041-1/+1
| | | | | (GH-120067) (GH-120072) (cherry picked from commit 109e1082ea92f89d42cd70f2cc7ca6fba6be9bab)
* [3.13] gh-119842: Honor PyOS_InputHook in the new REPL (GH-119843) (GH-120066)Łukasz Langa2024-06-048-11/+144
| | | | | | | (cherry picked from commit d9095194dde27eaabfc0b86a11989cdb9a2acfe1) Signed-off-by: Pablo Galindo <pablogsal@gmail.com> Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com> Co-authored-by: Michael Droettboom <mdboom@gmail.com>
* [3.13] gh-119553: Clear reader on Ctrl-C command (GH-119801) (#120062)Miss Islington (bot)2024-06-043-0/+19
| | | | | | (cherry picked from commit 010ea93b2b888149561becefeee90826bf8a2934) Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* [3.13] gh-120039: Reduce expected timeout in test_siginterrupt_off ↵Miss Islington (bot)2024-06-041-3/+3
| | | | | | | | | | (GH-120047) (#120060) The process is expected to time out. In the refleak builds, `support.SHORT_TIMEOUT` is often five minutes and we run the tests six times, so test_signal was taking >30 minutes. (cherry picked from commit d419d468ff4aaf6bc673354d0ee41b273d09dd3f) Co-authored-by: Sam Gross <colesbury@gmail.com>
* [3.13] gh-120041: Do not use append_to_screen when completions are visible ↵Miss Islington (bot)2024-06-043-10/+52
| | | | | | | | | | | | (GH-120042) (#120051) * gh-120041: Do not use append_to_screen when completions are visible (GH-120042) (cherry picked from commit 8fc7653766b106bdbc4ff6154e0020aea4ab15e6) * gh-120041: Refactor check for visible completion menu in completing_reader (GH-120055) (cherry picked from commit bf8e5e53d0c359a1f9c285d855e7a5e9b6d91375) --------- Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
* [3.13] gh-89928: Fix integer conversion of device numbers (GH-31794) (GH-120053)Miss Islington (bot)2024-06-044-39/+99
| | | | | | | | Fix os.major(), os.minor() and os.makedev(). Support device numbers larger than 2**63-1. Support non-existent device number (NODEV). (cherry picked from commit 7111d9605f9db7aa0b095bb8ece7ccc0b8115c3f) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.13] Fix incorrect pull GitHub link in What's New (GH-120045) (#120052)Miss Islington (bot)2024-06-041-1/+1
| | | | | Co-authored-by: Trey Hunner <trey@treyhunner.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* [3.13] gh-119588: Update docs to reflect decision to include the change with ↵Miss Islington (bot)2024-06-041-2/+2
| | | | | | | | Python 3.13 and not 3.12. (GH-120043) (#120046) gh-119588: Update docs to reflect decision to include the change with Python 3.13 and not 3.12. (GH-120043) (cherry picked from commit 4dcd91ceafce91ec37bb1a9d544e41fc65578994) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* [3.13] gh-119588: Implement zipfile.Path.is_symlink (zipp 3.19.0). ↵Miss Islington (bot)2024-06-044-12/+32
| | | | | | | | (GH-119591) (#119985) gh-119588: Implement zipfile.Path.is_symlink (zipp 3.19.0). (GH-119591) (cherry picked from commit 42a34ddb0b63e638905b01e17a7254623a0de427) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* [3.13] gh-106531: Apply changes from importlib_resources 6.3.2 (GH-117054) ↵Miss Islington (bot)2024-06-0416-146/+231
| | | | | | | | | | (#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>
* [3.13] gh-117657: Fix race involving GC and heap initialization (GH-119923) ↵Miss Islington (bot)2024-06-044-3/+7
| | | | | | | | | | | | | | | | | (#120038) The `_PyThreadState_Bind()` function is called before the first `PyEval_AcquireThread()` so it's not synchronized with the stop the world GC. We had a race where `gc_visit_heaps()` might visit a thread's heap while it's being initialized. Use a simple atomic int to avoid visiting heaps for threads that are not yet fully initialized (i.e., before `tstate_mimalloc_bind()` is called). The race was reproducible by running: `python Lib/test/test_importlib/partial/pool_in_threads.py`. (cherry picked from commit e69d068ad0bd6a25434ea476a647b635da4d82bb) Co-authored-by: Sam Gross <colesbury@gmail.com>
* [3.13] gh-119819: Fix regression to allow logging configuration with ↵Miss Islington (bot)2024-06-043-1/+31
| | | | | multipr… (GH-120030) (GH-120035) (cherry picked from commit 99d945c0c006e3246ac00338e37c443c6e08fc5c)
* [3.13] gh-118868: logging QueueHandler fix passing of kwargs (GH-118869) ↵Miss Islington (bot)2024-06-043-8/+39
| | | | | (GH-120032) (cherry picked from commit dce14bb2dce7887df40ae5c13b0d13e0dafceff7)
* [3.13] gh-119070: Update test_shebang_executable_extension to always use ↵Miss Islington (bot)2024-06-041-3/+3
| | | | | | | | non-installed version (GH-119846) (#GH-120015) gh-119070: Update test_shebang_executable_extension to always use non-installed version (GH-119846) (cherry picked from commit 5c48eb0cc6c3e84aafda0a734a05ecec14fc0ccf) Co-authored-by: Steve Dower <steve.dower@python.org>
* [3.13] gh-111499: Fix PYTHONMALLOCSTATS at Python exit (GH-120021) (#120022)Miss Islington (bot)2024-06-041-6/+6
| | | | | | | | | gh-111499: Fix PYTHONMALLOCSTATS at Python exit (GH-120021) Call _PyObject_DebugMallocStats() earlier in Py_FinalizeEx(), before the interpreter is deleted. (cherry picked from commit 5a1205b641df133932ed4c65b9a4ff5724e89963) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.13] gh-111389: Add PyHASH_MULTIPLIER constant (GH-119214) (#119334)Miss Islington (bot)2024-06-047-7/+16
| | | | | | gh-111389: Add PyHASH_MULTIPLIER constant (GH-119214) (cherry picked from commit f6da790122fdae1a28f444edfbb55202d6829cd1) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.13] gh-119724: Revert "bpo-45759: Better error messages for non-matching ↵T. Wouters2024-06-044-611/+454
| | | | | | | | 'elif'/'else' statements (GH-29513)" (GH-119974) (GH-120013) This reverts commit 1c8f912ebdfdb146cd7dd2d7a3a67d2c5045ddb0. (cherry picked from commit 31a4fb3c74a0284436343858803b54471e2dc9c7)
* [3.13] gh-117398: Use Per-Interpreter State for the _datetime Static Types ↵Miss Islington (bot)2024-06-0313-166/+381
| | | | | | | | | | | (gh-120009) We make use of the same mechanism that we use for the static builtin types. This required a few tweaks. This change is the final piece needed to make _datetime support multiple interpreters. I've updated the module slot accordingly. (cherry picked from commit 105f22ea46ac16866e6df18ebae2a8ba422b7f45, AKA gh-119929) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.13] gh-117142: Support Importing ctypes in Isolated Interpreters (gh-120008)Miss Islington (bot)2024-06-032-1/+3
| | | | | | | | This makes the support official. (cherry picked from commit dba7a167dbbd50e83e58df351f3414b7a08e0188, AKA gh-119991) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com> Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
* [3.13] gh-117398: Add datetime Module State (gh-120004)Miss Islington (bot)2024-06-035-162/+376
| | | | | | | | | | | | | | | | I was able to make use of the existing datetime_state struct, but there was one tricky thing I had to sort out. We mostly aren't converting to heap types, so we can't use things like PyType_GetModuleByDef() to look up the module state. The solution I came up with is somewhat novel, but I consider it straightforward. Also, it shouldn't have much impact on performance. In summary, this main changes here are: * I've added some macros to help hide how various objects relate to module state * as a solution to the module state lookup problem, I've stored the last loaded module on the current interpreter's internal dict (actually a weakref) * if the static type method is used after the module has been deleted, it is reloaded * to avoid extra work when loading the module, we directly copy the objects (new refs only) from the old module state into the new state if the old module hasn't been deleted yet * during module init we set various objects on the static types' __dict__s; to simplify things, we only do that the first time; once those static types have a separate __dict__ per interpreter, we'll do it every time * we now clear the module state when the module is destroyed (before, we were leaking everything in _datetime_global_state) (cherry picked from commit d82a7ba041321e7b58a5a9bbc394670be6ceeb7c, AKA gh-119810) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.13] gh-117657: Fix itertools.count thread safety (GH-119268) (#120007)Sam Gross2024-06-033-11/+54
| | | | | | Fix itertools.count in free-threading mode (cherry picked from commit 87939bd5790accea77c5a81093f16f28d3f0b429) Co-authored-by: Arnon Yaari <wiggin15@yahoo.com>
* [3.13] gh-117657: Fix race involving immortalizing objects (GH-119927) (#120005)Sam Gross2024-06-039-44/+30
| | | | | | | | | | | The free-threaded build currently immortalizes objects that use deferred reference counting (see gh-117783). This typically happens once the first non-main thread is created, but the behavior can be suppressed for tests, in subinterpreters, or during a compile() call. This fixes a race condition involving the tracking of whether the behavior is suppressed. (cherry picked from commit 47fb4327b5c405da6df066dcaa01b7c1aefab313)
* [3.13] gh-117657: Avoid `sem_clockwait` in TSAN (GH-119915) (#119992)Miss Islington (bot)2024-06-032-10/+1
| | | | | | | The `sem_clockwait` function is not currently instrumented, which leads to false positives. (cherry picked from commit 41c1cefbae71d687d1a935233b086473df65e15c) Co-authored-by: Sam Gross <colesbury@gmail.com>
* [3.13] gh-118835: pyrepl: Fix prompt length computation for custom prompts ↵Miss Islington (bot)2024-06-033-2/+41
| | | | | | | | containing ANSI escape codes (GH-119942) (#119990) gh-118835: pyrepl: Fix prompt length computation for custom prompts containing ANSI escape codes (GH-119942) (cherry picked from commit 2e0aa731aebb8ef3d89ada82f5d39b1bbac65d1f) Co-authored-by: Daniel Hollas <daniel.hollas@bristol.ac.uk>
* [3.13] Use Cirrus M1 macOS runners for CI (GH-119979) (GH-119986)Miss Islington (bot)2024-06-033-6/+7
| | | | | | (cherry picked from commit 6acb32fac3511c1d5500cac66f1d6397dcdab835) Co-authored-by: Łukasz Langa <lukasz@langa.pl> Co-authored-by: Ee Durbin <ee@python.org>
* gh-119679: Ensures correct import libraries are included in Windows install ↵Miss Islington (bot)2024-06-033-14/+23
| | | | | | | packages (GH-119790) (cherry picked from commit fd01271366abefa8f991e53f090387882fbd6bdd) Co-authored-by: Steve Dower <steve.dower@python.org>
* gh-102511: Amend 3.13.0b1.rst (GH-119895)Miss Islington (bot)2024-06-031-0/+1
| | | | | (cherry picked from commit 4765e1fa292007f8ddc59f33454b747312506a7a) Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
* [3.13] gh-119968: Improved monitoring c-api docs (GH-119969) (#119971)Miss Islington (bot)2024-06-031-1/+1
| | | | | | gh-119968: Improved monitoring c-api docs (GH-119969) (cherry picked from commit cae4c80714e7266772025676977e2a1b98cdcd7b) Co-authored-by: Awbert <119314310+SweetyAngel@users.noreply.github.com>