summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gh-101561: Add typing.override decorator (#101564)Steven Troxler2023-02-276-0/+127
| | | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-101825: Clarify that as_integer_ratio() output is always normalized (#101843)Sergey B Kirpichev2023-02-277-27/+21
| | | | | | | | | Make docstrings for `as_integer_ratio` consistent across types, and document that the returned pair is always normalized (coprime integers, with positive denominator). --------- Co-authored-by: Owain Davies <116417456+OTheDev@users.noreply.github.com> Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
* gh-101773: Optimize creation of Fractions in private methods (#101780)Sergey B Kirpichev2023-02-274-34/+50
| | | | | | This PR adds a private `Fraction._from_coprime_ints` classmethod for internal creations of `Fraction` objects, replacing the use of `_normalize=False` in the existing constructor. This speeds up creation of `Fraction` objects arising from calculations. The `_normalize` argument to the `Fraction` constructor has been removed. Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com> Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
* gh-102251: Updates to test_imp Toward Fixing Some Refleaks (gh-102254)Eric Snow2023-02-274-299/+952
| | | | | | | This is related to fixing the refleaks introduced by commit 096d009. I haven't been able to find the leak yet, but these changes are a consequence of that effort. This includes some cleanup, some tweaks to the existing tests, and a bunch of new test cases. The only change here that might have impact outside the tests in question is in imp.py, where I update imp.load_dynamic() to use spec_from_file_location() instead of creating a ModuleSpec directly. Also note that I've updated the tests to only skip if we're checking for refleaks (regrtest's --huntrleaks), whereas in gh-101969 I had skipped the tests entirely. The tests will be useful for some upcoming work and I'd rather the refleaks not hold that up. (It isn't clear how quickly we'll be able to fix the leaking code, though it will certainly be done in the short term.) https://github.com/python/cpython/issues/102251
* gh-102296 Document that inspect.Parameter kinds support ordering (GH-102297)Gouvernathor2023-02-271-2/+3
| | | Automerge-Triggered-By: GH:AlexWaygood
* gh-102250: Fix double-decref in COMPARE_AND_BRANCH error case (GH-102287)Dennis Sweeney2023-02-274-6/+23
|
* gh-101100: Fix sphinx warnings in `types` module (#102274)Nikita Sobolev2023-02-271-1/+1
| | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-91038: Change default argument value to `False` instead of `0` (#31621)Rotzbua2023-02-273-2/+3
| | | | | | The argument is used as a switch and corresponds to a boolean logic. Therefore it is more intuitive to use the corresponding constant `False` as default value instead of the integer `0`. Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
* gh-101765: unicodeobject: use Py_XDECREF correctly (#102283)Jelle Zijlstra2023-02-261-1/+1
|
* [doc] Improve grammar/fix missing word (GH-102060)VMan2023-02-262-2/+2
|
* gh-102259: Fix re doc issue regarding right square brackets (#102264)Skip Montanaro2023-02-261-1/+2
| | | Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* gh-101765: Fix refcount issues in list and unicode pickling (#102265)Jelle Zijlstra2023-02-262-1/+11
| | | Followup from #101769.
* gh-101100: Fix sphinx warnings in `typing` module docs (#102260)Nikita Sobolev2023-02-251-1/+1
|
* gh-102252: Improve coverage of test_bool.py (#102253)Eclips42023-02-251-0/+6
| | | Add tests for conversion from bool to complex.
* gh-102209: Sync with zipp 3.15 moving complexity tests into dedicated module ↵Jason R. Coombs2023-02-257-51/+87
| | | | | (#102232) Sync with jaraco/zipp@757a4e1a.
* asyncio docs: Fix dangling hyphen (#102227)Jelle Zijlstra2023-02-251-2/+2
| | | Currently this gets rendered with a dangling hyphen.
* gh-101997: Update bundled pip version to 23.0.1 (#101998)Pradyun Gedam2023-02-253-1/+2
|
* gh-101100: Fix Sphinx warnings in `decimal` module (#102125)Hugo van Kemenade2023-02-251-84/+84
| | | | Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* GH-102126: fix deadlock at shutdown when clearing thread states (#102222)Kumar Aditya2023-02-252-3/+11
|
* gh-95675: fix uid and gid at test_add_dir_getmember (gh-102207)SKO2023-02-252-6/+8
| | | Co-authored-by: Seonkyo Ok <seonkyo.ok@linecorp.com>
* gh-101765: Fix SystemError / segmentation fault in iter `__reduce__` when ↵Ionite2023-02-249-23/+148
| | | | internal access of `builtins.__dict__` exhausts the iterator (#101769)
* gh-102209: Disable the timeout in test_implied_dirs_performance. (#102225)Jason R. Coombs2023-02-241-1/+2
| | | Disable the timeout in test_implied_dirs_performance. Workaround for #102209 until I can work out a more robust test for linearity.
* gh-102192: Replace PyErr_Fetch/Restore etc by more efficient alternatives ↵Irit Katriel2023-02-2418-169/+136
| | | | (in Modules/) (#102196)
* gh-101476: Use _PyType_GetModuleState where applicable (#102188)Erlend E. Aasland2023-02-249-15/+19
|
* gh-102105 Fix wording in filterfalse/quantify/filter (GH-102189)Stefan Pochmann2023-02-242-4/+4
|
* Remove references to old Windows source files from internal documentation ↵Max Bachmann2023-02-241-5/+0
| | | | (GH-102216)
* gh-102141: replace use of getpid on Windows with GetCurrentProcessId (GH-102142)Max Bachmann2023-02-244-7/+17
|
* gh-81652: Add MAP_ALIGNED_SUPER FreeBSD and MAP_CONCEAL OpenBSD constants ↵Yeojin Kim2023-02-244-3/+20
| | | | (gh-102191)
* gh-102158: Add tests for `softkwlist` (#102159)Eclips42023-02-241-0/+18
| | | | | --------- Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* Fix deadlock on shutdown if test_current_{exception,frames} fails (#102019)Jacob Bower2023-02-232-73/+77
| | | | | | | | | | | | | | | | * Don't deadlock on shutdown if test_current_{exception,frames} fails These tests spawn a thread that waits on a threading.Event. If the test fails any of its assertions, the Event won't be signaled and the thread will wait indefinitely, causing a deadlock when threading._shutdown() tries to join all outstanding threads. Co-authored-by: Brett Simmers <bsimmers@meta.com> * Add a news entry * Fix whitespace --------- Co-authored-by: Brett Simmers <bsimmers@meta.com> Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
* gh-101476: Add _PyType_GetModuleState (GH-101477)Erlend E. Aasland2023-02-232-1/+18
| | | For fast module state access from heap type methods.
* gh-99108: Followup fix for Modules/Setup (GH-102183)Jonathan Protzenko2023-02-231-2/+2
| | | Automerge-Triggered-By: GH:erlend-aasland
* gh-93649: Split exception tests from _testcapimodule.c (GH-102173)Erlend E. Aasland2023-02-238-416/+434
| | | Automerge-Triggered-By: GH:erlend-aasland
* gh-101981: Consolidate macOS configure steps in CI (GH-102131)Erlend E. Aasland2023-02-231-5/+3
| | | Automerge-Triggered-By: GH:erlend-aasland
* gh-102151: Correctly fetch CONFIG_ARGS in Tools/freeze/test/freeze.py (#102152)Erlend E. Aasland2023-02-231-1/+1
|
* bpo-23224: Fix segfaults and multiple leaks in the lzma and bz2 modules ↵Zackery Spytz2023-02-237-175/+288
| | | | | | | | | | | | | (GH-7822) lzma.LZMADecompressor and bz2.BZ2Decompressor objects caused segfaults when their `__init__()` methods were not called. lzma.LZMADecompressor, lzma.LZMACompressor, bz2.BZ2Compressor, and bz2.BZ2Decompressor objects would leak locks and internal buffers when their `__init__()` methods were called multiple times. https://bugs.python.org/issue23224
* Fix typo in `Py_GetPythonHome` signature (#102168)Tanner Firl2023-02-231-1/+1
|
* gh-101578: Fixup NEWS and add What's New entry for new exception APIs (#102157)Erlend E. Aasland2023-02-232-11/+26
|
* GH-100719: Remove redundant `gi_code` field from generator object. (GH-100749)Mark Shannon2023-02-239-61/+116
|
* Revert "bpo-46978: Correct docstrings for in-place builtin operators #31802) ↵Irit Katriel2023-02-232-2/+1
| | | | | | | (#102146) Revert "bpo-46978: Correct docstrings for in-place builtin operators (#31802)" This reverts commit 128379b8cdb88a6d3d7fed24df082c9a654b3fb8.
* gh-87634: remove locking from functools.cached_property (GH-101890)Carl Meyer2023-02-235-54/+35
| | | Remove the undocumented locking capabilities of functools.cached_property.
* Fix syntax error in struct doc example (#102160)Terry Jan Reedy2023-02-221-1/+1
| | | | Missing closing ) reported on Discuss by Chukwudi Nwachukwu.
* gh-99108: Import MD5 and SHA1 from HACL* (#102089)Jonathan Protzenko2023-02-2224-699/+2498
| | | Replaces our fallback non-OpenSSL MD5 and SHA1 implementations with those from HACL* as we've already done with SHA2.
* GH-101777: `queue.rst`: use 2 spaces after a period to be consistent. (#102143)Owain Davies2023-02-221-8/+8
|
* Few coverage nitpicks for the cmath module (#102067)Sergey B Kirpichev2023-02-223-2/+13
| | | | | | | | | | | - partial tests for cosh/sinh overflows (L535 and L771). I doubt both ||-ed conditions could be tested. - removed inaccessible case in sqrt (L832): ax=ay=0 is handled above (L823) because fabs() is exact. Also added test (checked with mpmath and gmpy2) for second condition on that line. - some trivial tests for isclose (cover all conditions on L1217-1218) - add comment for uncovered L1018 Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
* GH-100982: Restrict `FOR_ITER_RANGE` to a single instruction to allow ↵Mark Shannon2023-02-224-30/+22
| | | | instrumentation. (GH-101985)
* gh-102135: Update turtle docs to rename wikipedia demo to rosette (#102137)somebody2023-02-221-3/+3
|
* gh-99942: python.pc on android/cygwin should link to libpython per ↵Eli Schwartz2023-02-222-1/+3
| | | | | | | | | configure.ac (GH-100356) In commit 254b309c801f82509597e3d7d4be56885ef94c11 a previous change to avoid linking to libpython was partially reverted for Android (and later Cygwin as well), to add back the link flags. This was applied to distutils and to python-config.sh, but not to python.pc. Add it back to python.pc as well. Automerge-Triggered-By: GH:gpshead
* gh-95672 fix typo SkitTest to SkipTest (gh-102119)Hyunkyun Moon2023-02-213-2/+3
| | | Co-authored-by: HyunKyun Moon <hyunkyun.moon@linecorp.com>
* gh-101936: Update the default value of fp from io.StringIO to io.BytesIO ↵Vo Hoang Long2023-02-214-1/+5
| | | | | (gh-102100) Co-authored-by: Long Vo <long.vo@linecorp.com>