summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "bpo-45229: Make datetime tests discoverable (GH-28615)" (GH-28650)Pablo Galindo Salgado2021-09-301-45/+47
| | | This reverts commit d441437ee71ae174c008c23308b749b91020ba77.
* bpo-41710: Document _PyTime_t API in pytime.h (GH-28647)Victor Stinner2021-09-301-0/+41
|
* bpo-41710: PyThread_acquire_lock_timed() clamps the timout (GH-28643)Victor Stinner2021-09-309-39/+67
| | | | | | | | | | | | | | | | | | | 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).
* Fix EncodingWarning in freeze_modules. (GH-28591)Inada Naoki2021-09-301-4/+4
|
* bpo-41710: Fix building pytime.c on Windows (GH-28644)Victor Stinner2021-09-301-5/+5
|
* bpo-41710: Add pytime_add() and pytime_mul() (GH-28642)Victor Stinner2021-09-302-102/+101
| | | | | | 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.
* bpo-41710: Add _PyTime_AsTimespec_clamp() (GH-28629)Victor Stinner2021-09-308-91/+269
| | | | | | | | | | | | | | | 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.
* bpo-43753: _operator.is_() uses Py_Is() (GH-28641)Victor Stinner2021-09-291-4/+2
|
* bpo-45229: Make datetime tests discoverable (GH-28615)Serhiy Storchaka2021-09-291-47/+45
|
* bpo-45020: Do not freeze <pkg>/__init__.py twice. (gh-28635)Eric Snow2021-09-291-0/+7
| | | | | 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
* [typo] s/libexpact/libexpat/ in setup.py (GH-28624)Łukasz Langa2021-09-291-1/+1
|
* [typo] Fix threading.Barrier comment that used confusing punctuation (GH-28623)Łukasz Langa2021-09-291-1/+1
| | | | | 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>
* bpo-44394: Ensure libexpat is linked against libm (GH-28617)Pablo Galindo Salgado2021-09-291-1/+3
|
* Fix doctest doc examples for syntax errors (GH-28486)andrei kulakov2021-09-291-11/+10
| | | | | | | | | * fix doctest doc examples for syntax errors * updated examples to use TypeErrors * fixed first sentence * unneeded comma
* bpo-45291: Explicitly set --libdir=lib when configure OpenSSL (GH-28566)zhanpon2021-09-291-0/+1
|
* bpo-24391: Better reprs for threading objects. (GH-20534)Serhiy Storchaka2021-09-293-0/+61
| | | | Add reprs for Semaphore, BoundedSemaphore, Event, and Barrier.
* bpo-39039: tarfile raises descriptive exception from zlib.error (GH-27766)Jack DeVries2021-09-293-0/+25
| | | | | | | * 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
* [docs] Use full names for time units (GH-28611)Serhiy Storchaka2021-09-2913-20/+21
| | | | Use "second", "millisecond", "microsecond", "nanosecond" instead of "sec", "ms", "msec", "us", "ns", etc.
* bpo-45269: test wrong `markers` type to `c_make_encoder` (GH-28540)Nikita Sobolev2021-09-282-0/+10
|
* [docs] Improve the markup of powers (GH-28598)Serhiy Storchaka2021-09-2818-32/+32
|
* bpo-45211: Remember the stdlib dir during startup. (gh-28586)Eric Snow2021-09-2810-3/+93
| | | | | 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
* bpo-35606: Fix math.prod tests using 'start' as keyword parameter (GH-28595)Pablo Galindo Salgado2021-09-282-14/+15
|
* bpo-45296: Fix exit/quit message on Windows (GH-28577)Terry Jan Reedy2021-09-283-0/+16
| | | | IDLE recognizes Ctrl-D, as on other systems, instead of Ctrl-Z.
* Optimized code format (GH-28599)Rajendra arora2021-09-281-3/+1
| | | Automerge-Triggered-By: GH:pablogsal
* [doc] fix minor typo for argparse (GH-28451)Louis Sautier2021-09-281-1/+1
| | | "A JSONDecodeError" instead of "An JSONDecodeError".
* Fixed typo in "decclarations" (GH-28578)Rajendra arora2021-09-281-1/+1
|
* Fix typo in whatsnew: "ns" is 10^-9 secs and "us" is 10^-6 secs. (GH-28565)Jörn Heissler2021-09-281-2/+2
|
* bpo-1596321: Fix threading._shutdown() for the main thread (GH-28549)Victor Stinner2021-09-273-8/+53
| | | | | 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.
* bpo-45249: Ensure the traceback module prints correctly syntax errors with ↵Pablo Galindo Salgado2021-09-272-6/+34
| | | | ranges (GH-28575)
* Select correct tool platform when building on Windows ARM64 natively (GH-28491)Niyas Sait2021-09-272-4/+9
|
* Do not check isabs() on Windows. (gh-28584)Eric Snow2021-09-271-0/+2
| | | | | I missed this in gh-28550. https://bugs.python.org/issue45211
* bpo-45211: Move helpers from getpath.c to internal API. (gh-28550)Eric Snow2021-09-278-100/+164
| | | | | | | | | | | | 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
* bpo-43914: Correctly highlight SyntaxError exceptions for invalid generator ↵Pablo Galindo Salgado2021-09-275-8/+31
| | | | expression in function calls (GH-28576)
* bpo-45274: Fix Thread._wait_for_tstate_lock() race condition (GH-28532)Victor Stinner2021-09-272-4/+22
| | | | | | 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.
* bpo-44958: Revert GH-27844 (GH-28574)Erlend Egeberg Aasland2021-09-263-40/+39
| | | | This reverts commit 050d1035957379d70e8601e6f5636637716a264b, but keeps the tests.
* bpo-45280: Add test for empty `NamedTuple` in `test_typing` (GH-28559)Nikita Sobolev2021-09-262-0/+14
| | | Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
* bpo-21302: Add nanosleep() implementation for time.sleep() in Unix (GH-28545)Victor Stinner2021-09-257-33/+114
| | | Co-authored-by: Livius <egyszeregy@freemail.hu>
* bpo-43914: Whats New 310: add new SyntaxError attributes (GH-28558)Terry Jan Reedy2021-09-251-1/+6
| | | Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
* bpo-45166: fixes `get_type_hints` failure on `Final` (GH-28279)Nikita Sobolev2021-09-255-10/+56
| | | | Co-authored-by: Łukasz Langa <lukasz@langa.pl> Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
* bpo-45277: Fix typo in codecs doc (GH-28555)Terry Jan Reedy2021-09-251-1/+1
| | | encoding => encode
* bpo-41299: Mark private thread_nt.h functions as static (GH-28553)Victor Stinner2021-09-241-10/+10
| | | | | | | | Mark the following thread_nt.h functions as static: * AllocNonRecursiveMutex() * FreeNonRecursiveMutex() * EnterNonRecursiveMutex() * LeaveNonRecursiveMutex()
* bpo-41299: Fix EnterNonRecursiveMutex() (GH-28548)Victor Stinner2021-09-241-3/+0
| | | Remove Py_FatalError() call: the code works even if now is negative.
* bpo-41299: QueryPerformanceFrequency() cannot fail (GH-28552)Victor Stinner2021-09-241-21/+7
| | | | | | 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.
* bpo-45020: Fix some corner cases for frozen module generation. (gh-28538)Eric Snow2021-09-245-69/+130
| | | | | This also includes some cleanup in preparation for a PR to make the "make all" output less noisy. https://bugs.python.org/issue45020
* bpo-44019: Add missing comma to operator.call doc (GH-28551)Terry Jan Reedy2021-09-241-1/+1
|
* bpo-44019: Implement operator.call(). (GH-27888)Antony Lee2021-09-246-0/+62
| | | | | | 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.
* bpo-20524: adds better error message for `.format()` (GH-28310)Nikita Sobolev2021-09-243-7/+50
| | | It now lists the bad format_spec and the type of the object.
* bpo-30951: Correct co_names docstring in inspect module (GH-2743)Alex Vig2021-09-241-1/+1
|
* bpo-38623: Add note about site module (site-packages) (GH-16974)Peter Bittner2021-09-231-1/+2
|
* bpo-39359: [zipfile] add missing "pwd: expected bytes, got str" exception ↵Daniel Hillier2021-09-233-6/+20
| | | | (GH-18031)