]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Wheeler Law [Fri, 21 Apr 2023 02:04:25 +0000 (21:04 -0500)]
gh-99352: Respect `http.client.HTTPConnection.debuglevel` in `urllib.request.AbstractHTTPHandler` (#99353)
* bugfix: let the HTTP- and HTTPSHandlers respect the value of http.client.HTTPConnection.debuglevel
* add tests
* add news
* ReSTify NEWS and reword a bit.
* Address Review Comments.
* Use mock.patch.object instead of settting the module level value.
* Used test values to assert the debuglevel.
---------
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Senthil Kumaran <senthil@python.org>
Adrien [Thu, 20 Apr 2023 14:07:41 +0000 (16:07 +0200)]
gh-98641: Document difference between task group and gather (#103644)
The purpose of the comments is to rule out the implication that asyncio.TaskGroup is a drop-in replacement / better alternative to asyncio.gather().
Eric Snow [Wed, 19 Apr 2023 22:09:35 +0000 (16:09 -0600)]
gh-98040: Move the Single-Phase Init Tests Out of test_imp (gh-102561)
I recently added some tests to test_imp, but @warsaw is removing that file in gh-98573. The tests are worth keeping so here I'm moving them to test_import.
Alexander Belopolsky [Wed, 19 Apr 2023 21:02:29 +0000 (17:02 -0400)]
gh-83861: Fix datetime.astimezone() method (GH-101545)
Pablo Galindo Salgado [Wed, 19 Apr 2023 20:51:31 +0000 (14:51 -0600)]
gh-102856: Clean some of the PEP 701 tokenizer implementation (#103634)
Pablo Galindo Salgado [Wed, 19 Apr 2023 17:53:34 +0000 (11:53 -0600)]
gh-102856: Skip test_mismatched_parens in WASI builds (#103633)
Pablo Galindo Salgado [Wed, 19 Apr 2023 16:18:16 +0000 (17:18 +0100)]
gh-102856: Initial implementation of PEP 701 (#102855)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
Co-authored-by: Marta Gómez Macías <mgmacias@google.com>
Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
Erlend E. Aasland [Wed, 19 Apr 2023 16:02:17 +0000 (10:02 -0600)]
gh-103583: Add ref. dependency between multibytecodec modules (#103589)
Erlend E. Aasland [Wed, 19 Apr 2023 14:15:50 +0000 (08:15 -0600)]
gh-83004: Harden msvcrt further (#103420)
Kumar Aditya [Wed, 19 Apr 2023 10:21:53 +0000 (15:51 +0530)]
GH-88342: clarify that `asyncio.as_completed` accepts generators yielding tasks (#103626)
Irit Katriel [Wed, 19 Apr 2023 05:05:52 +0000 (06:05 +0100)]
gh-102778: IDLE - make sys.last_exc available in Shell after traceback (#103314)
---------
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Nikita Sobolev [Wed, 19 Apr 2023 05:02:48 +0000 (08:02 +0300)]
gh-103582: Remove last references to `argparse.REMAINDER` from docs (#103586)
Erlend E. Aasland [Wed, 19 Apr 2023 03:08:16 +0000 (21:08 -0600)]
gh-103583: Always pass multibyte codec structs as const (#103588)
Erlend E. Aasland [Wed, 19 Apr 2023 02:30:54 +0000 (20:30 -0600)]
gh-103617: Fix compiler warning in _iomodule.c (#103618)
Ethan Furman [Tue, 18 Apr 2023 23:19:23 +0000 (16:19 -0700)]
gh-103596: [Enum] do not shadow mixed-in methods/attributes (GH-103600)
For example:
class Book(StrEnum):
title = auto()
author = auto()
desc = auto()
Book.author.desc is Book.desc
but
Book.author.title() == 'Author'
is commonly expected. Using upper-case member names avoids this confusion and possible performance impacts.
Co-authored-by: samypr100 <3933065+samypr100@users.noreply.github.com>
Nikita Sobolev [Tue, 18 Apr 2023 17:41:14 +0000 (20:41 +0300)]
GH-100530: Change the error message for non-class class patterns (GH-103576)
Steve Dower [Tue, 18 Apr 2023 16:47:08 +0000 (17:47 +0100)]
gh-95299: Remove lingering setuptools reference in installer scripts (GH-103613)
zyckk4 [Tue, 18 Apr 2023 11:21:26 +0000 (19:21 +0800)]
[Doc] Fix a typo in optparse.rst (#103504)
yuki [Tue, 18 Apr 2023 11:18:53 +0000 (20:18 +0900)]
gh-101100: Fix broken reference `__format__` in `string.rst` (#103531)
Pradyun Gedam [Tue, 18 Apr 2023 04:43:34 +0000 (23:43 -0500)]
gh-95299: Stop installing setuptools as a part of ensurepip and venv (#101039)
Remove the bundled setuptools wheel from ensurepip, and stop installing setuptools in environments created by venv.
Co-Authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
Rafael Fontenelle [Tue, 18 Apr 2023 02:57:53 +0000 (23:57 -0300)]
GH-103484: Docs: add linkcheck allowed redirects entries for most cases (#103569)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Skip Montanaro [Tue, 18 Apr 2023 01:21:19 +0000 (20:21 -0500)]
gh-67230: update whatsnew note for csv changes (#103598)
Nikita Sobolev [Mon, 17 Apr 2023 23:33:22 +0000 (02:33 +0300)]
gh-103449: Fix a bug in dataclass docstring generation (#103454)
AN Long [Mon, 17 Apr 2023 18:30:48 +0000 (02:30 +0800)]
gh-103092: Isolate winreg (#103250)
Steve Dower [Mon, 17 Apr 2023 16:33:54 +0000 (17:33 +0100)]
gh-103088: Ensure POSIX venv scripts always use LF line endings (GH-103591)
Also touches the affected files in meaningless ways to ensure they get updated when pulling
Dong-hee Na [Mon, 17 Apr 2023 14:14:18 +0000 (23:14 +0900)]
gh-101525: Fix make test if the --enable-bolt enabled (gh-103574)
Ezio Melotti [Mon, 17 Apr 2023 03:26:22 +0000 (11:26 +0800)]
Remove `expert-*` from `project-updater` GH workflow (#103579)
Erlend E. Aasland [Mon, 17 Apr 2023 00:41:25 +0000 (02:41 +0200)]
gh-103583: Add codecs and maps to _codecs_* module state (#103540)
Giampaolo Rodola [Sun, 16 Apr 2023 22:19:44 +0000 (00:19 +0200)]
gh-48330: address review comments to PR-12271 (#103209)
address review comments to PR-12271
Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
Erlend E. Aasland [Sun, 16 Apr 2023 03:57:30 +0000 (05:57 +0200)]
gh-103527: Add multibytecodec.h as make dep for _codecs_* (#103567)
Nikita Sobolev [Sat, 15 Apr 2023 20:48:31 +0000 (23:48 +0300)]
gh-103553: Improve `test_inspect`: add more assertions, remove unused (#103554)
Barney Gale [Sat, 15 Apr 2023 16:35:17 +0000 (17:35 +0100)]
GH-103517: Improve tests for `pathlib.Path.walk()` (GH-103518)
chgnrdv [Sat, 15 Apr 2023 05:53:31 +0000 (08:53 +0300)]
gh-102114: Make dis print more concise tracebacks for syntax errors in str inputs (#102115)
Barney Gale [Fri, 14 Apr 2023 20:55:41 +0000 (21:55 +0100)]
GH-78079: Fix UNC device path root normalization in pathlib (GH-102003)
We no longer add a root to device paths such as `//./PhysicalDrive0`,
`//?/BootPartition` and `//./c:` while normalizing. We also avoid adding a
root to incomplete UNC share paths, like `//`, `//a` and `//a/`.
Co-authored-by: Eryk Sun <eryksun@gmail.com>
Tian Gao [Fri, 14 Apr 2023 20:40:31 +0000 (13:40 -0700)]
gh-101517: Add regression test for a lineno bug in try/except* impacting pdb (#103547)
Erlend E. Aasland [Fri, 14 Apr 2023 18:47:13 +0000 (20:47 +0200)]
gh-103527: Add make deps for _codecs_* and _multibytecodec (#103528)
Zachary Ware [Fri, 14 Apr 2023 16:03:28 +0000 (11:03 -0500)]
gh-103532: Fix reST syntax in NEWS entry (GH-103544)
Zachary Ware [Fri, 14 Apr 2023 15:28:53 +0000 (10:28 -0500)]
gh-103532: Add NEWS entry (#103542)
Christopher Chavez [Fri, 14 Apr 2023 14:04:16 +0000 (09:04 -0500)]
gh-103532: Remove TKINTER_PROTECT_LOADTK code (GH-103535)
This was only needed for Tk 8.4.13 and older,
but Tkinter already requires at least 8.5.12.
Nikita Sobolev [Fri, 14 Apr 2023 09:01:10 +0000 (12:01 +0300)]
gh-103180: Add CI timeouts to all GitHub Actions jobs (#103437)
Ned Batchelder [Fri, 14 Apr 2023 07:45:14 +0000 (03:45 -0400)]
Remove double space in import error message (#103458)
Sergii Dymchenko [Fri, 14 Apr 2023 07:44:10 +0000 (00:44 -0700)]
ipaddress: Remove non-existent ip_str param from docstring (#103461)
AN Long [Fri, 14 Apr 2023 07:40:25 +0000 (15:40 +0800)]
Fix syntax typo in isolating extensions doc (#103516)
Nikita Sobolev [Fri, 14 Apr 2023 07:06:31 +0000 (10:06 +0300)]
gh-103406: Modernize pos-only arguments usage in `test_signature` (#103407)
Boris Verkhovskiy [Fri, 14 Apr 2023 03:07:49 +0000 (04:07 +0100)]
Proofread howto/perf_profiling.rst (#103530)
Benjamin Peterson [Thu, 13 Apr 2023 17:45:03 +0000 (12:45 -0500)]
Fix unused functions warnings in instrumentation.c (GH-103515)
Ethan Furman [Thu, 13 Apr 2023 15:31:03 +0000 (08:31 -0700)]
gh-103479: [Enum] require __new__ to be considered a data type (GH-103495)
a mixin must either have a __new__ method, or be a dataclass, to be interpreted as a data-type
Ethan Furman [Thu, 13 Apr 2023 15:24:33 +0000 (08:24 -0700)]
gh-103365: [Enum] STRICT boundary corrections (GH-103494)
STRICT boundary:
- fix bitwise operations
- make default for Flag
Mark Shannon [Thu, 13 Apr 2023 15:19:07 +0000 (16:19 +0100)]
GH-103488: Use return-offset, not yield-offset. (GH-103502)
* Use return-offset, not yield-offset, so that instruction pointer is correct when sending to a generator or coroutine.
Stanislav Syekirin [Thu, 13 Apr 2023 13:17:14 +0000 (15:17 +0200)]
gh-103088: Fix test_venv error message to avoid bytes/str warning (GH-103500)
Mark Shannon [Thu, 13 Apr 2023 12:56:09 +0000 (13:56 +0100)]
GH-103082: Turn on branch events for FOR_ITER instructions. (#103507)
Turn on branch events for FOR_ITER instructions.
Tomas R [Thu, 13 Apr 2023 07:37:57 +0000 (09:37 +0200)]
gh-102978: Fix mock.patch function signatures for class and staticmethod decorators (#103228)
Fixes unittest.mock.patch not enforcing function signatures for methods
decorated with @classmethod or @staticmethod when patch is called with
autospec=True.
Ali-Akber Saifee [Thu, 13 Apr 2023 04:46:52 +0000 (21:46 -0700)]
gh-103462: Ensure SelectorSocketTransport.writelines registers a writer when data is still pending (#103463)
Pradyun Gedam [Thu, 13 Apr 2023 04:17:36 +0000 (23:17 -0500)]
gh-95299: Rework test_cppext.py to not invoke setup.py directly (#103316)
* gh-95299: Rework test_cppext.py to not invoke setup.py directly
* Add tests/cppextdata data to `TESTSUBDIRS`
* Revert "Add tests/cppextdata data to `TESTSUBDIRS`"
This reverts commit
635492e53954fb0fc2a2875c8961bde99266c48d .
* Revert "gh-95299: Rework test_cppext.py to not invoke setup.py directly"
This reverts commit
41c5a667b5de7070bbde5780f1c124f96863c91d .
* Build and install the extension in a temporary directory instead
* Pull in wheels for setuptools and wheel for testing extension builds
Skip Montanaro [Thu, 13 Apr 2023 00:45:52 +0000 (19:45 -0500)]
gh-67230: document new csv quoting modes in whatsnew (gh-103491)
Skip Montanaro [Wed, 12 Apr 2023 22:32:30 +0000 (17:32 -0500)]
gh-67230: add quoting rules to csv module (GH-29469)
Add two quoting styles for csv dialects.
They will help to work with certain databases in particular.
Automerge-Triggered-By: GH:merwok
Stanislav Syekirin [Wed, 12 Apr 2023 20:11:50 +0000 (22:11 +0200)]
gh-103088: Fix virtual environment activate script not working in Cygwin (GH-103470)
Nikita Sobolev [Wed, 12 Apr 2023 18:27:14 +0000 (21:27 +0300)]
gh-103326: Remove `Python/importlib.h` (GH-103331)
Co-authored-by: Brett Cannon <brett@python.org>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Erlend E. Aasland [Wed, 12 Apr 2023 12:51:28 +0000 (14:51 +0200)]
gh-103092: Isolate `_collections` (#103093)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Mark Shannon [Wed, 12 Apr 2023 11:04:55 +0000 (12:04 +0100)]
GH-103082: Implementation of PEP 669: Low Impact Monitoring for CPython (GH-103083)
* The majority of the monitoring code is in instrumentation.c
* The new instrumentation bytecodes are in bytecodes.c
* legacy_tracing.c adapts the new API to the old sys.setrace and sys.setprofile APIs
AN Long [Wed, 12 Apr 2023 10:41:21 +0000 (18:41 +0800)]
gh-103092: Isolate msvcrt (#103248)
Nick Burns [Wed, 12 Apr 2023 08:59:21 +0000 (01:59 -0700)]
gh-103417: use time.monotonic in the example for sched.scheduler (#103418)
Furkan Onder [Wed, 12 Apr 2023 08:44:35 +0000 (11:44 +0300)]
GH-83893: Cross reference env. vars and -X command line options (GH-103414)
Co-authored-by: Erlend E. Aasland
Bar Harel [Wed, 12 Apr 2023 07:35:56 +0000 (08:35 +0100)]
gh-103357: Add logging.Formatter defaults support to logging.config fileConfig and dictConfig (GH-103359)
Tian Gao [Wed, 12 Apr 2023 06:18:34 +0000 (23:18 -0700)]
gh-103237: Polish pdb docs (#103238)
Tian Gao [Tue, 11 Apr 2023 22:40:30 +0000 (15:40 -0700)]
gh-103143: Polish pdb help messages and doc strings (GH-103144)
* Made all the command part of the docstring match the official documentation
* Always have a space between the command and the description in docstring
* Added a helper function to format the help message
Before:
```
(Pdb) h a
a(rgs)
Print the argument list of the current function.
(Pdb) h commands
commands [bpnumber]
(com) ...
(com) end
(Pdb)
...
(Pdb) h interact
interact
Start an interactive interpreter whose global namespace
contains all the (global and local) names found in the current scope.
```
After
```
(Pdb) h a
Usage: a(rgs)
Print the argument list of the current function.
(Pdb) h commands
Usage: (Pdb) commands [bpnumber]
(com) ...
(com) end
(Pdb)
...
(Pdb) h interact
Usage: interact
Start an interactive interpreter whose global namespace
contains all the (global and local) names found in the current scope.
```
Automerge-Triggered-By: GH:brandtbucher
Benjamin Peterson [Tue, 11 Apr 2023 20:30:05 +0000 (15:30 -0500)]
Remove redundant words from interpreter_definition.md. (GH-103455)
Irit Katriel [Tue, 11 Apr 2023 20:08:29 +0000 (21:08 +0100)]
gh-87092: fix refleak in peepholer test harness (#103448)
Stanislav Syekirin [Tue, 11 Apr 2023 19:20:46 +0000 (21:20 +0200)]
gh-103088: Sanitize venv paths when using MSYS or Cygwin Bash (GH-103325)
Barney Gale [Tue, 11 Apr 2023 16:26:45 +0000 (17:26 +0100)]
GH-103220: Fix `ntpath.join()` of partial UNC drive with trailing slash (GH-103221)
Nikita Sobolev [Tue, 11 Apr 2023 13:50:25 +0000 (16:50 +0300)]
gh-87864: Use correct function definition syntax in the docs (#103312)
Irit Katriel [Tue, 11 Apr 2023 10:53:06 +0000 (11:53 +0100)]
gh-77757: replace exception wrapping by PEP-678 notes in typeobject's __set_name__ (#103402)
Alex Waygood [Tue, 11 Apr 2023 10:25:45 +0000 (11:25 +0100)]
gh-103373: `__mro_entries__` docs: improve cross references (#103398)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Irit Katriel [Tue, 11 Apr 2023 10:20:39 +0000 (11:20 +0100)]
gh-91276: remove unused _PyOpcode_RelativeJump (#103156)
Irit Katriel [Tue, 11 Apr 2023 10:15:09 +0000 (11:15 +0100)]
gh-87092: move assembler related code from compile.c to assemble.c (#103277)
Irit Katriel [Tue, 11 Apr 2023 08:38:37 +0000 (09:38 +0100)]
gh-103176: sys._current_exceptions() returns mapping to exception instances instead of exc_info tuples (#103177)
Irit Katriel [Tue, 11 Apr 2023 08:31:39 +0000 (09:31 +0100)]
gh-102828: set stacklevel on deprecation warning (#103422)
Zac Hatfield-Dodds [Tue, 11 Apr 2023 06:44:53 +0000 (23:44 -0700)]
gh-99553: add tests for ExceptionGroup wrapping (#99615)
Hugo van Kemenade [Tue, 11 Apr 2023 06:17:34 +0000 (09:17 +0300)]
Docs: don't render files in includes/, they're for embedding only (#103313)
C.A.M. Gerlach [Tue, 11 Apr 2023 03:57:36 +0000 (22:57 -0500)]
Doc: Avoid error lexing multiprocessing docs code block on Pygments 2.15.0 (#103421)
David Ellis [Mon, 10 Apr 2023 21:50:58 +0000 (22:50 +0100)]
gh-103000: Optimise dataclasses asdict/astuple for common types (#103005)
Co-authored-by: Carl Meyer <carl@oddbird.net>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
AN Long [Mon, 10 Apr 2023 21:01:05 +0000 (05:01 +0800)]
gh-103092: Isolate winsound (#103249)
Erlend E. Aasland [Mon, 10 Apr 2023 20:58:25 +0000 (22:58 +0200)]
gh-83004: Harden winreg init (#103386)
Erlend E. Aasland [Mon, 10 Apr 2023 17:09:33 +0000 (19:09 +0200)]
gh-83004: Harden `msvcrt` init (#103383)
raylu [Mon, 10 Apr 2023 16:30:32 +0000 (09:30 -0700)]
gh-103059: Clarify gc.freeze documentation (#103058)
Nikita Sobolev [Mon, 10 Apr 2023 14:58:48 +0000 (17:58 +0300)]
gh-103334: Ignore `Tools/c-analyzer/cpython/_parser.py` from `patchcheck` (GH-103335)
I've also added a small comment to `Tools/c-analyzer/cpython/_parser.py` to trigger the `patchcheck` CI. It must pass now.
Automerge-Triggered-By: GH:ericsnowcurrently
Nikita Sobolev [Mon, 10 Apr 2023 14:57:17 +0000 (17:57 +0300)]
gh-97797: Mention `__metadata__` in docstrings of `typing.{_AnnotatedAlias, Annotated}` (#103405)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Kirill <80244920+Eclips4@users.noreply.github.com>
Nikita Sobolev [Mon, 10 Apr 2023 11:09:19 +0000 (14:09 +0300)]
gh-103395: Improve `typing._GenericAlias.__dir__` coverage (#103396)
James Hilton-Balfe [Sun, 9 Apr 2023 21:55:32 +0000 (22:55 +0100)]
Fix old behaviour in typing documentation (#103400)
Erlend E. Aasland [Sun, 9 Apr 2023 20:00:22 +0000 (22:00 +0200)]
gh-83004: Harden winsound init (#103385)
Raymond Hettinger [Sun, 9 Apr 2023 19:17:37 +0000 (14:17 -0500)]
Itertool recipe improvements (GH-103399)
Barney Gale [Sun, 9 Apr 2023 17:40:03 +0000 (18:40 +0100)]
GH-101362: Omit path anchor from `pathlib.PurePath()._parts` (GH-102476)
Improve performance of path construction by skipping the addition of the path anchor (`drive + root`) to the internal `_parts` list. Rename this attribute to `_tail` for clarity.
Barney Gale [Sun, 9 Apr 2023 15:48:45 +0000 (16:48 +0100)]
GH-103379: Fix up old tests for `pathlib.PurePath._parse_path` (GH-103380)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Furkan Onder [Sun, 9 Apr 2023 08:44:49 +0000 (11:44 +0300)]
Gh-68586: use run_python_until_end in test_capi (GH-102729)
Co-authored-by: Aidin Gharibnavaz
Automerge-Triggered-By: GH:kumaraditya303
Stepfen Shawn [Sun, 9 Apr 2023 08:43:21 +0000 (16:43 +0800)]
Remove useless symbol in pystats.h (#101864)
mara004 [Sun, 9 Apr 2023 08:26:52 +0000 (10:26 +0200)]
ctypes docs: fix missing `not` in variadic functions section (#102611)
Oleg Iarygin [Sun, 9 Apr 2023 08:18:53 +0000 (12:18 +0400)]
gh-103300: Fix `Popen.wait()` deadlock in patchcheck.py (#103301)
JakobDev [Sun, 9 Apr 2023 08:13:40 +0000 (10:13 +0200)]
Fix typos in test_tempfile.py (#102841)
dependabot[bot] [Sun, 9 Apr 2023 08:12:43 +0000 (13:42 +0530)]
build(deps): bump actions/stale from 7 to 8 (#103169)
Bumps [actions/stale](https://github.com/actions/stale) from 7 to 8.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v7...v8)
---
updated-dependencies:
- dependency-name: actions/stale
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Hugo van Kemenade [Sun, 9 Apr 2023 07:43:01 +0000 (10:43 +0300)]
Add hugovk as a .github code owner (GH-103394)
Automerge-Triggered-By: GH:hugovk