Commit Graph

28478 Commits

Author SHA1 Message Date
Wei-Hsiang (Matt) Wang cf472577e2
gh-123517: Remove unnecessary ``:meth:`` parentheses (#123518) 2024-09-01 05:59:42 +01:00
Maciej Olko 5332d989af
gh-123407: Enable translating literal and code blocks (#123408) 2024-08-31 07:31:36 +01:00
Victor Stinner d8e69b2c1b
gh-122854: Add Py_HashBuffer() function (#122855) 2024-08-30 15:42:27 +00:00
Victor Stinner 3d60dfbe17
gh-121645: Add PyBytes_Join() function (#121646)
* Replace _PyBytes_Join() with PyBytes_Join().
* Keep _PyBytes_Join() as an alias to PyBytes_Join().
2024-08-30 12:57:33 +00:00
Wei-Hsiang (Matt) Wang 103a0470e3
gh-123492: Remove unnecessary `:func:` parentheses (#123493) 2024-08-30 14:34:09 +03:00
Bénédikt Tran 40fff90ae3
gh-101860: document `property.__name__` (GH-123399) 2024-08-28 16:10:13 +02:00
Wulian 9e108b8719
Fix typos in docs, error messages and comments (#123336)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-08-28 14:41:04 +03:00
Victor Stinner 4c6dca8292
gh-120389: Add PyLong_FromInt64() and PyLong_AsInt64() (#120390)
Add new functions to convert C <stdint.h> numbers from/to Python int:

* PyLong_FromInt32()
* PyLong_FromUInt32()
* PyLong_FromInt64()
* PyLong_FromUInt64()
* PyLong_AsInt32()
* PyLong_AsUInt32()
* PyLong_AsInt64()
* PyLong_AsUInt64()
2024-08-28 10:16:13 +00:00
sobolevn 6f563e364d
gh-123254: Improve `tuple` C API docs with more info about errors (#123255)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2024-08-28 10:30:21 +03:00
Daniel Hollas 08c0166ce4
gh-109975: Fix a typo in What's New in Python 3.13 (#123393) 2024-08-27 15:53:45 +01:00
Mark Shannon f49a91648a
GH-117759: Document incremental GC (GH-123266)
* Update what's new

* Update gc module docs and fix inconsistency in gc.get_objects
2024-08-27 15:23:39 +01:00
Petr Viktorin 6754566a51
gh-120426: Reword the glossary term "immortal" (GH-123191)
Reword the glossary term "immortal", mark it as an implementation detail
2024-08-27 13:37:56 +02:00
Barney Gale 7bd6ebf696
GH-73991: Prune `pathlib.Path.copy()` and `copy_into()` arguments (#123337)
Remove *ignore* and *on_error* arguments from `pathlib.Path.copy[_into]()`,
because these arguments are under-designed. Specifically:

- *ignore* is appropriated from `shutil.copytree()`, but it's not clear
  how it should apply when the user copies a non-directory. We've changed
  the callback signature from the `shutil` version, but I'm not confident
  the new signature is as good as it can be.
- *on_error* is a generalisation of `shutil.copytree()`'s error handling,
  which is to accumulate exceptions and raise a single `shutil.Error` at
  the end. It's not obvious which solution is better.

Additionally, this arguments may be challenging to implement in future user
subclasses of `PathBase`, which might utilise a native recursive copying
method.
2024-08-26 17:05:34 +01:00
Barney Gale 033d537cd4
GH-73991: Make `pathlib.Path.delete()` private. (#123315)
Per feedback from Paul Moore on GH-123158, it's better to defer making
`Path.delete()` public than ship it with under-designed error handling
capabilities.

We leave a remnant `_delete()` method, which is used by `move()`. Any
functionality not needed by `move()` is deleted.
2024-08-26 16:26:34 +01:00
Barney Gale c68a93c582
GH-73991: Add `pathlib.Path.copy_into()` and `move_into()` (#123314)
These two methods accept an *existing* directory path, onto which we join
the source path's base name to form the final target path.

A possible alternative implementation is to check for directories in
`copy()` and `move()` and adjust the target path, which is done in several
`shutil` functions. This behaviour is helpful in a shell context, but
less so in a stored program that explicitly specifies destinations. For
example, a user that calls `Path('foo.py').copy('bar.py')` might not
imagine that `bar.py/foo.py` would be created, but under the alternative
implementation this will happen if `bar.py` is an existing directory.
2024-08-26 14:14:23 +01:00
CF Bolz-Tereick 70bfef52b5
gh-82378: Document the difference between sys.tracebacklimit and the limit arguments (#123286) 2024-08-25 23:50:43 +01:00
Kirill Podoprigora 249b083ed8
gh-122982: Extend the deprecation period for bool inversion by two years (#123306) 2024-08-25 12:24:44 -07:00
Barney Gale 625d0705b9
GH-73991: Add `pathlib.Path.move()` (#122073)
Add a `Path.move()` method that moves a file or directory tree, and returns a new `Path` instance pointing to the target.

This method is similar to `shutil.move()`, except that it doesn't accept a *copy_function* argument, and it doesn't check whether the destination is an existing directory.
2024-08-25 16:51:51 +01:00
Adam Turner 74ff496dce
GH-109975: Copyedit 3.13 What's New: Optimizations (#123301) 2024-08-25 16:17:46 +03:00
Adam Turner 9b3749849e
GH-123299: Move ctypes What's New entry to 3.14 (#123300) 2024-08-25 01:41:44 +01:00
Adam Turner 127660bcdb
GH-109975: Copyedit 3.13 What's New: Improved Modules (#123132)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2024-08-24 14:32:35 +01:00
Adam Turner b178beef26
Docs: Fix Makefile syntax (#123287) 2024-08-24 12:57:38 +00:00
Bar Harel 90b6d0e0f8
gh-123213: Fixed xml.etree.ElementTree.Element.extend and assignment to no longer hide exceptions (GH-123214) 2024-08-23 12:12:58 +03:00
Bénédikt Tran b1d3bd2e09
gh-123165: make `dis` functions render positions on demand (#123168) 2024-08-21 14:46:24 +01:00
Peter Bierma 9dbd123755
gh-123084: Turn `shutil.ExecError` into a deprecated alias of `RuntimeError` (#123125) 2024-08-21 00:39:24 +00:00
Jelle Zijlstra 0480052ea1
gh-109975: Copyedit What's New in Python 3.13 (#123150)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-08-19 23:51:37 +00:00
Pedro Lacerda be257c5815
gh-123049: configparser: Allow to create the unnamed section from scratch. (#123077)
---------

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-08-18 15:52:25 -04:00
Sergey B Kirpichev b0f462d4c8
gh-123110: correct note about _Bool in the struct module docs (GH-123111) 2024-08-18 16:58:58 +03:00
Adam Turner 79c542b5cc
Docs: Run ``latexmk`` in parallel when creating PDFs (#123113) 2024-08-17 20:58:06 +00:00
Adam Turner d60b97a833
GH-109975: Copyedit 3.13 What's New: Other Language Changes (#123086)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-08-17 12:09:42 +00:00
Sergey B Kirpichev ce4b9c8464
gh-121477: mention new PyLong_*Bytes() functions in PyLong_FromString() (#121478)
* gh-121477: mention new PyLong_*Bytes() functions in PyLong_FromString()

* Update Doc/c-api/long.rst

---------

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2024-08-17 09:13:31 +00:00
mathysEthical e9287ea426
fix typo in dis.rst (#121612) 2024-08-17 14:20:58 +05:30
Rafael Fontenelle 26de1b245e
Remove unneeded verb in the phrase in sys.rst (#122718) 2024-08-17 14:18:31 +05:30
Damien 8a59deca59
gh-122519: Adding socket module shutdown() constants description (#122543) 2024-08-17 13:59:23 +05:30
CF Bolz-Tereick a07cf4ce25
mention pypy somewhat more prominently in the pyrepl section of whatsnew (#123063) 2024-08-16 11:38:44 +00:00
Eddie Elizondo 3203a74129
gh-113190: Reenable non-debug interned string cleanup (GH-113601) 2024-08-15 11:55:09 +00:00
Adam Turner b106cf8d97
GH-109975: Copyedit 3.13 What's New: New Features (#122990)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
2024-08-15 10:08:15 +01:00
Rafael Fontenelle 1054a755a3
GH-103484: Tell linkcheck to ignore debian manpage redirects (#123019) 2024-08-14 22:35:23 +01:00
Damien 8e2dc7f380
gh-123005: Add version added in enum.Flag.__len__ (GH-123007) 2024-08-14 13:30:33 -07:00
Rafael Fontenelle 315a933a5b
Fix doctrees directory for the gettext builder (#122997) 2024-08-14 11:38:29 +01:00
Trey Hunner 906b796af8
gh-122873: Allow "python -m json" to work (#122884)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
2024-08-13 17:09:38 +01:00
Adam Turner db6f5e1933
GH-109975: Copyedit 3.13 What's New: Release Highlights (#122958)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-08-13 15:30:59 +01:00
Damien be90648fb2
gh-122944: Fix incorrect prompt strings in the Python Tutorial (#122949)
In the REPL, top level comments are followed by a primary, not secondary prompt.
Fix the places in the in the tutorial that use the latter.
2024-08-12 14:30:08 -04:00
Barney Gale a6644d4464
GH-73991: Rework `pathlib.Path.copytree()` into `copy()` (#122369)
Rename `pathlib.Path.copy()` to `_copy_file()` (i.e. make it private.)

Rename `pathlib.Path.copytree()` to `copy()`, and add support for copying
non-directories. This simplifies the interface for users, and nicely
complements the upcoming `move()` and `delete()` methods (which will also
accept any type of file.)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-08-11 22:43:18 +01:00
sobolevn ea70439bd2
gh-122701: Fix wording of raw strings/bytes in `lexical_analysis.rst` (#122702)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-08-11 21:02:50 +00:00
Rafael Fontenelle db8b83c2b0
Docs: Standardise versionchanged text in weakref.rst (#122898) 2024-08-11 21:40:11 +01:00
Wulian bc9d92c679
gh-122858: Deprecate `asyncio.iscoroutinefunction` (#122875)
Deprecate `asyncio.iscoroutinefunction` in favor of `inspect.iscoroutinefunction`.

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2024-08-11 16:35:51 +00:00
Barney Gale 363374cf69
GH-120794: Use example paths with multiple parts in pathlib docs (#122887)
In the documentation of `PosixPath` and `WindowsPath`, and their `Pure*`
equivalents, use example paths with multiple non-anchor parts.

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-08-10 21:21:17 +00:00
Adam Turner 0959142e4d
gh-122868: Add more lower bounds for sphinxcontrib dependencies (#122891) 2024-08-10 20:50:43 +00:00
Nico Mexis 5580f31c56
gh-115808: Add ``is_none`` and ``is_not_none`` to ``operator`` (#115814)
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2024-08-10 20:16:34 +01:00