summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* _ctypes callbacks.c uses _Py_COMP_DIAG_IGNORE_DEPR_DECLS (#105732)Victor Stinner2023-06-141-16/+20
| | | | | | Replace #pragma with _Py_COMP_DIAG_PUSH, _Py_COMP_DIAG_IGNORE_DEPR_DECLS and _Py_COMP_DIAG_POP to ease Python maintenance. Also add a comment explaining why callbacks.c ignores a deprecation warning.
* tarfile: Fix positional-only syntax in docs (GH-105770)Jelle Zijlstra2023-06-141-4/+4
| | | | | | | | The syntax used in the current docs (a / before any args) is invalid. I think the right approach is for the arguments to arbitrary filter functions to be treated as positional-only, meaning that users can supply filter functions with any names for the argument. tarfile.py only calls the filter function with positional arguments.
* gh-105587: Remove assertion from `_PyStaticObject_CheckRefcnt` (#105638)Eddie Elizondo2023-06-142-3/+5
|
* GH-89812: Clean up pathlib tests. (#104829)Barney Gale2023-06-141-84/+96
| | | | | | Clean up pathlib tests. Merge `PurePathTest` into `_BasePurePathTest`, and `PathTest` into `_BasePathTest`.
* gh-105751: test_ctypes avoids "from ctypes import *" (#105768)Victor Stinner2023-06-1448-83/+179
| | | | | | Using "import *" prevents linters like pyflakes to detect undefined names (usually missing imports). Replace c_voidp with c_void_p.
* gh-105751: test_ctypes.test_numbers uses top level imports (#105762)Victor Stinner2023-06-141-32/+8
| | | Moroever, c_ulonglong and c_bool are always available.
* gh-105751: test_ctypes gets Windows attrs from ctypes (#105758)Victor Stinner2023-06-1411-64/+75
| | | | | | | | | | | | | | | test_ctypes now gets attributes specific to Windows from the ctypes module, rather than relying on "from ctypes import *". Attributes: * ctypes.FormatError * ctypes.WINFUNCTYPE * ctypes.WinError * ctypes.WinDLL * ctypes.windll * ctypes.oledll * ctypes.get_last_error() * ctypes.set_last_error()
* gh-105699: Use a Thread-Local Variable for PKGCONTEXT (gh-105740)Eric Snow2023-06-144-1/+24
| | | This fixes a race during import. The existing _PyRuntimeState.imports.pkgcontext is shared between interpreters, and occasionally this would cause a crash when multiple interpreters were importing extensions modules at the same time. To solve this we add a thread-local variable for the value. We also leave the existing state (and infrequent race) in place for platforms that do not support thread-local variables.
* gh-104812: Skip Pending Calls Tests if No Threading (gh-105761)Eric Snow2023-06-141-0/+2
| | | This fixes the WASM buildbots.
* gh-105387: Limited C API implements Py_INCREF() as func (#105388)Victor Stinner2023-06-143-8/+18
| | | | | In the limited C API version 3.12, Py_INCREF() and Py_DECREF() functions are now implemented as opaque function calls to hide implementation details.
* GH-104554: Add RTSPS support to `urllib/parse.py` (#104605)zentarim2023-06-133-8/+9
| | | | | | | | | | | | | * GH-104554: Add RTSPS support to `urllib/parse.py` RTSPS is the permanent scheme defined in https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml alongside RTSP and RTSPU schemes. * 📜🤖 Added by blurb_it. --------- Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* gh-105436: Ignore unrelated errors when checking empty env (GH-105742)Steve Dower2023-06-131-3/+4
|
* gh-98040: Fix importbench: use types.ModuleType() (#105743)Victor Stinner2023-06-132-1/+4
| | | Replace removed imp.new_module(name) with types.ModuleType(name).
* gh-104812: Run Pending Calls in any Thread (gh-104813)Eric Snow2023-06-1316-118/+761
| | | For a while now, pending calls only run in the main thread (in the main interpreter). This PR changes things to allow any thread run a pending call, unless the pending call was explicitly added for the main thread to run.
* gh-102613: Bump recursion limit to fix running test_pathlib under Coverage ↵Łukasz Langa2023-06-131-1/+1
| | | | (#105744)
* gh-105481: add flags to each instr in the opcode metadata table, to replace ↵Irit Katriel2023-06-136-623/+679
| | | | opcode.hasarg/hasname/hasconst (#105482)
* gh-105733: Deprecate ctypes SetPointerType() and ARRAY() (#105734)Victor Stinner2023-06-135-9/+47
|
* gh-105603: Change the PyInterpreterConfig.own gil Field (gh-105620)Eric Snow2023-06-136-16/+40
| | | We are changing it to be more flexible that a strict bool can be for possible future expanded used cases.
* gh-105718: Fix buffer allocation in tokenizer with readline (#105728)Lysandros Nikolaou2023-06-133-5/+11
|
* gh-105373: Remove PyArg_Parse() deprecation (#105394)Victor Stinner2023-06-131-8/+16
| | | | | | There is no plan to deprecate PyArg_Parse(). The deprecation was added as a comment in the C API documentation in 2007 by commit 85eb8c103c9e460917911b43c6be302c30d75efb.
* gh-105713: Document that tokenize raises when mixing tabs/spaces (#105723)Lysandros Nikolaou2023-06-131-0/+3
| | | | | | * gh-105713: Document that tokenize raises when mixing tabs/spaces * Update Doc/whatsnew/3.12.rst Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* Fix magic number (GH-105722)Mark Shannon2023-06-131-3/+2
|
* GH-105678: Split MAKE_FUNCTION into MAKE_FUNCTION and SET_FUNCTION_ATTRIBUTE ↵Mark Shannon2023-06-1312-430/+480
| | | | (GH-105680)
* gh-105375: Improve error handling in _Unpickler_SetInputStream() (#105667)Erlend E. Aasland2023-06-132-13/+20
| | | | Prevent exceptions from possibly being overwritten in case of multiple failures.
* GH-105684: Require `asyncio.Task` implementations to support `set_name` ↵Kumar Aditya2023-06-135-16/+8
| | | | method (#105685)
* GH-104787: use bitfields in `_asyncio` (#104788)Kumar Aditya2023-06-131-7/+10
|
* gh-105540: Fix code generator tests (#105707)Guido van Rossum2023-06-121-128/+47
| | | | This involves expanding PEEK, POKE and JUMPBY macros, and removing super and register tests (those features no longer exist).
* gh-105375: Explicitly initialise all {Pickler,Unpickler}Object fields (#105686)Erlend E. Aasland2023-06-121-37/+53
| | | | | | All fields must be explicitly initialised to prevent manipulation of uninitialised fields in dealloc. Align initialisation order with the layout of the object structs.
* gh-105331: Change `asyncio.sleep` to raise ``ValueError` for nan (#105641)Jay2023-06-124-0/+24
| | | | Co-authored-by: Guido van Rossum <gvanrossum@gmail.com> Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* Remove support for legacy bytecode instructions (#105705)Guido van Rossum2023-06-123-22/+3
| | | | (A legacy instruction is of the form `instr(FOOBAR)`, i.e. missing the `(... -- ...)` stack/cache effect annotation.)
* gh-105229: Remove syntactic support for super-instructions (#105703)Guido van Rossum2023-06-122-143/+38
| | | It will not be used again.
* gh-105436: The environment block should end with two null wchar_t values ↵Dora2032023-06-123-1/+22
| | | | (GH-105495)
* gh-103968: PyType_FromMetaclass: Allow metaclasses with tp_new=NULL (GH-105386)Petr Viktorin2023-06-125-9/+53
|
* ARM64 clamping bug also exists in MSVC 14.35 (GH-105679)Steve Dower2023-06-121-1/+1
|
* gh-105673: Fix uninitialized warning in sysmodule.c (#105674)Nikita Sobolev2023-06-121-1/+1
| | | In sys_add_xoption(), 'value' may be uninitialized for some error paths.
* gh-105481: add pseudo-instructions to the bytecodes DSL (#105506)Irit Katriel2023-06-118-267/+507
|
* gh-105375: Harden pyexpat initialisation (#105606)Erlend E. Aasland2023-06-112-7/+14
| | | | Add proper error handling to add_errors_module() to prevent exceptions from possibly being overwritten.
* gh-105375: Improve error handling in the sys extension module (#105611)Erlend E. Aasland2023-06-112-6/+20
| | | | | In _PySys_AddXOptionWithError() and sys_add_xoption(), bail on first error to prevent exceptions from possibly being overwritten.
* gh-105375: Improve error handling in _ctypes (#105593)Erlend E. Aasland2023-06-112-4/+15
| | | | Prevent repeated PyLong_FromVoidPtr() from possibly overwriting the current exception.
* gh-105375: Improve error handling in PyUnicode_BuildEncodingMap() (#105491)Erlend E. Aasland2023-06-112-12/+19
| | | Bail on first error to prevent exceptions from possibly being overwritten.
* gh-105375: Improve PyErr_WarnExplicit() error handling (#105610)Erlend E. Aasland2023-06-112-12/+18
| | | | Bail on first error to prevent exceptions from possibly being overwritten.
* bpo-44185: Added close() to mock_open __exit__ (#26902)Samet YASLAN2023-06-113-3/+10
|
* gh-102676: Add more convenience properties to `dis.Instruction` (#103969)Tomas R2023-06-114-196/+435
| | | | | | | | Adds start_offset, cache_offset, end_offset, baseopcode, baseopname, jump_target and oparg to dis.Instruction. Also slightly improves the disassembly output by allowing opnames to overflow into the space reserved for opargs.
* Fix typo in configparser module docstring (#105652)litlighilit2023-06-111-1/+1
| | | "zc.buildbot" -> "zc.buildout"
* gh-105375: Improve error handling in the builtins extension module (#105585)Erlend E. Aasland2023-06-112-8/+34
|
* gh-105375: Improve _decimal error handling (#105605)Erlend E. Aasland2023-06-112-1/+6
| | | Fix a bug where an exception could end up being overwritten.
* gh-105375: Harden _datetime initialisation (#105604)Erlend E. Aasland2023-06-112-5/+32
| | | Improve error handling so init bails on the first exception.
* gh-105375: Improve array.array exception handling (#105594)Erlend E. Aasland2023-06-112-3/+7
| | | Fix a bug where 'tp_richcompare' could end up overwriting an exception.
* gh-105375: Harden _ssl initialisation (#105599)Erlend E. Aasland2023-06-112-5/+13
| | | | Add proper error handling to prevent reference leaks and overwritten exceptions.
* gh-80480: Emit DeprecationWarning for array's 'u' type code (#95760)Hugo van Kemenade2023-06-117-10/+48
|