There was an unnecessary quadratic loop in idna decoding. This restores
the behavior to linear.
(cherry picked from commit d315722564)
(cherry picked from commit a6f6c3a3d6)
Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
gh-96746: Docs: Clear up Py_TPFLAGS_DISALLOW_INSTANTIATION inheritance (GH-99002)
The flag is not inherited, but its effect -- a NULL tp_new -- is.
Drop hints for people who come here wanting to “disallow instantiation”.
(cherry picked from commit 1438b77997)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
The test.support.wait_process() function now uses a timeout of
LONG_TIMEOUT seconds by default, instead of SHORT_TIMEOUT. It
doesn't matter if a Python buildbot is slower, it only matters that
the process completes. The timeout should just be shorter than
"forever".
(cherry picked from commit a9a8c87126)
Co-authored-by: Victor Stinner <vstinner@python.org>
(cherry picked from commit f09da28768)
In very rare circumstances the JUMP opcode could be confused with the
argument of the opcode in the "then" part which doesn't end with the
JUMP opcode. This led to incorrect detection of the final JUMP opcode
and incorrect calculation of the size of the subexpression.
NOTE: Changed return value of functions _validate_inner() and
_validate_charset() in Modules/_sre/sre.c. Now they return 0 on success,
-1 on failure, and 1 if the last op is JUMP (which usually is a failure).
Previously they returned 1 on success and 0 on failure.
(cherry picked from commit e9ac890c02)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Specify the full path to the docs for `make docclean`
This is to have `make clean` not error out on cross-builds.
(cherry picked from commit 22bab74c8f)
The uuid.getnode() function has multiple implementations, tested sequentially.
The ifconfig implementation was incorrect and always failed: fix it.
In practice, functions of libuuid library are preferred, if available:
uuid_generate_time_safe(), uuid_create() or uuid_generate_time().
(cherry picked from commit e3ec272f57)
Co-authored-by: Chaim Sanders <csanders-git@users.noreply.github.com>
Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
[3.10] gh-92871: Postpone the removal of typing.{io,re} to 3.13 (GH-98958).
(cherry picked from commit 65d1407737)
Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
Fix subscription of types.GenericAlias instances containing bare generic types:
for example tuple[A, T][int], where A is a generic type, and T is a type
variable.
Use unnumbered footnote in this file to avoid reseting the footnotes numbering.
Example: when building the tutorial into a PDF and using `latex_show_urls = "footnotes"`; this footnote become the number 8. However, without this change, the footnote shows the number 1.
(cherry picked from commit f042646595)
Co-authored-by: Manuel Kaufmann <humitos@gmail.com>
gh-96151: Use a private name for passing builtins to dataclass. This now allows for a field named BUILTIN (gh-98143)
(cherry picked from commit 29f98b46b7)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
This is a tiny typo fix of package definition in glossary.
According to https://devguide.python.org/documentation/help-documenting/ simple typos don’t require issues of their own, but, instead, a pull request can by submitted directly.
Automerge-Triggered-By: GH:AlexWaygood
(cherry picked from commit fc94d55ff4)
Co-authored-by: ab <abousselmi@users.noreply.github.com>
Add more tkinter.Canvas tests (GH-98475)
It is a prerequisite for GH-94473. Add tests for the coords() method and
for creation of some Canvas items.
(cherry picked from commit ff173ed2f6)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>