gh-112092: clarify unstable ABI recompilation requirements (GH-112093)
Use different versions in the examples for when extensions do and do not need to be recompiled to make the examples easier to understand.
(cherry picked from commit 68a7b78cd5)
Co-authored-by: DerSchinken <53398996+DerSchinken@users.noreply.github.com>
Threads can't be forced to terminate (without potentially corrupting too much
state), so the expected behaviour of `ThreadPool.terminate` is to wait for
the currently executing tasks to finish.
Use shorter sleep time for threadpools, so if a task manages to start, the test
doesn't block for long.
(cherry picked from commit c1db960608)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
EPERM is raised when setreuid() fails.
EACCES is set in execve() when the test user has not access to sys.executable.
(cherry picked from commit 311d1e2701)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Only set filename to cwd if it was caused by failed chdir(cwd).
_fork_exec() now returns "noexec:chdir" for failed chdir(cwd).
(cherry picked from commit e2c097ebde)
Co-authored-by: Robert O'Shea <PurityLake@users.noreply.github.com>
Prefix 'dict' with 'o', 'g', or 'l' for 'object', 'global', or 'local'.
Suffix 'object' with '_'.
(cherry picked from commit 6f4b242a03)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Instead of checking if a directory does not exist and thereafter
creating it, directly call os.makedirs() with the exist_ok=True.
(cherry picked from commit 78fcde039a)
Co-authored-by: buermarc <44375277+buermarc@users.noreply.github.com>
In PyObject_GC_Del, in Py_DEBUG mode, when warning about GC objects that
were not properly untracked before starting destruction, take care to
untrack the object _before_ warning, to avoid triggering a GC run and
causing the problem the code tries to warn about. Also make sure to save and
restore any pending exceptions, which the warning would otherwise clobber or
trigger an assertion error on.
(cherry picked from commit ce6a533c4b)
Co-authored-by: T. Wouters <thomas@python.org>
gh-102468: Document `PyCFunction_New*` and `PyCMethod_New` (GH-112557)
(cherry picked from commit a482bc67ee)
Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Tkinter is a fact, not necessarily a feature.
Reorganize editor key bindings in a logical order
and remove those that do not work, at least on Windows.
Improve shell bindings list.
(cherry picked from commit 4a32275389)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
This matches Firefox format. Edge double-spaces non-simple
list but I think it looks worse.
(cherry picked from commit e07a400c31)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* Simplify __post_init__ example usage. It applies to all base classes, not just dataclasses.
(cherry picked from commit 05008c27b7)
Co-authored-by: Steffen Zeile <48187781+Kaniee@users.noreply.github.com>
- Align the argument spec for fnmatch functions with the actual
implementation.
- Update Sphinx markup to recent recommandations.
- Add link to 'iterable' glossary entry.
(cherry picked from commit 6e84f3b56f)
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Skip .pth files with names starting with a dot or hidden file attribute.
(cherry picked from commit 74208ed0c4)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
The substantive change is on line 577/593. Rest is header/footer stuff ignored when displaying.
(cherry picked from commit 7a24ecc953)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from b1db6278cf)
Align the multiprocessing shared memory docs with Diatáxis's
recommendations for references.
- use a parameter list for the SharedMemory.__init__() argument spec
- use the imperative mode
- use versionadded, not versionchanged, for added parameters
- reflow touched lines according to SemBr
gh-114107: test.pythoninfo logs Windows Developer Mode (GH-114121)
Also, don't skip the whole collect_windows() if ctypes is missing.
Log also ctypes.windll.shell32.IsUserAnAdmin().
(cherry picked from commit c77f552ec0)
Co-authored-by: Victor Stinner <vstinner@python.org>
gh-114069: Revise Tutorial Methods paragraph (GH-114127)
Remove excess words in the first and third sentences.
(cherry picked from commit 31a2543c80)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit af85274086)
- add :class: and :mod: markups where needed
- fix incorrect escaping of a star in ShareableList arg spec
- mark up parameters with stars: *val*
- mark up list of built-in types using list markup
- remove unneeded parentheses from :meth: markups
gh-114070: correct the specification of ``digit`` in the float() docs (GH-114080)
(cherry picked from commit 4f24b92aa0)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
gh-101225: Increase the socket backlog when creating a multiprocessing.connection.Listener (GH-113567)
Increase the backlog for multiprocessing.connection.Listener` objects created
by `multiprocessing.manager` and `multiprocessing.resource_sharer` to
significantly reduce the risk of getting a connection refused error when creating
a `multiprocessing.connection.Connection` to them.
(cherry picked from commit c7d59bd8cf)
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Fix a bug in the regex used for parsing a string input to the `fractions.Fraction` constructor. That bug led to an inconsistent exception message being given for some inputs.
---------
Co-authored-by: Crowthebird <78076854+thatbirdguythatuknownot@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
[3.12] gh-114021: Pin various sphinxcontrib extensions to older versions (GH-114022)
(cherry picked from commit 94b1d1fa38)
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
gh-89159: Document missing TarInfo members (GH-91564)
(cherry picked from commit 3aa4b839e4)
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
datamodel: Fix a typo in ``object.__init_subclass__`` (GH-111599)
(cherry picked from commit a47353d587)
Co-authored-by: InSync <122007197+InSyncWithFoo@users.noreply.github.com>
Link to the glossary for "magic methods" in ``MagicMock`` (GH-111292)
The MagicMock documentation mentions magic methods several times without
actually pointing to the term in the glossary. This can be helpful for
people to fully understand what those magic methods are.
(cherry picked from commit e97da8677f)
Co-authored-by: Pierre Equoy <pierre.equoy@canonical.com>
Tutorial: Clarify 'nonzero exit status' in the appendix (GH-112039)
(cherry picked from commit 32f3684b8f)
Co-authored-by: Andrew Zipperer <47086307+zipperer@users.noreply.github.com>
Determine the support of the Kyiv timezone by checking the result of
astimezone() which uses the system tz database and not the one
populated by zoneinfo.
(cherry picked from commit 931d7e052e)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
test_configdialog.HighPageTest.test_highlight_target_text_mouse fails
if a line of the Highlight tab text sample is not visible. If so, bbox()
in click_char() returns None and the unpacking iteration fails.
This occurred on a Devuan Linux system. Fix by moving the
'see character' call inside click_char, just before the bbox call.
Also, reduce the click_char calls to just one per tag name and
replace the other nested function with a dict comprehension.
(cherry picked from commit c4992f4106)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* Add new installation path functions subsection
* Add content from install/index to sysconfig
* Fix table
* Update note about installers
* Clean up the list of schemes, remove references to Distutils.
(cherry picked from commit f16e81f368)