| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
| |
ntohl(), htonl(), if_indextoname(), getaddrinfo() now use __index__() if
available.
Also fix the Argument Clinic names for module-level functions (although
this does not affect the user).
|
|
|
| |
Use it for the mode arguments in filemode(), S_IMODE(), S_ISDIR(), etc.
|
|
|
|
| |
* Fix strict aliasing in PyFloat_Pack8() and PyFloat_Pack4().
* Fix _testcapi.float_set_snan() on x86 (32-bit).
|
| |
|
|
|
|
| |
(GH-133094)
|
| |
|
|
|
|
| |
Even if such signature is not supported by PyArg_ParseTupleAndKeywords(),
Argument Clinic supports it with inlined converters.
|
|
|
|
|
|
| |
Support it for the dev_t values in mknod(), major(), minor() and makedev(),
CPU numbers in sched_setaffinity(), group numbers in setgroups(),
configuration name in fpathconf(), pathconf(), confstr(), and sysconf().
|
|
|
|
|
| |
Doing this was always the intention. I was finally motivated to find the time to do it.
See #87859 (comment).
|
|
|
|
|
| |
The function indicates whether or not the function has a return statement.
This is used by a later change related treating some functions like scripts.
|
|
|
| |
Note that the bulk of this change is tests.
|
|
|
|
|
| |
The `test_load_global_module()` test consumes a lot of dict key versions.
Skip the test if we have consumed half of the available versions that can be
used for the "load global" cache.
|
|
|
| |
This change consists of adding tests and moving code around, with some renaming thrown in.
|
| |
|
|
|
|
|
| |
SystemError is raised when buffer overflow is detected.
The stack and memory can already be corrupted, so treat this error as fatal.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(gh-130402)
If `Py_IsFinalizing()` is true, non-daemon threads (other than the current one)
are done, and daemon threads are prevented from running, so they
cannot finalize themselves and become done. Joining them (without timeout)
would block forever.
Raise PythonFinalizationError instead of hanging.
Raise even when a timeout is given, for consistency with trying to join your own thread.
See gh-123940 for a use case: calling `join()` from `__del__`. This is
ill-advised, but an exception should at least make it easier to diagnose.
|
|
|
| |
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
| |
This was in C version from beginning, but available only
on conditional compilation (EXTRA_FUNCTIONALITY). Current
patch adds function to create IEEE contexts to the
pure-python module as well.
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
| |
|
| |
|
| |
|
|
|
| |
This was overlooked in 5f2ba152a0471f6f556ca2d9486e5ba486fcfbde.
|
|
|
|
| |
(GH-132988)
|
|
|
|
|
|
|
|
|
|
| |
The following are added to the internal C-API:
* _PyErr_FormatV()
* _PyErr_SetModuleNotFoundError()
* _PyXIData_GetNotShareableErrorType()
* _PyXIData_FormatNotShareableError()
We also drop _PyXIData_lookup_context_t and _PyXIData_GetLookupContext().
|
|
|
|
|
|
|
|
|
| |
Windows (#132963)
To avoid having the debug sections being optimised away by the compiler
we use __attribute__((used)) on gcc and clang but in Windows this is
not supported by the Microsoft compiler and there is no equivalent flag.
Unfortunately Windows offers almost no alternative other than exporting
the symbol in the dynamic table or using it somehow.
|
|
|
| |
This is a partial revert of gh-132821. It resolves the refleak introduced by that PR.
|
| |
|
|
|
|
|
| |
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
OpenSSL 3.4.1 mnemonics are not compatible with OpenSSL 3.4.0 ones since
they were renumbered [1, 2]. Consequently, `_ssl_data_34.h` is renamed to
`_ssl_data_340.h` and `_ssl_data_34.h` now contains OpenSSL 3.4.1 mnemonics.
We also refine the mnemonics that are selected, discarding those that are
mnemonic-like but should not be used as such. More precisely, we remove
the ERR_LIB_MASK and ERR_LIB_OFFSET entries from OpenSSL 1.1.1 data.
[1]: https://github.com/openssl/openssl/issues/26316
[2]: https://github.com/openssl/openssl/issues/26388
|
| |
|
|
|
| |
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
|
|
|
|
| |
* add notes
* rename XIBufferViewObject to xibufferview
* move memoryview XIData code to memoryobject.c
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* Support arbitrary bytes-like objects, not only bytes, in fcntl().
* The fcntl() buffer argument is now null-terminated.
* Automatically retry an ioctl() system calls failing with EINTR.
* Release the GIL for an ioctl() system call even for large bytes-like object.
* Do not silence arbitrary errors whet try to get a buffer.
* Optimize argument parsing, check the argument type before trying to get
a buffer or convert it to integer.
* Fix some error messages.
|
| |
|
|
|
|
|
|
|
| |
It seems, no code actually uses these names, only sizes of the unnamed
union members are important. Though, I think it's good to be here
consistent wrt type codes ('g' for long double, etc).
This amends 85f89cb3e6.
|
|
|
|
|
|
|
|
| |
For the same reasons as running the GC, this will allow sections that
run in native code for long periods without executing bytecode to also
run the remote debugger protocol without having to wait until bytecode
is executed
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
|
|
|
|
| |
remotely (#132807)
|
| |
|
|
|
|
|
| |
* F - for float _Complex
* D - for double _Complex
* G - for long double _Complex (not supported by the struct module)
|
| |
|
|
|
|
|
|
|
|
| |
This change covers the following:
* dealloc: no cleanup if no buffer set
* dealloc: handle already-destroyed interpreter correctly
* handle errors in _memoryview_from_xid() correctly
* clean up the buffer if the xidata is never used
|
|
|
|
|
|
|
|
|
|
|
| |
(#132475)
Fix: Prevent crash in ctypes.CField when byte_size does not match type size (gh-132470)
When creating a ctypes.CField with an incorrect byte_size (e.g., using `byte_size=2` for `ctypes.c_byte`), the code would previously abort due to the failed assertion `byte_size == info->size`.
This commit replaces the assertion with a proper error handling mechanism that raises a `ValueError` when `byte_size` does not match the expected type size. This prevents the crash and provides a more informative error message to the us
Co-authored-by: sobolevn <mail@sobolevn.me>
|
|
|
|
| |
(GH-131594)
|
| |
|
| |
|
|
|
|
|
|
| |
This also reverts loghelper() change in 75f59bb629 for integer
input. The error message shouldn't include argument value here.
Co-authored-by: Victor Stinner <vstinner@python.org>
|
| |
|
|
|
|
| |
(GH-132754)
|