Itamar Ostricher
85c7bf5bce
gh-103793: Defer formatting task name ( #103767 )
...
The default task name is "Task-<counter>" (if no name is passed in during Task creation).
This is initialized in `Task.__init__` (C impl) using string formatting, which can be quite slow.
Actually using the task name in real world code is not very common, so this is wasted init.
Let's defer this string formatting to the first time the name is read (in `get_name` impl),
so we don't need to pay the string formatting cost if the task name is never read.
We don't change the order in which tasks are assigned numbers (if they are) --
the number is set on task creation, as a PyLong instead of a formatted string.
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2023-04-29 08:20:09 -07:00
Irit Katriel
fbf3596c3e
gh-87092: change assembler to use instruction sequence instead of CFG ( #103933 )
2023-04-29 12:06:04 +01:00
Prince Roshan
84e7d0f0c7
gh-103636: issue warning for deprecated calendar constants ( #103833 )
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2023-04-29 01:16:46 -06:00
Jelle Zijlstra
ed29f524cf
Various small fixes to dis docs ( #103923 )
...
- Fix description of MAKE_CELL, which appeared to be inverted from the
actual behavior
- Fix stray ".:" (sphinx-contrib/sphinx-lint#63 )
- Fix inconsistent indentation
- Add some missing code blocks
- Slight style improvements
2023-04-29 00:02:21 -07:00
Mark Shannon
738c226786
GH-103082: Code cleanup in instrumentation code ( #103474 )
2023-04-29 04:51:55 +00:00
Barry Warsaw
e1f14643dc
gh-98040: Remove just the `imp` module ( #98573 )
2023-04-28 16:17:58 -07:00
Tian Gao
79b9db9295
GH-103971: Forward-port test from GH-103980 (GH-103984)
2023-04-28 20:25:48 +00:00
Paul Ganssle
689723a4ab
GH-103944: Check error status when raising DeprecationWarning ( #103949 )
2023-04-28 15:44:13 -04:00
Carl Meyer
ebf97c50f2
gh-103978: avoid using 'class' as an identifier ( #103979 )
2023-04-28 19:20:50 +00:00
Olga Matoula
83aa496f81
gh-101100: Add reference doc for __post_init__ ( #103818 )
...
Signed-off-by: Olga Matoula <olgamatoula@gmail.com>
2023-04-28 13:10:26 -06:00
Raymond Hettinger
c3453fbb11
Update itertool recipe: polynomial_from_roots() (GH-103973)
2023-04-28 12:25:50 -05:00
Juhi Chandalia
81387fe36e
GH-103804: Add test for dis.disco ( #103901 )
2023-04-28 12:11:21 +01:00
Erlend E. Aasland
30216b69a2
gh-100021: Document that sqlite3's executemany() discards resulting rows ( #103939 )
2023-04-28 10:02:23 +02:00
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