Commit Graph

116709 Commits

Author SHA1 Message Date
Wes Turner 52cedc5c10
Fix typo in math.log docstring (#103943) 2023-04-28 00:31:31 -07:00
Marek Marczykowski-Górecki 67d140dba7
gh-83925: Make asyncio.subprocess communicate similar to non-asyncio (#18650)
subprocess's communicate(None) closes stdin of the child process, after
sending no (extra) data. Make asyncio variant do the same.
This fixes issues with processes that waits for EOF on stdin before
continuing.
2023-04-27 17:30:26 -07:00
Eric Snow 424a785a07
gh-94673: Fix _PyTypes_InitTypes() and get_type_attr_as_size() (gh-103961)
This change has two small parts:

1. a follow-up to gh-103940 with one case I missed
2. adding a missing return that I noticed while working on related code
2023-04-27 18:28:51 -06:00
Eric Snow d2e2e53f73
gh-94673: Ensure Builtin Static Types are Readied Properly (gh-103940)
There were cases where we do unnecessary work for builtin static types. This also simplifies some work necessary for a per-interpreter GIL.
2023-04-27 16:19:43 -06:00
Erlend E. Aasland 56c7176d1d
gh-102628: Fix sqlite3 CLI prompt in IDLE on Windows (#103945) 2023-04-27 21:22:26 +00:00
Erlend E. Aasland 2cf945bec6
Docs: fix dunders with too many underscores (#103955) 2023-04-27 23:17:43 +02:00
Tian Gao d50f01ad0a
gh-103935: Use `io.open_code()` when executing code in trace and profile modules (GH-103947) 2023-04-27 20:29:35 +00:00
Erlend E. Aasland bf0b8a9f8d
gh-98822: Add missing test directories to TESTSUBDIRS (#103942) 2023-04-27 21:43:53 +02:00
Irit Katriel 72adaba6dd
gh-87092: update CODEOWNERS for split of compile.c to 3 files (#103941) 2023-04-27 19:35:53 +00:00
Erlend E. Aasland 8def5ef016
gh-102628: Fix sqlite3 CLI prompt for Windows console users (#103898)
The prompt will still be incorrect in IDLE on Windows,
as IDLE uses CTRL-D for EOF on all platforms.
2023-04-27 21:23:10 +02:00
Adam Turner 44b5c21f41
GH-103903: Test the minimum Sphinx version in CI (#103904) 2023-04-27 19:27:38 +01:00
Paul Ganssle 0b7fd8ffc5
GH-103857: Deprecate utcnow and utcfromtimestamp (#103858)
Using `datetime.datetime.utcnow()` and `datetime.datetime.utcfromtimestamp()` will now raise a `DeprecationWarning`.

We also have removed our internal uses of these functions and documented the change.
2023-04-27 11:32:30 -06:00
Paul Ganssle a5308e188b
GH-90750: Use datetime.fromisocalendar in _strptime (#103802)
Use datetime.fromisocalendar in _strptime

This unifies the ISO → Gregorian conversion logic and improves handling
of invalid ISO weeks.
2023-04-27 10:27:27 -06:00
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