Commit Graph

116696 Commits

Author SHA1 Message Date
Finn Womack b701dce340
gh-102765: Update ntpath.isdir/isfile/islink/exists to use GetFileInformationByName when available (GH-103485) 2023-04-27 14:23:26 +00:00
Erlend E. Aasland 8a0c7f1e40
gh-103583: Isolate CJK codec modules (#103869) 2023-04-27 15:02:43 +02:00
Erlend E. Aasland e9c777208f
gh-103092: Isolate _ctypes, part 1 (#103893)
Establish global state and port the following types to heap types:

- DictRemover_Type
- PyCArg_Type
- PyCThunk_Type
- PyCField_Type
- StructParam_Type
2023-04-27 14:57:54 +02:00
Irit Katriel 63842bd907
gh-103590: do not wrap a single exception raised from a try-except* (#103665) 2023-04-27 12:52:15 +01:00
Itayazolay 78942ecd9b
gh-103607: Fix `pause_reading` to work when called from `connection_made` in `asyncio`. (#17425)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2023-04-27 15:33:29 +05:30
Nikita Sobolev dff8e5dc8d
gh-103880: Fix `assertRaises` usage in `test_genericalias` (GH-103916) 2023-04-27 16:54:59 +08:00
Inada Naoki ce2383ec66
gh-103883: Doc: Move PyUnicode_FromObject doc (#103913)
This API is one of Unicode creator APIs.
2023-04-27 14:53:11 +09:00
Reese Hyde 1d99e9e46e
gh-89415: Add source-specific multicast constants to socket module (#103684)
Add socket options for source-specific multicast when present as C #defines.

Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
2023-04-26 21:05:55 -07:00
Lysandros Nikolaou 9169a56fad
gh-103656: Transfer f-string buffers to parser to avoid use-after-free (GH-103896)
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
2023-04-27 01:33:31 +00:00
Stefano Rivera 76632b836c
gh-62432: unittest runner: Exit code 5 if no tests were run (#102051)
As discussed in https://discuss.python.org/t/unittest-fail-if-zero-tests-were-discovered/21498/7

It is common for test runner misconfiguration to fail to find any tests,
This should be an error.

Fixes: #62432
2023-04-27 01:28:46 +00:00
Franek Magiera dc3f97549a
gh-103629: Update typing.Unpack docs in compliance with PEP 692 (#103894) 2023-04-26 16:39:39 -06:00
Aidan Melen a3a5b4bb23
gh-60436: fix curses textbox backspace/del (#103783)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Michael Blahay <mblahay@gmail.com>
2023-04-26 22:54:07 +02:00
Michael Blahay 44010d0f12
gh-48241: Clarify URL needs to be encoded when provided to urlopen and Request (#103855)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2023-04-26 22:52:23 +02:00
180909 e901588002
Update MAC_address wikipedia URL in comments (#29019) 2023-04-26 14:27:03 -06:00
Hugo van Kemenade 842daa57cf
gh-103884: Docs CI: Only attempt nit-picky PR annotations for PRs (#103889) 2023-04-26 20:20:19 +00:00
Erlend E. Aasland bb8aa7a2b4
gh-103489: Add get/set config methods to sqlite3.Connection (#103506) 2023-04-26 19:57:48 +00:00
Erlend E. Aasland 222c63fc6b
gh-103015: Add entrypoint keyword param to sqlite3.Connection.load_extension (#103073) 2023-04-26 21:22:03 +02:00
Owain Davies 28a05f4cc2
gh-101879: docs - italicize argument in smtplib.SMPT() description (#101886) 2023-04-26 21:00:19 +02:00
July Tikhonov 37e37553b0
gh-91441: Clarify the docs of asyncio.loop.subprocess_exec() (#91442)
Clarify the docs of asyncio.loop.subprocess_exec()

Clarify the documentation of stdin, stdout and stderr arguments of
asyncio.loop.subprocess_exec().

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2023-04-26 12:57:19 -06:00
Juhi Chandalia d45225bd66
GH-99944: Make dis display the value of oparg of KW_NAMES (#103856)
Co-authored-by: chilaxan <chilaxan@gmail.com>
2023-04-26 19:00:36 +01:00
Carol Willing 1461a22f91
Add willingc to CODEOWNERS for asyncio (#103885) 2023-04-26 17:22:52 +00:00
Alex Waygood 81cf94c442
Docs build: Add upper bounds to transitive dependencies (#103860) 2023-04-26 11:07:31 -06:00
Jelle Zijlstra 6c4124d11a
gh-103879: Fix refleak in super specialization (#103882) 2023-04-26 08:50:19 -07:00
Carol Willing 1c0a9c5a1c
gh-101786: Clarify docs that asyncio.Server.sockets is a socket-like TransportSocket (#103877)
Clarify that asyncio.Server.sockets is a socket-like TransportSocket
2023-04-26 06:32:24 -06:00
Yichen Yan 214e5684c2
gh-103875: Use ascii and latin1 singletons in deepfreeze (#103876) 2023-04-26 11:45:58 +00:00
Paul Moore 438b811761
gh-103872: Update bundled pip version to 23.1.2 (gh-103873)
closes: #103872
xref: https://github.com/pypa/pip/pull/12000

<!-- gh-issue-number: gh-103872 -->
* Issue: gh-103872
<!-- /gh-issue-number -->

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2023-04-26 10:22:25 +00:00
Gordon Messmer 2763994be3
gh-74940: Allow fallback to UTF-8 encoding on systems with no locales installed (GH-14925)
This change removes the alias of the 'C' locale to 'en_US'. Because of
this alias, it is currently impossible for an application to use
setlocale() to specify a UTF-8 locale on a system that has no locales
installed, but which supports the C.UTF-8 locale/encoding.
2023-04-26 15:33:09 +09:00
Tian Gao 31acfd78a0
gh-103578: Fix pdb reading code with non-utf8 encoding (#103581)
`pdb` should use `io.open_code` to open code to avoid encoding issue.
2023-04-25 23:04:51 -06:00
Senthil Kumaran c9864121cb
gh-99352: Ensure HTTPSConnection is available before exercising https tests. (#103828)
gh-99352: Ensure HTTPSConnection is available before exercising https
tests.

This will fix the buildbot issue mentioned in

https://github.com/python/cpython/pull/99353
2023-04-25 18:02:27 -07:00
Juhi Chandalia 86aa8a5e98
GH-103804: Add test for dis.findlinestarts (#103806) 2023-04-25 22:23:35 +01:00
Carl Meyer ef25febcf2
gh-87729: specialize LOAD_SUPER_ATTR_METHOD (#103809) 2023-04-25 17:45:51 +00:00
Alex Waygood cef542ca57
gh-103721: Improve cross-references for generic-alias docs (#103838)
Cc. @adriangb

The "stub documentation" in `types.rst` does already link to the
in-depth docs in `stdtypes.rst`, but the link isn't obvious for new
users. It deserves to be made more prominent.

- Issue: https://github.com/python/cpython/issues/103721
2023-04-25 10:24:49 -06:00
Samuel Sloniker 32bea69b89
gh-51574: Make tempfile.mkdtemp() always return absolute paths (#94612)
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
2023-04-25 16:05:59 +00:00
Petr Viktorin c8c3956d90
gh-102950: Adjust tarfile filter tests for systems that don't set the sticky bit (GH-103831)
Also remove expilcit `type=tarfile.DIRTYPE`, the slash at the end is
enough.
2023-04-25 12:56:01 +00:00
Dong-hee Na 8330580800
gh-103726: Set up gcc-10 for ASAN (gh-103728)
<!--
Thanks for your contribution!
Please read this comment in its entirety. It's quite important.

# Pull Request title

It should be in the following format:

```
gh-NNNNN: Summary of the changes made
```

Where: gh-NNNNN refers to the GitHub issue number.

Most PRs will require an issue number. Trivial changes, like fixing a
typo, do not need an issue.

# Backport Pull Request title

If this is a backport PR (PR made against branches other than `main`),
please ensure that the PR title is in the following format:

```
[X.Y] <title from the original PR> (GH-NNNN)
```

Where: [X.Y] is the branch name, e.g. [3.6].

GH-NNNN refers to the PR number from `main`.

-->


<!-- gh-issue-number: gh-103726 -->
* Issue: gh-103726
<!-- /gh-issue-number -->
2023-04-25 12:13:36 +00:00
partev c9134fb228
DOC: remove reference to OpenSolaris (#102671) 2023-04-25 10:45:18 +00:00
sunmy2019 0acea96dad
gh-103826: fix unused variable warning introduced in gh-102343 (#103825) 2023-04-25 15:31:04 +05:30
Eric Snow d8627999d8
gh-100227: Add a Granular Lock for _PyRuntime.imports.extensions.dict (gh-103460)
The lock is unnecessary as long as there's a GIL, but completely
necessary with a per-interpreter GIL.
2023-04-24 21:09:35 -06:00
Prince Roshan b934f97850
gh-103636: add enums for days and months in calendar module (GH-103642)
Convert day contants to a Day enum, and add a Month enum.
2023-04-24 19:51:27 -07:00
Lysandros Nikolaou 57f8f9a66d
gh-103718: Correctly set f-string buffers in all cases (GH-103815)
Turns out we always need to remember/restore fstring buffers in all of
the stack of tokenizer modes, cause they might change to
`TOK_REGULAR_MODE` and have newlines inside the braces (which is when we
need to reallocate the buffer and restore the fstring ones).
2023-04-25 01:31:21 +00:00
Allan Lago 3df3b91e6a
gh-82814: fix shutil access error on WSL (#103790)
gh-82814: Adds `errno.EACCES` to the list of ignored errors on
`_copyxattr`.  EPERM and EACCES are different constants but
in general should be treated the same.

News entry authored by: Gregory P. Smith <greg@krypto.org>
2023-04-25 00:45:38 +00:00
Łukasz Langa b51da991e2
Also fail DO-NOT-MERGE when "awaiting changes" or "awaiting change review" present on PR (#103807)
"awaiting changes" means somebody put a review that requested changes.

"awaiting change review" means that the PR author published changes
after a red review and then requested a re-review.
2023-04-25 01:49:50 +02:00
Jaime Alonso Lorenzo d96cd44a59
gh-103765: Remove pkgutil.rst from .nitignore (GH-103797) 2023-04-24 17:42:43 -06:00
Olga Matoula 0f23eda4b9
gh-103810: Fix broken references in dataclasses (#103811)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-04-25 01:26:18 +02:00
Rodolfo M. Pereira 8291ae31dd
GH-103805: Lib test f541 linting issue fix (#103812)
This PR makes some minor linting adjustments to the Lib/test module
caught by [ruff](https://github.com/charliermarsh/ruff). The adjustments
are all related to the `F541 f-string without any placeholders` issue.

Issue: https://github.com/python/cpython/issues/103805

<!-- gh-issue-number: gh-103805 -->
* Issue: gh-103805
<!-- /gh-issue-number -->

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-04-24 23:24:49 +00:00
Eric Snow df3173d28e
gh-101659: Isolate "obmalloc" State to Each Interpreter (gh-101660)
This is strictly about moving the "obmalloc" runtime state from
`_PyRuntimeState` to `PyInterpreterState`.  Doing so improves isolation
between interpreters, specifically most of the memory (incl. objects)
allocated for each interpreter's use.  This is important for a
per-interpreter GIL, but such isolation is valuable even without it.

FWIW, a per-interpreter obmalloc is the proverbial
canary-in-the-coalmine when it comes to the isolation of objects between
interpreters.  Any object that leaks (unintentionally) to another
interpreter is highly likely to cause a crash (on debug builds at
least).  That's a useful thing to know, relative to interpreter
isolation.
2023-04-24 17:23:57 -06:00
Daniel Versoza 01be52e42e
gh-103801: Tools/wasm linting and formatting (#103796)
This PR makes three minor linting adjustments to the `wasm` module
caught by [ruff](https://github.com/charliermarsh/ruff).

<!-- gh-issue-number: gh-103801 -->
* Issue: gh-103801
<!-- /gh-issue-number -->

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2023-04-24 22:42:02 +00:00
jb2170 d94b3a6f45
gh-103673: Add missing ForkingUnixStreamServer and ForkingUnixDatagramServer socketservers (#103674)
sockserver gains ForkingUnixStreamServer and ForkingUnixDatagramServer classes for consistency with all of the others. Ironically these existed but were buried in our test suite.

Addresses #103673 

<!-- gh-issue-number: gh-103673 -->
* Issue: gh-103673
<!-- /gh-issue-number -->

---------

Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-04-24 22:35:52 +00:00
Eric Snow 209a0a7655
gh-95795: Move types.next_version_tag to PyInterpreterState (gh-102343)
Core static types will continue to use the global value.  All other types
will use the per-interpreter value.  They all share the same range, where
the global types use values < 2^16 and each interpreter uses values
higher than that.
2023-04-24 22:30:13 +00:00
Carl Meyer 0dc8b50d33
gh-87729: add LOAD_SUPER_ATTR instruction for faster super() (#103497)
This speeds up `super()` (by around 85%, for a simple one-level
`super().meth()` microbenchmark) by avoiding allocation of a new
single-use `super()` object on each use.
2023-04-24 22:22:14 +00:00