| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
| |
This reverts commit d441437ee71ae174c008c23308b749b91020ba77.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PyThread_acquire_lock_timed() now clamps the timeout into the
[_PyTime_MIN; _PyTime_MAX] range (_PyTime_t type) if it is too large,
rather than calling Py_FatalError() which aborts the process.
PyThread_acquire_lock_timed() no longer uses
MICROSECONDS_TO_TIMESPEC() to compute sem_timedwait() argument, but
_PyTime_GetSystemClock() and _PyTime_AsTimespec_truncate().
Fix _thread.TIMEOUT_MAX value on Windows: the maximum timeout is
0x7FFFFFFF milliseconds (around 24.9 days), not 0xFFFFFFFF
milliseconds (around 49.7 days).
Set PY_TIMEOUT_MAX to 0x7FFFFFFF milliseconds, rather than 0xFFFFFFFF
milliseconds.
Fix PY_TIMEOUT_MAX overflow test: replace (us >= PY_TIMEOUT_MAX) with
(us > PY_TIMEOUT_MAX).
|
| |
|
| |
|
|
|
|
|
|
| |
Add pytime_add() and pytime_mul() functions to pytime.c to compute
t+t2 and t*k with clamping to [_PyTime_MIN; _PyTime_MAX].
Fix pytime.h: _PyTime_FromTimeval() is not implemented on Windows.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the _PyTime_AsTimespec_clamp() function: similar to
_PyTime_AsTimespec(), but clamp to _PyTime_t min/max and don't raise
an exception.
PyThread_acquire_lock_timed() now uses _PyTime_AsTimespec_clamp() to
remove the Py_UNREACHABLE() code path.
* Add _PyTime_AsTime_t() function.
* Add PY_TIME_T_MIN and PY_TIME_T_MAX constants.
* Replace _PyTime_AsTimeval_noraise() with _PyTime_AsTimeval_clamp().
* Add pytime_divide_round_up() function.
* Fix integer overflow in pytime_divide().
* Add pytime_divmod() function.
|
| |
|
| |
|
|
|
|
|
| |
Currently we're freezing the __init__.py twice, duplicating the built data unnecessarily With this change we do it once. There is no change in runtime behavior.
https://bugs.python.org/issue45020
|
| |
|
|
|
|
|
| |
Removed extra comma in comment that indicates state of a `Barrier` as it was confusing and breaking the flow while reading.
Co-authored-by: Priyank <5903604+cpriyank@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
* fix doctest doc examples for syntax errors
* updated examples to use TypeErrors
* fixed first sentence
* unneeded comma
|
| |
|
|
|
|
| |
Add reprs for Semaphore, BoundedSemaphore, Event, and Barrier.
|
|
|
|
|
|
|
| |
* during tarfile parsing, a zlib error indicates invalid data
* tarfile.open now raises a descriptive exception from the zlib error
* this makes it clear to the user that they may be trying to open a
corrupted tar file
|
|
|
|
| |
Use "second", "millisecond", "microsecond", "nanosecond" instead of
"sec", "ms", "msec", "us", "ns", etc.
|
| |
|
| |
|
|
|
|
|
| |
During runtime startup we figure out the stdlib dir but currently throw that information away. This change preserves it and exposes it via PyConfig.stdlib_dir, _Py_GetStdlibDir(), and sys._stdlib_dir.
https://bugs.python.org/issue45211
|
| |
|
|
|
|
| |
IDLE recognizes Ctrl-D, as on other systems, instead of Ctrl-Z.
|
|
|
| |
Automerge-Triggered-By: GH:pablogsal
|
|
|
| |
"A JSONDecodeError" instead of "An JSONDecodeError".
|
| |
|
| |
|
|
|
|
|
| |
Fix the threading._shutdown() function when the threading module was
imported first from a thread different than the main thread: no
longer log an error at Python exit.
|
|
|
|
| |
ranges (GH-28575)
|
| |
|
|
|
|
|
| |
I missed this in gh-28550.
https://bugs.python.org/issue45211
|
|
|
|
|
|
|
|
|
|
|
|
| |
This accomplishes 2 things:
* consolidates some common code between getpath.c and getpathp.c
* makes the helpers available to code in other files
FWIW, the signature of the join_relfile() function (in fileutils.c) intentionally mirrors that of Windows' PathCchCombineEx().
Note that this change is mostly moving code around. No behavior is meant to change.
https://bugs.python.org/issue45211
|
|
|
|
| |
expression in function calls (GH-28576)
|
|
|
|
|
|
| |
Fix a race condition in the Thread.join() method of the threading
module. If the function is interrupted by a signal and the signal
handler raises an exception, make sure that the thread remains in a
consistent state to prevent a deadlock.
|
|
|
|
| |
This reverts commit 050d1035957379d70e8601e6f5636637716a264b, but keeps
the tests.
|
|
|
| |
Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
|
|
|
| |
Co-authored-by: Livius <egyszeregy@freemail.hu>
|
|
|
| |
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
|
|
|
|
| |
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
|
|
|
| |
encoding => encode
|
|
|
|
|
|
|
|
| |
Mark the following thread_nt.h functions as static:
* AllocNonRecursiveMutex()
* FreeNonRecursiveMutex()
* EnterNonRecursiveMutex()
* LeaveNonRecursiveMutex()
|
|
|
| |
Remove Py_FatalError() call: the code works even if now is negative.
|
|
|
|
|
|
| |
py_win_perf_counter_frequency() no longer checks for
QueryPerformanceFrequency() failure. According to the
QueryPerformanceFrequency() documentation, the function can no longer
fails since Windows XP.
|
|
|
|
|
| |
This also includes some cleanup in preparation for a PR to make the "make all" output less noisy.
https://bugs.python.org/issue45020
|
| |
|
|
|
|
|
|
| |
Having `operator.call(obj, arg)` mean `type(obj).__call__(obj, arg)` is
consistent with the other dunder operators. The semantics with `*args,
**kwargs` then follow naturally from the single-arg semantics.
|
|
|
| |
It now lists the bad format_spec and the type of the object.
|
| |
|
| |
|
|
|
|
| |
(GH-18031)
|