]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
4 years agobpo-30951: Correct co_names docstring in inspect module (GH-2743)
Alex Vig [Fri, 24 Sep 2021 10:05:34 +0000 (06:05 -0400)] 
bpo-30951: Correct co_names docstring in inspect module (GH-2743)

4 years agobpo-38623: Add note about site module (site-packages) (GH-16974)
Peter Bittner [Thu, 23 Sep 2021 21:39:58 +0000 (23:39 +0200)] 
bpo-38623: Add note about site module (site-packages) (GH-16974)

4 years agobpo-39359: [zipfile] add missing "pwd: expected bytes, got str" exception (GH-18031)
Daniel Hillier [Thu, 23 Sep 2021 21:37:53 +0000 (07:37 +1000)] 
bpo-39359: [zipfile] add missing "pwd: expected bytes, got str" exception (GH-18031)

4 years agobpo-38415: Allow using @asynccontextmanager-made ctx managers as decorators (GH-16667)
Jason Fried [Thu, 23 Sep 2021 21:36:03 +0000 (14:36 -0700)] 
bpo-38415: Allow using @asynccontextmanager-made ctx managers as decorators (GH-16667)

4 years ago[docs] Update documentation for `multiprocessing.get_start_method` (GH-18170)
Sam Sneddon [Thu, 23 Sep 2021 21:03:13 +0000 (22:03 +0100)] 
[docs] Update documentation for `multiprocessing.get_start_method` (GH-18170)

4 years agoFix legacy logging module URL (GH-28528)
Sean Leavey [Thu, 23 Sep 2021 14:47:10 +0000 (16:47 +0200)] 
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
4 years agobpo-43760: Document PyThreadState.use_tracing removal (GH-28527)
Victor Stinner [Thu, 23 Sep 2021 14:38:31 +0000 (16:38 +0200)] 
bpo-43760: Document PyThreadState.use_tracing removal (GH-28527)

4 years agobpo-41137: Reorganize What's New in Python 3.11 (GH-28518)
Victor Stinner [Thu, 23 Sep 2021 09:37:39 +0000 (11:37 +0200)] 
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.

4 years agobpo-39549: reprlib.Repr uses a “fillvalue” attribute (GH-18343)
Alexander Böhn [Wed, 22 Sep 2021 20:45:58 +0000 (16:45 -0400)] 
bpo-39549: reprlib.Repr uses a “fillvalue” attribute (GH-18343)

4 years agobpo-41203: Replace Mac OS X and OS X with macOS (GH-28515)
Serhiy Storchaka [Wed, 22 Sep 2021 17:33:36 +0000 (20:33 +0300)] 
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>
4 years agobpo-45238: Fix unittest.IsolatedAsyncioTestCase.debug() (GH-28449)
Serhiy Storchaka [Wed, 22 Sep 2021 15:43:23 +0000 (18:43 +0300)] 
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.

4 years agobpo-21302: time.sleep() uses waitable timer on Windows (GH-28483)
Victor Stinner [Wed, 22 Sep 2021 14:09:30 +0000 (16:09 +0200)] 
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>
4 years agobpo-45061: Revert unicode_is_singleton() change (GH-28516)
Victor Stinner [Wed, 22 Sep 2021 10:16:53 +0000 (12:16 +0200)] 
bpo-45061: Revert unicode_is_singleton() change (GH-28516)

Don't use a loop over 256 items, only checks for a single singleton.

4 years ago[codemod] Fix non-matching bracket pairs (GH-28473)
Mohamad Mansour [Tue, 21 Sep 2021 23:09:00 +0000 (02:09 +0300)] 
[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>
4 years ago[tests] Add missing assert against expected tracebacks in test_exceptions.py (GH...
andrei kulakov [Tue, 21 Sep 2021 22:06:13 +0000 (18:06 -0400)] 
[tests] Add missing assert against expected tracebacks in test_exceptions.py (GH-28484)

4 years agobpo-45234: Fix FileNotFound exception raised instead of IsADirectoryError in shutil...
andrei kulakov [Tue, 21 Sep 2021 21:53:07 +0000 (17:53 -0400)] 
bpo-45234: Fix FileNotFound exception raised instead of IsADirectoryError in shutil.copyfile() (GH-28421)

This was a regression from fixing BPO-43219.

4 years agobpo-45061: Detect refcount bug on empty string singleton (GH-28504)
Victor Stinner [Tue, 21 Sep 2021 21:43:09 +0000 (23:43 +0200)] 
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().

4 years agobpo-45216: Remove extraneous method docs from `difflib` (GH-28445)
Nikita Sobolev [Tue, 21 Sep 2021 21:31:12 +0000 (00:31 +0300)] 
bpo-45216: Remove extraneous method docs from `difflib` (GH-28445)

4 years agobpo-45061: Detect refcount bug on empty tuple singleton (GH-28503)
Victor Stinner [Tue, 21 Sep 2021 21:04:34 +0000 (23:04 +0200)] 
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.

4 years agobpo-45209: fix `UserWarning: resource_tracker` in test_multiprocessing (GH-28377)
Nikita Sobolev [Tue, 21 Sep 2021 17:49:42 +0000 (20:49 +0300)] 
bpo-45209: fix `UserWarning: resource_tracker` in test_multiprocessing (GH-28377)

4 years agobpo-24076: Fix reference in sum() introduced by GH-28469 (GH-28493)
Pablo Galindo Salgado [Tue, 21 Sep 2021 17:38:57 +0000 (18:38 +0100)] 
bpo-24076: Fix reference in sum() introduced by GH-28469 (GH-28493)

4 years agobpo-45246: Document that sorted() only uses "<" comparisons (GH-28494)
Raymond Hettinger [Tue, 21 Sep 2021 17:26:27 +0000 (12:26 -0500)] 
bpo-45246: Document that sorted() only uses "<" comparisons (GH-28494)

4 years agobpo-45200: Ignore test_multiprocessing_* in ASAN build due to false positives (GH...
Pablo Galindo Salgado [Tue, 21 Sep 2021 16:28:13 +0000 (17:28 +0100)] 
bpo-45200: Ignore test_multiprocessing_* in ASAN build due to false positives (GH-28492)

4 years agobpo-44958: Fix ref. leak introduced in GH-27844 (GH-28490)
Erlend Egeberg Aasland [Tue, 21 Sep 2021 13:15:54 +0000 (15:15 +0200)] 
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
4 years agobpo-44958: Only reset `sqlite3` statements when needed (GH-27844)
Erlend Egeberg Aasland [Tue, 21 Sep 2021 11:20:34 +0000 (13:20 +0200)] 
bpo-44958: Only reset `sqlite3` statements when needed (GH-27844)

4 years agobpo-24076: Inline single digit unpacking in the integer fastpath of sum() (GH-28469)
scoder [Tue, 21 Sep 2021 09:01:18 +0000 (11:01 +0200)] 
bpo-24076: Inline single digit unpacking in the integer fastpath of sum() (GH-28469)

4 years agobpo-45021: Fix a hang in forked children (GH-28007)
nullptr [Mon, 20 Sep 2021 18:30:19 +0000 (20:30 +0200)] 
bpo-45021: Fix a hang in forked children (GH-28007)

_global_shutdown_lock should be reinitialized in forked children

4 years agobpo-45155: Apply new byteorder default values for int.to/from_bytes (GH-28465)
Raymond Hettinger [Mon, 20 Sep 2021 18:22:55 +0000 (13:22 -0500)] 
bpo-45155: Apply new byteorder default values for int.to/from_bytes (GH-28465)

4 years agobpo-44848: Update Windows installer to use SQLite 3.36.0 (GH-27622)
Erlend Egeberg Aasland [Mon, 20 Sep 2021 15:58:13 +0000 (17:58 +0200)] 
bpo-44848: Update Windows installer to use SQLite 3.36.0 (GH-27622)

4 years agobpo-45229: Make pickle tests discoverable (GH-28467)
Serhiy Storchaka [Mon, 20 Sep 2021 15:21:33 +0000 (18:21 +0300)] 
bpo-45229: Make pickle tests discoverable (GH-28467)

4 years agobpo-1514420: Do not attempt to open files with names in <>s when formatting an except...
Irit Katriel [Mon, 20 Sep 2021 15:10:30 +0000 (16:10 +0100)] 
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>
4 years agobpo-40497: Fix handling of check in subprocess.check_output() (GH-19897)
Rémi Lapeyre [Mon, 20 Sep 2021 15:09:05 +0000 (17:09 +0200)] 
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>
4 years agobpo-45055: Add retry when downloading externals on Windows (GH-28399)
Steve Dower [Mon, 20 Sep 2021 14:33:00 +0000 (15:33 +0100)] 
bpo-45055: Add retry when downloading externals on Windows (GH-28399)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
4 years agobpo-45229: Use doctest.DocTestSuite instead of run_doctest (GH-28468)
Serhiy Storchaka [Mon, 20 Sep 2021 08:36:57 +0000 (11:36 +0300)] 
bpo-45229: Use doctest.DocTestSuite instead of run_doctest (GH-28468)

Alo use load_tests() for adding tests.

4 years agobpo-40413: test_embed tests calling Py_RunMain() multiple times (GH-28466)
Victor Stinner [Mon, 20 Sep 2021 08:30:02 +0000 (10:30 +0200)] 
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().

4 years agoDocs: Clarify the before_and_after() example (GH-28458)
Raymond Hettinger [Mon, 20 Sep 2021 00:52:27 +0000 (19:52 -0500)] 
Docs: Clarify the before_and_after() example (GH-28458)

4 years agobpo-45041: Simplify `sqlite3.Cursor.executescript()` (GH-28020)
Erlend Egeberg Aasland [Sun, 19 Sep 2021 22:52:36 +0000 (00:52 +0200)] 
bpo-45041: Simplify `sqlite3.Cursor.executescript()` (GH-28020)

4 years agobpo-45040: Simplify sqlite3 transaction control functions (GH-28019)
Erlend Egeberg Aasland [Sun, 19 Sep 2021 22:51:36 +0000 (00:51 +0200)] 
bpo-45040: Simplify sqlite3 transaction control functions (GH-28019)

4 years agobpo-45128: fixes `test_multiprocessing_fork` mysterious crash (GH-28387)
Nikita Sobolev [Sun, 19 Sep 2021 22:50:04 +0000 (01:50 +0300)] 
bpo-45128: fixes `test_multiprocessing_fork` mysterious crash (GH-28387)

4 years agobpo-30637: Improve the docs of ast.parse regarding differences with compile() (GH...
Pablo Galindo Salgado [Sun, 19 Sep 2021 22:44:51 +0000 (23:44 +0100)] 
bpo-30637: Improve the docs of ast.parse regarding differences with compile() (GH-28459)

4 years agoClean up initialization __class_getitem__ with Py_GenericAlias. (GH-28450)
Serhiy Storchaka [Sun, 19 Sep 2021 15:05:30 +0000 (18:05 +0300)] 
Clean up initialization __class_getitem__ with Py_GenericAlias. (GH-28450)

The cast to PyCFunction is redundant. Overuse of redundant casts
can hide actual bugs.

4 years agobpo-45229: Fix setUpModule in test_ssl (GH-28454)
Serhiy Storchaka [Sun, 19 Sep 2021 13:18:16 +0000 (16:18 +0300)] 
bpo-45229: Fix setUpModule in test_ssl (GH-28454)

4 years agobpo-45229: Remove test_main in many tests (GH-28405)
Serhiy Storchaka [Sun, 19 Sep 2021 12:27:33 +0000 (15:27 +0300)] 
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.

4 years agobpo-30856: Update TestResult early, without buffering in _Outcome (GH-28180)
Serhiy Storchaka [Sun, 19 Sep 2021 12:24:38 +0000 (15:24 +0300)] 
bpo-30856: Update TestResult early, without buffering in _Outcome (GH-28180)

TestResult methods addFailure(), addError(), addSkip() and
addSubTest() are now called immediately after raising an exception
in test or finishing a subtest.  Previously they were called only
after finishing the test clean up.

4 years agobpo-36674: Honour the skipping decorators in TestCase.debug() (GH-28446)
Serhiy Storchaka [Sat, 18 Sep 2021 12:34:22 +0000 (15:34 +0300)] 
bpo-36674: Honour the skipping decorators in TestCase.debug() (GH-28446)

unittest.TestCase.debug() raises now a SkipTest if the class or
the test method are decorated with the skipping decorator.

Previously it only raised a SkipTest if the test method was decorated
with other decorator in addition to the skipping decorator, or
if SkipTest was explicitly raised in the test or setup methods.

4 years agobpo-45198: __set_name__ documentation not clear about its usage with non-descriptor...
Raymond Hettinger [Sat, 18 Sep 2021 06:49:43 +0000 (01:49 -0500)] 
bpo-45198: __set_name__ documentation not clear about its usage with non-descriptor classes (GH-28439)

4 years agobpo-45235: Fix argparse overrides namespace with subparser defaults (GH-28420)
Adam Schwalm [Sat, 18 Sep 2021 04:20:31 +0000 (23:20 -0500)] 
bpo-45235: Fix argparse overrides namespace with subparser defaults (GH-28420)

4 years agoFix minor typo in Doc/c-api/type.rst (GH-28432)
Konstantin Popov [Sat, 18 Sep 2021 01:45:33 +0000 (04:45 +0300)] 
Fix minor typo in Doc/c-api/type.rst (GH-28432)

retreived-> retrieved

4 years agobpo-45183: don't raise an exception when calling zipimport.zipimporter.find_spec...
Brett Cannon [Fri, 17 Sep 2021 23:48:17 +0000 (16:48 -0700)] 
bpo-45183: don't raise an exception when calling zipimport.zipimporter.find_spec() when the zip file is missing and the internal cache has been reset (GH-28435)

This can occur when the zip file gets deleted, you call zipimport.zipimporter.invalidate_cache(), and then try to use zipimport.zipimporter.find_spec() (i.e. you left the zip file path on sys.path).

4 years agobpo-44640: Improve punctuation consistency in isinstance/issubclass error messages...
wyz23x2 [Fri, 17 Sep 2021 23:10:17 +0000 (07:10 +0800)] 
bpo-44640: Improve punctuation consistency in isinstance/issubclass error messages (GH-27144)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
4 years ago[doc] Clarify exception in `multiprocessing.cpu_count` (GH-23660)
Emmanuel Arias [Fri, 17 Sep 2021 22:58:20 +0000 (19:58 -0300)] 
[doc] Clarify exception in `multiprocessing.cpu_count` (GH-23660)

Previous wording didn't explain the slightly unintuitive behavior.

Co-authored-by: kj <28750310+Fidget-Spinner@users.noreply.github.com>
4 years agobpo-45020: Freeze os, site, and codecs. (gh-28398)
Eric Snow [Fri, 17 Sep 2021 22:31:31 +0000 (16:31 -0600)] 
bpo-45020: Freeze os, site, and codecs. (gh-28398)

https://bugs.python.org/issue45020

4 years agoFix missing space with help for `-m compileall -o` (GH-27591)
Daniel Hahler [Fri, 17 Sep 2021 22:28:09 +0000 (00:28 +0200)] 
Fix missing space with help for `-m compileall -o` (GH-27591)

4 years agobpo-42038: fix description of returned list of lines (GH-27529)
andrei kulakov [Fri, 17 Sep 2021 22:24:55 +0000 (18:24 -0400)] 
bpo-42038: fix description of returned list of lines (GH-27529)

4 years ago[doc] Add a missing apostrophe in a code example in venv.rst (GH-28391)
Arkaprabha Chakraborty [Fri, 17 Sep 2021 21:08:25 +0000 (02:38 +0530)] 
[doc] Add a missing apostrophe in a code example in venv.rst (GH-28391)

4 years agobpo-45116: Py_DEBUG ignores Py_ALWAYS_INLINE (GH-28419)
Victor Stinner [Fri, 17 Sep 2021 20:46:38 +0000 (22:46 +0200)] 
bpo-45116: Py_DEBUG ignores Py_ALWAYS_INLINE (GH-28419)

If the Py_DEBUG macro is defined, the Py_ALWAYS_INLINE macro does
nothing.

4 years agobpo-45187: Fix dangling threads in test_socket.CreateServerFunctionalTest (GH-28422)
Serhiy Storchaka [Fri, 17 Sep 2021 18:56:41 +0000 (21:56 +0300)] 
bpo-45187: Fix dangling threads in test_socket.CreateServerFunctionalTest (GH-28422)

4 years agobpo-45020: Fix build out of source tree (GH-28410)
Victor Stinner [Fri, 17 Sep 2021 18:20:43 +0000 (20:20 +0200)] 
bpo-45020: Fix build out of source tree (GH-28410)

* Makefile.pre.in: Add $(srcdir) when needed, remove it when it was
  used by mistake.
* freeze_modules.py tool uses ./Programs/_freeze_module if the
  executable doesn't exist in the source tree.

4 years agobpo-45231: update_file.py preserves end of line (GH-28411)
Victor Stinner [Fri, 17 Sep 2021 18:12:25 +0000 (20:12 +0200)] 
bpo-45231: update_file.py preserves end of line (GH-28411)

The update_file.py tool now preserves the end of line of the updated
file. Fix the "make regen-frozen" command: it no longer changes the
end of line of PCbuild/ files on Unix. Git changes the end of line
depending on the platform.

4 years agoRemove compatibility check for Python versions below 2.2. (GH-28314)
Omer Katz [Fri, 17 Sep 2021 13:36:41 +0000 (16:36 +0300)] 
Remove compatibility check for Python versions below 2.2. (GH-28314)

`os.path.realpath()` already exists in all our supported Python versions.
There's no longer a need to check if it exists or not.

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
4 years agobpo-45212: Add a comment for time.sleep() in tests (GH-28414)
Serhiy Storchaka [Fri, 17 Sep 2021 13:20:15 +0000 (16:20 +0300)] 
bpo-45212: Add a comment for time.sleep() in tests (GH-28414)

Co-authored-by: Victor Stinner <vstinner@python.org>
4 years agobpo-45116: Add the Py_ALWAYS_INLINE macro (GH-28390)
Victor Stinner [Fri, 17 Sep 2021 12:09:14 +0000 (14:09 +0200)] 
bpo-45116: Add the Py_ALWAYS_INLINE macro (GH-28390)

Add the Py_ALWAYS_INLINE macro to ask the compiler to always inline a
static inline function. The compiler can ignore it and decides to not
inline the function.

4 years agobpo-45219: Factor dictkey indexing (GH-28389)
Mark Shannon [Fri, 17 Sep 2021 11:20:51 +0000 (12:20 +0100)] 
bpo-45219: Factor dictkey indexing (GH-28389)

4 years agobpo-45217: adds note that `allow_no_value` in `configparser` is optional (GH-28396)
Nikita Sobolev [Fri, 17 Sep 2021 10:55:51 +0000 (13:55 +0300)] 
bpo-45217: adds note that `allow_no_value` in `configparser` is optional (GH-28396)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
4 years agobpo-45107: Make LOAD_METHOD_CLASS safer and faster, clean up comments (GH-28177)
Ken Jin [Fri, 17 Sep 2021 10:47:36 +0000 (18:47 +0800)] 
bpo-45107: Make LOAD_METHOD_CLASS safer and faster, clean up comments (GH-28177)

* Improve comments

* Check cls is a type, remove dict calculation

4 years agobpo-45162: Remove many old deprecated unittest features (GH-28268)
Serhiy Storchaka [Fri, 17 Sep 2021 10:33:27 +0000 (13:33 +0300)] 
bpo-45162: Remove many old deprecated unittest features (GH-28268)

* "fail*" and "assert*" aliases of TestCase methods.
* Broken from start TestCase method assertDictContainsSubset().
* Ignored TestLoader.loadTestsFromModule() parameter use_load_tests.
* Old alias _TextTestResult of TextTestResult.

4 years agobpo-45187: Collect test_socket tests using unittest (GH-28317)
Serhiy Storchaka [Fri, 17 Sep 2021 10:13:09 +0000 (13:13 +0300)] 
bpo-45187: Collect test_socket tests using unittest (GH-28317)

Previously, test classes ISOTPTest, J1939Test, BasicUDPLITETest and
UDPLITETimeoutTest were not included in the list of tests and
were not run by regrtest.

4 years agobpo-45203: fix compiler warnings (GH-28357)
Ken Jin [Fri, 17 Sep 2021 09:48:44 +0000 (17:48 +0800)] 
bpo-45203: fix compiler warnings (GH-28357)

Co-authored-by: Mark Shannon <mark@hotpy.org>
4 years agobpo-5846: Fix deprecations for obsolete unittest functions and add tests. (GH-28382)
Serhiy Storchaka [Fri, 17 Sep 2021 09:09:32 +0000 (12:09 +0300)] 
bpo-5846: Fix deprecations for obsolete unittest functions and add tests. (GH-28382)

4 years agobpo-45228: Fix stack buffer overflow in parsing J1939 address (GH-28404)
Serhiy Storchaka [Fri, 17 Sep 2021 08:46:19 +0000 (11:46 +0300)] 
bpo-45228: Fix stack buffer overflow in parsing J1939 address (GH-28404)

4 years agoFix typo and add a module prefix (GH-28401)
Raymond Hettinger [Fri, 17 Sep 2021 04:49:41 +0000 (23:49 -0500)] 
Fix typo and add a module prefix (GH-28401)

4 years agobpo-45020: Drop the frozen .h files from the repo. (gh-28392)
Eric Snow [Thu, 16 Sep 2021 20:20:52 +0000 (14:20 -0600)] 
bpo-45020: Drop the frozen .h files from the repo. (gh-28392)

The main advantage is that the files will no longer show up in diffs and PRs. That means, for a PR, the number of files / lines changed will more clearly reflect the actual change.  (This is essentially an un-revert of gh-28375.)

https://bugs.python.org/issue45020

4 years agobpo-45225: use map function instead of genexpr in capwords (GH-28342)
speedrun-program [Thu, 16 Sep 2021 19:49:38 +0000 (12:49 -0700)] 
bpo-45225: use map function instead of genexpr in capwords (GH-28342)

4 years agobpo-45220: Avoid automatically selecting the Windows 11 SDK preview when building...
Steve Dower [Thu, 16 Sep 2021 18:29:32 +0000 (19:29 +0100)] 
bpo-45220: Avoid automatically selecting the Windows 11 SDK preview when building (GH-28393)

4 years agobpo-45212: Fix dangling threads in skipped tests in test_socket (GH-28361)
Serhiy Storchaka [Thu, 16 Sep 2021 10:30:00 +0000 (13:30 +0300)] 
bpo-45212: Fix dangling threads in skipped tests in test_socket (GH-28361)

tearDown() is not called if setUp() raises an exception
(including SkipTest). addCleanup() should be used for guaranteed
execution of the cleanup code.

4 years agodocs: correct references to __isub__ etc (GH-28297)
David Hewitt [Thu, 16 Sep 2021 08:33:41 +0000 (09:33 +0100)] 
docs: correct references to __isub__ etc (GH-28297)

4 years agobpo-45020: Revert "Drop the frozen .h files from the repo." (gh-28380)
Eric Snow [Thu, 16 Sep 2021 05:27:38 +0000 (23:27 -0600)] 
bpo-45020: Revert "Drop the frozen .h files from the repo." (gh-28380)

gh-28375 broke one of the buildbots. Until I figure out why, I'm rolling the change back.

https://bugs.python.org/issue45020

4 years agobpo-45155 : Default arguments for int.to_bytes(length=1, byteorder=sys.byteorder...
Barry Warsaw [Thu, 16 Sep 2021 02:55:24 +0000 (19:55 -0700)] 
bpo-45155 : Default arguments for int.to_bytes(length=1, byteorder=sys.byteorder) (#28265)

Add default arguments for int.to_bytes() and int.from_bytes()

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
4 years agobpo-45020: Drop the frozen .h files from the repo. (gh-28375)
Eric Snow [Thu, 16 Sep 2021 01:15:26 +0000 (19:15 -0600)] 
bpo-45020: Drop the frozen .h files from the repo. (gh-28375)

The main advantage is that the files will no longer show up in diffs and PRs. That means, for a PR, the number of files / lines changed will more clearly reflect the actual change.

https://bugs.python.org/issue45020

4 years agobpo-39710: Remove Python 2-specific sentence from calendar documentation (GH-26985)
Hubert Badocha [Wed, 15 Sep 2021 20:36:38 +0000 (22:36 +0200)] 
bpo-39710: Remove Python 2-specific sentence from calendar documentation (GH-26985)

4 years agobpo-45019: Clean up the frozen __hello__ module. (gh-28374)
Eric Snow [Wed, 15 Sep 2021 20:15:32 +0000 (14:15 -0600)] 
bpo-45019: Clean up the frozen __hello__ module. (gh-28374)

Here's one more small cleanup that should have been in PR gh-28319. We eliminate stdout side-effects from importing the frozen __hello__ module, and update tests accordingly. We also move the module's source file into Lib/ from Toos/freeze/flag.py.

https://bugs.python.org/issue45019

4 years agoFix typo in Lib/sqlite3/test/test_types.py (GH-28226)
Konstantin Popov [Wed, 15 Sep 2021 20:09:08 +0000 (23:09 +0300)] 
Fix typo in Lib/sqlite3/test/test_types.py (GH-28226)

preceeding -> preceding

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
4 years agobpo-45019: Silence a warning in test_ctypes. (gh-28362)
Eric Snow [Wed, 15 Sep 2021 19:33:05 +0000 (13:33 -0600)] 
bpo-45019: Silence a warning in test_ctypes. (gh-28362)

This was missed in PR gh-28319.

https://bugs.python.org/issue45019

4 years agobpo-45089: Improve sqlite3 trace callback docs (GH-28238)
Erlend Egeberg Aasland [Wed, 15 Sep 2021 18:39:05 +0000 (20:39 +0200)] 
bpo-45089: Improve sqlite3 trace callback docs (GH-28238)

- Add link to str object and sqlite3 transaction control
- Mention that exceptions are not propagated

4 years agobpo-5846: Deprecate obsolete methods in `unittest` (GH-28299)
Erlend Egeberg Aasland [Wed, 15 Sep 2021 18:33:31 +0000 (20:33 +0200)] 
bpo-5846: Deprecate obsolete methods in `unittest` (GH-28299)

Deprecate makeSuite, findTestCases, and getTestCaseNames. Scheduled for removal in Python 3.13.

4 years agobpo-45193: News for IDLE PR_28343 (GH-28348)
Terry Jan Reedy [Wed, 15 Sep 2021 18:26:43 +0000 (14:26 -0400)] 
bpo-45193: News for IDLE PR_28343 (GH-28348)

4 years agobpo-45167: Fix deepcopying of GenericAlias (GH-28324)
Serhiy Storchaka [Wed, 15 Sep 2021 18:25:41 +0000 (21:25 +0300)] 
bpo-45167: Fix deepcopying of GenericAlias (GH-28324)

4 years agobpo-45207: Make test_gdb.test_pycfunction() quiet (GH-28355)
Victor Stinner [Wed, 15 Sep 2021 18:21:06 +0000 (20:21 +0200)] 
bpo-45207: Make test_gdb.test_pycfunction() quiet (GH-28355)

test_gdb.test_pycfunction() now ignores gdb stderr, it no longer logs
messages like:

    Function "meth_varargs" not defined.

4 years agobpo-45205: Make test_compileall quiet (GH-28356)
Victor Stinner [Wed, 15 Sep 2021 18:20:45 +0000 (20:20 +0200)] 
bpo-45205: Make test_compileall quiet (GH-28356)

Make test_compileall quiet: test_year_2038_mtime_compilation() and
test_larger_than_32_bit_times() of test_compileall no longer log
"Compiling ..." messages to stdout.

4 years agobpo-45208: Make test_pdb.test_checkline_is_not_executable() quiet (GH-28354)
Victor Stinner [Wed, 15 Sep 2021 18:19:31 +0000 (20:19 +0200)] 
bpo-45208: Make test_pdb.test_checkline_is_not_executable() quiet (GH-28354)

test_pdb.test_checkline_is_not_executable() no longer writes output
to stdout.

Remove also unused variables 'f'.

4 years agobpo-45204: Reduce verbosity of test_peg_generator (GH-28360)
Pablo Galindo Salgado [Wed, 15 Sep 2021 18:16:51 +0000 (19:16 +0100)] 
bpo-45204: Reduce verbosity of test_peg_generator (GH-28360)

4 years agobpo-45188: Windows now regenerates frozen modules at the start of build instead of...
Steve Dower [Wed, 15 Sep 2021 17:11:12 +0000 (18:11 +0100)] 
bpo-45188: Windows now regenerates frozen modules at the start of build instead of late (GH-28322)

This will enable us to drop the frozen module header files from the repository.

It does currently cause many source files to be built twice, which just takes more time. For whoever comes to fix this in the future, the files shared between freeze_module and pythoncore should be put into a static library that is consumed by both.

4 years agobpo-45185: enables `TestEnumerations` in `test_ssl` (GH-28330)
Nikita Sobolev [Wed, 15 Sep 2021 16:57:03 +0000 (19:57 +0300)] 
bpo-45185: enables `TestEnumerations` in `test_ssl` (GH-28330)

4 years agobpo-45020: Freeze some of the modules imported during startup. (gh-28335)
Eric Snow [Wed, 15 Sep 2021 16:19:30 +0000 (10:19 -0600)] 
bpo-45020: Freeze some of the modules imported during startup. (gh-28335)

Doing this provides significant performance gains for runtime startup (~15% with all the imported modules frozen). We don't yet freeze all the imported modules because there are a few hiccups in the build systems we need to sort out first. (See bpo-45186 and bpo-45188.)

Note that in PR GH-28320 we added a command-line flag (-X frozen_modules=[on|off]) that allows users to opt out of (or into) using frozen modules. The default is still "off" but we will change it to "on" as soon as we can do it in a way that does not cause contributors pain.

https://bugs.python.org/issue45020

4 years agobpo-44786: Fix a warning in RE in c-analyzer (GH-28351)
Serhiy Storchaka [Wed, 15 Sep 2021 14:08:48 +0000 (17:08 +0300)] 
bpo-44786: Fix a warning in RE in c-analyzer (GH-28351)

4 years agobpo-45203: Cleanup stats gathering code for LOAD_METHOD (GH-28352)
Mark Shannon [Wed, 15 Sep 2021 13:55:49 +0000 (14:55 +0100)] 
bpo-45203: Cleanup stats gathering code for LOAD_METHOD (GH-28352)

4 years agobpo-21302: Add _PyTime_AsNanoseconds() (GH-28350)
Victor Stinner [Wed, 15 Sep 2021 12:26:43 +0000 (14:26 +0200)] 
bpo-21302: Add _PyTime_AsNanoseconds() (GH-28350)

Refactor pytime.c:

* Add pytime_from_nanoseconds() and pytime_as_nanoseconds(),
  and use explicitly these functions
* Add two empty lines between functions
* PEP 7: add braces { ... }
* C99: declare variables where they are set
* Rename private functions to lowercase
* Rename error_time_t_overflow() to pytime_time_t_overflow()
* Rename win_perf_counter_frequency() to py_win_perf_counter_frequency()
* py_get_monotonic_clock(): add an assertion to detect overflow when
  mach_absolute_time() unsigned uint64_t is casted to _PyTime_t
  (signed int64_t).

_testcapi: use _PyTime_FromNanoseconds().

4 years agobpo-45152: refactor the dis module to make handling of hasconst opcodes more generic...
Irit Katriel [Wed, 15 Sep 2021 09:14:15 +0000 (10:14 +0100)] 
bpo-45152: refactor the dis module to make handling of hasconst opcodes more generic (GH-28258)

4 years agobpo-45193: Restore IDLE completion boxes on Ubuntu (GH-28343)
Terry Jan Reedy [Wed, 15 Sep 2021 07:13:23 +0000 (03:13 -0400)] 
bpo-45193: Restore IDLE completion boxes on Ubuntu (GH-28343)

The line that should not have been needed on macOS tk 8.6.8 but was,
should not be a problem on Ubuntu, but is.  It is not needed on macOS
tk 8.6.11, installed with 3.10.  Disable it but leave it for
now in case some system needs it.

4 years agobpo-45020: Don't test IDLE with frozen module. (GH-28344)
Terry Jan Reedy [Wed, 15 Sep 2021 07:08:44 +0000 (03:08 -0400)] 
bpo-45020: Don't test IDLE with frozen module. (GH-28344)

Otherwise, test would need special import.