| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Other aspects of typing aren't covered yet; I'll do that in a
separate PR.
|
|
|
| |
The context manager result has the "filename" attribute.
|
| |
|
|
|
| |
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
|
|
|
|
| |
1. It makes them interned.
2. It allows to add comments to individual opcodes.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
information (GH-91531)
|
| |
|
| |
|
|
|
|
|
| |
Also inline necessary functionality from `sndhdr` into `email.mime.audio` for `MIMEAudio`.
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
|
|
|
|
|
| |
multiprocessing.set_executable for Windows (GH-31279)
This bring the API to be on a par with Unix-like systems.
|
|
|
|
|
| |
re (GH-91660)
Also test that all extra cases are in BMP.
|
|
|
|
|
|
| |
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.
|
|
|
| |
re.error is now raised instead of TypeError.
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
| |
Closes GH-91764
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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().
|
| |
|
|
|
|
|
| |
(#32242)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
|
|
|
| |
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
|
| |
|
|
|
|
| |
Authored-by: Aviv Palivoda <palaviv@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@innova.no>
|
|
|
| |
Co-authored-by: Victor Stinner <vstinner@python.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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*".
|
|
|
|
| |
If Python is built in debug mode, _Py_Dealloc() now ensures that the
tp_dealloc function leaves the current exception unchanged.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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*".
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
less dangerous. (GH-91790)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
signal.raise_signal() and os.kill() now call PyErr_CheckSignals() to
check immediately for pending signals.
|
|
|
|
|
| |
objects in argparse (#32257)" (#91771)
This reverts commit 328dbc051f84bd5fdf61101bb4fa61d85f8b7feb.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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*".
|