Commit graph

111101 commits

Author SHA1 Message Date
Victor Stinner 6bc89116cb
bpo-41299: Mark private thread_nt.h functions as static (GH-28553)
Mark the following thread_nt.h functions as static:

* AllocNonRecursiveMutex()
* FreeNonRecursiveMutex()
* EnterNonRecursiveMutex()
* LeaveNonRecursiveMutex()
2021-09-25 01:14:09 +02:00
Victor Stinner d639e31705
bpo-41299: Fix EnterNonRecursiveMutex() (GH-28548)
Remove Py_FatalError() call: the code works even if now is negative.
2021-09-25 00:40:18 +02:00
Victor Stinner f35ddf2422
bpo-41299: QueryPerformanceFrequency() cannot fail (GH-28552)
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.
2021-09-25 00:31:56 +02:00
Eric Snow 7c801e0fa6
bpo-45020: Fix some corner cases for frozen module generation. (gh-28538)
This also includes some cleanup in preparation for a PR to make the "make all" output less noisy.

https://bugs.python.org/issue45020
2021-09-24 14:35:47 -06:00
Terry Jan Reedy bfe26bbad7
bpo-44019: Add missing comma to operator.call doc (GH-28551) 2021-09-24 18:40:44 +01:00
Antony Lee 6587fc60d4
bpo-44019: Implement operator.call(). (GH-27888)
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.
2021-09-24 16:22:49 +01:00
Nikita Sobolev 8d8729146f
bpo-20524: adds better error message for .format() (GH-28310)
It now lists the bad format_spec and the type of the object.
2021-09-24 11:18:04 -04:00
Alex Vig 3f8b23f8dd
bpo-30951: Correct co_names docstring in inspect module (GH-2743) 2021-09-24 12:05:34 +02:00
Peter Bittner 55b45bf707
bpo-38623: Add note about site module (site-packages) (GH-16974) 2021-09-23 23:39:58 +02:00
Daniel Hillier 91099e2544
bpo-39359: [zipfile] add missing "pwd: expected bytes, got str" exception (GH-18031) 2021-09-23 23:37:53 +02:00
Jason Fried 86b833badd
bpo-38415: Allow using @asynccontextmanager-made ctx managers as decorators (GH-16667) 2021-09-23 23:36:03 +02:00
Sam Sneddon af90b5498b
[docs] Update documentation for multiprocessing.get_start_method (GH-18170) 2021-09-23 23:03:13 +02:00
Sean Leavey 8492b729ae
Fix legacy logging module URL (GH-28528)
The URL listed in the `logging` docs for the original `logging` module leads to a 404. I managed to find the new location for the page and updated the URL.

Automerge-Triggered-By: GH:vsajip
2021-09-23 07:47:10 -07:00
Victor Stinner f4ccb79d52
bpo-43760: Document PyThreadState.use_tracing removal (GH-28527) 2021-09-23 16:38:31 +02:00
Victor Stinner ec7ffa4b5b
bpo-41137: Reorganize What's New in Python 3.11 (GH-28518)
* Merge the two Removed sections.
* Move "Build Changes" at the end, before "C API Changes".
* Move the pdb change in Porting to Python 3.11.
* Move C API new features in their section.
2021-09-23 11:37:39 +02:00
Alexander Böhn 8c21941dda
bpo-39549: reprlib.Repr uses a “fillvalue” attribute (GH-18343) 2021-09-22 15:45:58 -05:00
Serhiy Storchaka 36122e1814
bpo-41203: Replace Mac OS X and OS X with macOS (GH-28515)
Replace old names when they refer to actual versions of macOS.
Keep historical names in references to older versions.

Co-authored-by: Patrick Reader <_@pxeger.com>
2021-09-22 20:33:36 +03:00
Serhiy Storchaka ecb6922ff2
bpo-45238: Fix unittest.IsolatedAsyncioTestCase.debug() (GH-28449)
It runs now asynchronous methods and callbacks.

If it fails, doCleanups() can be called for cleaning up.
2021-09-22 17:43:23 +02:00
Victor Stinner 58f8adfda3
bpo-21302: time.sleep() uses waitable timer on Windows (GH-28483)
On Windows, time.sleep() now uses a waitable timer which has a
resolution of 100 ns (10^-7 sec). Previously, it had a solution of 1
ms (10^-3 sec).

* On Windows, time.sleep() now calls PyErr_CheckSignals() before
  resetting the SIGINT event.
* Add _PyTime_As100Nanoseconds() function.
* Complete and update time.sleep() documentation.

Co-authored-by: Livius <egyszeregy@freemail.hu>
2021-09-22 16:09:30 +02:00
Victor Stinner 8620be99da
bpo-45061: Revert unicode_is_singleton() change (GH-28516)
Don't use a loop over 256 items, only checks for a single singleton.
2021-09-22 12:16:53 +02:00
Mohamad Mansour 8f943ca257
[codemod] Fix non-matching bracket pairs (GH-28473)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-09-22 01:09:00 +02:00
andrei kulakov a007347100
[tests] Add missing assert against expected tracebacks in test_exceptions.py (GH-28484) 2021-09-22 00:06:13 +02:00
andrei kulakov b7eac52b46
bpo-45234: Fix FileNotFound exception raised instead of IsADirectoryError in shutil.copyfile() (GH-28421)
This was a regression from fixing BPO-43219.
2021-09-21 23:53:07 +02:00
Victor Stinner 86f28372b1
bpo-45061: Detect refcount bug on empty string singleton (GH-28504)
Detect refcount bugs in C extensions when the empty Unicode string
singleton is destroyed by mistake.

* Move forward declarations to the top of unicodeobject.c.
* Simplifiy unicode_is_singleton().
2021-09-21 23:43:09 +02:00
Nikita Sobolev 06e1773c8d
bpo-45216: Remove extraneous method docs from difflib (GH-28445) 2021-09-21 23:31:12 +02:00
Victor Stinner 79a3148099
bpo-45061: Detect refcount bug on empty tuple singleton (GH-28503)
Detect refcount bugs in C extensions when the empty tuple singleton
is destroyed by mistake.

Add the _Py_FatalRefcountErrorFunc() function.
2021-09-21 23:04:34 +02:00
Nikita Sobolev f604cf1c37
bpo-45209: fix UserWarning: resource_tracker in test_multiprocessing (GH-28377) 2021-09-21 19:49:42 +02:00
Pablo Galindo Salgado 1c7e98dc25
bpo-24076: Fix reference in sum() introduced by GH-28469 (GH-28493) 2021-09-21 18:38:57 +01:00
Raymond Hettinger 9a0dcc5b2e
bpo-45246: Document that sorted() only uses "<" comparisons (GH-28494) 2021-09-21 12:26:27 -05:00
Pablo Galindo Salgado a356272362
bpo-45200: Ignore test_multiprocessing_* in ASAN build due to false positives (GH-28492) 2021-09-21 17:28:13 +01:00
Erlend Egeberg Aasland 3e3ff09058
bpo-44958: Fix ref. leak introduced in GH-27844 (GH-28490)
Modify managed_connect() helper to support in-memory databases. Use it
for the regression tests added in GH-27844.

Automerge-Triggered-By: GH:pablogsal
2021-09-21 06:15:54 -07:00
Erlend Egeberg Aasland 050d103595
bpo-44958: Only reset sqlite3 statements when needed (GH-27844) 2021-09-21 12:20:34 +01:00
scoder debd804037
bpo-24076: Inline single digit unpacking in the integer fastpath of sum() (GH-28469) 2021-09-21 11:01:18 +02:00
nullptr 0bfa1106ac
bpo-45021: Fix a hang in forked children (GH-28007)
_global_shutdown_lock should be reinitialized in forked children
2021-09-20 11:30:19 -07:00
Raymond Hettinger 9510e6f3c7
bpo-45155: Apply new byteorder default values for int.to/from_bytes (GH-28465) 2021-09-20 13:22:55 -05:00
Erlend Egeberg Aasland 5846c9b71e
bpo-44848: Update Windows installer to use SQLite 3.36.0 (GH-27622) 2021-09-20 16:58:13 +01:00
Serhiy Storchaka e6ba992288
bpo-45229: Make pickle tests discoverable (GH-28467) 2021-09-20 18:21:33 +03:00
Irit Katriel f71300cb04
bpo-1514420: Do not attempt to open files with names in <>s when formatting an exception (GH-28143)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-09-20 17:10:30 +02:00
Rémi Lapeyre 4d2957c1b9
bpo-40497: Fix handling of check in subprocess.check_output() (GH-19897)
Co-authored-by: Tal Einat <taleinat@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-09-20 17:09:05 +02:00
Steve Dower ef9e22b253
bpo-45055: Add retry when downloading externals on Windows (GH-28399)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-09-20 15:33:00 +01:00
Serhiy Storchaka a856364cc9
bpo-45229: Use doctest.DocTestSuite instead of run_doctest (GH-28468)
Alo use load_tests() for adding tests.
2021-09-20 11:36:57 +03:00
Victor Stinner 5e2c32e08e
bpo-40413: test_embed tests calling Py_RunMain() multiple times (GH-28466)
Calling Py_InitializeFromConfig()+Py_RunMain() multiple times must
not crash.

Cleanup also test_get_argc_argv().
2021-09-20 10:30:02 +02:00
Raymond Hettinger fcbf9b176b
Docs: Clarify the before_and_after() example (GH-28458) 2021-09-19 19:52:27 -05:00
Erlend Egeberg Aasland a6779715c4
bpo-45041: Simplify sqlite3.Cursor.executescript() (GH-28020) 2021-09-19 23:52:36 +01:00
Erlend Egeberg Aasland 771a546713
bpo-45040: Simplify sqlite3 transaction control functions (GH-28019) 2021-09-19 23:51:36 +01:00
Nikita Sobolev 1d42408495
bpo-45128: fixes test_multiprocessing_fork mysterious crash (GH-28387) 2021-09-19 23:50:04 +01:00
Pablo Galindo Salgado e6d05a4092
bpo-30637: Improve the docs of ast.parse regarding differences with compile() (GH-28459) 2021-09-19 23:44:51 +01:00
Serhiy Storchaka f25f2e2e8c
Clean up initialization __class_getitem__ with Py_GenericAlias. (GH-28450)
The cast to PyCFunction is redundant. Overuse of redundant casts
can hide actual bugs.
2021-09-19 18:05:30 +03:00
Serhiy Storchaka a624177386
bpo-45229: Fix setUpModule in test_ssl (GH-28454) 2021-09-19 16:18:16 +03:00
Serhiy Storchaka 40348acc18
bpo-45229: Remove test_main in many tests (GH-28405)
Instead of explicitly enumerate test classes for run_unittest()
use the unittest ability to discover tests. This also makes these
tests discoverable and runnable with unittest.

load_tests() can be used for dynamic generating tests and adding
doctests. setUpModule(), tearDownModule() and addModuleCleanup()
can be used for running code before and after all module tests.
2021-09-19 15:27:33 +03:00