]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
4 years agobpo-38291: Update 3.10 WhatsNew with typing.{io|re} DeprecationWarning (GH-27872)
Ken Jin [Mon, 23 Aug 2021 17:13:51 +0000 (01:13 +0800)] 
bpo-38291: Update 3.10 WhatsNew with typing.{io|re} DeprecationWarning (GH-27872)

4 years ago[doc] Fix typo in idle.rst (GH-27903)
Ikko Ashimine [Mon, 23 Aug 2021 17:12:33 +0000 (02:12 +0900)] 
[doc] Fix typo in idle.rst (GH-27903)

intially -> initially

4 years agoFix bytes.__bytes__ to not truncate at a zero byte (GH-27902)
Mark Dickinson [Mon, 23 Aug 2021 14:24:12 +0000 (15:24 +0100)] 
Fix bytes.__bytes__ to not truncate at a zero byte (GH-27902)

4 years agobpo-24234: Implement bytes.__bytes__ (GH-27901)
Dong-hee Na [Mon, 23 Aug 2021 10:01:51 +0000 (10:01 +0000)] 
bpo-24234: Implement bytes.__bytes__ (GH-27901)

4 years agobpo-24234: implement complex.__complex__ (GH-27887)
Mark Dickinson [Mon, 23 Aug 2021 08:15:49 +0000 (09:15 +0100)] 
bpo-24234: implement complex.__complex__ (GH-27887)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
4 years agobpo-4442: Document use of __new__ for subclasses of immutable types (GH-27866)
Raymond Hettinger [Sun, 22 Aug 2021 19:27:06 +0000 (14:27 -0500)] 
bpo-4442:  Document use of __new__ for subclasses of immutable types (GH-27866)

4 years agobpo-44957: Promote PEP 604 syntax in typing docs (GH-27833)
Sebastian Rittau [Sun, 22 Aug 2021 18:45:01 +0000 (20:45 +0200)] 
bpo-44957: Promote PEP 604 syntax in typing docs (GH-27833)

* Use "X | Y" instead of "Union" where it makes sense.
* Mention that "X | Y" is equivalent to "Union[X, Y]" in Union section.
* Remove "Optional[X]" as shorthand for "Union[X, None]" as the new
  shorthand is now "X | None".
* Mention that "Optional[X]" can be written as "X | None" in section
  about "Optional".

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
4 years ago bpo-42560: reorganize Tkinter docs modules section for clarity (GH-27840)
Mark Roseman [Sun, 22 Aug 2021 18:41:45 +0000 (11:41 -0700)] 
 bpo-42560: reorganize Tkinter docs modules section for clarity (GH-27840)

- move description of internal modules (_tkinter and tkinter.constants) from section intro to list of additional modules at end of section, as not most important info
- added missing ttk and tix here
- emphasized up front that most apps will need tkinter and ttk

4 years agobpo-42560: tweaks to intro of Tkinter docs- add macOS, drop ActiveState (GH-27835)
Mark Roseman [Sun, 22 Aug 2021 18:35:22 +0000 (11:35 -0700)] 
bpo-42560: tweaks to intro of Tkinter docs- add macOS, drop ActiveState (GH-27835)

4 years agobpo-42560: rework external references in Tkinter docs (GH-27838)
Mark Roseman [Sun, 22 Aug 2021 18:34:15 +0000 (11:34 -0700)] 
bpo-42560: rework external references in Tkinter docs (GH-27838)

- reorganized from two sections (tkinter vs. tcl/tk) into three (tkinter, tcl/tk, and books)
- main (recommended) tkinter docs have one tutorial (tkdocs) and one reference (shipman), added better descriptions
- dropped link to Tkinter page on wiki (suggestion by E. Paine; outdated, most material already linked to from python.org)
- replaced Tcl/Tk recent man pages and core dev home with single link to main Tcl/Tk page (which holds both of these)
- updated Modern Tkinter link to book page on TkDocs site (was Amazon link to old version), dropped description
- replaced Grayson book by Moore book (newer, covers ttk)
- changed Ousterhout ref to second edition, covers ttk
- dropped link to Welch book (old)

4 years agobpo-41322: Add unit tests for deprecation of test return values (GH-27846)
andrei kulakov [Sun, 22 Aug 2021 18:32:45 +0000 (14:32 -0400)] 
bpo-41322: Add unit tests for deprecation of test return values (GH-27846)

Also fix the traceback of warnings.

4 years agoRemove unused UNKNOWN macros from cursor.h and prepare_protocol.h (GH-27885)
Erlend Egeberg Aasland [Sun, 22 Aug 2021 13:23:45 +0000 (15:23 +0200)] 
Remove unused UNKNOWN macros from cursor.h and prepare_protocol.h (GH-27885)

4 years agobpo-44978: allow Argument Clinic to handle __complex__ special methods (GH-27886)
Mark Dickinson [Sun, 22 Aug 2021 12:13:26 +0000 (13:13 +0100)] 
bpo-44978: allow Argument Clinic to handle __complex__ special methods (GH-27886)

4 years agobpo-44955: Always call stopTestRun() for implicitly created TestResult objects (GH...
Serhiy Storchaka [Sun, 22 Aug 2021 07:33:52 +0000 (10:33 +0300)] 
bpo-44955: Always call stopTestRun() for implicitly created TestResult objects (GH-27831)

Method stopTestRun() is now always called in pair with method startTestRun()
for TestResult objects implicitly created in TestCase.run().
Previously it was not called for test methods and classes decorated with
a skipping decorator.

4 years agobpo-44940: Clarify the documentation of re.findall() (GH-27849)
Serhiy Storchaka [Sun, 22 Aug 2021 07:24:20 +0000 (10:24 +0300)] 
bpo-44940: Clarify the documentation of re.findall() (GH-27849)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Vedran Čačić <vedgar+github@gmail.com>
4 years agobpo-44968: Fix test_subprocess_wait_no_same_group in test_asyncio (GH-27870)
Serhiy Storchaka [Sat, 21 Aug 2021 20:09:08 +0000 (23:09 +0300)] 
bpo-44968: Fix test_subprocess_wait_no_same_group in test_asyncio (GH-27870)

The code of the test was never executed because the test function
was unintentionally converted to a generator function.

4 years agobpo-44966: Fix out-of-date traceback message (GH-27867)
Raymond Hettinger [Sat, 21 Aug 2021 18:59:18 +0000 (13:59 -0500)] 
bpo-44966: Fix out-of-date traceback message (GH-27867)

4 years agobpo-44965: Early exit for non-DML statements in sqlite3.Cursor.executemany() (GH...
Erlend Egeberg Aasland [Sat, 21 Aug 2021 18:58:58 +0000 (20:58 +0200)] 
bpo-44965: Early exit for non-DML statements in sqlite3.Cursor.executemany() (GH-27865)

4 years agobpo-44524: Do not set _name of _SpecialForm without need (GH-27861)
Serhiy Storchaka [Sat, 21 Aug 2021 06:47:59 +0000 (09:47 +0300)] 
bpo-44524: Do not set _name of _SpecialForm without need (GH-27861)

Because setting non-empty _name affects behavior of other code.

In most cases __name__ can be derived from __origin__.__name__.

4 years agobpo-44926: `get_type_hints`: Add note about type aliases with forward refs (#27859)
Maximilian Hils [Fri, 20 Aug 2021 14:36:51 +0000 (16:36 +0200)] 
bpo-44926: `get_type_hints`: Add note about type aliases with forward refs (#27859)

4 years agobpo-44960: add regression test for geometric_mean with mixed int/floa… (#27856)
Irit Katriel [Fri, 20 Aug 2021 13:08:21 +0000 (14:08 +0100)] 
bpo-44960: add regression test for geometric_mean with mixed int/floa… (#27856)

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
4 years agobpo-44954: Fix wrong result in float.fromhex corner case (GH-27834) 27858/head
Mark Dickinson [Fri, 20 Aug 2021 10:40:11 +0000 (11:40 +0100)] 
bpo-44954: Fix wrong result in float.fromhex corner case (GH-27834)

4 years agoFix reST markup in dataclasses.rst (GH-27843)
Jean-Abou-Samra [Thu, 19 Aug 2021 20:47:16 +0000 (22:47 +0200)] 
Fix reST markup in dataclasses.rst (GH-27843)

The signature of field() had an extraneous colon at the end, causing it
to appear all bold and without the module name.

4 years agobpo-41322: added deprecation warning for tests returning value!=None (GH-27748)
andrei kulakov [Thu, 19 Aug 2021 09:41:04 +0000 (05:41 -0400)] 
bpo-41322: added deprecation warning for tests returning value!=None (GH-27748)

4 years agobpo-36384: [doc] Mention CVE-2021-29921 fix in 3.8.12 (GH-27824)
Łukasz Langa [Thu, 19 Aug 2021 08:55:49 +0000 (10:55 +0200)] 
bpo-36384: [doc] Mention CVE-2021-29921 fix in 3.8.12 (GH-27824)

4 years agobpo-44830: [doc] Restore missing Mozilla devguide link (GH-27818)
Jack DeVries [Thu, 19 Aug 2021 08:10:54 +0000 (04:10 -0400)] 
bpo-44830: [doc] Restore missing Mozilla devguide link (GH-27818)

4 years agobpo-44079: Strip superfluous statement cache from sqlite3.Connection (GH-25998)
Erlend Egeberg Aasland [Wed, 18 Aug 2021 23:37:53 +0000 (01:37 +0200)] 
bpo-44079: Strip superfluous statement cache from sqlite3.Connection (GH-25998)

4 years agobpo-44947: Refine the syntax error for trailing commas in import statements (GH-27814)
Pablo Galindo Salgado [Wed, 18 Aug 2021 20:09:21 +0000 (21:09 +0100)] 
bpo-44947: Refine the syntax error for trailing commas in import statements (GH-27814)

4 years agobpo-44874: deprecate Py_TRASHCAN_SAFE_BEGIN and Py_TRASHCAN_SAFE_END (GH-27693)
Irit Katriel [Wed, 18 Aug 2021 19:50:19 +0000 (20:50 +0100)] 
bpo-44874: deprecate Py_TRASHCAN_SAFE_BEGIN and Py_TRASHCAN_SAFE_END (GH-27693)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
4 years agobpo-44524: Fix cryptic TypeError message when trying to subclass special forms in...
Yurii Karabas [Wed, 18 Aug 2021 19:08:32 +0000 (22:08 +0300)] 
bpo-44524: Fix cryptic TypeError message when trying to subclass special forms in `typing` (GH-27710)

This was a Python 3.9 regression.

4 years agobpo-44949: Fix test_readline auto history tests (#27813)
Victor Stinner [Wed, 18 Aug 2021 17:38:54 +0000 (19:38 +0200)] 
bpo-44949: Fix test_readline auto history tests (#27813)

4 years agobpo-44852: Support filtering over warnings without a set message (GH-27793)
Łukasz Langa [Wed, 18 Aug 2021 11:19:30 +0000 (13:19 +0200)] 
bpo-44852: Support filtering over warnings without a set message (GH-27793)

Additional improvements:

- messages which were compiled regular expressions aren't unpacked back into
  strings for unmatched warnings;

- removed unnecessary "if tokens:" check (there's one before the for loop);

- took `endswith` calculation out of the for loop.

4 years agobpo-44508: [Doc] Document failure mode for loop.call_soon_threadsafe (GH-27688)
meowmeowmeowcat [Tue, 17 Aug 2021 22:55:04 +0000 (06:55 +0800)] 
bpo-44508: [Doc] Document failure mode for loop.call_soon_threadsafe (GH-27688)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
4 years agointroduce omitted index default before using it (GH-27775)
Jefferson Oliveira [Tue, 17 Aug 2021 21:19:03 +0000 (18:19 -0300)] 
introduce omitted index default before using it (GH-27775)

4 years agobpo-44935: enable posix_spawn() on Solaris (GH-27795)
Jakub Kulík [Tue, 17 Aug 2021 18:09:48 +0000 (20:09 +0200)] 
bpo-44935: enable posix_spawn() on Solaris (GH-27795)

Enable posix_spawn() on Solaris

4 years agobpo-44698: Restore complex pow behaviour for small integral exponents (GH-27772)
Mark Dickinson [Tue, 17 Aug 2021 16:51:28 +0000 (17:51 +0100)] 
bpo-44698: Restore complex pow behaviour for small integral exponents (GH-27772)

4 years agobpo-44895: Introduce PYTHONDUMPREFSFILE variable for refcount dumping (GH-27767)
Dong-hee Na [Tue, 17 Aug 2021 15:52:50 +0000 (15:52 +0000)] 
bpo-44895: Introduce PYTHONDUMPREFSFILE variable for refcount dumping (GH-27767)

4 years agobpo-44889: Specialize LOAD_METHOD with PEP 659 adaptive interpreter (GH-27722)
Ken Jin [Tue, 17 Aug 2021 14:55:55 +0000 (22:55 +0800)] 
bpo-44889: Specialize LOAD_METHOD with PEP 659 adaptive interpreter (GH-27722)

Adds four new instructions:

* LOAD_METHOD_ADAPTIVE
* LOAD_METHOD_CACHED
* LOAD_METHOD_MODULE
* LOAD_METHOD_CLASS

4 years agobpo-42035: Enhance test_get_type_name() of _testcapi (GH-27649)
Hai Shi [Tue, 17 Aug 2021 14:50:33 +0000 (22:50 +0800)] 
bpo-42035: Enhance test_get_type_name() of _testcapi (GH-27649)

4 years agobpo-42035: Add PyType_GetQualName() to get a type's qualified name. (GH-27551)
Hai Shi [Tue, 17 Aug 2021 13:39:34 +0000 (21:39 +0800)] 
bpo-42035: Add PyType_GetQualName() to get a type's qualified name. (GH-27551)

4 years agobpo-44903: Removed othergui.rst and list of GUI frameworks (GH-27762)
Gautam Chaudhuri [Tue, 17 Aug 2021 09:00:58 +0000 (10:00 +0100)] 
bpo-44903: Removed othergui.rst and list of GUI frameworks (GH-27762)

4 years agobpo-38956: don't print BooleanOptionalAction's default twice (GH-27672)
Maximilian Hils [Mon, 16 Aug 2021 21:42:21 +0000 (23:42 +0200)] 
bpo-38956: don't print BooleanOptionalAction's default twice (GH-27672)

Co-authored-by: Micky Yun Chan <michan@redhat.com>
4 years agobpo-44914: Add tests for some invariants of tp_version_tag (GH-27774)
Ken Jin [Mon, 16 Aug 2021 19:18:36 +0000 (03:18 +0800)] 
bpo-44914: Add tests for some invariants of tp_version_tag (GH-27774)

4 years agoFix a SystemError in code.replace() (#27771)
Guido van Rossum [Mon, 16 Aug 2021 18:34:23 +0000 (11:34 -0700)] 
Fix a SystemError in code.replace() (#27771)

While the comment said 'We don't bother resizing localspluskinds',
this would cause .replace() to crash when it happened.
(Also types.CodeType(), but testing that is tedious, and this tests all
code paths.)

4 years agobpo-44852: Support ignoring specific DeprecationWarnings wholesale in regrtest (GH...
Łukasz Langa [Mon, 16 Aug 2021 18:13:51 +0000 (20:13 +0200)] 
bpo-44852: Support ignoring specific DeprecationWarnings wholesale in regrtest (GH-27634)

4 years agobpo-44900: Add five superinstructions. (GH-27741)
Mark Shannon [Mon, 16 Aug 2021 11:23:13 +0000 (12:23 +0100)] 
bpo-44900: Add five superinstructions. (GH-27741)

* LOAD_FAST LOAD_FAST
* STORE_FAST LOAD_FAST
* LOAD_FAST LOAD_CONST
* LOAD_CONST LOAD_FAST
* STORE_FAST STORE_FAST

4 years agobpo-44914: Maintain invariants of type version tags. (GH-27773)
Mark Shannon [Mon, 16 Aug 2021 11:21:34 +0000 (12:21 +0100)] 
bpo-44914: Maintain invariants of type version tags. (GH-27773)

* Do not invalidate type versions unnecessarily.

4 years agobpo-44895: skip test_no_hang_on_context_chain_cycle2 until the refleak is fixed ...
Irit Katriel [Mon, 16 Aug 2021 08:36:49 +0000 (09:36 +0100)] 
bpo-44895: skip test_no_hang_on_context_chain_cycle2 until the refleak is fixed (GH-27761)

4 years agobpo-44911: Fixed IsolatedAsyncioTestCase from throwing an exception on leaked tasks...
Bar Harel [Mon, 16 Aug 2021 08:21:08 +0000 (11:21 +0300)] 
bpo-44911: Fixed IsolatedAsyncioTestCase from throwing an exception on leaked tasks (GH-27765)

4 years agobpo-16580: [doc] Add examples to int.to_bytes and int.from_bytes (GH-27760)
Gautam Chaudhuri [Sun, 15 Aug 2021 11:29:05 +0000 (12:29 +0100)] 
bpo-16580: [doc] Add examples to int.to_bytes and int.from_bytes (GH-27760)

* added code equivs. for to_bytes and from_bytes

Based on woparry's patch[1] from the relevant issue thread[2].

[1]: https://bugs.python.org/file30372/issue16580.patch
[2]: https://bugs.python.org/issue16580

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
4 years agobpo-44907: Update error messages in tutorial examples (GH-27755)
meowmeowmeowcat [Fri, 13 Aug 2021 23:40:58 +0000 (07:40 +0800)] 
bpo-44907: Update error messages in tutorial examples (GH-27755)

4 years agobpo-30077: Add support for Apple aifc/sowt pseudo-compression (GH-24449)
dnknth [Fri, 13 Aug 2021 11:31:25 +0000 (13:31 +0200)] 
bpo-30077: Add support for Apple aifc/sowt pseudo-compression (GH-24449)

Co-authored-by: Toby Thurston <thurston@eml.cc>
4 years agobpo-36700: [doc] Update base64 RFC references to RFC 4648 (GH-27700)
andrei kulakov [Fri, 13 Aug 2021 10:58:55 +0000 (06:58 -0400)] 
bpo-36700: [doc] Update base64 RFC references to RFC 4648 (GH-27700)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
4 years agobpo-26228: [doc] Adapt PTY documentation updates from GH-4167 (GH-27754)
Łukasz Langa [Fri, 13 Aug 2021 10:57:07 +0000 (12:57 +0200)] 
bpo-26228: [doc] Adapt PTY documentation updates from GH-4167 (GH-27754)

Co-authored-by: Cornelius Diekmann <c.diekmann@googlemail.com>
4 years agoAdded test case based on recommended test cases from RFC 4648 (GH-27747)
andrei kulakov [Fri, 13 Aug 2021 10:50:37 +0000 (06:50 -0400)] 
Added test case based on recommended test cases from RFC 4648 (GH-27747)

4 years agobpo-44891: Tests `id` preserving on `* 1` for `str` and `bytes` (GH-27745)
Nikita Sobolev [Fri, 13 Aug 2021 10:36:22 +0000 (13:36 +0300)] 
bpo-44891: Tests `id` preserving on `* 1` for `str` and `bytes` (GH-27745)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
4 years agobpo-44895: Temporarily add an extra gc.collect() call (GH-27746)
Irit Katriel [Fri, 13 Aug 2021 09:41:35 +0000 (10:41 +0100)] 
bpo-44895: Temporarily add an extra gc.collect() call (GH-27746)

This is part of an investigation of a non-deterministic reference leak. While we're looking for the root cause, this is included temporarily so that CI doesn't fail on this particular issue. This enables it to find other regressions in the meantime, which would otherwise be shadowed by our known issue.

4 years agobpo-43392: Optimize repeated calls to `__import__()` (GH-24735)
Germán Méndez Bravo [Thu, 12 Aug 2021 18:23:29 +0000 (11:23 -0700)] 
bpo-43392: Optimize repeated calls to `__import__()` (GH-24735)

Implements a two steps check in `importlib._bootstrap._find_and_load()` to avoid locking when the module has been already imported and it's ready.

---

Using `importlib.__import__()`, after this, does show a big difference:

Before:
```
$ ./python -c 'import timeit; print(timeit.timeit("__import__(\"timeit\")", setup="from importlib import __import__"))'
15.92248619502061
```

After:
```
$ ./python -c 'import timeit; print(timeit.timeit("__import__(\"timeit\")", setup="from importlib import __import__"))'
1.206068897008663
```

---

4 years agoUpdate pegen to use the latest upstream developments (GH-27586)
Pablo Galindo Salgado [Thu, 12 Aug 2021 16:37:30 +0000 (17:37 +0100)] 
Update pegen to use the latest upstream developments (GH-27586)

4 years agobpo-44885: Correct the ast locations of f-strings with format specs and repeated...
Pablo Galindo Salgado [Thu, 12 Aug 2021 16:13:30 +0000 (17:13 +0100)] 
bpo-44885: Correct the ast locations of f-strings with format specs and repeated expressions (GH-27729)

4 years agobpo-44890: Fix AMD build error (GH-27740)
Irit Katriel [Thu, 12 Aug 2021 14:20:44 +0000 (15:20 +0100)] 
bpo-44890: Fix AMD build error (GH-27740)

4 years agobpo-44890: collect specialization stats if Py_DEBUG (GH-27731)
Irit Katriel [Thu, 12 Aug 2021 11:15:06 +0000 (12:15 +0100)] 
bpo-44890: collect specialization stats if Py_DEBUG (GH-27731)

4 years agobpo-44878: Remove loop from interpreter. All dispatching is done by gotos. (GH-27727)
Mark Shannon [Thu, 12 Aug 2021 10:47:38 +0000 (11:47 +0100)] 
bpo-44878: Remove loop from interpreter. All dispatching is done by gotos. (GH-27727)

4 years agobpo-33930: Fix typo in the test name. (#27733)
Benjamin Peterson [Thu, 12 Aug 2021 01:56:43 +0000 (18:56 -0700)] 
bpo-33930: Fix typo in the test name. (#27733)

bpo-33930: Fix typo in the test name. (GH-27733)

4 years agobpo-26228: Fix pty EOF handling (GH-12049)
Zephyr Shannon [Wed, 11 Aug 2021 22:21:46 +0000 (15:21 -0700)] 
bpo-26228: Fix pty EOF handling (GH-12049)

On non-Linux POSIX platforms, like FreeBSD or macOS,
the FD used to read a forked PTY may signal its exit not
by raising an error but by sending empty data to the read
syscall. This case wasn't handled, leading to hanging
`pty.spawn` calls.

Co-authored-by: Reilly Tucker Siemens <reilly@tuckersiemens.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
4 years agoUpdate test__opcode and _Py_GetSpecializationStats with recent specialization stat...
Irit Katriel [Wed, 11 Aug 2021 16:34:01 +0000 (17:34 +0100)] 
Update test__opcode and _Py_GetSpecializationStats with recent specialization stat changes (GH-27728)

4 years agobpo-33479: Add architecture and threading model sections to Tkinter module docs ...
Mark Roseman [Wed, 11 Aug 2021 16:29:15 +0000 (09:29 -0700)] 
bpo-33479: Add architecture and threading model sections to Tkinter module docs (GH-27717)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
4 years agobpo-44878: Remove the switch from the main interpreter loop when using computed gotos...
Mark Shannon [Wed, 11 Aug 2021 13:02:11 +0000 (14:02 +0100)] 
bpo-44878: Remove the switch from the main interpreter loop when using computed gotos. (GH-27726)

* Refactor dispatch logic to make flow of control clearer. Moves lltrace and dxprofile instrumentation into DISPATCH macro.

* Remove switch in interpreter loop when using computed gotos. There is no need for two nearly-duplicate dispatch tables.

4 years agobpo-44878: _PyEval_EvalFrameDefault readability improvements (GH-27725)
Mark Shannon [Wed, 11 Aug 2021 10:47:52 +0000 (11:47 +0100)] 
bpo-44878:  _PyEval_EvalFrameDefault readability improvements (GH-27725)

* Move a few variable declarations to point of definition.

* Factor out tracing of function entry into helper function.

4 years agoAdd .DS_Store on ignore (GH-27711)
180909 [Wed, 11 Aug 2021 09:32:25 +0000 (17:32 +0800)] 
Add .DS_Store on ignore (GH-27711)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
4 years agoAdd missing DISPATCH() (GH-27715)
Mark Shannon [Wed, 11 Aug 2021 08:25:26 +0000 (09:25 +0100)] 
Add missing DISPATCH() (GH-27715)

4 years agobpo-33930: Fix segfault with deep recursion when cleaning method objects (GH-27678)
Pablo Galindo Salgado [Tue, 10 Aug 2021 23:34:14 +0000 (00:34 +0100)] 
bpo-33930: Fix segfault with deep recursion when cleaning method objects (GH-27678)

4 years agobpo-44854: Add .editorconfig file to help enforce `make patchcheck` (GH-27638)
Łukasz Langa [Tue, 10 Aug 2021 16:30:57 +0000 (18:30 +0200)] 
bpo-44854: Add .editorconfig file to help enforce `make patchcheck` (GH-27638)

4 years agoClassify specialization failures. Provides more useful stats, with lower overhead...
Mark Shannon [Tue, 10 Aug 2021 13:53:05 +0000 (14:53 +0100)] 
Classify specialization failures. Provides more useful stats, with lower overhead. (GH-27701)

4 years agoFix stats for STORE_ATTR specialization. (GH-27708)
Mark Shannon [Tue, 10 Aug 2021 10:40:37 +0000 (11:40 +0100)] 
Fix stats for STORE_ATTR specialization. (GH-27708)

4 years agobpo-25782: avoid hang in PyErr_SetObject when current exception has a cycle in its...
Irit Katriel [Tue, 10 Aug 2021 09:37:25 +0000 (10:37 +0100)] 
bpo-25782: avoid hang in PyErr_SetObject when current exception has a cycle in its context chain (GH-27626)

Co-authored-by: Dennis Sweeney 36520290+sweeneyde@users.noreply.github.com
4 years agobpo-33479: Remove unqualified tkinter threadsafe claim. (GH-6990)
Terry Jan Reedy [Tue, 10 Aug 2021 09:32:21 +0000 (05:32 -0400)] 
bpo-33479: Remove unqualified tkinter threadsafe claim. (GH-6990)

It has not been true for several years and likely never was.

4 years agomake lib2to3 parse async generators everywhere (GH-6588)
Zsolt Dollenstein [Tue, 10 Aug 2021 09:31:32 +0000 (10:31 +0100)] 
make lib2to3 parse async generators everywhere (GH-6588)

4 years agobpo-14853: add back the stdin test, skip if stdin is redirected (GH-27694)
Irit Katriel [Mon, 9 Aug 2021 22:38:26 +0000 (23:38 +0100)] 
bpo-14853: add back the stdin test, skip if stdin is redirected (GH-27694)

4 years agobpo-39498 Start linking the security warnings in the stdlib modules (GH-18272)
Anthony Shaw [Mon, 9 Aug 2021 22:35:51 +0000 (08:35 +1000)] 
bpo-39498 Start linking the security warnings in the stdlib modules (GH-18272)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
4 years agobpo-44854: Remove trailing whitespaces (GH-27689)
Serhiy Storchaka [Mon, 9 Aug 2021 18:32:54 +0000 (21:32 +0300)] 
bpo-44854: Remove trailing whitespaces (GH-27689)

4 years agobpo-44872: use new trashcan macros in framobject.c (#27683)
Irit Katriel [Mon, 9 Aug 2021 17:11:38 +0000 (18:11 +0100)] 
bpo-44872: use new trashcan macros in framobject.c (#27683)

4 years agobpo-41402: Fix email ContentManager calling .encode() on bytes (GH-21631)
Johannes Reiff [Mon, 9 Aug 2021 16:45:41 +0000 (18:45 +0200)] 
bpo-41402: Fix email ContentManager calling .encode() on bytes (GH-21631)

4 years agobpo-38840: Incorrect __all__ in multiprocessing.managers (GH-18034)
Zackery Spytz [Mon, 9 Aug 2021 16:44:55 +0000 (09:44 -0700)] 
bpo-38840: Incorrect __all__ in multiprocessing.managers (GH-18034)

This was causing test___all__ to fail on platforms lacking a shared
memory implementation.

Co-Authored-By: Xavier de Gaye <xdegaye@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
4 years agobpo-44522: Fix inaccurate information in open() function (GH-27650)
meowmeowmeowcat [Mon, 9 Aug 2021 14:14:54 +0000 (22:14 +0800)] 
bpo-44522: Fix inaccurate information in open() function (GH-27650)

- Use "Low surrogate code units" instead of "Unicode Private Use Area"

4 years agoRemove unused variable. (GH-27677)
Mark Shannon [Mon, 9 Aug 2021 13:44:26 +0000 (14:44 +0100)] 
Remove unused variable. (GH-27677)

4 years agobpo-44702: Remove ambiguity in sentence (GH-27676)
meowmeowmeowcat [Mon, 9 Aug 2021 12:01:30 +0000 (20:01 +0800)] 
bpo-44702: Remove ambiguity in sentence (GH-27676)

Automerge-Triggered-By: GH:pablogsal
4 years agobpo-32695: Docs and tests for compresslevel and preset kwargs in tarfile (GH-21470)
Zackery Spytz [Mon, 9 Aug 2021 10:05:31 +0000 (03:05 -0700)] 
bpo-32695: Docs and tests for compresslevel and preset kwargs in tarfile (GH-21470)

Co-Authored-By: Bo Bayles <bbayles@gmail.com>
4 years agobpo-44826: Specialize STORE_ATTR (GH-27590)
Mark Shannon [Mon, 9 Aug 2021 09:40:21 +0000 (10:40 +0100)] 
bpo-44826: Specialize STORE_ATTR (GH-27590)

* Generalize cache names for LOAD_ATTR to allow store and delete specializations.

* Factor out specialization of attribute dictionary access.

* Specialize STORE_ATTR.

4 years agobpo-44840: Compiler: Move duplication of exit blocks with no line numbers to after...
Mark Shannon [Mon, 9 Aug 2021 09:18:59 +0000 (10:18 +0100)] 
bpo-44840: Compiler: Move duplication of exit blocks with no line numbers to after CFG optimization. (GH-27656)

4 years agobpo-42053: Remove misleading check in os.fwalk() (GH-27669)
Serhiy Storchaka [Sun, 8 Aug 2021 18:04:02 +0000 (21:04 +0300)] 
bpo-42053: Remove misleading check in os.fwalk() (GH-27669)

os.fwalk() does not support integer as the first argument,
and never supported.

4 years agobpo-44859: Improve error handling in sqlite3 and and raise more accurate exceptions...
Serhiy Storchaka [Sun, 8 Aug 2021 05:49:44 +0000 (08:49 +0300)] 
bpo-44859: Improve error handling in sqlite3 and and raise more accurate exceptions. (GH-27654)

* MemoryError is now raised instead of sqlite3.Warning when
  memory is not enough for encoding a statement to UTF-8
  in Connection.__call__() and Cursor.execute().
* UnicodEncodeError is now raised instead of sqlite3.Warning when
  the statement contains surrogate characters
  in Connection.__call__() and Cursor.execute().
* TypeError is now raised instead of ValueError for non-string
  script argument in Cursor.executescript().
* ValueError is now raised for script containing the null
  character instead of truncating it in Cursor.executescript().
* Correctly handle exceptions raised when getting boolean value
  of the result of the progress handler.
* Add many tests covering different corner cases.

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
4 years agobpo-44830 - Remove the broken Broken Mozilla devguide link. (GH-27664)
Senthil Kumaran [Sun, 8 Aug 2021 03:18:10 +0000 (20:18 -0700)] 
bpo-44830 - Remove the broken Broken Mozilla devguide link. (GH-27664)

4 years agobpo-44856: Possible reference leak in error paths of update_bases() and __build_class...
Pablo Galindo Salgado [Sat, 7 Aug 2021 10:10:14 +0000 (11:10 +0100)] 
bpo-44856: Possible reference leak in error paths of update_bases() and __build_class__ (GH-27647)

4 years agobpo-42971: Add errno.EQFULL (macOS) (GH-24419)
Ronald Oussoren [Fri, 6 Aug 2021 21:35:13 +0000 (23:35 +0200)] 
bpo-42971: Add errno.EQFULL (macOS) (GH-24419)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
4 years agobpo-41576: document BaseException in favor of bare except (GH-21917)
Thomas Grainger [Fri, 6 Aug 2021 20:44:15 +0000 (21:44 +0100)] 
bpo-41576: document BaseException in favor of bare except (GH-21917)

4 years agobpo-27752: improve documentation of csv.Dialect (GH-26795)
Jack DeVries [Fri, 6 Aug 2021 20:05:16 +0000 (16:05 -0400)] 
bpo-27752: improve documentation of csv.Dialect (GH-26795)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
4 years agobpo-44605: Teach @total_ordering() to work with metaclasses (GH-27633)
Raymond Hettinger [Fri, 6 Aug 2021 19:33:30 +0000 (14:33 -0500)] 
bpo-44605: Teach @total_ordering() to work with metaclasses (GH-27633)

4 years agobpo-44839: Raise more specific errors in sqlite3 (GH-27613)
Serhiy Storchaka [Fri, 6 Aug 2021 18:28:47 +0000 (21:28 +0300)] 
bpo-44839: Raise more specific errors in sqlite3 (GH-27613)

MemoryError raised in user-defined functions will now preserve
its type. OverflowError will now be converted to DataError.
Previously both were converted to OperationalError.

4 years agoUpgrade bundled pip and setuptools (#27625)
Tzu-ping Chung [Fri, 6 Aug 2021 18:22:48 +0000 (02:22 +0800)] 
Upgrade bundled pip and setuptools (#27625)

pip is now 21.2.3
setuptools is now 57.4.0