Commit Graph

25585 Commits

Author SHA1 Message Date
Julien Palard 595baa4e06
gh-86404: [doc] Two 'make suspicious' false positives. (GH-94407) 2022-06-29 10:18:54 +02:00
Victor Stinner 600c65c094
gh-94172: Remove ssl.PROTOCOL_SSLv2 dead code (#94312)
Remove dead code related to ssl.PROTOCOL_SSLv2. ssl.PROTOCOL_SSLv2
was already removed in Python 3.10.

In test_ssl, @requires_tls_version('SSLv2') always returned False.

Extract of the removed code: "OpenSSL has removed support for SSLv2".
2022-06-28 13:57:08 +02:00
Stanley 4b854b7466
gh-61585: Clarify import scope in modules tutorial (GH-93455)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-06-28 12:15:44 +02:00
Erik De Bonte 81ac9ac492
Add docs for decorated object and field specifier params (GH-94354) 2022-06-28 11:58:35 +02:00
Serhiy Storchaka efdc9d68de
gh-87995: Make MappingProxyType hashable (GH-94252) 2022-06-28 11:54:58 +02:00
Victor Stinner 71d5299b73
gh-94199: Remove hashlib.pbkdf2_hmac() Python implementation (GH-94200)
Remove the pure Python implementation of hashlib.pbkdf2_hmac(),
deprecated in Python 3.10. Python 3.10 and newer requires OpenSSL
1.1.1 or newer (PEP 644), this OpenSSL version provides a C
implementation of pbkdf2_hmac() which is faster.
2022-06-28 11:51:13 +02:00
Julien Palard bc7f6fcdf1
gh-86404: [doc] Fix missing space in idle documentation. (GH-94366)
This should have been spotted by sphinx-lint, tracked here:

https://github.com/sphinx-contrib/sphinx-lint/issues/39
2022-06-28 09:44:52 +02:00
Terry Jan Reedy e6391e08bf
gh-82006: IDLE doc improvements (#94349)
0. Update text start and stop conditions.
1. Title-case sections but not subsections.
2. Edit Shell Window sections: title, execute, restart.
2022-06-27 18:59:26 -04:00
Mark Shannon c0453a40fa
GH-94163: Add BINARY_SLICE and STORE_SLICE instructions. (GH-94168) 2022-06-27 12:24:23 +01:00
Arun Mani J d71f5adc41
gh-85023: [doc] clarify parameters vs arguments explanation in FAQ (GH-94282) 2022-06-26 22:57:41 +01:00
Paul Moore aedb5194d5
gh-94214: Add venv context.lib_path and document the context (GH-94221) 2022-06-26 17:49:03 +01:00
Victor Stinner cc0d5e568e
gh-94226: Remove the locale.format() function (#94229)
Remove the locale.format() function, deprecated in Python
3.7: use locale.format_string() instead.

Remove TestFormatPatternArg test case: it is irrelevant for
locale.format_string() which accepts complex formats.
2022-06-26 12:41:19 +02:00
Max Bachmann 32d595fdcd
[doc] fix typo in reference to tp_descr_get and tp_descr_set (GH-94140) 2022-06-26 11:02:29 +01:00
Serhiy Storchaka c834c02569
Revert "bpo-45162: Revert "Remove many old deprecated unittest features"" (GH-92556)
This reverts commit b50322d203.
2022-06-26 10:18:06 +03:00
Jason R. Coombs 38612a05b5
gh-93259: Validate arg to ``Distribution.from_name``. (GH-94270)
Syncs with importlib_metadata 4.12.0.
2022-06-25 21:04:28 -04:00
Irit Katriel 9af6b75298
gh-70474: [doc] fix wording of GET_ANEXT doc (GH-94048) 2022-06-25 23:44:30 +01:00
Stanley c57a1c76d7
bpo-39971: Change examples to be runnable (GH-32172) 2022-06-25 21:51:26 +01:00
Erlend Egeberg Aasland bd3c1c187e
gh-90016: Reword sqlite3 adapter/converter docs (#93095)
Also add adapters and converter recipes.

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com
2022-06-25 22:06:06 +02:00
Victor Stinner 944c7d8a85
gh-94199: Remove ssl.match_hostname() function (#94224) 2022-06-25 12:54:11 +02:00
Yaron de Leeuw 50cd4b6959
bpo-26253: Add compressionlevel to tarfile stream (GH-2962)
`tarfile` already accepts a compressionlevel argument for creating
files. This patch adds the same for stream-based tarfile usage.
The default is 9, the value that was previously hard-coded.
2022-06-25 11:43:54 +03:00
Oleg Iarygin a91ffcf3fa
Docs: Remove `Provides [...]` from `multiprocessing.shared_memory` description (#92761) 2022-06-24 10:08:45 -07:00
Victor Stinner d3a27e4c93
gh-94196: Remove gzip.GzipFile.filename attribute (#94197)
gzip: Remove the filename attribute of gzip.GzipFile,
deprecated since Python 2.6, use the name attribute instead. In write
mode, the filename attribute added '.gz' file extension if it was not
present.
2022-06-24 11:59:32 +02:00
Victor Stinner d435a18c53
gh-94199: Remove ssl.RAND_pseudo_bytes() function (#94202)
Remove the ssl.RAND_pseudo_bytes() function, deprecated in Python
3.6: use os.urandom() or ssl.RAND_bytes() instead.
2022-06-24 11:05:53 +02:00
Victor Stinner 6e33ba114f
gh-94169: Remove deprecated io.OpenWrapper (#94170)
Remove io.OpenWrapper and _pyio.OpenWrapper, deprecated in Python
3.10: just use :func:`open` instead. The open() (io.open()) function
is a built-in function. Since Python 3.10, _pyio.open() is also a
static method.
2022-06-24 08:46:53 +02:00
Julien Palard 11e865c74b
gh-86404: [doc] Fix missing backtick and double target name. (#94120) 2022-06-23 09:12:18 +02:00
Oscar R fb1e9506c1
gh-91456: [Enum] Deprecate default auto() behavior with mixed value types (GH-91457)
When used with plain Enum, auto() returns the last numeric value assigned, skipping any incompatible member values (such as strings); starting in 3.13 the default auto() for plain Enums will require all the values to be of compatible types, and will return a new value that is 1 higher than any existing value.

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2022-06-22 23:20:24 -07:00
partev 7c439dca13
Closes gh-94152: Update pyvideo.org URL (GH-94075)
The URL is now https://pyvideo.org, which uses HTTPS and avoids a redirect.
2022-06-22 22:35:02 -05:00
Inada Naoki 9877f4c624
gh-85308: argparse: Use filesystem encoding for arguments file (GH-93277) 2022-06-23 12:09:57 +09:00
Victor Stinner 47e35625ff
gh-84623: Remove unused imports (#94132) 2022-06-22 19:14:27 +02:00
partev 8661c5053f
gh-94114: Remove obsolete reference to python.org mirrors (GH-94115)
* gh-94114
2022-06-22 09:55:06 -07:00
Serhiy Storchaka fda4b2f063
gh-74696: Do not change the current working directory in shutil.make_archive() if possible (GH-93160)
It is no longer changed when create a zip or tar archive.

It is still changed for custom archivers registered with shutil.register_archive_format()
if root_dir is not None.

Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2022-06-22 10:47:25 +02:00
Irit Katriel 6575841266
bpo-30535: [doc] state that sys.meta_path is not empty by default (GH-94098)
Co-authored-by: Windson yang <wiwindson@outlook.com>
2022-06-21 23:03:08 +01:00
Gregory P. Smith 296e4efebb
gh-89336: Remove configparser APIs that were deprecated for 3.12 (#92503)
https://github.com/python/cpython/issue/89336: Remove configparser 3.12 deprecations.

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2022-06-21 14:31:25 -07:00
Ezio Melotti f28ec34c5c
gh-82927: Update files related to HTML entities. (GH-92504) 2022-06-21 22:03:12 +02:00
max dd5cf84f24
Tutorial: specify match cases don't fall through (GH-93615) 2022-06-21 21:44:09 +02:00
paulreece 51d673176a
gh-93240: clarify wording in IO tutorial (GH-93276)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-06-21 21:40:11 +02:00
luzpaz 830513754d
gh-93675: Fix typos in `Doc/` (GH-93676)
Closes #93675
2022-06-21 21:10:45 +02:00
Oleg Iarygin f62ff97f31
gh-93851: Fix all broken links in Doc/ (GH-93853) 2022-06-21 20:55:18 +02:00
Steve Dower 5a08e0fda4
gh-94068: Remove HVSOCKET_CONTAINER_PASSTHRU constant because it has been removed from Windows (GH-94069)
Fixes #94068

Automerge-Triggered-By: GH:zware
2022-06-21 10:27:21 -07:00
Adam Turner 0efe3a1636
gh-86986: Drop compatibility support for Sphinx 2 (GH-93737)
* Revert "bpo-42843: Keep Sphinx 1.8 and Sphinx 2 compatibility (GH-24282)"

This reverts commit 5c1f15b4b1

* Revert "bpo-42579: Make workaround for various versions of Sphinx more robust (GH-23662)"

This reverts commit b63a620014.
2022-06-21 17:04:46 +02:00
Matthias Köppe 61f24e7885
gh-90539: doc: Expand on what should not go into CFLAGS, LDFLAGS (#92754) 2022-06-20 15:58:02 +02:00
Erlend Egeberg Aasland 8e08978141
gh-61162: Clarify sqlite3 connection context manager docs (GH-93890)
Explicitly note that transactions are only closed if there is an open
transation at `__exit__`, and that transactions are not implicitly
opened during `__enter__`.

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>

Automerge-Triggered-By: GH:erlend-aasland
2022-06-19 13:17:43 -07:00
Erlend Egeberg Aasland 6446592c89
gh-93925: Improve clarity of sqlite3 commit/rollback, and close docs (#93926)
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-06-19 21:17:28 +02:00
Victor Stinner 27b9894033
gh-93937, C API: Move PyFrame_GetBack() to Python.h (#93938)
Move the follow functions and type from frameobject.h to pyframe.h,
so the standard <Python.h> provide frame getter functions:

* PyFrame_Check()
* PyFrame_GetBack()
* PyFrame_GetBuiltins()
* PyFrame_GetGenerator()
* PyFrame_GetGlobals()
* PyFrame_GetLasti()
* PyFrame_GetLocals()
* PyFrame_Type

Remove #include "frameobject.h" from many C files. It's no longer
needed.
2022-06-19 12:02:33 +02:00
Hugo van Kemenade 59c1b33805
What's new in 3.10: fix link to issue (#93968)
* What's new in 3.10: fix link to issue

* What's new in 3.10: fix link to GH issue

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2022-06-19 11:04:26 +02:00
CAM Gerlach 71354adff0
gh-92611: Add details on replacements for cgi utility funcs (GH-92792)
Per @brettcannon 's [suggestions on the Discourse thread](https://discuss.python.org/t/pep-594-take-2-removing-dead-batteries-from-the-standard-library/13508/51), discussed in #92611 and as a followup to PR #92612 , this PR add additional specific per-function replacement information for the utility functions in the `cgi` module deprecated by PEP 594 (PEP-594).

@brettcannon , should this be backported (without the `deprecated-removed` , which I would update it accordingly and re-add in my other PR adding that to the others for 3.11+), or just go in 3.11+?
2022-06-17 14:05:21 -07:00
Victor Stinner 0ff626f210
gh-77782: Deprecate global configuration variable (#93943)
Deprecate global configuration variable like
Py_IgnoreEnvironmentFlag: the Py_InitializeFromConfig() API should be
instead.

Fix declaration of Py_GETENV(): use PyAPI_FUNC(), not PyAPI_DATA().
2022-06-17 16:12:00 +02:00
Victor Stinner 1735710873
gh-77782: Py_FdIsInteractive() now uses PyConfig.interactive (#93916) 2022-06-17 15:19:28 +02:00
Erlend Egeberg Aasland d5be9a5dff
gh-92547: Amend What's New (#93872) 2022-06-16 16:00:43 +02:00
Erlend Egeberg Aasland ce4d11f98b
gh-93857: Fix broken audit-event targets in sqlite3 docs (#93859)
Corrected targets for the following audit-events:

- sqlite3.enable_load_extension => sqlite3.Connection.enable_load_extension
- sqlite3.load_extension => sqlite3.Connection.load_extension
2022-06-15 16:01:27 +02:00
Erlend Egeberg Aasland d31834688b
gh-87260: Update sqlite3 signature docs to reflect actual implementation (#93840)
Align the docs for the following methods with the actual implementation:

- sqlite3.complete_statement()
- sqlite3.Connection.create_function()
- sqlite3.Connection.create_aggregate()
- sqlite3.Connection.set_progress_handler()
2022-06-15 12:28:24 +02:00
Victor Stinner 7e9eaad864
Add test.support.busy_retry() (#93770)
Add busy_retry() and sleeping_retry() functions to test.support.
2022-06-15 11:42:10 +02:00
Erlend Egeberg Aasland cdd3984307
gh-93183: Adjust wording in socket docs (#93832)
package => packet

Co-authored-by: Victor Norman
2022-06-15 10:36:37 +02:00
Ken Jin ad90d49887
[docs] Fix LOAD_ATTR version changed (GH-93816) 2022-06-15 00:22:32 +08:00
Ken Jin 38a7f787d8
GH-93429: Document `LOAD_METHOD` removal (GH-93803) 2022-06-14 21:43:28 +08:00
Sanket Shanbhag a338e106b6
gh-91877: Fix WriteTransport.get_write_buffer_{limits,size} docs (#92338)
- Amend docs for WriteTransport.get_write_buffer_limits
- Add docs for WriteTransport.get_write_buffer_size
2022-06-14 14:46:18 +02:00
Pamela Fox 5d8e7a1240
Change list to view object (#93661) 2022-06-11 11:54:31 +01:00
Julien Palard bc3b31ea77
gh-86404: [doc] A make sucpicious false positive. (GH-93710) 2022-06-11 12:52:25 +02:00
John Belmonte 010284b46b
gh-90153: whatsnew: "z" option in format spec (GH-93624)
Add what's new entry for PEP 682 in Python 3.11.
2022-06-11 10:58:49 +01:00
Oleg Iarygin 78f1a43694
gh-91317: Document that Path does not collapse initial `//` (GH-32193)
Documentation for `pathlib` says:

> Spurious slashes and single dots are collapsed, but double dots ('..') are not, since this would change the meaning of a path in the face of symbolic links:

However, it omits that initial double slashes also aren't collapsed.

Later, in documentation of `PurePath.drive`, `PurePath.root`, and `PurePath.name` it mentions UNC but:

- this abbreviation says nothing to a person who is unaware about existence of UNC (Wikipedia doesn't help either by [giving a disambiguation page](https://en.wikipedia.org/wiki/UNC))
- it shows up only if a person needs to use a specific property or decides to fully learn what the module provides.

For context, see the BPO entry.
2022-06-10 15:52:36 -07:00
Barney Gale 2ba0fd5767
gh-81790: support "UNC" device paths in `ntpath.splitdrive()` (GH-91882) 2022-06-10 16:59:55 +01:00
Petr Viktorin 21a9a85ff4
gh-93466: Document PyType_Spec doesn't accept repeated slot IDs; raise where this was problematic (GH-93471) 2022-06-10 15:55:09 +02:00
Vinay Sajip e974b3e333
Improve logging documentation with example and additional cookbook re… (GH-93644) 2022-06-09 16:43:35 +01:00
Sebastian Berg 7fef847662
bpo-45383: Get metaclass from bases in PyType_From* (GH-28748)
This checks the bases of of a type created using the FromSpec
API to inherit the bases metaclasses.  The metaclass's alloc
function will be called as is done in `tp_new` for classes
created in Python.

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-06-09 17:11:08 +02:00
CAM Gerlach a5ba0f4ebc
Doc: Update references and examples of old, unsupported OSes and uarches (GH-92791) 2022-06-09 15:55:06 +02:00
Illia Volochii 2dece90808
gh-93180: Update os.copy_file_range() documentation (#93182) 2022-06-08 17:49:13 +02:00
Petr Viktorin 2c3fe5eeb2
gh-87961: Remove outdated notes from functions that aren't in the Limited API (GH-93581)
* Remove outdated notes from functions that aren't in the Limited API

Nowadays everything that *is* in the Limited API has a note added
automatically.
These notes could mislead people to think that these functions
could never be added to the limited API. Remove them.

* Also remove forgotten note on tp_vectorcall_offset not being finalized
2022-06-08 17:03:07 +02:00
Kalyan ffc58a9710
gh-93370: Deprecate sqlite3.version and sqlite3.version_info (#93482)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2022-06-08 01:34:50 +02:00
jacksonriley 8ef7929baf
Fix `PurePath.relative_to` links in the pathlib documentation. (GH-93268)
These are currently broken as they refer to :meth:`Path.relative_to` rather than :meth:`PurePath.relative_to`, and `relative_to` is a method on `PurePath`.
2022-06-07 11:54:16 -07:00
Adrian Garcia Badaracco 296081a7ce
gh-92592: Allow logging filters to return a LogRecord. (GH-92591) 2022-06-07 16:53:57 +01:00
Andreas Grommek 75ceae05c1
gh-88831: In docs for asyncio.create_task, explain why strong references to tasks are needed (GH-93258)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2022-06-07 10:56:09 +02:00
Vinay Sajip 1b74803991
gh-93162: Add ability to configure QueueHandler/QueueListener together (GH-93269)
Also, provide getHandlerByName() and getHandlerNames() APIs.

Closes #93162.
2022-06-07 10:20:35 +02:00
Davide Rizzo 57e8ee7086
gh-86986: bump min sphinx version to 3.2 (GH-93337) 2022-06-07 10:05:38 +02:00
Samodya Abeysiriwardane 74039330f2
Fix contributor name in WhatsNew 3.11 (GH-93556) 2022-06-07 12:05:00 +08:00
Erlend Egeberg Aasland bb0b768946
gh-89018: Improve documentation of `sqlite3` exceptions (#27645)
- Order exceptions as in PEP 249
- Reword descriptions, so they match the current behaviour

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-06-06 23:47:15 +02:00
Illia Volochii d1e2e0e1b2
gh-93475: Expose FICLONE and FICLONERANGE constants in fcntl (#93478) 2022-06-06 23:21:58 +02:00
Thomas Grainger 46fde1feb5
[docs] fix some asyncio.Barrier.wait docs grammar (GH-93552) 2022-06-06 20:10:42 +02:00
Thomas Grainger 71c8f96971
Remove action=None kwarg from Barrier docs (GH-93538) 2022-06-06 19:28:05 +02:00
Stanley 56b5daf159
gh-83728: Add hmac.new default parameter deprecation (GH-91939) 2022-06-06 18:47:40 +02:00
Omer Katz 8584981a58
asyncio.Barrier docs: Fix typo (#93371)
taks -> tasks
2022-06-06 07:39:51 -07:00
Hugo van Kemenade 86a5e22dfe
GH-92308 What's New: list pending removals in 3.13 and future versions (#92562) 2022-06-06 12:12:03 +02:00
Dennis Sweeney 4082c8e298
Document LOAD_FAST_CHECK opcode (#93498) 2022-06-05 11:24:09 -04:00
Ken Jin debf4c1ec5
gh-93433: Fix dis doc example output (GH-93434) 2022-06-03 18:02:58 +08:00
Petr Viktorin b9509ba7a9
gh-68966: Make mailcap refuse to match unsafe filenames/types/params (GH-91993) 2022-06-03 11:43:35 +02:00
Éric 8aa9d40b00
gh-90300: split --help output into separate options (#30331)
Make --help output shorter and add new help options.

--help-env, --help-xoptions and --help-all command-line options are
added to complement --help.
2022-06-01 05:50:01 -04:00
Vinay Sajip 132e563703
[doc] Improve discoverability of links between logging documents. (GH-93405) 2022-06-01 08:29:13 +01:00
Ezio Melotti 5247389369
Remove the execution bit to some socket-related files. (#93368) 2022-06-01 09:11:46 +02:00
Wei-Ting Yang e7aab7c92a
gh-93372: Fix typo in os.rename documentation (GH-93401) 2022-06-01 09:54:31 +03:00
Noah Kantrowitz 8241a6971e
📝 Make sure the phrase "constant-time compare" actually appears in the docs (GH-93396)
This is purely for SEO as this is the actual generic name for this kind of method and it currently does not appear in a Google search for "python constant time compare". Not creating an issue or setting this up for backports as its trivial (I think) and not a functional change.
2022-05-31 18:35:28 -07:00
ynfle fc694364cc
gh-93391: fix typo in `array` docs (GH-93392)
Fixes #93391

Automerge-Triggered-By: GH:rhettinger
2022-05-31 14:52:03 -07:00
Moshe Kaplan e6e81602f4
[doc] logging.rst - Change link to point directly to the Google Group. (GH-93390) 2022-05-31 22:46:52 +01:00
Carl Bordum Hansen bb900712a5
Remove VOC reference (93333)
VOC has been archived by the BeeWare project, and they are instead
embedding CPython, rather than transpiling to Java bytecode.
2022-05-31 10:29:21 -07:00
Kumar Aditya a565ab0fd5
GH-93312: Add os.PIDFD_NONBLOCK flag (#93313) 2022-05-31 12:51:29 +02:00
Kevin Locke 8136606769
bpo-42272: fix misleading warning filter message/module docs (#23172)
* bpo-42272: improve message/module warning filter docs

"The Warnings Filter" section of the warnings module documentation
describes the message and module filters as "a string containing a
regular expression".  While that is true when they are arguments to the
filterwarnings function, it is not true when they appear in -W or
$PYTHONWARNINGS where they are matched literally (after stripping any
starting/ending whitespace).  Update the documentation to note when they
are matched literally.  Also clarify that module matches the
"fully-qualified module name", rather than "module name" which is
ambiguous.

skip news (since this is a doc fix)

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>

* bpo-42272: remove bad submodule warning filter doc

The `error:::mymodule[.*]` example in the "Describing Warning Filters"
section of the warnings module documentation does not behave as the
comment describes.  Since the module portion of the filter string is
interpreted literally, it would match a module with a fully-qualified
name that is literally `mymodule[.*]`.

Unfortunately, there is not a way to match '"module" and any subpackages
of "mymodule"' as documented, since the module part of a filter string
is matched literally.  Instead, update the filter and comment to match
only "mymodule".

skip news (since this is a doc fix)

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>

* bpo-42272: add warning filter doc changes to NEWS

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2022-05-30 03:43:32 +02:00
georgically 877ad7b3b2
gh-92240 : Include release dates for "What's New In Python 3.X" (#92937)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-05-28 20:24:35 -07:00
Baptiste Mispelon 642d1fa81f
gh-92727: Add example of named group in doc for re.Match.__getitem__ (#92730) 2022-05-28 13:11:08 -05:00
Eric Snow caa279d6fd
bpo-40514: Drop EXPERIMENTAL_ISOLATED_SUBINTERPRETERS (gh-93185)
This was added for bpo-40514 (gh-84694) to test out a per-interpreter GIL. However, it has since proven unnecessary to keep the experiment in the repo. (It can be done as a branch in a fork like normal.) So here we are removing:

* the configure option
* the macro
* the code enabled by the macro
2022-05-27 17:38:01 -06:00
David Foster 711eda7dec
gh-91243: Document Required and NotRequired (#93173)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-05-27 15:11:45 -07:00
Jelle Zijlstra 8995177030
gh-77024: test.support: Improve documentation (#92513)
This is a rework of #5774 on current main. I was a bit more
conservative in making changes than the original PR.

See @csabella's comments on issue #77024 and the discussion
on #5774 for explanations of several of the changes.

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-05-27 07:16:25 -07:00
Kumar Aditya cb04a09d2d
GH-93207: Remove HAVE_STDARG_PROTOTYPES configure check for stdarg.h (#93215) 2022-05-27 13:30:45 +02:00
Wenzel Jakob 5e34b494a0
gh-60074: add new stable API function PyType_FromMetaclass (GH-93012)
Added a new stable API function ``PyType_FromMetaclass``, which mirrors
the behavior of ``PyType_FromModuleAndSpec`` except that it takes an
additional metaclass argument. This is, e.g., useful for language
binding tools that need to store additional information in the type
object.
2022-05-27 10:27:39 +02:00
jackh-ncl cc377063ef
gh-91513: Add 'asyncio' taskName to logging LogRecord attributes. (GH-93193) 2022-05-26 09:30:51 +01:00
Victor Stinner 5185956527
gh-69443: Add test.support.Py_DEBUG constant (#93226) 2022-05-26 00:12:54 +02:00
Victor Stinner bf58cd01b3
gh-90817: Deprecate explicitly locale.resetlocale() (#93196)
The function was already deprecated in Python 3.11 since it calls
locale.getdefaultlocale() which was deprecated in Python 3.11.
2022-05-25 22:04:06 +02:00
Victor Stinner 71d8775fee
gh-93202: Always use %zd printf formatter (#93201)
Python now always use the ``%zu`` and ``%zd`` printf formats to
format a size_t or Py_ssize_t number. Building Python 3.12 requires a
C11 compiler, so these printf formats are now always supported.

* PyObject_Print() and _PyObject_Dump() now use the printf %zd format
  to display an object reference count.
* Update PY_FORMAT_SIZE_T comment.
* Remove outdated notes about the %zd format in PyBytes_FromFormat()
  and PyUnicode_FromFormat() documentations.
* configure no longer checks for the %zd format and no longer defines
  PY_FORMAT_SIZE_T macro in pyconfig.h.
* pymacconfig.h no longer undefines PY_FORMAT_SIZE_T: macOS 10.4 is
  no longer supported. Python 3.12 now requires macOS 10.6 (Snow
  Leopard) or newer.
2022-05-25 14:21:36 +02:00
Miro Hrončok 16a7e4a0b7
gh-92728: Restore re.template, but deprecate it (GH-93161)
Revert "bpo-47211: Remove function re.template() and flag re.TEMPLATE (GH-32300)"

This reverts commit b09184bf05.
2022-05-25 09:05:35 +03:00
Victor Stinner c7667a2d35
gh-93103: Enhance PyConfig.parser_debug documentation (#93186)
Document that -d option and PYTHONDEBUG env var require a debug
build of Python. Also mention them in the debug build documentation.
2022-05-24 23:23:01 +02:00
Jordan Borean fbd11f3edd
gh-92658: Add Hyper-V socket support (GH-92755) 2022-05-24 21:37:06 +01:00
Julien Palard e739ff1416
Doc: No need to use rst syntax in code comments. (GH-93102)
And it raises `make suspicious` false positives.
2022-05-23 23:45:16 +02:00
Nicolas Haller 2176898308
gh-92859: Doc: add info about logging.debug() calling basicConfig() (GH-93063) 2022-05-23 20:18:43 +01:00
Steve Dower 6a6f823ea7
gh-92913: Fix typos in documentation (GH-93129) 2022-05-23 17:39:10 +01:00
Victor Stinner fc00667247
gh-93103: Update PyUnicode_DecodeFSDefault() doc (#93105)
Update documentation of PyUnicode_DecodeFSDefault(),
PyUnicode_DecodeFSDefaultAndSize() and PyUnicode_EncodeFSDefault():
they now use the filesystem encoding and error handler of PyConfig,
Py_FileSystemDefaultEncoding and Py_FileSystemDefaultEncodeErrors
variables are no longer used.
2022-05-23 14:56:59 +02:00
Victor Stinner 764e83db85
gh-93103: Deprecate global configuration variable (#93104)
Deprecate global configuration variables, like
Py_IgnoreEnvironmentFlag, in the documentation: the
Py_InitializeFromConfig() API should be instead.
2022-05-23 14:56:35 +02:00
Nicolas Haller 88f0d0c1e8
gh-89158: Add some REPL secondary prompt markers (#93073)
This fixes an issue on tutorial/classes.rst section 9.4 where the example "class Warehouse"
was truncated when pressing the >>> button to hide the prompts and output.
2022-05-23 00:58:07 -04:00
Shantanu e39cd76561
gh-92994: Clarify importlib "check" example (#92995)
Fixes #92994
2022-05-22 18:53:24 -07:00
Stanley b7a6610bc8
gh-73137: Added sub-subsection headers for flags in re (#93000)
Fixes #73137
2022-05-22 18:52:17 -07:00
Jelle Zijlstra ac718d357a
binascii docs: strict_mode parameter is keyword-only (#93055)
See 35b98e38b6

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-05-22 18:48:17 -07:00
Jelle Zijlstra ea5918e932
termios docs: fix indentation (#93080) 2022-05-22 15:55:11 -07:00
Shantanu f9d6c59917
gh-91362: reword pickle docs to account for nested classes (#92429)
Fixes #91362
2022-05-21 07:54:10 -07:00
Serhiy Storchaka 7f835923c1
gh-71223: Improve rendering of some references in the docs (GH-93041)
For example, instead of "eval()uated" (link from "eval()")
show "evaluated" (link from the whole word).
2022-05-21 10:33:23 +03:00
Shantanu 2fadde7e66
gh-93019: Fix markup in zipfile.rst (#93025)
Fixes #93019
2022-05-20 21:36:09 -07:00
Raymond Hettinger 59719a242d
Take advantage of math.comb() in the nth_combination() recipe (#93027) 2022-05-20 18:02:33 -05:00
Brett Cannon d59b2d0441
Fix a directive in the `pathlib` docs (GH-93030) 2022-05-20 15:52:38 -07:00
Stanley f51ed04c66
gh-72073: Add Windows case in pathlib.rename (GH-93002)
#72073

https://docs.python.org/3.12/library/pathlib.html#pathlib.Path.rename
2022-05-20 15:25:39 -07:00
CAM Gerlach 31fa41ed68
gh-92611: Clarify planned removal version in PEP 594-deprecated modules (GH-92793)
As discussed in #92611 and #92564 and as a followup to PR #92612 , this 3.11+ only PR uses the proper `deprecated-removed` role for the modules deprecated by PEP 593 (PEP-594) to clearly indicate to users that a removal version is planned and what it is, so they can prepare accordingly or voice any unanticipated impacts.

Related to #92792 ; if we decide to backport that PR, the upgrade to using `deprecated-removed` on those functions can be moved to this one.
2022-05-20 14:47:51 -07:00
Shantanu f20a6a54fb
gh-91860: documentation for typing.dataclass_transform (#92768)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-05-20 07:32:29 -07:00
Rafael Fontenelle 0e12781ad9
Doc: add missing manpage and title references in tkinter docs (#29008)
- add bind(3tk) manpage markup
- add Tcl/Tk book reference markup
2022-05-20 10:19:37 +02:00
Pavel a637c09a60
Doc: Minor adjustment of `socket.create_server` docs (#26938)
- fix spelling in create_server() docs
- add a line about create_server() in the socket.py docstring
2022-05-20 10:18:02 +02:00
Steve Dower 403d16fa28
gh-92913: Clarify changes to PyInitConfig.module_search_paths[_set] fields (GH-92980) 2022-05-19 20:23:53 +01:00
Mark Shannon 3fd8610002
GH-89914: Make the oparg of the YIELD_VALUE instruction equal the stack depth. (GH-92960) 2022-05-19 17:49:29 +01:00
Alex Waygood 70aa1b9b91
gh-92417: `importlib` docs: remove references to unsupported Python versions (GH-92424)
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-05-19 17:48:44 +02:00
Martin Fischer 2cdd57f119
bpo-46879: Fix incorrect sphinx object names in doc (GH-31615)
API members documented in sphinx have an object name, which allow the
documentation to be linked from other projects. Sphinx calculates the
object name by prefixing the current module name to the directive
argument, e.g:

.. module:: foo
.. function:: bar.baz

becomes foo.bar.baz. Since these anchors aren't displayed in the
documentation, some mistakes have crept in, namely the Python stdlib
documentation currently contains the objects:

* asyncio.asyncio.subprocess.DEVNULL
* asyncio.asyncio.subprocess.PIPE
* asyncio.asyncio.subprocess.STDOUT
* asyncio.asyncio.subprocess.Process
* multiprocessing.sharedctypes.multiprocessing.Manager
* xml.etree.ElementTree.xml.etree.ElementInclude

This commit fixes this by making use of the :module: option which
without an argument makes sphinx take the directive argument as is
for the object name (avoiding the prefixing of the current module
name that led to these broken object names).

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2022-05-19 17:34:58 +02:00
Alex Waygood 84b86000e2
gh-92417: `subprocess` docs: remove note on compatibility with Python <3.5 (GH-92538) 2022-05-19 17:31:51 +02:00
Alex Waygood 090df844ea
gh-92417: `fractions`, `decimal`: Improve docs for alternative constructor methods (GH-92421)
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2022-05-19 17:28:51 +02:00
Alex Waygood 639b62c9c4
gh-92417: `socket` docs: remove references to Python <3.3 (GH-92544) 2022-05-19 17:25:58 +02:00
Zackery Spytz fb082c2fc5
bpo-45393: help() on operator precedence has misleading entries (GH-31246)
Fix the formatting for "await x" and "not x" in the operator
precedence table.
2022-05-19 17:05:04 +02:00
CAM Gerlach 97b9c1096f
gh-92417: Update docs and examples of doctest.IGNORE_EXCEPTION_DETAIL for Py>=3 (GH-92502) 2022-05-19 16:59:07 +02:00
Jelle Zijlstra 6b51773afd
gh-91491: Complete Whats New in 3.11 for typing (#92708)
Fixes #91491

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-05-19 07:07:54 -07:00
Mark Shannon e48ac9c100
GH-90690: Remove `PRECALL` instruction (GH-92925) 2022-05-19 11:05:26 +01:00
Jan Brasna 41638967a0
Doc: amend ssl.PROTOCOL_SSLv2 and ssl.PROTOCOL_SSLv3 wording (#92634) 2022-05-19 11:22:16 +02:00
Duprat 60ee61571a
Include ``asyncio.Barrier`` in 3.11 Whats New (GH-92927) 2022-05-19 15:12:33 +08:00
Inada Naoki 96f65835f8
gh-87901: Remove the encoding argument from os.popen (GH-92836) 2022-05-19 11:42:43 +09:00
180909 f2d994da10
gh-92812: Align ArgumentParser.add_subparsers() docs with argument spec (#92814) 2022-05-18 23:08:23 +02:00
David CARLIER 9a1adf2790
bpo-42047: Add native thread ID for DragonFlyBSD (#22714)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: kj <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2022-05-18 15:10:10 +02:00
Victor Stinner e0477ae371
gh-91755: Remove doc of C API private refcount functions (#92918)
These functions should only be used by Python internals.
2022-05-18 14:09:44 +02:00
Erlend Egeberg Aasland 7ee19e2715
gh-92780: Improve sqlite3.Connection.create_collation docs (#92790)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-05-18 13:44:16 +02:00
Charlie Zhao 58a3d28039
gh-91755: Document Py_IncRef and Py_DecRef as C functions (#91805)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-05-18 10:42:05 +02:00
Nikita Sobolev b86d783a4e
bpo-40838: document `getdoc`, `getmodule`, `getsourcefile` in `inspect` returns `None` (#30575)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-05-17 18:24:35 -07:00
谭九鼎 bd30461298
re docs: fix source code link (#92819) 2022-05-16 17:04:17 -07:00
Erlend Egeberg Aasland 00f22e8cc2
gh-92547: Remove deprecated sqlite3 features (#92548)
The following sqlite3 features were deprecated in 3.10, scheduled for
removal in 3.12:

- sqlite3.OptimizedUnicode (gh-23163)
- sqlite3.enable_shared_cache (gh-24008)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Signed-off-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2022-05-16 19:52:08 +02:00