summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Rewrite audio.py to jive with image.py (#91886)Barry Warsaw2022-04-246-64/+78
| | | | | | | Similar to the rewrite of email/mime/image.py and associated test after the deprecation of imghdr.py, thisrewrites email/mime/audio.py and associated tests after the deprecation of sndhdr.py. Closes #91885
* gh-91821: Make decimal test succeed consistently (#91825)Jelle Zijlstra2022-04-242-0/+2
| | | | | | | The test relies on precision being set to 9, but some ways of invoking this test leave it set to 28 instead. I don't know exactly how it happens, but setting the precision directly should make the behavior consistent.
* gh-91491: What's New in 3.11 section for typing PEPs (#91721)Jelle Zijlstra2022-04-241-2/+133
| | | | | Other aspects of typing aren't covered yet; I'll do that in a separate PR.
* Simplify testing the warning filename (GH-91868)Serhiy Storchaka2022-04-248-43/+43
| | | The context manager result has the "filename" attribute.
* gh-91230: Concise catch_warnings with simplefilter (#91435)Zac Hatfield-Dodds2022-04-245-2/+49
|
* gh-91217: deprecate spwd (#91846)Brett Cannon2022-04-234-1/+13
| | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* RE: Pre-split the list of opcode names (GH-91859)Serhiy Storchaka2022-04-231-70/+71
| | | | 1. It makes them interned. 2. It allows to add comments to individual opcodes.
* gh-84461: Add --enable-wasm-pthreads and more file systems (GH-91820)Christian Heimes2022-04-235-63/+161
|
* gh-91308: Simplify parsing inline flag "x" (verbose) (GH-91855)Serhiy Storchaka2022-04-231-16/+4
|
* RE: Add more tests for inline flag "x" and re.VERBOSE (GH-91854)Serhiy Storchaka2022-04-231-5/+27
|
* gh-84461: Add sys._emscripten_info, improve docs and build (gh-91781)Christian Heimes2022-04-238-123/+263
|
* gh-88116: Enhance the inspect frame APIs to use the extended position ↵Pablo Galindo Salgado2022-04-235-38/+193
| | | | information (GH-91531)
* gh-85864: Mark positional-only args in io docs (#91683)slateny2022-04-231-10/+10
|
* gh-91547: Remove "Undocumented modules" page (#91682)Shantanu2022-04-223-27/+1
|
* gh-91217: deprecate-sndhdr (#91806)Brett Cannon2022-04-226-16/+49
| | | | | Also inline necessary functionality from `sndhdr` into `email.mime.audio` for `MIMEAudio`. Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* bpo-46720: Add support for path-like objects to ↵Géry Ogam2022-04-225-8/+34
| | | | | multiprocessing.set_executable for Windows (GH-31279) This bring the API to be on a par with Unix-like systems.
* gh-91575: Add a script for generating data for case-insensitive matching in ↵Serhiy Storchaka2022-04-225-57/+212
| | | | | re (GH-91660) Also test that all extra cases are in BMP.
* gh-91700: Validate the group number in conditional expression in RE (GH-91702)Serhiy Storchaka2022-04-223-0/+16
| | | | | | In expression (?(group)...) an appropriate re.error is now raised if the group number refers to not defined group. Previously it raised RuntimeError: invalid SRE code.
* gh-90568: Fix exception type for \N with a named sequence in RE (GH-91665)Serhiy Storchaka2022-04-223-2/+9
| | | re.error is now raised instead of TypeError.
* gh-89279: In ceval.c, redefine some macros for speed (#32387)Guido van Rossum2022-04-222-13/+61
| | | | | | | | | | | Macros Py_DECREF, Py_XDECREF, Py_IS_TYPE, _Py_atomic_load_32bit_impl and _Py_DECREF_SPECIALIZED are redefined as macros that completely replace the inline functions of the same name. These three came out in the top four of functions that (in MSVC) somehow weren't inlined. Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
* gh-91764: Mark version typing.Unpack and LiteralString were added in (#91817)Dominic Davis-Foster2022-04-221-0/+4
| | | Closes GH-91764
* gh-89653: PEP 670: Amend docs (GH-91813)Erlend Egeberg Aasland2022-04-224-17/+18
|
* gh-80527: Deprecate PEP 623 Unicode functions (#91801)Victor Stinner2022-04-222-5/+14
| | | | | | | | | | | Deprecate functions: * PyUnicode_AS_DATA() * PyUnicode_AS_UNICODE() * PyUnicode_GET_DATA_SIZE() * PyUnicode_GET_SIZE() Previously, these functions were macros and so it wasn't possible to decorate them with Py_DEPRECATED().
* Docs: Clarify availability of PyOS_CheckStack (GH-91816)Petr Viktorin2022-04-222-3/+4
|
* gh-91291: Accept attributes as keyword arguments in decimal.localcontext ↵Sam Ezeh2022-04-226-62/+161
| | | | | (#32242) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* bpo-43224: Implement pickling of TypeVarTuples (#32119)Matthew Rahtz2022-04-222-7/+74
| | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-91217: deprecate-pipes (GH-91779)Brett Cannon2022-04-224-1/+8
|
* gh-69093: Add indexing and slicing support to sqlite3.Blob (#91599)Erlend Egeberg Aasland2022-04-225-16/+349
| | | | Authored-by: Aviv Palivoda <palaviv@gmail.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@innova.no>
* gh-91156: Use `locale.getencoding()` instead of getpreferredencoding (GH-91732)Inada Naoki2022-04-2214-44/+29
| | | Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-89653: Add assertions to unicodeobject.h functions (#91800)Victor Stinner2022-04-211-0/+7
|
* gh-89653: PEP 670: Convert unicodeobject.h macros to functions (#91799)Victor Stinner2022-04-211-18/+44
| | | | | | | | | | | | Convert unicodeobject.h macros to static inline functions: * PyUnicode_AS_DATA() * PyUnicode_AS_UNICODE() * PyUnicode_GET_DATA_SIZE() * PyUnicode_GET_SIZE() Static inline functions are wrapped by macros which casts arguments with _PyObject_CAST() to prevent introducing new compiler warnings when passing "const PyObject*".
* gh-89373: _Py_Dealloc() checks tp_dealloc exception (#32357)Victor Stinner2022-04-214-3/+50
| | | | If Python is built in debug mode, _Py_Dealloc() now ensures that the tp_dealloc function leaves the current exception unchanged.
* gh-79315: Add Include/cpython/pythread.h header (#91798)Victor Stinner2022-04-215-44/+50
|
* gh-79315: Add Include/cpython/modsupport.h header (#91797)Victor Stinner2022-04-215-106/+118
|
* gh-89653: PEP 670: Group deprecated API in unicodeobject.h (#91796)Victor Stinner2022-04-211-56/+58
|
* gh-91768: C API no longer use "const PyObject*" type (#91769)Victor Stinner2022-04-215-26/+32
| | | | | | | | | | | | | Py_REFCNT(), Py_TYPE(), Py_SIZE() and Py_IS_TYPE() functions argument type is now "PyObject*", rather than "const PyObject*". * Replace also "const PyObject*" with "PyObject*" in functions: * _Py_strhex_impl() * _Py_strhex_with_sep() * _Py_strhex_bytes_with_sep() * Remove _PyObject_CAST_CONST() and _PyVarObject_CAST_CONST() macros. * Py_IS_TYPE() can now use Py_TYPE() in its implementation.
* gh-89653: PEP 670: Convert unicodeobject.h macros to functions (#91773)Victor Stinner2022-04-211-57/+74
| | | | | | | | | | | | | | | | | Convert unicodeobject.h macros to static inline functions: * PyUnicode_MAX_CHAR_VALUE() * PyUnicode_READ() * PyUnicode_READY() * PyUnicode_READ_CHAR() * PyUnicode_WRITE() Move PyUnicode_READY() after _PyUnicode_Ready(), since it uses _PyUnicode_Ready(). Static inline functions are wrapped by macros which casts arguments with _PyObject_CAST() and casts 'kind' arguments to "unsigned int" to prevent introducing new compiler warnings when passing "const PyObject*".
* GH-91719: Make MSVC generate somewhat faster switch code (#91718)Guido van Rossum2022-04-214-3/+90
| | | | | | | | | | | Apparently a switch on an 8-bit quantity where all cases are present generates a more efficient jump (doing only one indexed memory load instead of two). So we make opcode and use_tracing uint8_t, and generate a macro full of extra `case NNN:` lines for all unused opcodes. See https://github.com/faster-cpython/ideas/issues/321#issuecomment-1103263673
* GH-88116: Document that PyCodeNew is dangerous, and make PyCode_NewEmpty ↵Mark Shannon2022-04-214-7/+39
| | | | less dangerous. (GH-91790)
* GH-88756: Update docs for PEP 523 eval function type. (GH-91788)Mark Shannon2022-04-212-1/+8
|
* bpo-47169: Export PyOS_CheckStack on Windows (GH-32414)Petr Viktorin2022-04-213-0/+3
|
* GH-88116: Use a compact format to represent end line and column offsets. ↵Mark Shannon2022-04-2120-533/+853
| | | | | | | | | | | | (GH-91666) * Stores all location info in linetable to conform to PEP 626. * Remove column table from code objects. * Remove end-line table from code objects. * Document new location table format
* gh-89653: PEP 670: Convert tuple macros to functions (#91786)Victor Stinner2022-04-212-11/+29
| | | | | | | | | | | | | | Convert macros to static inline functions: * PyTuple_GET_SIZE() * PyTuple_SET_ITEM() * PyList_GET_SIZE() * PyList_SET_ITEM() Add a macro converting arguments to PyTupleObject*, PyListObject* or PyObject* to prevent emitting new compiler warnings. According to PEP 670, PyTuple_GET_ITEM() and PyList_GET_ITEM() are left as macros.
* gh-91782: Define static_assert() macro on FreeBSD (#91787)Victor Stinner2022-04-211-0/+9
| | | | | On FreeBSD, if the static_assert() macro is not defined, define it in Python until <sys/cdefs.h> supports C11: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255290
* gh-89653: PEP 670: Convert PyWeakref_GET_OBJECT() to function (#91785)Victor Stinner2022-04-211-10/+16
| | | | | | Convert the PyWeakref_GET_OBJECT() macro to a static inline function. Add an assertion to check the argument with PyWeakref_Check(). Add a macro converting the argument to PyObject* to prevent emitting new compiler warning.
* gh-91636: Don't clear required fields of function objects (GH-91651)Dennis Sweeney2022-04-213-3/+79
|
* bpo-42066: CookieJar cookies should not be sorted (GH-22745)Iman Kermani2022-04-213-12/+9
|
* gh-90623: signal.raise_signal() calls PyErr_CheckSignals() (#91756)Victor Stinner2022-04-213-1/+19
| | | | signal.raise_signal() and os.kill() now call PyErr_CheckSignals() to check immediately for pending signals.
* Revert "gh-85567: Register a cleanup function to close files for FileType ↵Victor Stinner2022-04-213-11/+3
| | | | | objects in argparse (#32257)" (#91771) This reverts commit 328dbc051f84bd5fdf61101bb4fa61d85f8b7feb.
* gh-89653: PEP 670: Convert unicodeobject.h macros to functions (#91705)Victor Stinner2022-04-211-41/+61
| | | | | | | | | | | | | | | | | | Convert unicodeobject.h macros to static inline functions: * PyUnicode_CHECK_INTERNED() * PyUnicode_DATA(), _PyUnicode_COMPACT_DATA(), _PyUnicode_NONCOMPACT_DATA() * PyUnicode_GET_LENGTH() * PyUnicode_IS_ASCII() * PyUnicode_IS_COMPACT() * PyUnicode_IS_COMPACT_ASCII() * PyUnicode_IS_READY() Reorder functions to declare functions before their first usage. Static inline functions are wrapped by macros which casts arguments with _PyObject_CAST() to prevent introducing new compiler warnings when passing "const PyObject*".