| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
in PyArg_Parse (gh-112439)
|
|
|
|
|
|
|
|
| |
Add support for TLS-PSK (pre-shared key) to the ssl module.
---------
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
|
|
|
|
|
| |
Revert commit c8c0afc7137ab9f22bf59d591084948ca967c97c (PR #94532),
which moved `struct.Struct` initialisation from `Struct.__init__` to `Struct.__new__`.
This caused issues with code in the wild that subclasses `struct.Struct`.
|
| |
|
|
|
| |
The new function corresponds to the existing (public) PyType_GetName() and PyType_GetQualName().
|
|
|
|
| |
classes thread safe (gh-112298)
|
|
|
|
| |
On older versions of macOS, _NSGetExecutablePath appears to only
be available via macho-o/dyld so macho-o/dyld.h is still needed.
|
| |
|
|
|
|
|
| |
builds (GH-111546)
Co-authored-by: Ned Deily <nad@python.org>
|
|
|
| |
Rename Py_NOGIL to Py_GIL_DISABLED
|
|
|
|
| |
(gh-112116)
|
| |
|
| |
|
|
|
|
| |
(gh-112193)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(gh-112111)
* gh-112070: make `functools.lrucacle` threadsafe in --disable-gil build
* gh-112070: update generate `functoolsmodule` files
* gh-112070: add NEWS file
* Delete Misc/NEWS.d/next/Library/2023-11-15-20-19-45.gh-issue-112070.q6OhcU.rst
* gh-112070: reformat functoolsmodule.c
---------
Co-authored-by: Sam Gross <colesbury@gmail.com>
|
|
|
| |
clockid_t is defined as long long on AIX.
|
| |
|
|
|
|
|
|
|
| |
* Run again test_ast_recursion_limit() on WASI platform.
* Add _testinternalcapi.get_c_recursion_remaining().
* Fix test_ast and test_sys_settrace: test_ast_recursion_limit() and
test_trace_unpack_long_sequence() now adjust the maximum recursion
depth depending on the the remaining C recursion.
|
|
|
|
|
| |
Always use an individual lock on hash objects when in free-threaded builds.
Fixes #111916
|
|
|
|
|
|
|
|
|
| |
This avoids:
python3.13 Tools/unicode/makeunicodedata.py
python3.13: can't open file '.../build/debug/Tools/unicode/makeunicodedata.py': [Errno 2] No such file or directory
make: *** [Makefile:1498: regen-unicodedata] Error 2
Re-run `make regen-unicodedata` to update the script path in generated files.
|
| |
|
|
|
|
|
| |
* gh-112062: Make `_struct` module thread-safe in --disable-gil builds
|
|
|
| |
Add Modules/_testcapi/hash.c and Lib/test/test_capi/test_hash.py.
|
|
|
| |
Add getnameinfo extension NI_IDN flag.
|
|
|
|
|
|
| |
In non-debug more the check for the "errors" argument is skipped,
and then PyUnicode_AsUTF8() can fail, but its result was not checked.
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
| |
* Fix crash when encoding is not string or None.
* Fix crash when both line_buffering and write_through raise exception
when converted ti int.
* Add a number of tests for constructor and reconfigure() method
with invalid arguments.
|
|
|
|
|
|
|
| |
_PyDict_Pop_KnownHash(): remove the default value and the return type
becomes an int.
Co-authored-by: Stefan Behnel <stefan_ml@behnel.de>
Co-authored-by: Antoine Pitrou <pitrou@free.fr>
|
|
|
|
|
|
|
|
|
| |
The `@critical_section` directive instructs Argument Clinic to generate calls
to `Py_BEGIN_CRITICAL_SECTION()` and `Py_END_CRITICAL_SECTION()` around the
bound function. In `--disable-gil` builds, these calls will lock and unlock
the `self` object. They are no-ops in the default build.
This is used in one place (`_io._Buffered.close`) as a demonstration.
Subsequent PRs will use it more widely in the `_io.Buffered` bindings.
|
| |
|
|
|
|
| |
unstable (#112042)
|
|
|
|
|
|
| |
* Split list_extend() into two sub-functions: list_extend_fast() and
list_extend_iter().
* list_inplace_concat() no longer has to call Py_DECREF() on the
list_extend() result, since list_extend() now returns an int.
|
|
|
| |
Co-authored-by: Sam Gross <colesbury@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
destruction (#111778)
In PyObject_GC_Del, in Py_DEBUG mode, when warning about GC objects that
were not properly untracked before starting destruction, take care to
untrack the object _before_ warning, to avoid triggering a GC run and
causing the problem the code tries to warn about. Also make sure to save and
restore any pending exceptions, which the warning would otherwise clobber or
trigger an assertion error on.
|
|
|
| |
Fix undefined behaviour in datetime.time.fromisoformat() when parsing a string without a timezone. 'tzoffset' is not assigned to by parse_isoformat_time if it returns 0, but time_fromisoformat then passes tzoffset to another function, which is undefined behaviour (even if the function in question does not use the value).
|
|
|
|
| |
Use new C API functions PyDict_GetItemRef() and
PyMapping_GetOptionalItemString().
|
|
|
|
| |
Like PyUnicode_AsUTF8(), but check for embedded null characters.
|
|
|
|
| |
(GH-111842)
|
|
|
|
|
|
|
|
| |
This adds a macro `Py_CAN_START_THREADS` that corresponds to the Python
function `test.support.threading_helper.can_start_thread()`. WASI and
some Emscripten builds do not have a working pthread implementation.
This macro is used to guard the critical sections C API tests that
require a working threads implementation.
|
| |
|
|
|
|
|
|
|
| |
Drop posix.fallocate() under WASI.
The underlying POSIX function, posix_fallocate(), was found to vary too
much between implementations to remain in WASI. As such, while it was
available in WASI preview1, it's been dropped in preview2.
|
|
|
|
|
|
|
|
| |
Critical sections are helpers to replace the global interpreter lock
with finer grained locking. They provide similar guarantees to the GIL
and avoid the deadlock risk that plain locking involves. Critical
sections are implicitly ended whenever the GIL would be released. They
are resumed when the GIL would be acquired. Nested critical sections
behave as if the sections were interleaved.
|
|
|
| |
PyUnicode_FSConverter() already checks for embedded null characters.
|
|
|
|
|
| |
Signed-off-by: kalyanr <kalyan.ben10@live.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
|
| |
|
| |
|