| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
zipinfo now supports the full range of values in the TZ string
determined by RFC 8536 and detects all invalid formats.
Both Python and C implementations now raise exceptions of the same
type on invalid data.
|
|
|
|
|
|
| |
Now re.error is raised instead of OverflowError or RuntimeError for
too large width of look-behind pattern.
The limit is increased to 2**32-1 (was 2**31-1).
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* Use explicit initialiser for m_base
* Add module state stub; establish global state on stack
* Put conversion factors in state struct
* Move PyDateTime_TimeZone_UTC to state
* Move PyDateTime_Epoch to state struct
* Fix ref leaks in and clean up initialisation
|
|
|
|
| |
* Fix test_peg_generator after tokenizer refactoring
* Remove references to tokenizer.c in comments etc.
|
|
|
|
|
| |
gh-85283: _stat extension uses the limited C API
The _stat C extension is now built with the limited C API.
|
|
|
|
| |
PyUnicode_EqualToUTF8AndSize() functions (GH-110297)
|
| |
|
| |
|
|
|
|
| |
TypeError would be overwritten by OverflowError
if 'code' param contained non-ints.
|
|
|
|
|
|
| |
---------
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
|
|
|
|
|
| |
We had been faking it (poorly).
We will add timeouts separately.
|
| |
|
|
|
| |
Add OS version specific macro for Solaris: Py_SUNOS_VERSION.
|
|
|
|
| |
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
|
|
|
| |
(This is still a test module.)
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
It was not documented and only supported in the C implementation.
|
|
|
|
|
|
|
|
| |
Add wrapper for timerfd_create, timerfd_settime, and timerfd_gettime to os module.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
| |
This specifically refers to `test.support.interpreters.Interpreter.run()`.
|
|
|
|
| |
`decimal` (#107524)
|
|
|
|
| |
This matches a similar optimisation done for math.floor in
https://github.com/python/cpython/pull/21072
|
|
|
|
|
|
|
| |
* Use `FindFirstFile` Win32 API to fix a bug where `ntpath.realpath()`
breaks out of traversing a series of paths where a (handled)
`ERROR_ACCESS_DENIED` or `ERROR_SHARING_VIOLATION` occurs.
* Update docs to reflect that `ntpath.realpath()` eliminates MS-DOS
style names.
|
|
|
| |
Co-authored-by: Erlend E. Aasland <erlend@python.org>
|
|
|
|
| |
Co-authored-by: Filipe Laíns <filipe.lains@gmail.com>
|
|
|
|
|
| |
This is a temporary solution. The full fix may involve serializing the traceback in some form.
(FYI, I merged this yesterday and the reverted it due to buildbot failures. See gh-110248.)
|
|
|
|
| |
word. (GH-109846)
|
| |
|
|
|
|
| |
(gh-110318)
|
|
|
|
|
|
|
| |
(gh-110314)
This reverts commit 6bc889aedc11cc8e0b9f57948a3d528ad2685497.
That commit is causing some buildbot failures.
|
|
|
| |
This is a temporary fix. The full fix may involve serializing the traceback in some form.
|
|
|
|
|
|
| |
Add PyThreadState_GetUnchecked() function: similar to
PyThreadState_Get(), but don't issue a fatal error if it is NULL. The
caller is responsible to check if the result is NULL. Previously,
this function was private and known as _PyThreadState_UncheckedGet().
|
|
|
|
|
|
|
|
|
| |
Necessary (gh-110245)
In a few places we switch to another interpreter without knowing if it has a thread state associated with the current thread. For the main interpreter there wasn't much of a problem, but for subinterpreters we were *mostly* okay re-using the tstate created with the interpreter (located via PyInterpreterState_ThreadHead()). There was a good chance that tstate wasn't actually in use by another thread.
However, there are no guarantees of that. Furthermore, re-using an already used tstate is currently fragile. To address this, now we create a new thread state in each of those places and use it.
One consequence of this change is that PyInterpreterState_ThreadHead() may not return NULL (though that won't happen for the main interpreter).
|
|
|
|
| |
(#110242)
|
|
|
|
|
| |
* add RecvChannel.close() and SendChannel.close()
* make RecvChannel and SendChannel shareable
* expose ChannelEmptyError and ChannelNotEmptyError
|
|
|
|
|
|
|
| |
(gh-109921)
The existence of background threads running on a subinterpreter was preventing interpreters from getting properly destroyed, as well as impacting the ability to run the interpreter again. It also affected how we wait for non-daemon threads to finish.
We add PyInterpreterState.threads.main, with some internal C-API functions.
|
|
|
| |
This change makes sure sys.path[0] is set properly for subinterpreters. Before, it wasn't getting set at all. This PR does not address the broader concerns from gh-109853.
|
|
|
|
|
|
|
|
| |
Make PyObject_VisitManagedDict() and PyObject_ClearManagedDict()
functions public in Python 3.13 C API.
* Rename _PyObject_VisitManagedDict() to PyObject_VisitManagedDict().
* Rename _PyObject_ClearManagedDict() to PyObject_ClearManagedDict().
* Document these functions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace os.cpu_count() with os.process_cpu_count() in modules:
* compileall
* concurrent.futures
* multiprocessing
Replace os.cpu_count() with os.process_cpu_count() in programs:
* _decimal deccheck.py test
* freeze.py
* multissltests.py
* python -m test (regrtest)
* wasm_build.py
Other changes:
* test.pythoninfo logs os.process_cpu_count().
* regrtest gets os.process_cpu_count() / os.cpu_count() in headers.
|
|
|
|
|
|
|
|
|
| |
* Refactor os_sched_getaffinity_impl(): move variable definitions to
their first assignment.
* Fix test_posix.test_sched_getaffinity(): restore the old CPU mask
when the test completes!
* Doc: Specify that os.cpu_count() counts *logicial* CPUs.
* Doc: Specify that os.sched_getaffinity(0) is related to the calling
thread.
|
|
|
|
|
|
|
|
|
|
|
| |
* Remove unused <locale.h> includes.
* Remove unused <fcntl.h> include in traceback.h.
* Remove redundant <assert.h> and <stddef.h> includes. They are already
included by "Python.h".
* Remove <object.h> include in faulthandler.c. Python.h already includes it.
* Add missing <stdbool.h> in pycore_pythread.h if HAVE_PTHREAD_STUBS
is defined.
* Fix also warnings in pthread_stubs.h: don't redefine macros if they
are already defined, like the __NEED_pthread_t macro.
|
| |
|
| |
|
| |
|
|
|
|
| |
faulthandler now detected freed interp and freed tstate, and no
longer dereference them.
|
|
|
|
| |
(GH-109790)
|