summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* gh-92671: Don't omit parentheses when unparsing empty tuples (GH-92673)Batuhan Taskaya2022-05-163-1/+9
|
* gh-92820: Skip test_cppext if _ctypes is missing (#92844)Victor Stinner2022-05-163-4/+22
| | | Add @test.support.requires_venv_with_pip decorator.
* Speedup: build docs in parallel (GH-92733)Hugo van Kemenade2022-05-162-4/+4
|
* gh-81548: Clarify the deprecation of octal sequences affect byte strings ↵Pablo Galindo Salgado2022-05-161-2/+2
| | | | | (GH-92643) Automerge-Triggered-By: GH:pablogsal
* gh-90473: WASI: Mark tests that require os.pipe() (GH-92837)Christian Heimes2022-05-164-0/+14
|
* gh-87670: Add web.archive redirects from effbot (GH-92816)Stanley2022-05-163-4/+5
|
* gh-92530: Fix an issue that occurred after interrupting ↵Serhiy Storchaka2022-05-162-7/+16
| | | | | | | | threading.Condition.notify (GH-92534) If Condition.notify() was interrupted just after it released the waiter lock, but before removing it from the queue, the following calls of notify() failed with RuntimeError: cannot release un-acquired lock.
* Restore default role check in `make check`. (#92290)Ezio Melotti2022-05-154-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | * Restore default role check in `make check`. * Options first, then files. * Update `make.bat` too. * Add a comment explaining the extra options. * No reason to ignore the README.rst. * Enable default-role check in sphinx-lint. Co-authored-by: Julien Palard <julien@palard.fr> * Update sphinx-lint default-role check. * Fix use of the default role in the docs. * Update make.bat to check for the default role too. * Fix comment in make.bat. Co-authored-by: Julien Palard <julien@palard.fr>
* gh-89668: Optimize ZipFile file header processing algorithm to avoid ↵Jan Wolski2022-05-151-1/+1
| | | | unneeded IO(gh-25966)
* gh-92781: Avoid mixing declarations and code in C API (#92783)Victor Stinner2022-05-156-11/+20
| | | | | Avoid mixing declarations and code in the C API to fix the compiler warning: "ISO C90 forbids mixed declarations and code" [-Werror=declaration-after-statement].
* gh-90473: Fail subprocess early on Emscripten/WASI (GH-92802)Christian Heimes2022-05-142-6/+13
|
* GH-92804: Fix memory leak in memoryview iterator (gh-92805)Kumar Aditya2022-05-143-3/+6
|
* gh-90861: Memory optimization for set.issubset (gh-92799)Dong-hee Na2022-05-141-5/+5
|
* gh-92611: Link to PEP 594 sections & add key detail in doc deprecation ↵CAM Gerlach2022-05-1321-22/+46
| | | | notices (GH-92612)
* Fix numbers.Real.__rdivmod__ doc string (#31991)Géry Ogam2022-05-131-3/+3
|
* gh-91249: Remove .bat extension in documentation for when activating venv on ↵yashlad6812022-05-131-1/+1
| | | | Windows. (GH-92770)
* bpo-9182: Add a section on specifying positional arguments (#31810)slateny2022-05-132-2/+34
|
* Fix small typo (#92721)Gabi Nagy2022-05-131-1/+1
|
* gh-92446: Argparse choices should be a sequence (#92450)1809092022-05-131-1/+1
|
* Document Py_ssize_t. (GH-92512)Julien Palard2022-05-1310-24/+31
| | | | | | It fixes 252 errors from a Sphinx nitpicky run (sphinx-build -n). But there's 8182 errors left. Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
* gh-85858: Remove PyUnicode_InternImmortal() function (#92579)Victor Stinner2022-05-137-67/+27
| | | | | | | | | | | | | | | | | Remove the PyUnicode_InternImmortal() function and the SSTATE_INTERNED_IMMORTAL macro. The PyUnicode_InternImmortal() function is still exported in the stable ABI. The function is removed from the API. PyASCIIObject.state.interned size is now a single bit, rather than 2 bits. Keep SSTATE_NOT_INTERNED and SSTATE_INTERNED_MORTAL macros for backward compatibility, but no longer use them internally since the interned member is now a single bit and so can only have two values (interned or not interned). Update stats of _PyUnicode_ClearInterned().
* gh-89653: Use int type for Unicode kind (#92704)Victor Stinner2022-05-1313-52/+49
| | | | Use the same type that PyUnicode_FromKindAndData() kind parameter type (public C API): int.
* GH-92236: Remove spurious "line" event when starting coroutine or generator. ↵Mark Shannon2022-05-134-0/+107
| | | | (GH-92722)
* gh-89653: PEP 670: Convert PyUnicode_KIND() macro to function (#92705)Victor Stinner2022-05-133-10/+21
| | | | | | | | In the limited C API version 3.12, PyUnicode_KIND() is now implemented as a static inline function. Keep the macro for the regular C API and for the limited C API version 3.11 and older to prevent introducing new compiler warnings. Update _decimal.c and stringlib/eq.h for PyUnicode_KIND().
* 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()