For source file "path/to/file.py" it created file with incorrect path
"/absolute/path/to/path/to/file.pyc" instead of "path/to/file.pyc".
(cherry picked from commit 60ff67d010)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Substrings of the specified string no longer considered valid values.
(cherry picked from commit f1a2417b9e)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
It now always uses setattr() instead of setting the dict item to modify
the namespace. This allows to use a class as a namespace.
(cherry picked from commit 95e92ef6c7)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
type() no longer called for SUPPRESS.
This only affects positional arguments with nargs='?'.
(cherry picked from commit 9bcadf589a)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Fix parsing positional argument with nargs equal to '?' or '*' if it is
preceded by an option and another positional argument.
(cherry picked from commit 4a5e4aade4)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* Detect source file encoding.
* Use the "replace" error handler even for UTF-8 (default) encoding.
* Remove the BOM.
* Fix detection of too long lines if they contain NUL.
* Return the head rather than the tail for truncated long lines.
(cherry picked from commit e2f710792b)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Arguments with the value identical to the default value (e.g. booleans,
small integers, empty or 1-character strings) are no longer considered
"not present".
(cherry picked from commit 3094cd17b0)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Only the first one has now been removed, all subsequent ones are now
taken literally.
(cherry picked from commit aae126748f)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
gh-122392: IDLE - Fix overlapping lines in browsers (GH-122392) (GH-124975)
Increase currently inadequate vertical spacing for the IDLE browsers (path,
module, and stack) on high-resolution monitors.
---------
(cherry picked from commit c5df1cb7bd)
Co-authored-by: Zhikang Yan <2951256653@qq.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
gh-112804: Clamping timeout value for _PySemaphore_PlatformWait (gh-124914)
* gh-112804: Clamping timeout value for _PySemaphore_PlatformWait
* Address code review
* nit
(cherry picked from commit a5fc50994a)
Co-authored-by: Donghee Na <donghee.na@python.org>
Prepare What's New in Python 3.13 for final release
(cherry picked from commit 31516c98dd)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
gh-125025: `_thread` docs: fix/update the *caveats* list (GH-125026)
(cherry picked from commit 1e098dc766)
Co-authored-by: Jan Kaliszewski <zuo@kaliszewski.net>
Doc: Simplify the definition of 'soft deprecated' (GH-124988)
(cherry picked from commit feca4cf64e)
Co-authored-by: Andrés Delfino <adelfino@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
gh-109975: Suggest ``pynntp`` instead of ``nntplib`` (GH-124830)
The ``nntplib`` library has been deleted from PyPI by its author.
(cherry picked from commit ac9648243d)
Co-authored-by: Christian Clauss <cclauss@me.com>
gh-121982: ``csv``: Add a test case for invalid ``quoting`` constant. (GH-121983)
Test invalid quoting constant
(cherry picked from commit 656b7a3c83)
Co-authored-by: Tomas R <tomas.roun8@gmail.com>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
gh-122864: Fix a ``test_funcattrs.test___builtins__`` when executing directly (GH-124845)
Previously when executing ``test_functattrs.test___builtins__`` directly, it failed because the fact, that ``__builtins__`` is refers to the built-in module ``builtins`` while it's expects a ``__builtins__.__dict__``. But when this test is being run from another module, then ``__builtins__`` is refers to ``builtins.__dict__``. Now this part of the behaviour is covered.
---------
(cherry picked from commit 8fbf10d6cf)
Co-authored-by: Mark Byrne <31762852+mbyrnepr2@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Highlight `datetime.timedelta.seconds` vs `.total_seconds()` in docs. (GH-124811)
Thanks to the reviewers for suggesting the use of a "caution" section instead of "warning" or "note".
(cherry picked from commit d150e4abcf)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
GH-109975: Copyedit 3.13 What's New: Link to installing free-threaded binaries on macOS (GH-124831)
(cherry picked from commit 4129a74a37)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
GH-109975: Copyedit 3.13 What's New: Note delayed expected release date for Python 3.13.0 (GH-124827)
Note delayed expected release date of 3.13.0
(cherry picked from commit 8823690264)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Doc: Fix archive filenames for standard builds (GH-124826)
(cherry picked from commit 91e64be731)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
gh-115145: Update documentation about ``PyThreadState_DeleteCurrent`` (gh-124920)
(cherry picked from commit 9eeb21bf76)
Co-authored-by: Donghee Na <donghee.na@python.org>
Revert the incremental GC in 3.13, since it's not clear that without further turning, the benefits outweigh the costs.
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Doc: Run HTML and non-HTML daily builds separately (GH-124493)
(cherry picked from commit cce1125574)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
gh-123811: test that round() can return signed zero (GH-123829)
(cherry picked from commit d2b9b6f919)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
* Setting the __module__ attribute for a class now removes the
__firstlineno__ item from the type's dict.
* The _collections_abc and _pydecimal modules now completely replace the
collections.abc and decimal modules after importing them. This
allows to get the source of classes and functions defined in these
modules.
* inspect.findsource() now checks whether the first line number for a
class is out of bound.
(cherry picked from commit 69a4063ca5)
gh-123826: Fix unused function warnings in mimalloc on NetBSD (GH-123827)
(cherry picked from commit 4a6b1f1796)
Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
gh-123823: Fix test_posix for unsupported posix_fallocate on NetBSD (GH-123824)
Fix test_posix for unsupported posix_fallocate on NetBSD.
(cherry picked from commit df4f0cbfad)
Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
gh-123915: Ensure that Windows AMD64 and ARM64 release builds use different directories (GH-123918)
(cherry picked from commit 00ffdf2736)
Co-authored-by: adang1345 <adang1345@gmail.com>
gh-123892: Add "_wmi" to sys.stdlib_module_names (GH-123893)
(cherry picked from commit fb1b51a58d)
Co-authored-by: Victor Stinner <vstinner@python.org>
gh-123881: Add additional test coverage for PEP 695 edge cases (GH-123886)
(cherry picked from commit b52de7e02d)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
gh-77894: Fix a crash when the GC breaks a loop containing a memoryview (GH-123898)
Now a memoryview object can only be cleared if there are no buffers
that refer it.
(cherry picked from commit a1dbf2ea69)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>