Commit Graph

123751 Commits

Author SHA1 Message Date
Steve Dower df7228ce14
gh-124254: Detect freethreaded MSI component when doing an upgrade on Windows (GH-124279) 2024-09-23 16:27:46 +01:00
Kirill Podoprigora 6ab634840c
Add Kirill Podoprigora for AST codeowners (#124302) 2024-09-23 07:16:19 -07:00
Adam Turner 9d0a75269c
GH-109975: Copyedit 3.13 What's New: C API (#124313) 2024-09-23 14:28:17 +01:00
Savannah Ostrowski 5f5c0b9c23
GH-79714: Add mention of stderr for clarity to ArgumentParser.exit() (GH-123932) 2024-09-23 12:08:03 +03:00
Sam James 0e89f7abd4
GH-113655: Lower the C recursion limit for HPPA, PPC64 and SPARC (#124264)
Lower the C recursion limit for HPPA, PPC64 and SPARC, as they use
relatively large stack frames that cause e.g. `test_descr` to hit
a stack overflow.  According to quick testing, it seems that values
around 8000 are max for HPPA and PPC64 (ELFv1 ABI) and 7000 for SPARC64.
To keep things safe, let's use 5000 for PPC64 and 4000 for SPARC.

Co-authored-by: Michał Górny <mgorny@gentoo.org>
2024-09-23 09:03:30 +02:00
Y5 d3e79d75d1
gh-124130: Notes on empty string corner case of category `\B` (#124133)
Signed-off-by: y5c4l3 <y5c4l3@proton.me>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-09-23 08:58:14 +02:00
Furkan Onder 2e8c769481
gh-124228: Fix UUID test in configure files for NetBSD (#124229)
Fix UUID configuration in configure files for NetBSD compatibility.
2024-09-23 08:54:36 +02:00
Terry Jan Reedy d5f95ec07b
gh-112938: IDLE - Fix uninteruptable hang when Shell gets rapid continuous output. (#124310)
https://github.com/python/cpython/issues/88496 replaced text.update with text.update_idletasks in colorizer.py and outwin.py to fix test failures on macOS.  While theoretically correct, the result was Shell freezing when receiving continuous short strings to print.  Test: `while 1: 1`.

The guess is that there is no idle time in which to do the screen update.  Reverting the change in one of the files,
outwin, fixes the issue.  Colorizer runs ever 1/20 second and seems to work fine.

When running test-outwin on macOS, alias 'update'
to 'update_idletasks on the text used for testing.
2024-09-22 15:51:09 -04:00
Michał Górny 342e654b8e
gh-124213: Skip tests failing inside systemd-nspawn --suppress-sync=true (#124215)
Add a helper function that checks whether the test suite is running
inside a systemd-nspawn container, and skip the few tests failing
with `--suppress-sync=true` in that case.  The tests are failing because
`--suppress-sync=true` stubs out `fsync()`, `fdatasync()` and `msync()`
calls, and therefore they always return success without checking for
invalid arguments.

Call `os.open(__file__, os.O_RDONLY | os.O_SYNC)` and check the errno to
detect whether `--suppress-sync=true` is actually used, and skip
the tests only in that scenario.
2024-09-20 13:37:49 +00:00
AN Long 1a577729e3
gh-111513: Improve datetime.fromtimestamp's error message (#124249) 2024-09-20 14:42:43 +02:00
Y5 db6eb3640a
gh-124217, ipaddress: Add RFC 9637 reserved IPv6 block `3fff::/20` (#124240)
Signed-off-by: y5c4l3 <y5c4l3@proton.me>
2024-09-20 11:01:28 +00:00
Jacob Walls 622368d99c
Fix typo in XMLParser doc (#124129) 2024-09-20 12:42:44 +02:00
Brian Schubert 63f196090f
gh-124248: Fix crash in struct when processing 0p fields (#124251) 2024-09-20 12:08:59 +02:00
Serhiy Storchaka baa3550bc3
gh-95468: Add more tests for "--" (double dash) in test_argparse (GH-124274) 2024-09-20 09:54:20 +00:00
Petr Viktorin aee219f455
gh-123880: Allow recursive import of single-phase-init modules (GH-123950)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Brett Cannon <brett@python.org>
2024-09-20 10:27:34 +02:00
sobolevn 3e36e5aef1
gh-123797: Check for runtime availability of `ptsname_r` on macos (#123806) 2024-09-20 09:30:27 +03:00
Serhiy Storchaka aae126748f
gh-81691: Fix handling of multiple "--" (double dashes) in argparse (GH-124233)
Only the first one has now been removed, all subsequent ones are now
taken literally.
2024-09-20 09:20:47 +03:00
Victor Stinner 7a2d77c903
test_cext, test_cppext: enable /W4 warnings on Windows (#124253)
Add an explicit cast to (void*) and add Py_UNUSED() to fix some
warnings in extension.c.
2024-09-19 22:32:01 +02:00
Hugo van Kemenade 5f01111594
Docs: Update two FAQs for Python 3 (#124247)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-09-19 21:50:05 +03:00
Serhiy Storchaka 992e8f6102
gh-124245: Fix UserWarning in test_argparse (GH-124246) 2024-09-19 21:35:12 +03:00
luk1337 7331d0f70b
gh-124160: Pass main_tstate to update_global_state_for_extension() (#124164) 2024-09-19 21:35:20 +05:30
Jakub Kulík 8f82d9aa21
bpo-41843: Reenable use of sendfile in shutil module on Solaris (GH-23893) 2024-09-19 14:47:05 +00:00
Stefano Rivera 426569eb8c
Support the "pager" binary in _pyrepl (#122878)
Debian (and derivatives) provide a /usr/bin/pager binary, managed by the
alternatives system, that always points to an available pager utility.
Allow _pyrepl to use it, to follow system policy.

This is a very trivial change, from a patch that Debian has been
carrying since 2.7 era. Seems appropriate to upstream.
https://bugs.debian.org/799555
2024-09-19 13:18:24 +00:00
Sergey B Kirpichev 4420cf4dc9
gh-124040: Adjust few tests in testHypot/testDist to get exactly computed results (GH-124042) 2024-09-19 11:11:03 +03:00
sobolevn 7628f67d55
gh-123934: Fix `MagicMock` not to reset magic method return values (#124038) 2024-09-19 10:55:47 +03:00
Victor Stinner 43cd7aa8cd
gh-120754: Fix memory leak in FileIO.__init__() (#124225)
Free 'self->stat_atopen' before assigning it, since
io.FileIO.__init__() can be called multiple times manually
(especially by test_io).
2024-09-19 00:11:50 +02:00
Jacek ea7fe1fe2e
gh-124212: Fix undefined variable in error message in venv (GH-124211) 2024-09-18 22:05:18 +00:00
Furkan Onder 36682c0914
gh-124083: Skip test_signal.test_strsignal() on NetBSD (#124084)
Skip test_strsignal() on NetBSD due to TypeError.
2024-09-18 21:22:00 +00:00
Zachary Ware 9a6e2336e4
Fix `make htmllive` target (GH-124219)
Allow `make -C Doc htmllive` to work without manual venv activation

Set PATH to ensure that `sphinx-autobuild` can find `sphinx-build`.
2024-09-18 21:02:20 +00:00
Tomas R 21d2a9ab2f
gh-116022: Improve `repr()` of AST nodes (#117046)
Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-09-18 10:28:22 -07:00
Victor Stinner f9fa6ba4f8
gh-124064: Fix -Wconversion warnings in Parser/string_parser.c (#124204)
Fix integer overflow check in decode_unicode_with_escapes(): use
PY_SSIZE_T_MAX instead of SIZE_MAX.
2024-09-18 19:10:56 +02:00
Bénédikt Tran 5cd50cb6eb
gh-122145: Handle an empty AST body when reporting tracebacks (#122161) 2024-09-18 18:42:33 +02:00
Cody Maloney 8b6c7c7877
gh-120754: Refactor I/O modules to stash whole stat result rather than individual members (#123412)
Multiple places in the I/O stack optimize common cases by using the
information from stat. Currently individual members are extracted from
the stat and stored into the fileio struct. Refactor the code to store
the whole stat struct instead.

Parallels the changes to _io. The `stat` Python object doesn't allow
changing members, so rather than modifying estimated_size, just clear
the value.
2024-09-18 17:47:57 +02:00
Jelle Zijlstra 96f619faa7
gh-124206: Fix calling get_annotate_function() on static types (#124208)
Fixes #124206. No news entry because the bug this fixes was never
released.
2024-09-18 08:39:22 -07:00
sobolevn 3b6bfa77aa
gh-102511: Change the `os.path.splitroot` param name from `path` back to `p` (GH-124097) 2024-09-18 15:17:32 +01:00
Sam James 0c4884d8aa
test: fix _is_perf_version_at_least typo (#124199) 2024-09-18 13:44:32 +01:00
Petr Viktorin 32119fc377
gh-118915: Add/fix docs entries for some new 3.13 C API (GH-124134) 2024-09-18 14:15:43 +02:00
Petr Viktorin 42c8b0556c
gh-123085: _compile_importlib: Avoid copying sources before compilation (GH-124131)
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2024-09-18 14:14:34 +02:00
Sergey B Kirpichev 8a284e1896
gh-119771: Set errno on overflows in _Py_c_pow() (#120256)
Before we did this in complex_pow() and behavior of the public C API
function _Py_c_pow() was different from the pure-python pow().
2024-09-18 10:39:11 +02:00
Nate Ohlson 81480e6edb
gh-124190: Ignore files directories check warning tooling (#124193)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2024-09-18 10:49:43 +03:00
neonene 646f16bdee
gh-124153: Implement `PyType_GetBaseByToken()` and `Py_tp_token` slot (GH-124163) 2024-09-18 09:18:19 +02:00
Serhiy Storchaka 79a7410236
Revert "gh-123974: Fix time.get_clock_info() on NetBSD (#123975)" (GH-124115)
This reverts commit b1d6f8a2ee.
2024-09-18 09:29:24 +03:00
Nate Ohlson 29a1a6e3ed
gh-124191: Disable -Wconversion in enable safety (gh-124192) 2024-09-18 12:55:09 +09:00
Bradley Reynolds d8c0fe1944
gh-124194: Fix wrong issue number in What's New in Python 3.8 (#124195)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-09-18 01:51:15 +01:00
Jacek a15a584bf3
gh-122765: make prompt in activate.csh robust against unbalanced quotes and newlines (GH-123751) 2024-09-17 17:16:43 +00:00
Sergey B Kirpichev f4dd440210
gh-123836: workaround fmod(x, y) bug on Windows (#124171)
Buildbot failure on Windows 10 with MSC v.1916 64 bit (AMD64):
FAIL: testFmod (test.test_math.MathTests.testFmod)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\3.x.bolen-windows10\build\Lib\test\test_math.py", line 605, in testFmod
    self.ftest('fmod(-10, 1)', math.fmod(-10, 1), -0.0)
    ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\buildarea\3.x.bolen-windows10\build\Lib\test\test_math.py", line 258, in ftest
    self.fail("{}: {}".format(name, failure))
    ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: fmod(-10, 1): expected -0.0, got 0.0 (zero has wrong sign)

Here Windows loose sign of the result; if y is nonzero, the result
should have the same sign as x.

This amends commit 28aea5d07d.
2024-09-17 17:16:15 +00:00
Jakub Kulík f15fff3f13
gh-110190: Fix ctypes structs with array on SPARC (GH-118233) 2024-09-17 19:06:53 +02:00
Victor Stinner 3aff1d0260
gh-124064: Fix -Wconversion warnings in Parser/pegen.c (#124181) 2024-09-17 15:58:43 +00:00
Victor Stinner ec08aa1fe4
gh-124064: Fix -Wconversion warnings in pycore_{long,object}.h (#124177)
Change also the fix for pycore_gc.h and pycore_stackref.h:
declare constants as uintptr_t, rather than casting constants.
2024-09-17 15:35:40 +00:00
Rafael Fontenelle ab80c6b402
GH-103484: Fix broken links reported by linkcheck (#124169) 2024-09-17 17:05:15 +02:00