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
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
Barry Warsaw
e1f14643dc
gh-98040: Remove just the `imp` module ( #98573 )
2023-04-28 16:17:58 -07: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
Franek Magiera
dc3f97549a
gh-103629: Update typing.Unpack docs in compliance with PEP 692 ( #103894 )
2023-04-26 16:39:39 -06: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
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
af53046995
gh-102950: Implement PEP 706 – Filter for tarfile.extractall ( #102953 )
2023-04-24 10:58:06 +02:00
James Hilton-Balfe
730bbddfdf
gh-101688: Implement types.get_original_bases ( #101827 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-04-23 20:24:30 +01:00
Eddie Elizondo
ea2c001650
gh-84436: Implement Immortal Objects (gh-19474)
...
This is the implementation of PEP683
Motivation:
The PR introduces the ability to immortalize instances in CPython which bypasses reference counting. Tagging objects as immortal allows up to skip certain operations when we know that the object will be around for the entire execution of the runtime.
Note that this by itself will bring a performance regression to the runtime due to the extra reference count checks. However, this brings the ability of having truly immutable objects that are useful in other contexts such as immutable data sharing between sub-interpreters.
2023-04-22 13:39:37 -06:00
Raymond Hettinger
0cb0871584
GH-103415: Document itertools.batched() in whatsnew.3.12 ( #103670 )
2023-04-21 20:52:37 -05:00
Kumar Aditya
da2273fec7
GH-88342: clarify that `asyncio.as_completed` accepts generators yielding tasks ( #103626 )
2023-04-19 15:51:53 +05:30
Pradyun Gedam
ece20dba12
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>
2023-04-17 23:43:34 -05:00
Skip Montanaro
e35e0f15eb
gh-67230: update whatsnew note for csv changes ( #103598 )
2023-04-17 21:21:19 -04:00
Skip Montanaro
fb38c1b52e
gh-67230: document new csv quoting modes in whatsnew (gh-103491)
2023-04-12 20:45:52 -04:00
Irit Katriel
55c99d97e1
gh-77757: replace exception wrapping by PEP-678 notes in typeobject's __set_name__ ( #103402 )
2023-04-11 11:53:06 +01:00
Irit Katriel
78b763f630
gh-103176: sys._current_exceptions() returns mapping to exception instances instead of exc_info tuples ( #103177 )
2023-04-11 09:38:37 +01:00
Kumar Aditya
63dc969ec6
Document `asyncio` performance improvement in What's New ( #103370 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-04-09 07:29:08 +05:30
Alex Waygood
644136563d
gh-74690: Document changes made to runtime-checkable protocols in 3.12 ( #103348 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-04-07 22:06:37 +01:00
Alex Waygood
04501ee57e
gh-103193: Celebrate performance improvements to `inspect.getattr_static` in 'What's New in Python 3.12' ( #103349 )
2023-04-07 18:14:50 +01:00
Dong-hee Na
a62ff97075
gh-101525: Disable peephole optimization process of BOLT (gh-103187)
...
Co-authored-by: Dong-hee Na <donghee.na@linecorp.com>
2023-04-05 09:10:45 +09:00
Charles Machalow
935aa45235
GH-75586: Make shutil.which() on Windows more consistent with the OS (GH-103179)
2023-04-04 23:24:13 +01:00
Nikita Sobolev
2a721258a1
gh-101865: Deprecate `co_lnotab` from code objects as per PEP 626 ( #101866 )
...
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2023-04-03 17:35:04 +02:00
Giampaolo Rodola
6883007a86
bpo-4080: unittest durations ( #12271 )
2023-04-03 00:12:51 +02:00
Alex Waygood
6d59c9e32e
gh-102433: Use `inspect.getattr_static` in `typing._ProtocolMeta.__instancecheck__` ( #103034 )
2023-04-02 14:22:19 +01:00
Irit Katriel
06249ec89f
gh-102192: deprecate _PyErr_ChainExceptions ( #102935 )
2023-04-01 21:30:23 +01:00
James De Bias
b0422e140d
gh-102871: Remove obsolete browsers from webbrowser ( #102872 )
2023-03-31 11:02:47 -04:00
Furkan Onder
048d6243d4
GH-84783: Mention Author for GH-101264 (make slices hashable) ( #103146 )
...
Will Bradshaw contributed original patch on bpo-40603.
---------
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-03-31 09:54:17 -04:00
Hugo van Kemenade
6a1c49a717
gh-101100: Test docs in nit-picky mode ( #102513 )
...
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2023-03-24 13:23:35 +02:00
Irit Katriel
3468c768ce
gh-102859: Remove JUMP_IF_FALSE_OR_POP and JUMP_IF_TRUE_OR_POP ( #102870 )
2023-03-22 18:10:48 +00:00
Irit Katriel
7f760c2fca
gh-102828: emit deprecation warning for onerror arg to shutil.rmtree ( #102850 )
2023-03-21 11:08:46 +00:00
Eric Snow
28d369e070
gh-102304: Add a What's New Entry About _Py_RefTotal (gh-102845)
...
https://github.com/python/cpython/issues/102304
2023-03-20 10:35:49 -06:00
Alan Williams
5e6661bce9
gh-72346: Added isdst deprecation warning to email.utils.localtime (GH-91450)
2023-03-19 19:20:20 -05:00
Irit Katriel
d51a6dc28e
gh-102828: add onexc arg to shutil.rmtree. Deprecate onerror. ( #102829 )
2023-03-19 18:33:51 +00:00
Irit Katriel
e1e9bab006
gh-102778: Add sys.last_exc, deprecate sys.last_type, sys.last_value,sys.last_traceback ( #102779 )
2023-03-18 11:47:11 +00:00
Kumar Aditya
4f5774f648
GH-78530: add support for generators in `asyncio.wait` ( #102761 )
2023-03-17 06:58:43 +05:30
Irit Katriel
3f9285a8c5
gh-102755: Add PyErr_DisplayException(exc) ( #102756 )
2023-03-16 22:18:04 +00:00
Steve Dower
0f175766e2
gh-99726: Improves correctness of stat results for Windows, and uses faster API when available (GH-102149)
...
This deprecates `st_ctime` fields on Windows, with the intent to change them to contain the correct value in 3.14. For now, they should keep returning the creation time as they always have.
2023-03-16 17:27:21 +00:00
Kumar Aditya
adaed17341
GH-102748: remove legacy support for generator based coroutines from `asyncio.iscoroutine` ( #102749 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-03-16 20:28:10 +05:30
Irit Katriel
152292b98f
gh-101578: mention in what's new in 3.12 that exceptions are now normalized before stored ( #102702 )
2023-03-14 22:38:15 +00:00
Thomas Krennwallner
ced13c96a4
gh-79940: add introspection API for asynchronous generators to `inspect` module ( #11590 )
2023-03-11 18:49:40 +05:30
Steve Dower
cb35882773
gh-102519: Add os.listdrives, os.listvolumes and os.listmounts on Windows (GH-102544)
2023-03-10 12:21:37 +00:00
T. Wouters
58d761e5b5
GH-84783: Document GH-101264 (Make the slice object hashable) in What's New. ( #102548 )
2023-03-08 18:39:33 -08:00
Petr Viktorin
6b2d7c0ddb
gh-101101: Unstable C API tier (PEP 689) (GH-101102)
2023-02-28 09:31:01 +01:00
Steven Troxler
0f89acf6cc
gh-101561: Add typing.override decorator ( #101564 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-02-27 13:16:11 -08:00
Erlend E. Aasland
5b9573eed4
gh-101578: Fixup NEWS and add What's New entry for new exception APIs ( #102157 )
2023-02-23 13:19:21 +01:00
Carl Meyer
056dfc71dc
gh-87634: remove locking from functools.cached_property (GH-101890)
...
Remove the undocumented locking capabilities of functools.cached_property.
2023-02-22 17:49:22 -08:00
Erlend E. Aasland
8a2b7ee64d
gh-101693: In sqlite3, deprecate using named placeholders with parameters supplied as a sequence ( #101698 )
2023-02-15 06:27:16 +01:00
Soumendra Ganguly
244d4cd9d2
gh-85984: Remove legacy Lib/pty.py code. ( #92365 )
...
Refactored the implementation of pty.fork to use os.login_tty.
A DeprecationWarning is now raised by pty.master_open() and pty.slave_open(). They were
undocumented and deprecated long long ago in the docstring in favor of pty.openpty.
Signed-off-by: Soumendra Ganguly <soumendraganguly@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-02-08 17:00:17 -08:00