summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* gh-90473: Increase stack size, disable obmalloc on WASI (GH-92732)Christian Heimes2022-05-135-10/+44
|
* gh-92536: Doc update about Py_UNICODE removal (GH-92756)Inada Naoki2022-05-132-3/+3
|
* gh-92584: test_cppext uses setuptools (#92639)Victor Stinner2022-05-122-67/+77
| | | | Rewrite test_cppext to run in a virtual environment and to build the C++ extension with setuptools rather than distutils.
* gh-92311: Add tests for frame_setlineno jumping over listcomps (#92741)Dennis Sweeney2022-05-121-0/+48
|
* Check result of utc_to_seconds and skip fold probe in pure Python (#91582)Paul Ganssle2022-05-125-38/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `utc_to_seconds` call can fail, here's a minimal reproducer on Linux: TZ=UTC python -c "from datetime import *; datetime.fromtimestamp(253402300799 + 1)" The old behavior still raised an error in a similar way, but only because subsequent calculations happened to fail as well. Better to fail fast. This also refactors the tests to split out the `fromtimestamp` and `utcfromtimestamp` tests, and to get us closer to the actual desired limits of the functions. As part of this, we also changed the way we detect platforms where the same limits don't necessarily apply (e.g. Windows). As part of refactoring the tests to hit this condition explicitly (even though the user-facing behvior doesn't change in any way we plan to guarantee), I noticed that there was a difference in the places that `datetime.utcfromtimestamp` fails in the C and pure Python versions, which was fixed by skipping the "probe for fold" logic for UTC specifically — since UTC doesn't have any folds or gaps, we were never going to find a fold value anyway. This should prevent some failures in the pure python `utcfromtimestamp` method on timestamps close to 0001-01-01. There are two separate news entries for this because one is a potentially user-facing change, the other is an internal code correctness change that, if anything, changes some error messages. The two happen to be coupled because of the test refactoring, but they are probably best thought of as independent changes. Fixes GH-91581
* Add notes for maintaining ABCs (#92736)Raymond Hettinger2022-05-122-0/+51
|
* gh-91578: improved error message when trying to instantiate an abstract ↵ravi1402222022-05-124-8/+9
| | | | class with missing methods (gh-47246)
* gh-92514: Remove unused test.support.BasicTestRunner (#92515)Jelle Zijlstra2022-05-123-14/+2
|
* gh-92436: __future__ docs: add note on expectations for "from __future__ ↵Jelle Zijlstra2022-05-121-1/+9
| | | | import annotations" (#92568)
* Update outdated `LOAD_METHOD` comments in `Python/ceval.c` (GH-92641)Crowthebird2022-05-121-2/+2
|
* gh-92536: PEP 623: Remove wstr and legacy APIs from Unicode (GH-92537)Inada Naoki2022-05-1235-2088/+197
|
* gh-86388 Remove deprecated behaviors in randrange() (#92677)Raymond Hettinger2022-05-125-102/+73
|
* Fix typo in argparse docs. (GH-92691)thueringa2022-05-121-1/+1
| | | | | | | | | | | | | # Fix typo in argparse docs. > Sometimes, when dealing with **a** particularly long argument list**s**, [...] Mixture between plural and singular forms is incorrect. Use singular consistently since typically only a single argument list is employed. Change to: > Sometimes, when dealing with a particularly long argument list, [...] No issue was opened, since this is a trivial change. Automerge-Triggered-By: GH:rhettinger
* gh-89653: PEP 670: Fix Sphinx syntax in Unicode doc (#92707)Victor Stinner2022-05-121-4/+4
|
* gh-89653: PEP 670: unicodeobject.h uses _Py_CAST() (#92696)Victor Stinner2022-05-112-9/+15
| | | | | | | | | | Use _Py_CAST() and _Py_STATIC_CAST() in macros wrapping static inline functions of unicodeobject.h. Change also the kind type from unsigned int to int: same parameter type than PyUnicode_FromKindAndData(). The limited API version 3.11 no longer casts arguments to expected types.
* gh-89653: PEP 670: Update C API unicode documentation (#92702)Victor Stinner2022-05-111-10/+11
|
* gh-89653: PEP 670: Convert PyDict_GET_SIZE() macro to function (#92695)Victor Stinner2022-05-111-1/+9
| | | The limited C API version 3.12 no longer casts the argument.
* Fix minor documentation error in bisect docs (GH-92697)Steve Dower2022-05-111-1/+1
|
* gh-92031, test_embed: Improve test for unquickening static code (#92440)Dennis Sweeney2022-05-111-10/+30
|
* gh-89653: PEP 670: Use PyObject* type for parameters (#92694)Victor Stinner2022-05-113-15/+20
| | | | | | | | | Use the PyObject* type for parameters of static inline functions: * Py_SIZE(): same parameter type than PyObject_Size() * PyList_GET_SIZE(), PyList_SET_ITEM(): same parameter type than PyList_Size() and PyList_SetItem() * PyTuple_GET_SIZE(), PyTuple_SET_ITEM(): same parameter type than PyTuple_Size() and PyTuple_SetItem().
* gh-89653: Add assertions to unicodeobject.h functions (#92692)Victor Stinner2022-05-111-2/+8
|
* gh-89653: PEP 670: Limited API doesn't cast arguments (#92654)Victor Stinner2022-05-113-3/+13
| | | | | | | | The limited API version 3.11 no longer casts arguments to expected types of functions of functions: * PyList_GET_SIZE(), PyList_SET_ITEM() * PyTuple_GET_SIZE(), PyTuple_SET_ITEM() * PyWeakref_GET_OBJECT()
* gh-89653: PEP 670: Convert unicodeobject.h macros to functions (#92648)Victor Stinner2022-05-111-48/+66
| | | | | | | | | | | | | | | | | | | | Convert the following Unicode macros to static inline functions. Surrogate functions: * Py_UNICODE_IS_SURROGATE() * Py_UNICODE_IS_HIGH_SURROGATE() * Py_UNICODE_IS_LOW_SURROGATE() * Py_UNICODE_HIGH_SURROGATE() * Py_UNICODE_LOW_SURROGATE() * Py_UNICODE_JOIN_SURROGATES() "Is" functions: * Py_UNICODE_ISALNUM() * Py_UNICODE_ISSPACE() In the implementation of these functions, the character type is now well defined to Py_UCS4.
* gh-90978: asyncio TestSSL uses SHORT_TIMEOUT (#92642)Victor Stinner2022-05-111-10/+13
| | | | TestSSL of asyncio now uses support.SHORT_TIMEOUT rather than hardcoded timeouts like 5, 10 or 40 seconds.
* gh-89653: PEP 670: Convert PyCell macros to functions (#92653)Victor Stinner2022-05-113-11/+25
| | | | | | | | | | | Convert the following macros to static inline functions: * PyCell_GET() * PyCell_SET() Limited C API version 3.12 no longer casts arguments. Fix also usage of PyCell_SET(): only delete the old value after setting the new value.
* gh-92651: Remove the Include/token.h header file (#92652)Victor Stinner2022-05-1113-39/+52
| | | | | | | | | | | | | | | Remove the token.h header file. There was never any public tokenizer C API. The token.h header file was only designed to be used by Python internals. Move Include/token.h to Include/internal/pycore_token.h. Including this header file now requires that the Py_BUILD_CORE macro is defined. It no longer checks for the Py_LIMITED_API macro. Rename functions: * PyToken_OneChar() => _PyToken_OneChar() * PyToken_TwoChars() => _PyToken_TwoChars() * PyToken_ThreeChars() => _PyToken_ThreeChars()
* bpo-42627: Fix incorrect parsing of Windows registry proxy settings (GH-26307)狂男风2022-05-112-16/+21
|
* gh-89653: PEP 670: Convert pycore_gc.h macros to functions (#92649)Victor Stinner2022-05-112-24/+50
| | | | | | | | | | | | | | Convert the following macros to static inline functions: * _Py_AS_GC() * _PyGCHead_FINALIZED(), _PyGCHead_SET_FINALIZED() * _PyGCHead_NEXT(), _PyGCHead_SET_NEXT() * _PyGCHead_PREV(), _PyGCHead_SET_PREV() * _PyGC_FINALIZED(), _PyGC_SET_FINALIZED() * _PyObject_GC_IS_TRACKED() * _PyObject_GC_MAY_BE_TRACKED() Add a macro wrapping the _PyObject_GC_IS_TRACKED() function to cast the argument to PyObject*.
* gh-91810: ElementTree: Use text file's encoding by default in XML ↵Serhiy Storchaka2022-05-113-30/+29
| | | | | | | | declaration (GH-91903) ElementTree method write() and function tostring() now use the text file's encoding ("UTF-8" if not available) instead of locale encoding in XML declaration when encoding="unicode" is specified.
* gh-89336: Fix configparser.RawConfigParser.readfp typo (GH-92636)Hugo van Kemenade2022-05-111-1/+1
|
* Fix typo in unittest.rst: addCleanupModule -> addModuleCleanup (GH-92631)Mikhail Terekhov2022-05-111-1/+1
|
* gh-92632: Make function starunpack_helper run faster when encounters starred ↵zikcheng2022-05-111-0/+1
| | | | argument. (GH-92655)
* gh-92550: Fix pathlib.Path.rglob() for empty pattern (GH-92604)Serhiy Storchaka2022-05-113-1/+7
|
* Revert "gh-92550 - Fix regression in `pathlib.Path.rglob()` (GH-92583)" ↵Serhiy Storchaka2022-05-115-2/+38
| | | | | (GH-92598) This reverts commit dcdf250d2de1428f7d8b4e9ecf51d2fd8200e21a.
* gh-92584: test_decimal uses shutil.which() (#92640)Victor Stinner2022-05-101-2/+2
| | | | test_decimal now uses shutil.which() rather than deprecated distutils.spawn.find_executable().
* What's New 3.12: PyFrame_BlockSetup() was removed in 3.11 (#92645)Victor Stinner2022-05-101-2/+0
| | | | | | What's New in Python 3.11: "PyFrame_BlockSetup() and PyFrame_BlockPop() have been removed. (Contributed by Mark Shannon in bpo-40222.)" https://docs.python.org/dev/whatsnew/3.11.html#id8
* gh-91966 Document where key functions are applied in the bisect module (#92602)Raymond Hettinger2022-05-101-15/+52
|
* bpo-39264: Fix UserDict.get() to account for __missing__() (GH-17910)Bar Harel2022-05-103-1/+19
| | | | | | Here's the patch according to the discussion at the [Python-Dev mailing list](https://mail.python.org/archives/list/python-dev@python.org/thread/SDXOEMAEM6KQ3CQCJVBVRT5QNSPAVU6X/). UserDict.get() will match dict's behavior and not call `__missing__`. Automerge-Triggered-By: GH:rhettinger
* bpo-39278: add docstrings to functions in pdb module (#17924)Carl Bordum Hansen2022-05-101-0/+39
|
* bpo-43689: improve documentation for Differ (GH-25132)Jürgen Gmach2022-05-102-1/+2
| | | | | | | | | Lines beginning with ``?`` try to help understanding the given diff. The output can be hard to understand when it contains whitespace characters, such as spaces, tabs or line breaks. While previously only tabs were mentioned, now all are listed. Automerge-Triggered-By: GH:rhettinger
* gh-84131: Remove the deprecated pathlib.Path.link_to method. (#92505)Gregory P. Smith2022-05-105-59/+7
| | | Co-authored-by: Barney Gale <barney.gale@gmail.com>
* Update numbers.rst (#31995)Géry Ogam2022-05-101-2/+2
|
* bpo-42259: clarify pprint saferepr docs (#30256)andrei kulakov2022-05-101-5/+9
|
* gh-80143: Add clarification for escape characters (#92292)slateny2022-05-101-3/+7
|
* gh-91731: Fix typo in pymacro.h (#92618)Pablo Galindo Salgado2022-05-101-1/+1
| | | | | | | | | * Fix typo in pymacro.h * Update Include/pymacro.h Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-92619: Fix bug where the compiler duplicates exit blocks unnecessarily ↵Irit Katriel2022-05-103-16/+17
| | | | (GH-92620)
* Add `__slots__` to `typing._NotIterable` (GH-92570)Alex Waygood2022-05-101-0/+1
|
* gh-92256: Improve Argument Clinic parser error messages (#92268)Erlend Egeberg Aasland2022-05-101-3/+9
| | | | Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-76773: Update docs mentioning no-longer-supported Windows versions & ↵CAM Gerlach2022-05-109-115/+70
| | | | features (GH-92529)
* gh-92417: `zlib` docs, `binascii` docs: remove Python 2 compatibility notes ↵Alex Waygood2022-05-102-6/+0
| | | | (GH-92543)