summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gh-101100: Clean up Doc/c-api/exceptions.rst and Doc/c-api/sys.rst (GH-114825)Skip Montanaro2024-02-113-20/+29
|
* gh-115282: Fix direct invocation of `test_traceback.py` (#115283)Nikita Sobolev2024-02-111-4/+7
|
* gh-97959: Fix rendering of routines in pydoc (GH-113941)Serhiy Storchaka2024-02-115-72/+333
| | | | | | | | | | * Class methods no longer have "method of builtins.type instance" note. * Corresponding notes are now added for class and unbound methods. * Method and function aliases now have references to the module or the class where the origin was defined if it differs from the current. * Bound methods are now listed in the static methods section. * Methods of builtin classes are now supported as well as methods of Python classes.
* gh-49766: Make date-datetime comparison more symmetric and flexible (GH-114760)Serhiy Storchaka2024-02-115-84/+91
| | | | | | | | | | | | | Now the special comparison methods like `__eq__` and `__lt__` return NotImplemented if one of comparands is date and other is datetime instead of ignoring the time part and the time zone or forcefully return "not equal" or raise TypeError. It makes comparison of date and datetime subclasses more symmetric and allows to change the default behavior by overriding the special comparison methods in subclasses. It is now the same as if date and datetime was independent classes.
* gh-115011: Improve support of __index__() in setters of members with ↵Serhiy Storchaka2024-02-113-67/+61
| | | | | | | | | | | | | | unsigned integer type (GH-115029) Setters for members with an unsigned integer type now support the same range of valid values for objects that has a __index__() method as for int. Previously, Py_T_UINT, Py_T_ULONG and Py_T_ULLONG did not support objects that has a __index__() method larger than LONG_MAX. Py_T_ULLONG did not support negative ints. Now it supports them and emits a RuntimeWarning.
* gh-97928: Partially restore the behavior of tkinter.Text.count() by default ↵Serhiy Storchaka2024-02-115-28/+59
| | | | | | | | | | | | | (GH-115031) By default, it preserves an inconsistent behavior of older Python versions: packs the count into a 1-tuple if only one or none options are specified (including 'update'), returns None instead of 0. Except that setting wantobjects to 0 no longer affects the result. Add a new parameter return_ints: specifying return_ints=True makes Text.count() always returning the single count as an integer instead of a 1-tuple or None.
* gh-67837, gh-112998: Fix dirs creation in concurrent extraction (GH-115082)Serhiy Storchaka2024-02-114-3/+31
| | | | | | | Avoid race conditions in the creation of directories during concurrent extraction in tarfile and zipfile. Co-authored-by: Samantha Hughes <shughes-uk@users.noreply.github.com> Co-authored-by: Peder Bergebakken Sundt <pbsds@hotmail.com>
* gh-85984: Add _POSIX_VDISABLE from unistd.h to termios module. (#114985)Soumendra Ganguly2024-02-112-3/+5
| | | | Signed-off-by: Soumendra Ganguly <soumendraganguly@gmail.com> Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-79382: Fix recursive glob() with trailing "**" (GH-115134)Serhiy Storchaka2024-02-113-1/+15
| | | | Trailing "**" no longer allows to match files and non-existing paths in recursive glob().
* gh-115172: Fix explicit index extries for the C API (GH-115173)Serhiy Storchaka2024-02-1114-153/+150
|
* gh-115133: Fix tests for XMLPullParser with Expat 2.6.0 (GH-115164)Serhiy Storchaka2024-02-112-22/+38
| | | | | Feeding the parser by too small chunks defers parsing to prevent CVE-2023-52425. Future versions of Expat may be more reactive.
* gh-114807: multiprocessing: don't raise ImportError if _multiprocessing is ↵Hood Chatham2024-02-111-1/+1
| | | | | missing (#114808) `_multiprocessing` is only used under the `if _winapi:` block, this moves the import to be within the `_winapi` ImportError handling try/except for equivalent treatment.
* gh-101100: Fix dangling refs in bdb.rst (#114983)Skip Montanaro2024-02-112-9/+10
| | | Co-authored-by: AN Long <aisk@users.noreply.github.com>
* gh-115274: Fix direct invocation of `testmock/testpatch.py` (#115275)Nikita Sobolev2024-02-111-1/+1
|
* gh-115249: Fix `test_descr` with `-OO` mode (#115250)Nikita Sobolev2024-02-111-1/+5
|
* gh-115258: Temporarily disable test on Windows (#115269)Sam Gross2024-02-111-0/+3
| | | | The "test_shutdown_all_methods_in_many_threads" test times out on the Windows CI. This skips the test on Windows until we figure out the root cause.
* gh-101100: Fix sphinx warnings in `c-api/gcsupport.rst` (#114786)Nikita Sobolev2024-02-103-5/+9
|
* gh-115254: Fix `test_property` with `-00` mode (#115255)Nikita Sobolev2024-02-101-0/+1
|
* gh-114670: Fix `_testbuffer` module initialization (#114672)Nikita Sobolev2024-02-101-53/+74
|
* gh-115252: Fix `test_enum` with `-OO` mode (GH-115253)Nikita Sobolev2024-02-101-3/+14
|
* GH-115060: Speed up `pathlib.Path.glob()` by removing redundant regex ↵Barney Gale2024-02-104-28/+76
| | | | | matching (#115061) When expanding and filtering paths for a `**` wildcard segment, build an `re.Pattern` object from the subsequent pattern parts, rather than the entire pattern, and match against the `os.DirEntry` object prior to instantiating a path object. Also skip compiling a pattern when expanding a `*` wildcard segment.
* gh-114894: add array.array.clear() method (#114919)Mike Zimin2024-02-107-1/+71
| | | | | Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: AN Long <aisk@users.noreply.github.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-102840: Fix confused traceback when floordiv or mod operations happens ↵Kirill Podoprigora2024-02-103-6/+37
| | | | between Fraction and complex objects (GH-102842)
* gh-115059: Remove debugging code in test_io (GH-115240)Serhiy Storchaka2024-02-101-30/+0
|
* gh-76763: Make chr() always raising ValueError for out-of-range values ↵Serhiy Storchaka2024-02-104-28/+32
| | | | | | (GH-114882) Previously it raised OverflowError for very large or very small values.
* GH-87804: Fix counter overflow in statvfs on macOS (#99570)Ronald Oussoren2024-02-102-0/+102
| | | | | | | | | | On macOS the statvfs interface returns block counts as 32-bit integers, and that results in bad reporting for larger disks. Therefore reimplement statvfs in terms of statfs, which does use 64-bit integers for block counts. Tested using a sparse filesystem image of 100TB.
* gh-114552: Update `__dir__` method docs: it allows returning an iterable ↵Nikita Sobolev2024-02-102-3/+11
| | | | (#114662)
* gh-96471: Add shutdown() method to queue.Queue (#104750)Laurie O2024-02-105-0/+474
| | | | Co-authored-by: Duprat <yduprat@gmail.com>
* gh-111968: Refactor _PyXXX_Fini to integrate with _PyObject_ClearFreeLists ↵Donghee Na2024-02-1020-107/+38
| | | | (gh-114899)
* gh-115165: Fix `typing.Annotated` for immutable types (#115213)dave-shawley2024-02-093-1/+28
| | | | The return value from an annotated callable can raise any exception from __setattr__ for the `__orig_class__` property.
* gh-110481: Implement inter-thread queue for biased reference counting (#114824)Sam Gross2024-02-0921-11/+418
| | | | | | | | | Biased reference counting maintains two refcount fields in each object: `ob_ref_local` and `ob_ref_shared`. The true refcount is the sum of these two fields. In some cases, when refcounting operations are split across threads, the ob_ref_shared field can be negative (although the total refcount must be at least zero). In this case, the thread that decremented the refcount requests that the owning thread give up ownership and merge the refcount fields.
* gh-112903: Handle non-types in _BaseGenericAlias.__mro_entries__() (#115191)Carl Meyer2024-02-093-1/+92
| | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* Add Peter L to ACKS (GH-115222)Peter Lazorchak2024-02-091-0/+1
|
* gh-115142: Skip test_optimizer if _testinternalcapi module is not available ↵Kirill Podoprigora2024-02-091-1/+4
| | | | (GH-115175)
* gh-115184: Fix refleak tracking issues in free-threaded build (#115188)Sam Gross2024-02-093-6/+16
| | | | | | | | Fixes a few issues related to refleak tracking in the free-threaded build: - Count blocks in abandoned segments - Call `_mi_page_free_collect` earlier during heap traversal in order to get an accurate count of blocks in use. - Add missing refcount tracking in `_Py_DecRefSharedDebug` and `_Py_ExplicitMergeRefcount`. - Pause threads in `get_num_global_allocated_blocks` to ensure that traversing the mimalloc heaps is safe.
* Docs: correctly link to code objects (#115214)Erlend E. Aasland2024-02-091-2/+3
|
* gh-115059: Flush the underlying write buffer in io.BufferedRandom.read1() ↵Serhiy Storchaka2024-02-093-0/+63
| | | | (GH-115163)
* GH-113632: update configure.ac for WebAssembly support tiers (#115192)Brett Cannon2024-02-094-6/+11
| | | Move WASI to tier 2 and drop Emscripten.
* gh-101100: Fix sphinx warnings in `library/enum.rst` (#114696)Nikita Sobolev2024-02-092-3/+15
| | | | Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
* gh-115167: Exclude vcruntime140_threads.dll from Windows build output ↵adang13452024-02-082-1/+2
| | | | (GH-115176)
* gh-112069: Adapt set/frozenset methods to Argument Clinic (#115112)Tomas R2024-02-083-157/+674
|
* gh-107944: Improve error message for getargs with bad keyword arguments ↵Shantanu2024-02-086-29/+113
| | | | (#114792)
* gh-115136: Fix possible NULL deref in getpath_joinpath() (GH-115137)Artem Chernyshev2024-02-081-0/+4
| | | | Signed-off-by: Artem Chernyshev <artem.chernyshev@red-soft.ru>
* gh-115146: Fix typo in pickletools.py documentation (GH-115148)Justin Applegate2024-02-081-1/+1
|
* When the Py_CompileStringExFlags fuzzer encounters a SystemError, abort ↵Alex Gaynor2024-02-071-2/+9
| | | | | (#115147) This allows us to catch bugs beyond memory corruption and assertions.
* gh-114828: parenthesize non-atomic macro definitions in pycore_symtable.h ↵Carl Meyer2024-02-071-12/+12
| | | | (#115143)
* gh-112066: Use `PyDict_SetDefaultRef` in place of `PyDict_SetDefault`. (#112211)Sam Gross2024-02-076-25/+32
| | | | | This changes a number of internal usages of `PyDict_SetDefault` to use `PyDict_SetDefaultRef`. Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-114828: Fix __class__ in class-scope inlined comprehensions (#115139)Carl Meyer2024-02-073-0/+33
|
* GH-108362: Revert "GH-108362: Incremental GC implementation (GH-108038)" ↵Mark Shannon2024-02-0713-647/+392
| | | | | | | (#115132) Revert "GH-108362: Incremental GC implementation (GH-108038)" This reverts commit 36518e69d74607e5f094ce55286188e4545a947d.
* gh-101100: Fix Py_DEBUG dangling Sphinx references (#115003)Skip Montanaro2024-02-072-8/+9
|