Commit Graph

27628 Commits

Author SHA1 Message Date
Hugo van Kemenade 8ccd1ba461
gh-101100: Fix Sphinx warnings in `reference/expressions.rst` (#114194) 2024-01-22 18:21:14 +02:00
Serhiy Storchaka 1b719b39b9
gh-114321: Expose more constants in the fcntl module (GH-114322) 2024-01-22 18:09:22 +02:00
Kirill Podoprigora 6d30cbee01
Docs: Fix typo in code snippet (GH-114421) 2024-01-22 17:56:30 +02:00
Serhiy Storchaka 650f9e4c94
gh-114115: Update documentation of array.array (GH-114117)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-01-22 08:42:50 +00:00
Gregory P. Smith fd49e22670
gh-114328: tty cbreak mode should not alter ICRNL (#114335)
The terminal CR -> NL mapping setting should be inherited in cbreak mode as OSes do not specify altering it as part of their stty cbreak mode definition.
2024-01-21 15:25:52 -08:00
Erlend E. Aasland 336030161a
Docs: align sqlite3 docs with versionadded/versionchanged recommendations (#114400)
When a parameter is added to a function or method, use the 'versionchanged'
directive, not 'versionadded'.
2024-01-21 19:54:19 +00:00
Erlend E. Aasland de17cf444a
Docs: link to sys.stdout in ftplib docs (#114396) 2024-01-21 17:41:21 +00:00
Nikita Sobolev 38768e4cdd
gh-114384: Align sys.set_asyncgen_hooks signature in docs to reflect implementation (#114385) 2024-01-21 13:49:49 +01:00
Erlend E. Aasland 96c15b1c8d
Docs: mark up FTP() constructor with param list (#114359)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-01-21 12:27:33 +01:00
Nikita Sobolev 47133d8d86
gh-101100: Fix sphinx warnings in `Doc/c-api/memory.rst` (#114373) 2024-01-21 11:34:43 +02:00
Erlend E. Aasland fbc28748ea
Docs: mark up the FTP debug levels as a list (#114360)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-01-21 09:19:31 +00:00
cdzhan b04c5005cc
Fix the confusing "User-defined methods" reference in the datamodel (#114276)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2024-01-21 03:45:38 +00:00
Erlend E. Aasland 8f4f773647
Docs: Add missing line continuation to FTP_TLS class docs (#114352)
Regression introduced by b1ad5a5d4.
2024-01-20 19:39:44 +00:00
Erlend E. Aasland b1ad5a5d44
Docs: structure the ftplib reference (#114317)
Introduce the following headings and subheadings:

- Reference
  * FTP objects
  * FTP_TLS objects
  * Module variables
2024-01-20 16:06:52 +01:00
Adam Turner e6495159f6
GH-99380: Update to Sphinx 7 (#99381) 2024-01-20 11:20:51 +00:00
David H. Gutteridge 567a85e9c1
gh-114332: Fix the flags reference for ``re.compile()`` (#114334)
The GH-93000 change set inadvertently caused a sentence in re.compile()
documentation to refer to details that no longer followed. Correct this
with a link to the Flags sub-subsection.

Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-01-20 11:17:41 +00:00
Barney Gale 6313cdde58
GH-79634: Accept path-like objects as pathlib glob patterns. (#114017)
Allow `os.PathLike` objects to be passed as patterns to `pathlib.Path.glob()` and `rglob()`. (It's already possible to use them in `PurePath.match()`)

While we're in the area:

- Allow empty glob patterns in `PathBase` (but not `Path`)
- Speed up globbing in `PathBase` by generating paths with trailing slashes only as a final step, rather than for every intermediate directory.
- Simplify and speed up handling of rare patterns involving both `**` and `..` segments.
2024-01-20 02:10:25 +00:00
Hugo van Kemenade 229ee5bea1
Retain shorter tables of contents for Sphinx 5.2.3+ (#114318)
Disable toc_object_entries, new in Sphinx 5.2.3
2024-01-19 18:52:42 +00:00
DerSchinken 68a7b78cd5
gh-112092: clarify unstable ABI recompilation requirements (#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.
2024-01-18 21:04:40 +01:00
Nikita Sobolev 9c93350f58
gh-108303: Move all doctest related files and tests to `Lib/test/test_doctest/` (#112109)
Co-authored-by: Brett Cannon <brett@python.org>
2024-01-18 16:58:11 +01:00
Miyashita Yosuke ba683c22ec
gh-114231: Fix indentation in enum.rst (#114232) 2024-01-18 09:23:15 +00:00
Terry Jan Reedy 8cda72037b
gh-114211: Update EmailMessage doc about ordered keys (#114224)
Ordered keys are no longer unlike 'real dict's.
2024-01-18 02:25:22 +00:00
Steve Dower f56d132deb
gh-112984 Update Windows build and installer for free-threaded builds (GH-113129) 2024-01-17 21:52:23 +00:00
Christophe Nanteuil 7573c44c32
Fix typo in tkinter.ttk.rst (GH-106157) 2024-01-17 18:23:25 +00:00
Sergey B Kirpichev 029ecee10d
gh-114070: fix token reference warnings in expressions.rst (#114169) 2024-01-17 18:39:50 +02:00
Karolina Surma f49752552e
gh-111301: Advertise importlib methods removal in What's new in Python 3.12 (GH-111630) 2024-01-17 15:25:42 +01:00
Terry Jan Reedy 4a32275389
gh-72284: Revise lists in IDLE doc (#114174)
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.
2024-01-17 07:52:32 +00:00
Erlend E. Aasland 8d26db45df
gh-112043: Align concurrent.futures.Executor.map docs with implementation (#114153)
The first parameter is named 'fn', not 'func'.
2024-01-17 01:31:16 +00:00
Steffen Zeile 05008c27b7
gh-88531 Fix dataclass __post_init__/__init__ interplay documentation (gh-107404)
* Simplify __post_init__ example usage. It applies to all base classes, not just dataclasses.
2024-01-16 20:17:34 -05:00
Barney Gale 45e527dfb5
GH-110109: pathlib docs: bring `from_uri()` and `as_uri()` together. (#110312)
This is a very soft deprecation of `PurePath.as_uri()`. We instead document
it as a `Path` method, and add a couple of sentences mentioning that it's
also available in `PurePath`.

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-01-16 22:51:57 +00:00
Kuan-Wei Chiu 1d6989f9b0
Fix typo in c_annotations.py comment (#108773)
"compatability" => "compatibility"
2024-01-16 23:36:01 +01:00
Erlend E. Aasland 6e84f3b56f
gh-94220: Align fnmatch docs with the implementation and amend markup (#114152)
- Align the argument spec for fnmatch functions with the actual
  implementation.
- Update Sphinx markup to recent recommandations.
- Add link to 'iterable' glossary entry.

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-01-16 22:35:09 +00:00
Barney Gale 7092b3f131
GH-78988: Document `pathlib.Path.glob()` exception propagation. (#114036)
We propagate the `OSError` from the `is_dir()` call on the top-level
directory, and suppress all others.
2024-01-16 22:28:54 +00:00
solya0x c86571e4c9
Update copyright years to 2024. (GH-113608)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-01-16 21:54:05 +01:00
Erlend E. Aasland b1db6278cf
Docs: Improve multiprocessing.SharedMemory reference (#114093)
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
2024-01-16 16:43:13 +00:00
Terry Jan Reedy 31a2543c80
gh-114069: Revise Tutorial Methods paragraph (#114127)
Remove excess words in the first and third sentences.
2024-01-16 11:33:05 -05:00
Serhiy Storchaka d2d8332f71
gh-113626: Add allow_code parameter in marshal functions (GH-113648)
Passing allow_code=False prevents serialization and de-serialization of
code objects which is incompatible between Python versions.
2024-01-16 18:05:15 +02:00
AN Long a482bc67ee
gh-102468: Document `PyCFunction_New*` and `PyCMethod_New` (GH-112557)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2024-01-16 16:17:03 +01:00
Erlend E. Aasland af85274086
Docs: Align multiprocessing.shared_memory docs with Sphinx recommendations (#114103)
- 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
2024-01-16 12:35:35 +00:00
Zackery Spytz 8fd287b18f
gh-78502: Add a trackfd parameter to mmap.mmap() (GH-25425)
If *trackfd* is False, the file descriptor specified by *fileno*
will not be duplicated.

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-16 08:51:46 +01:00
Sergey B Kirpichev 4f24b92aa0
gh-114070: correct the specification of ``digit`` in the float() docs (#114080) 2024-01-15 14:19:59 -08:00
Sergey B Kirpichev 0f2fa6150b
gh-109598: make PyComplex_RealAsDouble/ImagAsDouble use __complex__ (GH-109647)
`PyComplex_RealAsDouble()`/`PyComplex_ImagAsDouble` now try to convert
an object to a `complex` instance using its `__complex__()` method
before falling back to the ``__float__()`` method.

PyComplex_ImagAsDouble() also will not silently return 0.0 for
non-complex types anymore.  Instead we try to call PyFloat_AsDouble()
and return 0.0 only if this call is successful.
2024-01-15 16:04:17 +01:00
Ronald Oussoren 2010d45327
gh-113666: Adding missing UF_ and SF_ flags to module 'stat' (#113667)
Add some constants to module 'stat' that are used on macOS.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-15 12:22:43 +01:00
Hugo van Kemenade c2808431b3
gh-101100: Fix Sphinx warnings in `howto/urllib2.rst` and `library/http.client.rst` (#114060) 2024-01-14 20:38:53 +00:00
Barney Gale e4ff131e01
GH-44626, GH-105476: Fix `ntpath.isabs()` handling of part-absolute paths (#113829)
On Windows, `os.path.isabs()` now returns `False` when given a path that
starts with exactly one (back)slash. This is more compatible with other
functions in `os.path`, and with Microsoft's own documentation.

Also adjust `pathlib.PureWindowsPath.is_absolute()` to call
`ntpath.isabs()`, which corrects its handling of partial UNC/device paths
like `//foo`.

Co-authored-by: Jon Foster <jon@jon-foster.co.uk>
2024-01-13 07:36:05 +00:00
Stanley 3aa4b839e4
gh-89159: Document missing TarInfo members (#91564) 2024-01-12 23:19:57 +00:00
InSync a47353d587
datamodel: Fix a typo in ``object.__init_subclass__`` (#111599) 2024-01-12 22:59:24 +00:00
Pierre Equoy e97da8677f
Link to the glossary for "magic methods" in ``MagicMock`` (#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.
2024-01-12 22:54:36 +00:00
Andrew Zipperer 32f3684b8f
Tutorial: Clarify 'nonzero exit status' in the appendix (#112039) 2024-01-12 22:42:51 +00:00
Alois Klink dce30c9cbc
gh-95649: Document that asyncio contains uvloop code (#107536)
Some of the asyncio SSL changes in GH-31275 [1] were taken from
v0.16.0 of the uvloop project [2]. In order to comply with the MIT
license, we need to just need to document the copyright information.

[1]: https://github.com/python/cpython/pull/31275
[2]: https://github.com/MagicStack/uvloop/tree/v0.16.0
2024-01-12 22:21:13 +00:00