Pieter Eendebak
382ee2f0f2
gh-102491: Remove IronPython version check in sys_version ( #102492 )
2023-03-19 15:52:47 -07: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
gaogaotiantian
039714d00f
gh-101975: Fixed a potential SegFault on garbage collection (GH-102803)
2023-03-18 10:59:21 +00:00
Inada Naoki
65fb7c4055
gh-102701: Fix overflow in dictobject.c (GH-102750)
2023-03-17 22:39:09 +09: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
51d693c584
gh-102594: PyErr_SetObject adds note to exception raised on normalization error ( #102675 )
2023-03-16 10:16:01 +00:00
yonatanp
2dc94634b5
gh-94440: Fix issue of ProcessPoolExecutor shutdown hanging ( #94468 )
...
Fix an issue of concurrent.futures ProcessPoolExecutor shutdown hanging.
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-03-15 21:44:52 -07:00
Kumar Aditya
a44553ea9f
GH-100112: avoid using iterable coroutines in asyncio internally ( #100128 )
2023-03-16 09:20:43 +05:30
Jamoo721
1c9f3391b9
gh-102690: Use Edge as fallback in webbrowser instead of IE ( #102691 )
2023-03-15 22:52:11 -04:00
Max Bachmann
afa6092ee4
gh-102281: Fix potential nullptr dereference + use of uninitialized memory (gh-102282)
2023-03-15 21:58:43 +09:00
Nikita Sobolev
2b5781d659
gh-102615: Use list instead of tuple in repr of paramspec ( #102637 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-03-15 09:33:41 +00:00
Tom Levy
8647ba4b63
Remove misformatted exclamation marks in docs ( #102694 )
...
Remove the exclamation mark from :program:`!foo` in .rst files because
it inadvertently shows up in the rendered HTML.
(Sphinx's cross-referencing roles use a '!' prefix to suppress
hyperlinking[1], but :program: is not a cross-referencing role so the
'!' is displayed verbatim.)
The exclamation marks in venv.rst were introduced in #98350 . See
comments [2] and [3] for additional discussion.
[1]: https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#cross-referencing-syntax
[2]: https://github.com/python/cpython/pull/98350#issuecomment-1285965759
[3]: https://github.com/python/cpython/pull/98350#issuecomment-1286394047
Reported-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
2023-03-15 09:06:32 +02:00
Andre Hora
5e0865f22e
gh-101377: improving test_locale_calendar_formatweekday of calendar ( #101378 )
...
---------
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-03-14 22:36:31 -04:00
Jacob Bower
cbd3fbfb6e
gh-102013: Add PyUnstable_GC_VisitObjects ( #102014 )
2023-03-14 01:35:54 +00:00
Raymond Hettinger
457e4d1a51
GH-102670: Use sumprod() to simplify, speed up, and improve accuracy of statistics functions (GH-102649)
2023-03-13 20:06:43 -05:00
Nikita Sobolev
d97757f793
gh-102069: Fix __weakref__ descriptor generation for custom dataclasses ( #102075 )
2023-03-13 15:42:05 -06:00
T
71e37d9079
gh-98169 dataclasses.astuple support DefaultDict ( #98170 )
...
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
2023-03-13 14:46:35 -06:00
Mark Shannon
233e32f936
GH-102300: Reuse objects with refcount == 1 in float specialized binary ops. (GH-102301)
2023-03-13 10:34:54 +00:00
gaogaotiantian
5d677c556f
GH-101673: Fix pdb bug where local variable changes are lost after longlist ( #101674 )
2023-03-12 23:09:55 +00:00
Виталий Дмитриев
f6ca71a422
Fix duplicated words in the docs (GH-102629)
...
With grep utility found some duplicated words
Automerge-Triggered-By: GH:AlexWaygood
2023-03-12 11:03:59 -07:00
Thomas Krennwallner
ced13c96a4
gh-79940: add introspection API for asynchronous generators to inspect module ( #11590 )
2023-03-11 18:49:40 +05:30
wangxiang-hz
aa0a73d1bc
gh-102213: Optimize the performance of __getattr__ (GH-102248)
...
When __getattr__ is defined, python with try to find an attribute using _PyObject_GenericGetAttrWithDict
find nothing is reasonable so we don't need an exception, it will hurt performance.
2023-03-11 19:11:37 +08:00
Brandt Bucher
08b67fb34f
GH-90997: Shrink the LOAD_GLOBAL caches ( #102569 )
2023-03-10 17:01:16 -08:00
Nikita Sobolev
b48be8fa18
gh-102103: add module argument to dataclasses.make_dataclass ( #102104 )
2023-03-10 17:26:46 -07:00
Xuehai Pan
ee6f8413a9
gh-102578: Optimise setting and deleting mutable attributes on non-dataclass subclasses of frozen dataclasses (gh-102573)
2023-03-10 19:21:22 -05:00
Barney Gale
90f1d77717
GH-80486: Fix handling of NTFS alternate data streams in pathlib (GH-102454)
...
Co-authored-by: Maor Kleinberger <kmaork@gmail.com>
2023-03-10 17:29:04 +00:00
Paul Ganssle
64bde502cf
GH-102537: Handle check for PYTHONTZPATH failing in zoneinfo test (GH-102538)
...
It is possible but unlikely for the `python_tzpath_context` function to fail between the start of the `try` block and the point where `os.environ.get` succeeds, in which case `old_env` will be undefined. In this case, we want to take no action.
Practically speaking this will really only happen in an error condition anyway, so it doesn't really matter, but we should probably do it right anyway.
2023-03-10 07:29:37 -08:00
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
David Hewitt
71cf7c3ddd
gh-102378: don't bother stripping / from __text_signature__ ( #102379 )
2023-03-09 15:06:20 -08:00
Max Bachmann
c6858d1e7f
gh-102255: Improve build support for Windows API partitions (GH-102256)
...
Add `MS_WINDOWS_DESKTOP`, `MS_WINDOWS_APPS`, `MS_WINDOWS_SYSTEM` and `MS_WINDOWS_GAMES` preprocessor definitions to allow switching off functionality missing from particular API partitions ("partitions" are used in Windows to identify overlapping subsets of APIs).
CPython only officially supports `MS_WINDOWS_DESKTOP` and `MS_WINDOWS_SYSTEM` (APPS is included by normal desktop builds, but APPS without DESKTOP is not covered). Other configurations are a convenience for people building their own runtimes.
`MS_WINDOWS_GAMES` is for the Xbox subset of the Windows API, which is also available on client OS, but is restricted compared to `MS_WINDOWS_DESKTOP`. These restrictions may change over time, as they relate to the build headers rather than the OS support, and so we assume that Xbox builds will use the latest available version of the GDK.
2023-03-09 21:09:12 +00:00
Kumar Aditya
1a84cc007e
GH-102397: Fix segfault from race condition in signal handling ( #102399 )
...
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-03-08 13:29:39 +05:30
Thomas Wouters
f9774e57d8
Python 3.12.0a6
2023-03-07 22:48:18 +01:00
Irit Katriel
a33ca2ad1f
gh-102493: fix normalization in PyErr_SetObject ( #102502 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-03-07 13:27:46 -08:00
Pablo Galindo Salgado
f533f216e6
gh-102416: Do not memoize incorrectly loop rules in the parser ( #102467 )
2023-03-06 14:41:53 +01:00
Barney Gale
6716254e71
GH-101362: Optimise PurePath(PurePath(...)) (GH-101667)
...
The previous `_parse_args()` method pulled the `_parts` out of any supplied `PurePath` objects; these were subsequently joined in `_from_parts()` using `os.path.join()`. This is actually a slower form of joining than calling `fspath()` on the path object, because it doesn't take advantage of the fact that the contents of `_parts` is normalized!
This reduces the time taken to run `PurePath("foo", "bar")` by ~20%, and the time taken to run `PurePath(p, "cheese")`, where `p = PurePath("/foo", "bar", "baz")`, by ~40%.
Automerge-Triggered-By: GH:AlexWaygood
2023-03-05 15:50:21 -08:00
Barney Gale
3e60e0213e
GH-101362: Check pathlib.Path flavour compatibility at import time (GH-101664)
...
This saves a comparison in `pathlib.Path.__new__()` and reduces the time taken to run `Path()` by ~5%.
Automerge-Triggered-By: GH:AlexWaygood
2023-03-05 14:46:45 -08:00
Barney Gale
3572c861d8
GH-101362: Call join() only when >1 argument supplied to pathlib.PurePath() ( #101665 )
...
GH-101362: Call join() only when >1 argument supplied to pathlib.PurePath
This reduces the time taken to run `PurePath("foo")` by ~15%
2023-03-05 22:00:56 +00:00
Yeojin Kim
9a478be1a4
gh-101979: argparse: fix a bug where parentheses in metavar argument of add_argument() were dropped ( #102318 )
2023-03-05 06:54:33 -08:00
Marta Gómez Macías
66aa78cbe6
gh-102356: Add thrashcan macros to filter object dealloc ( #102426 )
...
Add thrashcan macros to the deallocator of the filter objects to protect against deeply nested destruction of chains of nested filters.
2023-03-05 12:00:41 +01:00
Matthias Görgens
eff9f43924
gh-96821: Add config option --with-strict-overflow ( #96823 )
...
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Shantanu <hauntsaninja@gmail.com>
2023-03-04 13:39:52 -08:00
Jaysinh Shukla
81763341ed
gh-63301: Set exit code when tabnanny CLI exits on error ( #7699 )
...
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-03-04 13:32:13 -08:00
Byeongmin Choi
77a3196b7c
gh-101863: Fix wrong comments in EUC-KR codec (gh-102417)
2023-03-05 01:01:54 +09:00
Gouvernathor
90801e48fd
gh-102302 Micro-optimize inspect.Parameter.__hash__ ( #102303 )
2023-03-04 15:08:57 +00:00
Alexey Izbyshev
c2bd55d26f
gh-102179: Fix os.dup2 error reporting for negative fds ( #102180 )
2023-03-04 19:54:08 +05:30
Raj
705487c655
gh-101892: Fix SystemError when a callable iterator call exhausts the iterator ( #101896 )
...
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2023-03-04 19:51:29 +05:30
Max Bachmann
c1748ed59d
gh-102344: Reimplement winreg QueryValue / SetValue using QueryValueEx / SetValueEx (GH-102345)
...
The newer APIs are more widely available than the old ones, and are called in a way to preserve functionality.
2023-03-01 14:50:38 +00:00