Commit Graph

121885 Commits

Author SHA1 Message Date
Nice Zombies a23fa3368e
gh-117945: Fix `os.path.ismount()` documentation (#117947) 2024-04-16 15:55:53 -07:00
Jelle Zijlstra dd4383f3c1
linecache: Fix docstring location (#117948)
gh-117501 put some code before the docstring, so now it is no longer
recognized as a docstring.
2024-04-16 15:37:18 -07:00
Seth Michael Larson d70ee13e57
gh-112844: Fix xz CPE identifier (GH-117656) 2024-04-16 23:11:43 +01:00
Mariusz Felisiak de0dc68b82
gh-115009: Update Windows installer to use SQLite 3.45.3 (GH-117445) 2024-04-16 23:10:05 +01:00
Victor Stinner 919784737c
gh-117645: Increase WASI stack size from 512 KiB to 8 MiB (#117674)
Increase also the initial memory from 10 MiB to 20 MiB.

Reenable test_dynamic on WASI build.
2024-04-16 23:26:54 +02:00
Victor Stinner 3fe03ccea6
gh-117755: Fix mimalloc for huge allocation on s390x (#117809)
Fix mimalloc allocator for huge memory allocation (around
8,589,934,592 GiB) on s390x.

Abort allocation early in mimalloc if the number of slices doesn't
fit into uint32_t, to prevent a integer overflow (cast 64-bit
size_t to uint32_t).
2024-04-16 20:34:12 +00:00
Victor Stinner e05d202ebf
gh-117755: Remove tests on huge memory allocations (#117938)
Remove unreliable tests on huge memory allocations:

* Remove test_maxcontext_exact_arith() of test_decimal.
  Stefan Krah, test author, agreed on removing the test:
  https://github.com/python/cpython/issues/114331#issuecomment-1925731273
* Remove test_constructor() tests of test_io.
  Sam Gross suggests remove them:
  https://github.com/python/cpython/pull/117809#pullrequestreview-2003889558

On Linux, depending how overcommit is configured, especially on Linux
s390x, a huge memory allocation (half or more of the full address
space) can succeed, but then the process will eat the full system
swap and make the system slower and slower until the whole system
becomes unusable.

Moreover, these tests had to be skipped when Python is built with
sanitizers.
2024-04-16 22:05:12 +02:00
Sam Gross 241ed5f2cd
gh-117376: Make code objects use deferred reference counting (#117823)
We want code objects to use deferred reference counting in the
free-threaded build. This requires them to be tracked by the GC, so we
set `Py_TPFLAGS_HAVE_GC` in the free-threaded build, but not the default
build.
2024-04-16 12:42:53 -04:00
Donghee Na a734fd5cf7
gh-112069: Make setiter_iternext to be thread-safe (gh-117935) 2024-04-16 16:31:42 +00:00
Hugo van Kemenade 3284b84c43
Docs: Add classes to C API return value annotations (#117926)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-04-16 15:56:15 +00:00
Sam Gross df0f3a738f
gh-117683: Fix test_free_different_thread failures with GIL disabled (#117685) 2024-04-16 11:55:56 -04:00
Jeff Glass acf69e09c6
gh-115178: Add Counts of UOp Pairs to pystats (GH-115181) 2024-04-16 14:27:18 +01:00
Mark Shannon c053d52edd
GH-115776: Static object are immortal, so mark them as such. (GH-117673) 2024-04-16 12:51:41 +01:00
Alex Waygood cff0a2db00
gh-117691: Add an appropriate stacklevel for PEP-706 tarfile deprecation warnings (GH-117872) 2024-04-16 13:36:00 +02:00
neonene c520bf9bdf
gh-117613: Argument Clinic: ensure that 'defining_class' params are positional-only (#117781) 2024-04-16 09:52:45 +00:00
Douglas Thor 1316692e8c
gh-102402: Fix floating point math issue by using `time.time_ns()` in `logging.LogRecord` (GH-102412) 2024-04-16 10:44:57 +01:00
Nikita Sobolev 1a1e013a4a
gh-117797: Improve `test_descr.test_not_implemented` (#117798) 2024-04-16 09:11:57 +00:00
Victor Stinner 2cc916e147
gh-117613: Enhance test_clinic @defining_class tests (#117896) 2024-04-16 09:32:51 +02:00
Inada Naoki 6dc661bc9f
gh-77102: site: try utf-8 and fallback to locale encoding when reading .pth file (#117802) 2024-04-16 12:56:16 +09:00
Eric Snow 3831144f9c
gh-76785: Fix Windows Refleak in test_interpreters (gh-117913)
gh-117662 introduced some refleaks, or, rather, exposed some existing refleaks.  The leaks are coming when test.support.os_helper is imported in a "legacy" interpreter.  I've updated test.test_interpreters.utils to avoid importing os_helper, which fixes the leaks.  I'll address the root cause separately.
2024-04-15 20:16:37 -06:00
Erlend E. Aasland 757891ee8a
gh-117804: Document how to suppress PGO unprofiled source warnings (#117859) 2024-04-15 23:17:28 +02:00
Hugo van Kemenade 3375282bb8
Docs: add link roles with Sphinx extlinks (#117850)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-04-15 21:22:00 +03:00
Hugo van Kemenade 78da154067
gh-109975: Copyedit "What's New in Python 3.13" (#117902)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-04-15 17:20:40 +00:00
Sam Gross 520cf2170e
gh-117688: Fix deadlock in test_no_stale_references with GIL disabled (#117720)
Check `my_object_collected.wait()` in a loop to give the main thread a
chance to merge the reference count fields. Additionally, call
`my_object_collected.set()` in a background thread to avoid deadlocking
when the destructor is called asynchronously via the eval breaker
within the body of of `my_object_collected.wait()`.
2024-04-15 12:54:56 -04:00
Alex Waygood 106e9ddc43
Docs: make the `whatsnew-typing-py312` anchor point to things that were new in the typing module (#117904) 2024-04-15 16:48:13 +00:00
mpage 0d5238373d
gh-117657: Quiet more TSAN warnings due to incorrect modeling of compare/exchange (#117830) 2024-04-15 12:17:55 -04:00
mpage 6e0b327690
gh-117657: Quiet TSAN warning about a data race between `start_the_world()` and `tstate_try_attach()` (#117828)
TSAN erroneously reports a data race between the `_Py_atomic_compare_exchange_int`
on `tstate->state` in `tstate_try_attach()` and the non-atomic load of
`tstate->state` in `start_the_world`. The `_Py_atomic_compare_exchange_int` fails,
but TSAN erroneously treats it as a store.
2024-04-15 12:17:33 -04:00
mpage 47832067da
gh-117657: Add TSAN suppressions for the free-threaded build (#117736)
Additionally, reduce the iterations for a few weakref tests that would
otherwise take a prohibitively long amount of time (> 1 hour) when TSAN
is enabled and the GIL is disabled.
2024-04-15 12:08:25 -04:00
Raymond Hettinger 0823f43618
gh-115532: Minor tweaks to kde() (gh-117897) 2024-04-15 10:08:21 -05:00
Serhiy Storchaka 10f1a2687a
gh-115664: Reorganize versionadded directives for -X options (GH-116304)
Add the versionadded directives just under the description of the
corresponding option.
2024-04-15 18:01:17 +03:00
Steve Dower 7d9d6b53bc
gh-112278: Improve error handling in wmi module and tests (GH-117818) 2024-04-15 15:43:11 +01:00
Steve Dower 185999bb3a
gh-90329: Add _winapi.GetLongPathName and GetShortPathName and use in venv to reduce warnings (GH-117817) 2024-04-15 15:36:06 +01:00
Victor Stinner 64cd6fc9a6
gh-117889: Fix PGO test in test_peg_generator (#117893)
Reuse support.check_cflags_pgo() in test_peg_generator to check for
PGO build.

Log PGO_PROF_USE_FLAG in test.pythoninfo.
2024-04-15 13:59:34 +00:00
Mark Shannon 784e076a10
GH-117750: When clearing object's dict, clear inline values but leave dict attached (GH-117808) 2024-04-15 14:45:05 +01:00
Hugo van Kemenade 7d0be7aea5
Add 'The Python 2.3 Method Resolution Order' (#116435) 2024-04-15 13:01:15 +03:00
Serhiy Storchaka 57bdb75975
gh-117694: Improve tests for PyEval_EvalCodeEx() (GH-117695) 2024-04-15 12:44:54 +03:00
Victor Stinner a9107fe5c0
gh-117755: Skip test_io.test_constructor() on s390x (#117801)
The test allocates 9 223 372 036 854 775 807 bytes
(0x7fffffffffffffff) and mimalloc fails with a division by zero on
s390x.
2024-04-15 10:24:47 +02:00
Donghee Na 7bcc257e97
gh-117826: Remove lookdict_index from delitemif_lock_held (gh-117869) 2024-04-15 14:26:59 +09:00
Galen Rice 74b0658e6a
docs: typo in 3.13 release notes (#117866) 2024-04-14 14:04:59 -07:00
Nice Zombies 9ee94d1391
gh-117636: Remove redundant type check in `os.path.join()` (#117638) 2024-04-14 14:04:14 -07:00
Erlend E. Aasland e01831760e
Doc: mark up classes, attributes, parameters, and methods in dataclasses.rst (#117820) 2024-04-14 16:29:01 +00:00
Hugo van Kemenade 8fc953f606
gh-115692: Add tests to increase `json` coverage (#115693)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-04-14 06:11:06 -06:00
Jason R. Coombs 9c93b7402b
gh-117348: restore import time performance of configparser (#117703)
Reduces import time by over 50% (10431µs vs 4350µs on Apple M3 Pro).
2024-04-14 11:10:09 +00:00
Jelle Zijlstra c99d374fc7
dataclasses docs: add some link anchors (#117601) 2024-04-14 01:03:16 -07:00
Erlend E. Aasland 0dcfd0d522
Autoconf: aarch64-apple-darwin/clang is now a tier 1 platform (#117861)
See also python/pep#3705
2024-04-14 09:21:29 +02:00
Gouvernathor f303651b45
Simpler example of shallow dict export of a dataclass (#117812) 2024-04-13 17:14:43 -07:00
Gouvernathor e7cce2a9c6
Tweak wording for dataclasses.replace (gh-117758) 2024-04-13 20:03:09 -04:00
Barney Gale a74f117dab
GH-115060: Speed up `pathlib.Path.glob()` by omitting initial `stat()` (#117831)
Since 6258844c, paths that might not exist can be fed into pathlib's
globbing implementation, which will call `os.scandir()` / `os.lstat()` only
when strictly necessary. This allows us to drop an initial `self.is_dir()`
call, which saves a `stat()`.

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2024-04-14 00:08:03 +01:00
Erlend E. Aasland 3095d02642
gh-96398: Fix mpicc check in configure.ac (#117857) 2024-04-13 21:22:06 +00:00
Hugo van Kemenade 56ed979d04
gh-68583: webbrowser: replace `getopt` with `argparse`, add long options (#117047) 2024-04-13 08:56:56 -06:00