summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove stray backtick in NEWS entry (#115356)Ezio Melotti2024-02-121-1/+1
|
* gh-115285: Fix `test_dataclasses` with `-OO` mode (#115286)Nikita Sobolev2024-02-121-0/+3
|
* gh-114271: Make `PyInterpreterState.threads.count` thread-safe in ↵mpage2024-02-122-4/+4
| | | | | free-threaded builds (gh-115093) Use atomics to mutate PyInterpreterState.threads.count.
* gh-110850: Add PyTime_t C API (GH-115215)Petr Viktorin2024-02-1219-114/+448
| | | | | | | | | | | | * gh-110850: Add PyTime_t C API Add PyTime_t API: * PyTime_t type. * PyTime_MIN and PyTime_MAX constants. * PyTime_AsSecondsDouble(), PyTime_Monotonic(), PyTime_PerfCounter() and PyTime_GetSystemClock() functions. Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-115049: Fix py.exe failing when user has no LocalAppData. (GH-115185)Steve Dower2024-02-122-2/+14
| | | Also ensure we always display a debug message or error for RC_INTERNAL_ERROR
* gh-87804: Fix the refleak in error handling of `_pystatvfs_fromstructstatfs` ↵Nikita Sobolev2024-02-121-8/+9
| | | | | (#115335) It was the macro expansion! Sorry!
* gh-115233: Fix an example in the Logging Cookbook (GH-115325)Serhiy Storchaka2024-02-124-23/+90
| | | | | Also add more tests for LoggerAdapter. Also support stacklevel in LoggerAdapter._log().
* GH-113710: Fix updating of dict version tag and add watched dict stats ↵Mark Shannon2024-02-126-23/+22
| | | | (GH-115221)
* gh-115058: Add ``reset_rare_event_counters`` function in `_testinternalcapi` ↵Kirill Podoprigora2024-02-122-0/+18
| | | | (GH-115128)
* Remove outdated comment about py3.6 in `test_typing` (#115318)Nikita Sobolev2024-02-121-2/+0
|
* Add missing sections to blurbs (#114553)Hugo van Kemenade2024-02-123-0/+3
|
* gh-89039: Call subclass constructors in datetime.*.replace (GH-114780)Eugene Toder2024-02-123-21/+124
| | | | | | | | | When replace() method is called on a subclass of datetime, date or time, properly call derived constructor. Previously, only the base class's constructor was called. Also, make sure to pass non-zero fold values when creating subclasses in various methods. Previously, fold was silently ignored.
* gh-101100: Fix Sphinx warnings in `whatsnew/2.7.rst` and related (#115319)Hugo van Kemenade2024-02-129-100/+119
| | | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-114785: Remove content from `Porting from Python2` how-to (#114805)Nikita Sobolev2024-02-123-420/+19
| | | | | | Keep the page though, because people might still rely on it (the traffic shows that they do). Instead of our own manual we now give links to the 3rd-party ones. Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* gh-114563: C decimal falls back to pydecimal for unsupported format strings ↵John Belmonte2024-02-123-122/+88
| | | | | | | | | | | | | | | | | | (GH-114879) Immediate merits: * eliminate complex workarounds for 'z' format support (NOTE: mpdecimal recently added 'z' support, so this becomes efficient in the long term.) * fix 'z' format memory leak * fix 'z' format applied to 'F' * fix missing '#' format support Suggested and prototyped by Stefan Krah. Fixes gh-114563, gh-91060 Co-authored-by: Stefan Krah <skrah@bytereef.org>
* GH-114695: Add `sys._clear_internal_caches` (GH-115152)Brandt Bucher2024-02-1212-84/+130
|
* gh-87804: Fix error handling and style in `_pystatvfs_fromstructstatfs` ↵Nikita Sobolev2024-02-121-31/+33
| | | | (#115236)
* 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
|