summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gh-118973: Add _tkinter to freethreaded MSI (GH-126768)Steve Dower2024-11-152-1/+4
|
* gh-126312: Don't traverse frozen objects on the free-threaded build (#126338)Peter Bierma2024-11-153-5/+54
| | | | | Also, _PyGC_Freeze() no longer freezes unreachable objects. Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
* gh-126554: ctypes: Correctly handle NULL dlsym values (GH-126555)George Alexopoulos2024-11-154-31/+220
| | | | | | | | | | | | | | | | | | | | | | | | | For dlsym(), a return value of NULL does not necessarily indicate an error [1]. Therefore, to avoid using stale (or NULL) dlerror() values, we must: 1. clear the previous error state by calling dlerror() 2. call dlsym() 3. call dlerror() If the return value of dlerror() is not NULL, an error occured. In ctypes we choose to treat a NULL return value from dlsym() as a "not found" error. This is the same as the fallback message we use on Windows, Cygwin or when getting/formatting the error reason fails. [1]: https://man7.org/linux/man-pages/man3/dlsym.3.html Signed-off-by: Georgios Alexopoulos <grgalex42@gmail.com> Signed-off-by: Georgios Alexopoulos <grgalex@ba.uoa.gr> Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Petr Viktorin <encukou@gmail.com>
* GH-124567: Reduce overhead of debug build for GC. Should help CI performance ↵Mark Shannon2024-11-151-1/+9
| | | | (GH-126777)
* gh-103951: enable optimization for fast attribute access on module ↵Sergey B Kirpichev2024-11-155-4/+6
| | | | | subclasses (GH-126264) Co-authored-by: Nicolas Tessore <n.tessore@ucl.ac.uk>
* gh-126433: Update hacl-star (GH-126791)Victor Stinner2024-11-1510-30/+37
| | | | Retrieve the change: "Lib_Memzero0.c: Fix compiler warning on 32-bit Windows".
* gh-126807: pygettext: Do not attempt to extract messages from function ↵Tomas R.2024-11-143-5/+36
| | | | | | | | | | | | | | | | definitions. (GH-126808) Fixes a bug where pygettext would attempt to extract a message from a code like this: def _(x): pass This is because pygettext only looks at one token at a time and '_(x)' looks like a function call. However, since 'x' is not a string literal, it would erroneously issue a warning.
* GH-126766: `url2pathname()`: handle empty authority section. (#126767)Barney Gale2024-11-144-9/+14
| | | | | Discard two leading slashes from the beginning of a `file:` URI if they introduce an empty authority section. As a result, file URIs like `///etc/hosts` are correctly parsed as `/etc/hosts`.
* gh-124111: Update tkinter for compatibility with Tcl/Tk 9.0.0 (GH-124156)Marc Culler2024-11-1411-195/+338
|
* gh-126061: add new functions to `refcounts.dat` (#126788)RUANG (James Roy)2024-11-141-0/+13
|
* GH-117759: Update GC docs for incremental collection (GH-126695)Mark Shannon2024-11-141-51/+87
|
* gh-123832: Adjust `socket.getaddrinfo` docs for better POSIX compliance ↵Petr Viktorin2024-11-141-3/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (GH-126182) * gh-123832: Adjust `socket.getaddrinfo` docs for better POSIX compliance This changes nothing changes for CPython supported platforms, but hints how to deal with platforms that stick to the letter of the spec. It also marks `socket.getaddrinfo` as a wrapper around `getaddrinfo(3)`; specifically, workarounds to make the function work consistently across platforms are out of scope in its code. Include wording similar to the POSIX's “by providing options and by limiting the returned information”, which IMO suggests that the hints limit the resulting list compared to the defaults, *but* can be interpreted differently. Details are added in a note. Specifically say that this wraps the underlying C function. So, the details are in OS docs. The “full range of results” bit goes away. Use `AF_UNSPEC` rather than zero for the *family* default, although I don't think a system where it's nonzero would be very usable. Suggest setting proto and/or type (with examples, as the appropriate values aren't obvious). Say why you probably want to do that that on all systems; mention the behavior on the “letter of the spec” systems. Suggest that the results should be tried in order, which is, AFAIK best practice -- see RFC 6724 section 2, and its predecessor from 2003 (which are specific to IP, but indicate how people use this): > Well-behaved applications SHOULD iterate through the list of > addresses returned from `getaddrinfo()` until they find a working address. Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
* Document that return-less user-defined functions return None (#126769)John Marshall2024-11-141-1/+2
| | | | Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com> Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
* Doc: Recommend shlex.quote alongside pipes removal (#126570)Colin Watson2024-11-141-0/+2
| | | | | | | One of the most common reasons I see the old `pipes` module still in use when porting to Python 3.13 is for the undocumented `pipes.quote` function, which can easily be replaced with `shlex.quote`. I think it's worth specifically calling this out, since being directed to the `subprocess` module would be confusing in this case.
* gh-126731: Update outdated project information in `pprint.pp` doc (#126732)Wulian2024-11-141-1/+1
|
* Add Savannah to CODEOWNERS for argparse and the JIT (#126814)Savannah Ostrowski2024-11-131-1/+4
| | | Add Savannah to CODEOWNERS
* GH-118289: Fix handling of non-directories in `posixpath.realpath()` (#120127)Barney Gale2024-11-133-4/+75
| | | | | | | In strict mode, raise `NotADirectoryError` if we encounter a non-directory while we still have path parts left to process. We use a `part_count` variable rather than `len(rest)` because the `rest` stack also contains markers for unresolved symlinks.
* GH-126606: don't write incomplete pyc files (GH-126627)CF Bolz-Tereick2024-11-133-1/+40
| | | | Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru> Co-authored-by: Brett Cannon <brett@python.org>
* gh-126188: Update bundled pip to 24.3.1 (gh-126805)Stéphane Bidoul2024-11-133-1/+2
| | | Update bundled pip to 24.3.1
* gh-89640: Pull in update to float word order detection in autoconf-archive ↵Hood Chatham2024-11-135-134/+195
| | | | (#126747)
* gh-126390: Support for preserving order of options and nonoption arguments ↵Serhiy Storchaka2024-11-135-5/+48
| | | | in gnu_getopt() (GH-126393)
* gh-109413: Enable `strict_optional` for `libregrtest/main.py` (#126394)sobolevn2024-11-134-8/+21
|
* gh-126623: Update libexpat to 2.6.4, make future updates easier (GH-126792)Seth Michael Larson2024-11-137-22/+119
| | | Update libexpat to 2.6.4, make future updates easier.
* gh-123465: Ensure PyType_FromMetaclass avoids extra strcmp (GH-125460)neonene2024-11-131-2/+2
| | | use else
* gh-126456: Fix _pyrepl curses tigetstr() (#126472)Victor Stinner2024-11-131-2/+2
|
* gh-123619: Add an unstable C API function for enabling deferred reference ↵Peter Bierma2024-11-138-1/+128
| | | | | | counting (GH-123635) Co-authored-by: Sam Gross <colesbury@gmail.com>
* gh-126175: Add attributes to TOMLDecodeError. Deprecate free-form `__init__` ↵Taneli Hukkinen2024-11-134-52/+163
| | | | args (GH-126428)
* gh-126341: add release check to `__iter__` method of `memoryview` (#126759)Ritvik Pasham2024-11-133-0/+4
| | | | | | Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: sobolevn <mail@sobolevn.me>
* gh-71936: Fix race condition in multiprocessing.Pool (GH-124973)Petr Viktorin2024-11-133-13/+22
| | | | | | | | | | | | | | | | | | * gh-71936: Fix race condition in multiprocessing.Pool Proxes of shared objects register a Finalizer in BaseProxy._incref(), and it will call BaseProxy._decref() when it is GCed. This may cause a race condition with Pool(maxtasksperchild=None) on Windows. A connection would be closed and raised TypeError when a GC occurs between _ConnectionBase._check_writable() and _ConnectionBase._send_bytes() in _ConnectionBase.send() in the second or later task, and a new object is allocated that shares the id() of a previously deleted one. Instead of using the id() of the token (or the proxy), use a unique, non-reusable number. Co-Authored-By: Akinori Hattori <hattya@gmail.com>
* gh-104745: Limit starting a patcher more than once without stopping it (#126649)Red4Ru2024-11-133-2/+62
| | | | | | | | Previously, this would cause an `AttributeError` if the patch stopped more than once after this, and would also disrupt the original patched object. --------- Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* bpo-46128: Strip IsolatedAsyncioTestCase frames from reported stacktraces ↵Andrew Svetlov2024-11-132-0/+3
| | | | | | | | | | | | | | | (#30196) * Strip IsolatedAsyncioTestCase frames from reported stacktraces * Update Misc/NEWS.d/next/Library/2021-12-19-10-47-24.bpo-46128.Qv3EK1.rst Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> --------- Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-126757: fix minor typo (GH-126758)Yuxuan Zhang2024-11-121-1/+1
|
* gh-119826: Improved fallback for ntpath.abspath() on Windows (GH-119938)Nice Zombies2024-11-123-18/+35
|
* gh-126688: Reinit import lock after fork (#126692)Sam Gross2024-11-124-0/+11
| | | | | | The PyMutex implementation supports unlocking after fork because we clear the list of waiters in parking_lot.c. This doesn't work as well for _PyRecursiveMutex because on some systems, such as SerenityOS, the thread id is not preserved across fork().
* GH-120423: `pathname2url()`: handle forward slashes in Windows paths (#126593)Barney Gale2024-11-123-6/+14
| | | | Adjust `urllib.request.pathname2url()` so that forward slashes in Windows paths are handled identically to backward slashes.
* gh-116897: Deprecate generic false values in urllib.parse.parse_qsl() ↵Serhiy Storchaka2024-11-125-9/+45
| | | | | | | | (GH-116903) Accepting objects with false values (like 0 and []) except empty strings and byte-like objects and None in urllib.parse functions parse_qsl() and parse_qs() is now deprecated.
* gh-89083: add support for UUID version 8 (RFC 9562) (#123224)Bénédikt Tran2024-11-125-19/+109
| | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* gh-126705: Make os.PathLike more like a protocol (#126706)Stephen Morton2024-11-123-0/+6
| | | it can now be used as a base class in other protocols
* gh-76785: Improved Subinterpreters Compatibility with 3.12 (2/2) (gh-126707)Eric Snow2024-11-129-91/+247
| | | | | | | | | These changes makes it easier to backport the _interpreters, _interpqueues, and _interpchannels modules to Python 3.12. This involves the following: * add the _PyXI_GET_STATE() and _PyXI_GET_GLOBAL_STATE() macros * add _PyXIData_lookup_context_t and _PyXIData_GetLookupContext() * add _Py_xi_state_init() and _Py_xi_state_fini()
* gh-95382: Use cache for indentations in the JSON encoder (GH-118636)Serhiy Storchaka2024-11-121-64/+118
|
* gh-126133: Only use start year in PSF copyright, remove end years (#126236)Hugo van Kemenade2024-11-1245-50/+47
|
* gh-126061: Add PyLong_IsPositive/Zero/Negative() functions (#126065)RUANG (James Roy)2024-11-127-0/+164
| | | | | Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com> Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* gh-125916: Allow functools.reduce() 'initial' to be a keyword argument (#125917)Sayandip Dutta2024-11-128-13/+76
|
* gh-126595: fix a crash when calling `itertools.count(sys.maxsize)` (#126617)Bénédikt Tran2024-11-123-0/+13
|
* gh-126405: fix use-after-free in `_asyncio.Future.remove_done_callback` ↵Kumar Aditya2024-11-121-0/+2
| | | | (#126733)
* gh-126209: Fix inconsistency of `skip_file_prefixes` in `warnings.warn`'s C ↵Daehee Kim2024-11-124-5/+23
| | | | | | | and Python implementations (GH-126329) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
* gh-126525: Fix `makeunicodedata.py` output on macOS and Windows (#126526)sobolevn2024-11-121-1/+1
|
* gh-126699: allow AsyncIterator to be used as a base for Protocols (#126702)Stephen Morton2024-11-123-1/+6
|
* Fix error message of "Check if Autoconf files are up to date" job (#126683)sobolevn2024-11-121-1/+1
|
* gh-84852: Add MIME types for .eot, ,otf, .ttf, .woff and .woff2 fonts (#20199)Sahil Prajapati2024-11-124-0/+22
| | | | | Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>