| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Move the following API from Include/opcode.h (public C API) to a new
Include/internal/pycore_opcode.h header file (internal C API):
* EXTRA_CASES
* _PyOpcode_Caches
* _PyOpcode_Deopt
* _PyOpcode_Jump
* _PyOpcode_OpName
* _PyOpcode_RelativeJump
|
|
|
|
|
|
|
|
|
| |
Fix signal.NSIG value on FreeBSD to accept signal numbers greater
than 32, like signal.SIGRTMIN and signal.SIGRTMAX.
* Add Py_NSIG constant.
* Add pycore_signal.h internal header file.
* _Py_Sigset_Converter() now includes the range of valid signals in
the error message.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the limited C API version 3.11 and newer, the following functions
no longer cast their object pointer argument with _PyObject_CAST() or
_PyObject_CAST_CONST():
* Py_REFCNT(), Py_TYPE(), Py_SIZE()
* Py_SET_REFCNT(), Py_SET_TYPE(), Py_SET_SIZE()
* Py_IS_TYPE()
* Py_INCREF(), Py_DECREF()
* Py_XINCREF(), Py_XDECREF()
* Py_NewRef(), Py_XNewRef()
* PyObject_TypeCheck()
* PyType_Check()
* PyType_CheckExact()
Split Py_DECREF() implementation in 3 versions to make the code more
readable.
Update the xxlimited.c extension, which uses the limited C API
version 3.11, to pass PyObject* to these functions.
|
|
|
|
| |
Fixes gh-91880.
|
|
|
|
| |
It always failed on non-UTF-8 locale and prevented running regrtests.
|
|
|
|
|
| |
Closes #90633
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* Add a new :gh:`...` role for GitHub issues.
* Fix a GitHub id to use the :gh: role.
* Add Misc/NEWS entry.
* Refactoring and rephrasing.
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
|
|
|
|
|
|
|
| |
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)
|
| |
|
| |
|