Commit Graph

124532 Commits

Author SHA1 Message Date
Jun Komoda 5b4502560b
gh-126615: `ctypes`: Make `COMError` public (GH-126686)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-11-20 12:53:43 +00:00
Barney Gale 9d2a879aff
GH-84850: Improve whatsnew entry for `[Fancy]URLopener` removal (#127032) 2024-11-20 13:14:07 +02:00
Hugo van Kemenade 3746d0a7b3
gh-123299: Copyedit "What's New in Python 3.14" (#127028) 2024-11-20 11:35:24 +02:00
Richard Hansen 9bca3ef575
Doc: C API: `PyThreadState::on_delete` was removed in v3.13 (#126536) 2024-11-20 09:44:45 +01:00
Barney Gale c9b399fbdb
GH-85168: Use filesystem encoding when converting to/from `file` URIs (#126852)
Adjust `urllib.request.url2pathname()` and `pathname2url()` to use the
filesystem encoding when quoting and unquoting file URIs, rather than
forcing use of UTF-8.

No changes are needed in the `nturl2path` module because Windows always
uses UTF-8, per PEP 529.
2024-11-19 21:19:30 +00:00
Hugo van Kemenade 2cdfb41d0c Merge remote-tracking branch 'upstream/main' 2024-11-19 22:10:24 +02:00
Eric Snow 1c0a104eca
gh-126914: Store the Preallocated Thread State's Pointer in a PyInterpreterState Field (gh-126989)
This approach eliminates the originally reported race. It also gets rid of the deadlock reported in gh-96071, so we can remove the workaround added then.
2024-11-19 12:59:19 -07:00
Hugo van Kemenade fc1042f9a6 Post 3.14.0a2 2024-11-19 21:55:02 +02:00
sobolevn 824afbf548
gh-109413: Enable mypy's `disallow_any_generics` setting when checking `libregrtest` (#127033) 2024-11-19 22:41:59 +03:00
Beomsoo Kim 8da9920a80
gh-126947: Typechecking for _pydatetime.timedelta.__new__ arguments (#126949)
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2024-11-19 22:40:52 +03:00
CoderTCY 88dc84bcf9
gh-125729: Makes the installation of the turtle module dependent on the Tcl/Tk install option (GH-126176) 2024-11-19 17:19:33 +00:00
Justin Applegate 29cbcbd73b
gh-126991: Fix reference leak in loading pickle's opcode BUILD (GH-126990)
If PyObject_SetItem() fails in the `load_build()` function of _pickle.c, no DECREF for the `dict` variable.
2024-11-19 18:00:35 +02:00
Malcolm Smith c5c9286804
gh-118201: Simplify conv_confname (#126089) 2024-11-19 10:42:19 -05:00
Hugo van Kemenade 5fcc3a4cee
Update docs 'make serve' to suggest 'make htmllive' (#126969) 2024-11-19 17:28:34 +02:00
Hugo van Kemenade add43c3420 Python 3.14.0a2 2024-11-19 16:52:44 +02:00
sobolevn 3932e1db53
gh-126980: Fix `bytearray.__buffer__` crash on `PyBUF_{READ,WRITE}` (#126981)
Co-authored-by: Victor Stinner <vstinner@python.org>
2024-11-19 17:44:53 +03:00
Barney Gale 4d771977b1
GH-84850: Remove `urllib.request.URLopener` and `FancyURLopener` (#125739) 2024-11-19 16:01:49 +02:00
Mark Shannon a99dd23c1f
GH-124567: Replace quadratic assert with linear one (GH-127009) 2024-11-19 13:38:59 +00:00
Filipe Laíns 🇵🇸 6309e9e07a
codeowners: add myself to getpath, site, and venv (#126994)
Signed-off-by: Filipe Laíns <lains@riseup.net>
2024-11-19 12:43:34 +00:00
Pablo Galindo Salgado 30aeb00d36
gh-126076: Account for relocated objects in tracemalloc (#126077) 2024-11-19 10:35:17 +00:00
Hugo van Kemenade 899fdb213d
Revert "GH-126491: GC: Mark objects reachable from roots before doing cycle collection (GH-126502)" (#126983) 2024-11-19 11:25:09 +02:00
Victor Stinner 84f07c3a4c
gh-126594: Fix typeobject.c wrap_buffer() cast (#126754)
Reject flags smaller than INT_MIN.

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-11-19 09:13:20 +01:00
Victor Stinner b3687ad454
gh-126876: Fix socket internal_select() for large timeout (#126968)
If the timeout is larger than INT_MAX, replace it with INT_MAX, in
the poll() code path.

Add an unit test.
2024-11-19 09:08:42 +01:00
Eric Snow d6b3e78504
gh-126986: Drop _PyInterpreterState_FailIfNotRunning() (gh-126988)
We replace it with _PyErr_SetInterpreterAlreadyRunning().
2024-11-19 00:11:12 +00:00
Filipe Laíns 🇵🇸 0063f5f314
getpath: fix warning typo (#126978) 2024-11-18 23:50:01 +00:00
Brandt Bucher 4cd10762b0
GH-126795: Increase the JIT threshold from 16 to 4096 (GH-126816) 2024-11-18 11:11:23 -08:00
Hugo van Kemenade 933f21c3c9
gh-85957: Add missing MIME types for images with RFCs (#126966) 2024-11-18 20:13:20 +02:00
Serhiy Storchaka f7ef0203d4
gh-123803: Support arbitrary code page encodings on Windows (GH-123804)
If the cpXXX encoding is not directly implemented in Python, fall back
to use the Windows-specific API codecs.code_page_encode() and
codecs.code_page_decode().
2024-11-18 17:45:25 +00:00
Stan U. 8fe1926164
gh-126911: Update credits output (#126913)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
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: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-11-18 17:29:14 +02:00
Mark Shannon b0fcc2c47a
GH-126491: GC: Mark objects reachable from roots before doing cycle collection (GH-126502)
* Mark almost all reachable objects before doing collection phase

* Add stats for objects marked

* Visit new frames before each increment

* Remove lazy dict tracking

* Update docs

* Clearer calculation of work to do.
2024-11-18 14:31:26 +00:00
sobolevn a1d9c8aa80
gh-109413: Enable `strict_optional = true` for `libregrtest/run_workers` (#126855)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-11-18 17:23:43 +03:00
Michał Górny 2c0a21c1aa
gh-126909: Fix running xattr tests on systems with lower limits (#126930)
Modify the extended attribute tests to write fewer and smaller extended
attributes, in order to fit within filesystems with total xattr limit
of 1 KiB (e.g. ext4 with 1 KiB blocks).  Previously, the test would
write over 2 KiB, making it fail with ENOSPC on such systems.
2024-11-18 14:05:55 +01:00
Serhiy Storchaka f9c5573ded
gh-101955: Fix SystemError in possesive quantifier with alternative and group (GH-111362)
Co-authored-by: <wjssz@users.noreply.github.com>
2024-11-18 13:43:44 +02:00
Serhiy Storchaka 7538e7f569
gh-67877: Fix memory leaks in terminated RE matching (GH-126840)
If SRE(match) function terminates abruptly, either because of a signal
or because memory allocation fails, allocated SRE_REPEAT blocks might
be never released.

Co-authored-by: <wjssz@users.noreply.github.com>
2024-11-18 11:53:45 +02:00
Russell Keith-Magee 3938fd60c0
gh-126789: Correct sysconfig test exclusions for iOS and Android. (GH-126941) 2024-11-18 09:50:40 +01:00
Joseph Martinot-Lagarde ce453e6c2f
Doc: Reorganize math module documentation (#126337)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2024-11-18 08:57:32 +01:00
Russell Keith-Magee 500a4712bb
gh-126167: Modify iOS Testbed to read arguments from Info.plist (#126169)
Modify iOS Testbed to read arguments from Info.plist.
2024-11-18 07:43:41 +08:00
beavailable 0c5c80928c
gh-126896: Fix docs about `asyncio.start_server()` (#126897) 2024-11-17 11:32:35 -08:00
Filipe Laíns 🇵🇸 9d6366b60d
GH-126920: fix Makefile overwriting sysconfig.get_config_vars 2024-11-17 01:56:01 +00:00
Filipe Laíns 🇵🇸 acbd5c9c6c
GH-126789: fix some sysconfig data on late site initializations 2024-11-17 00:07:25 +00:00
RanKKI ed81971e6b
gh-124452: Fix header mismatches when folding/unfolding with email message (#125919)
The header-folder of the new email API has a long standing known buglet where
if the first token is longer than max_line_length, it puts that token on the next
line.  It turns out there is also a *parsing* bug when parsing such a header:
the space prefixing that first, non-empty line gets preserved and tacked on to
the start of the header value, which is not the expected behavior per the RFCs.
The bug arises from the fact that the parser assumed that there would be at
least one token on the line with the header, which is going to be true for
probably every email producer other than the python email library with its
folding buglet.  Clearly, though, this is a case that needs to be handled
correctly.  The fix is simple: strip the blanks off the start of the whole
value, not just the first physical line of the value.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-11-16 18:01:52 -05:00
Hood Chatham 2313f84210
GH-126748: amend configure.rst description for the 'build_wasm' make target (#126687)
Clarified the documentation around how the build_wasm target is selected.
2024-11-16 09:46:39 +08:00
Hood Chatham 544b001b23
gh-126691: Remove --with-emscripten-target (#126787)
This unifies the code for nodejs and the code for the browser. After this
commit, the browser example doesn't work; this will be fixed in a
subsequent update.
2024-11-16 09:44:05 +08:00
Alex Gaynor d6bcc154e9
Added a warning to the urljoin docs, indicating that it is not safe to use with attacker controlled URLs (GH-126659)
This was flagged to me at a party today by someone who works in red-teaming as a frequently encountered footgun. Documenting the potentially unexpected behavior seemed like a good place to start.
2024-11-15 18:09:05 -05:00
Beomsoo Kim 94a7a4e22f
Docs: Miscellaneous corrections to simple statements in the language reference (GH-126720)
* Replace: The :keyword:`global` -> The :keyword:`global` statement
Add :keyword: when it's needed

* Replace repeated links with duoble backticks
2024-11-15 13:02:34 -08:00
Nadeshiko Manju 3be7498d24
gh-126476: Raise IllegalMonthError for calendar.formatmonth() when the input month is not correct (GH-126484)
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2024-11-15 11:03:06 -08:00
Seth Michael Larson a2c180f4e7
Add PEP 761 to What's New (#126550)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-11-15 15:54:56 +00:00
Bénédikt Tran 612ac283b8
gh-122549: Add platform.invalidate_caches() (#122547)
Allow to invalidate platform's cached results.
2024-11-15 13:52:56 +00:00
Peter Bierma 08f98f4576
Fix intermittent failures for the `PyUnstable_Object_EnableDeferredRefcount` tests (GH-126849)
Hotfix for the PyUnstable_Object_EnableDeferredRefcount tests.
2024-11-15 14:03:46 +01:00
Petr Viktorin d00f7b1b9d
gh-125063: marshal: Add version 5, improve documentation (GH-126829)
* Document that slices can be marshalled
* Deduplicate and organize the list of supported types
  in docs
* Organize the type code list in marshal.c, to make
  it more obvious that this is a versioned format
* Back-fill some historical info

Co-authored-by: Michael Droettboom <mdboom@gmail.com>
2024-11-15 13:48:57 +01:00