Commit graph

25444 commits

Author SHA1 Message Date
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