Fix misspellings in sysconfig docs (GH-108156)
(cherry picked from commit 1dc0c58d2b)
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
Docs: Remove links to external C functions and macros in os.rst (GH-108138)
(cherry picked from commit c31c61c04e)
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
- Add explanatory comments
- Add return value to connection_close() for propagating errors
- Always check the return value of connection_exec_stmt()
- Assert pre/post state in remove_callbacks()
- Don't log unraisable exceptions in case of interpreter shutdown
- Make sure we're not initialized if reinit fails
- Try to close the database even if ROLLBACK fails
(cherry picked from commit fd19509220)
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
- name the last parameter *whence*, like it is for seek() methods on
file objects
- add param docstrings
- structure the valid *whence* params
(cherry picked from commit dd4442c8f5)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Docs: format sys.float_info properly (GH-108107)
- Normalise capitalisation and punctuation
- Use attribute markup for named tuple attributes
- Use :c:macro: markup for C macros
- Use a list for the 'rounds' attribute values
- Use list-table, for better .rst readability
- Remove one unneeded sys.float_info.dig link
(cherry picked from commit ca0c6c1f1e)
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
gh-101100: Only show GitHub check annotations on changed doc paragraphs (GH-108065)
* Only show GitHub check annotations on changed doc paragraphs
* Improve check-warnings script arg parsing following Hugo's suggestions
* Factor filtering warnings by modified diffs into helper function
* Build docs on unmerged branch so warning lines match & avoid deep clone
---------
(cherry picked from commit eb953d6e44)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* gh-101100: Docs: Check Sphinx warnings and fail if improved (#106460)
(cherry picked from commit 806d7c98a5)
* [3.12] gh-101100: Docs: Check Sphinx warnings and fail if improved (GH-106460).
(cherry picked from commit 806d7c98a5)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
---------
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Docs: emphasise warning and add accurate markups for sys.unraisablehook (GH-108105)
(cherry picked from commit cc58ec9724)
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Docs: Fix Sphinx warnings in io.rst (GH-107903)
- Mark up parameter and argument names properly
- If possible, link to docs for methods like `seek`, `tell`, `write`, `read`, etc.
(cherry picked from commit 5c76899dad)
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: T. Wouters <thomas@python.org>
gh-107801: Document SEEK_HOLE and SEEK_DATA (GH-107936)
(cherry picked from commit 8a19f225b9)
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Antoine Pitrou <antoine@python.org>
gh-107909: Test explicit `object` base in PEP695 generic classes (GH-108001)
(cherry picked from commit b61f5995ae)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
gh-107298: Fix some references in the C API documentation (GH-108072)
(cherry picked from commit f51f0466c0)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
gh-107298: Add standard exceptions and warnings in the nitpick_ignore list (GH-108029)
(cherry picked from commit c9d83f93d8)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
gh-108000: Test that `lambda` also has `__type_params__` (GH-108002)
(cherry picked from commit a8d440b383)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
GH-92584: Remove references to Distutils in configure.rst (GH-108043)
Remove references to Distutils in configure.rst
(cherry picked from commit e88eb3775e)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
GH-92584: Redirect macOS package installation to the PPUG (GH-108044)
(cherry picked from commit 902864256c)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
GH-92584: Remove references to Distutils in ``PYTHONUSERBASE`` (GH-108040)
Remove references to Distutils in ``PYTHONUSERBASE``
(cherry picked from commit 636ca313b2)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
GH-92584: Remove reference to Distutils in ``cx_Freeze``'s description (GH-108047)
Remove reference to Distutils in ``cx_Freeze``'s description
(cherry picked from commit 57fcf96e4f)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
gh-91051: fix type watcher test to be robust to existing watcher (GH-107989)
(cherry picked from commit fce93c80ae)
Co-authored-by: Carl Meyer <carl@oddbird.net>
Remove Sphinx problem matcher to avoid annotating unchanged files (GH-108005)
(cherry picked from commit 0d7f5d3ba3)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
GH-92584: Drop reference to Distutils in ``site.USER_BASE`` (GH-108031)
Drop reference to Distutils in ``site.USER_BASE``
(cherry picked from commit f2a9dfdee9)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
gh-104496: Use correct Tcl or Tk version in Tkinter tests (GH-107688)
In future Tcl and Tk versions can be desynchronized.
(cherry picked from commit 3c8e8f3cee)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Docs: Fix more Sphinx annotations in ctypes.rst (GH-107708)
(cherry picked from commit 8c9af6b9a0)
Co-authored-by: Erlend E. Aasland <erlend@python.org>
gh-100814: Fix exception for invalid callable value of Tkinter image option (GH-107692)
Passing a callable object as an option value to a Tkinter image now raises
the expected TclError instead of an AttributeError.
(cherry picked from commit 50e3cc9748)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-107715: Escape class name in regular expression (GH-107716)
This patch escapes the class name before embedding it in the regular expression
for `pat` in `doctest.DocTestFinder._find_lineno`. While class names do not
ordinarily contain special characters, it is possible to encounter these when a
class is created dynamically. Escaping the name will correctly return `None` in
this scenario, rather than potentially matching a different class or raising
`re.error` depending on the symbols used.
(cherry picked from commit 8579327879)
Co-authored-by: Gertjan van Zwieten <git@gjvz.nl>
* Update 2023-08-07-14-12-07.gh-issue-107715.238r2f.rst
---------
Co-authored-by: Gertjan van Zwieten <git@gjvz.nl>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Cover all the Mapping Protocol, almost all the Sequence Protocol
(except PySequence_Fast) and a part of the Object Protocol.
Move existing tests to Lib/test/test_capi/test_abstract.py and
Modules/_testcapi/abstract.c.
Add also tests for PyDict C API..
(cherry picked from commit 16c9415fba)
* [3.12] gh-86457: Fix signature for code.replace() (GH-23199)
Also add support of @text_signature in Argument Clinic..
(cherry picked from commit 0e6e32fb84)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* Update 2023-08-07-16-30-48.gh-issue-95065.-im4R5.rst
gh-91795: Update build optimization part of PCbuild/readme.txt (GH-91849)
(cherry picked from commit 906b73be5e)
Co-authored-by: Fatih <77548106+fatihkabakk@users.noreply.github.com>
gh-99203: shutil.make_archive(): restore select CPython <= 3.10.5 behavior (GH-99802)
Restore following CPython <= 3.10.5 behavior of shutil.make_archive()
that went away as part of gh-93160:
Do not create an empty archive if root_dir is not a directory, and, in
that case, raise FileNotFoundError or NotADirectoryError regardless
of format choice. Beyond the brought-back behavior, the function may
now also raise these exceptions in dry_run mode.
(cherry picked from commit a86df298df)
Co-authored-by: 6t8k <58048945+6t8k@users.noreply.github.com>
gh-106300: Improve errors testing in test_unittest.test_runner (GH-106737)
Use a custom exception to prevent unintentional silence of actual errors.
(cherry picked from commit fd9d70a94d)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* Strings with length from 2**31-1 to 2**32-2 always caused MemoryError,
it doesn't matter how much memory is available.
* Strings with length exactly 2**32-1 caused OSError.
* Strings longer than 2**32-1 characters were truncated due to integer overflow bug.
* Strings containing the null character were truncated at the first null character.
Now strings longer than 2**31-1 characters caused OverflowError and the null character is allowed..
(cherry picked from commit 04cc01453d)
Restore the global Input Stream pointer after trying to match a sub-pattern.
.
(cherry picked from commit abd9cc52d9)
Co-authored-by: SKO <41810398+uyw4687@users.noreply.github.com>
* gh-91051: fix segfault when using all 8 type watchers (GH-107853)
(cherry picked from commit 66e4edd734)
Co-authored-by: Carl Meyer <carl@oddbird.net>
gh-107963: Fix set_forkserver_preload to check the type of given list (GH-107965)
(cherry picked from commit 6515ec3d3d)
gh-107963: Fix set_forkserver_preload to check the type of given list
Co-authored-by: Dong-hee Na <donghee.na@python.org>
Add another example to the statistics docs (GH-107904)
(cherry picked from commit 2b6dc2accc)
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>