Commit Graph

25735 Commits

Author SHA1 Message Date
Raymond Hettinger 7c8626ab3d
Improvements to the bisect docs (GH-95807) 2022-08-09 01:31:50 -05:00
Erlend E. Aasland 41c939cb35
gh-95273: Reorganize sqlite3 doc module level funcs and vars (#95626)
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-08-08 21:25:35 +02:00
Serhiy Storchaka 62f06508e7
gh-95781: More strict format string checking in PyUnicode_FromFormatV() (GH-95784)
An unrecognized format character in PyUnicode_FromFormat() and
PyUnicode_FromFormatV() now sets a SystemError.
In previous versions it caused all the rest of the format string to be
copied as-is to the result string, and any extra arguments discarded.
2022-08-08 19:21:07 +03:00
Petr Viktorin 656dad702d
gh-93274: Expose receiving vectorcall in the Limited API (GH-95717) 2022-08-08 14:12:05 +02:00
Serhiy Storchaka cc9160a29b
gh-91838: Resolve more HTTP links which redirect to HTTPS (GH-95650) 2022-08-08 14:00:17 +03:00
Andrzej Bartosiński f83b0cabeb
Fix documentation typo for functools.cmp_to_key (GH-95766) 2022-08-08 01:49:48 -05:00
Erlend E. Aasland 56af5a200d
gh-94635: Fixup sqlite3 'Introduction' seealso note (#95751)
In gh-95269, the seealso note incorrectly ended up in
the 'Tutorial' section.
2022-08-06 23:30:26 +02:00
Howie Zhao d25ff1f613
gh-95155: Update "Using Python on a Mac" documentation (GH-95284)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2022-08-06 18:50:28 +02:00
Oleg Iarygin 56d16e8cb4
gh-93243: Make smtpd private before porting its users (GH-93246)
gh-93243

This PR is required to reduce diffs of the following porting (no need to either maintain documentation and tests consistent with each porting step, or try to port everything and remove smtpd in a single PR).

Automerge-Triggered-By: GH:warsaw
2022-08-05 17:41:29 -07:00
Barney Gale 29650fea96
gh-86943: implement `pathlib.WindowsPath.is_mount()` (GH-31458)
Have `pathlib.WindowsPath.is_mount()` call `ntpath.ismount()`. Previously it raised `NotImplementedError` unconditionally.


https://bugs.python.org/issue42777
2022-08-05 15:37:44 -07:00
Terry Jan Reedy 834064c19a
gh-89362: Doc IDLE menu and search (#95697)
Update menu item position and capitalization.
Add paragraph about search.
For help.html, include save-as addition.
2022-08-05 12:21:45 -04:00
Pablo Galindo Salgado bacbc35830
Remove draft notice from 3.11 What's new (#95713) 2022-08-05 15:40:41 +01:00
Victor Stinner 398ed84dc4
gh-93744: Remove configure --with-cxx-main option (#95651)
Remove the "configure --with-cxx-main" build option: it didn't work
for many years. Remove the MAINCC variable from configure and
Makefile.

The MAINCC variable was added by the issue gh-42471: commit
0f48d98b74. Previously, --with-cxx-main
was named --with-cxx.

Keep CXX and LDCXXSHARED variables, even if they are no longer used
by Python build system.
2022-08-05 13:26:58 +02:00
Mariatta Wijaya a525f2ada4
GH-95685: Fix rendering of the string documentation (#95686)
There's an extra underlines that messed the rest of the documentation rendering.

Closes #95685
2022-08-05 09:41:02 +02:00
Brandt Bucher 5f3c9fda18
GH-90997: Document CACHEs (GH-95694) 2022-08-04 22:45:05 -07:00
Terry Jan Reedy 9890f86ae2
gh-65802: IDLE - explain SaveAs and extensions (#95690)
File name extensions may or may not be shown for the current name
and are added in an OS-dependent manner if not given for the new
name.
2022-08-04 21:51:14 -04:00
Eric Snow 87154d8dd8
gh-94673: Add Per-Interpreter tp_subclasses for Static Builtin Types (gh-95301) 2022-08-04 19:26:59 -06:00
Barry Warsaw e1182bc377
gh-94619: Remove long deprecated methods module_repr() and load_module() (#94624)
* gh-94619: Remove long deprecated methods module_repr() and load_module()

Closes #94619

* Update Misc/NEWS.d/next/Library/2022-07-06-14-57-33.gh-issue-94619.PRqKVX.rst

Fix typo

Co-authored-by: Brett Cannon <brett@python.org>

Co-authored-by: Brett Cannon <brett@python.org>
2022-08-04 17:24:26 -07:00
Erlend Egeberg Aasland 44f1f63ad5
Docs: sqlite3 docs fixup (#95681)
- Disable links to the module itself
- Fix link indent
- Consistent ref markup
2022-08-05 00:06:46 +02:00
Erlend Egeberg Aasland b24e8b28a7
gh-95271: Extract placeholders howto from sqlite3 tutorial (#95522)
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2022-08-04 22:41:18 +02:00
fluesvamp c47d09a4ac
Remove unnecessary text from documentation. (GH-95670) 2022-08-04 21:18:05 +01:00
Erlend Egeberg Aasland 12d92c733c
gh-95273: Improve documented return values and exceptions raised for sqlite3 class methods (#95530)
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-08-04 21:58:10 +02:00
ceh 962acd4468
Docs: fix two typos in the sqlite3 docs (#95661)
- statment => statement
- transaciton => transaction
2022-08-04 20:25:53 +02:00
Petr Viktorin 7b370b7305
gh-93274: Make vectorcall safe on mutable classes & inherit it by default (#95437) 2022-08-04 17:19:29 +02:00
Petr Viktorin a613fedd6e
gh-95388: Deprecate creating immutable types with mutable bases (GH-95533) 2022-08-04 16:13:45 +02:00
Ken Jin 42b102bbf9
gh-94936: C getters: co_varnames, co_cellvars, co_freevars (#95008) 2022-08-04 06:53:31 -07:00
Łukasz Langa 0342c93a6b
gh-91323: Revert "Allow overriding a future compliance check in asyncio.Task (GH-32197)" (GH-95442)
This reverts commit d4bb38f82b.
2022-08-04 15:51:38 +02:00
Serhiy Storchaka d0d0154443
gh-91838: Resolve HTTP links which redirect to HTTPS (GH-95642)
It updates links which redirect to HTTPS with different authority or
path.
2022-08-04 13:30:05 +03:00
Serhiy Storchaka f79547a429
gh-91838: Use HTTPS links in docs for resources which redirect to HTTPS (GH-95527)
If an HTTP link is redirected to a same looking HTTPS link, the latter can
be used directly without changes in readability and behavior.
It protects from a men-in-the-middle attack.

This change does not affect Python examples.
2022-08-04 10:13:49 +03:00
Terry Jan Reedy bcc74d509a
gh-95191: IDLE Prompts entry for What's New 3.10 (#95633) 2022-08-03 22:17:57 -04:00
Terry Jan Reedy c569526fac
gh-95191: IDLE Prompts entry for Whatnew 3.11 (#95632) 2022-08-03 20:56:05 -04:00
Hugo van Kemenade dc2757accd
gh-90817: Use .. deprecated-removed:: when removal version known (#94960) 2022-08-03 23:47:20 +02:00
Steve Dower 67840edb28
gh-94399: Restore PATH search behaviour of py.exe launcher for '/usr/bin/env' shebang lines (GH-95582) 2022-08-03 22:18:51 +01:00
Ethan Furman 6bde34000d
[Enum] add whatsnew entries (GH-95455) 2022-08-03 14:11:20 -07:00
Derek Kim ebd660156d
gh-95423: Update winreg.DeleteKeyEx documentation and remove dynamic function load (GH-95521) 2022-08-03 21:55:03 +01:00
Erlend Egeberg Aasland 4d02572f8c
gh-95273: Align sqlite3 const doc refs with the devguide recommendations (#95525) 2022-08-03 22:21:15 +02:00
CAM Gerlach ac3bf6155f
gh-91207: Fix CSS bug in Windows CHM help file and add deprecation message (GH-95607) 2022-08-03 20:23:20 +01:00
Erlend Egeberg Aasland 89f5229328
Docs: fix incorrect formatting in sqlite3 CLI docs (#95581) 2022-08-03 00:17:09 +02:00
Christian Heimes e3b6ff19aa
gh-95451: Update docs for wasm32-emscripten and -wasi platforms (GH-95452)
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Michael Droettboom <mdboom@gmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-08-02 21:00:41 +02:00
CAM Gerlach 75a6441718
gh-95516: Add param types and clarify param descriptions of LogRecord (GH-95517) 2022-08-02 08:42:35 +01:00
Steve Dower d2c1a9c76c
gh-92219: Clarify that some options to the installer may break the install (GH-95548) 2022-08-02 00:57:46 +01:00
Alex Hedges d965d1995e
no-issue: Fix typo of "thrid" instead of "third" in dis docs (gh-95510) 2022-08-02 00:06:43 +09:00
Noam Cohen 347c783673
gh-95007: Remove the NoneType return converter from Argument Clinic Doc (#95529)
The converter was removed in 74b5e4ce80
2022-08-01 15:07:35 +02:00
Erlend Egeberg Aasland bc7c7cd18a
gh-77617: Add sqlite3 command-line interface (#95026)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-08-01 12:25:16 +02:00
Erlend Egeberg Aasland 1e6b63542e
gh-95273: Clarify when sqlite_* attributes are added to sqlite3 exceptions (#95523) 2022-08-01 11:15:07 +02:00
markus-sus d29e279de3
bpo-42037: Corrected request dependencies in CookieJar functions (GH-23112) 2022-08-01 10:42:13 +08:00
Pablo Galindo Salgado aa37ffda29
bpo-45445: Revert "bpo-45445: Fail if an invalid X-option is provided in the command line (GH-28823)" (#94745) 2022-07-31 16:33:56 +01:00
Erlend Egeberg Aasland 6c439b978b
gh-94635: Add Reference, How-to, and Concepts headings to sqlite3 docs (#94636)
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-07-31 01:24:15 +02:00
Zachary Ware 82814624bf
Doctest cleanups (GH-95436)
* GHA: Don't hide doctest output

* Enable doctests in math.rst

* Squash warnings in nntplib.rst doctests

* Squash warning in turtle.rst doctest

* Squash warnings in whatsnew/3.2.rst doctests

* Treat warnings as errors in Doc/ doctests
2022-07-30 17:21:08 -05:00
Robert O'Shea cd26595232
gh-95454: Replace truthy/falsy with true/false (GH-95456) 2022-07-30 00:42:21 -07:00
Erlend Egeberg Aasland d92b19e1b5
gh-95273: Relocate sqlite3 enable load extension note (#95430) 2022-07-29 21:27:15 +02:00
Steve Dower e3bae80e70
gh-94302: Clarify use of the 'open' operation in os.startfile (GH-95441) 2022-07-29 17:24:56 +01:00
Christian Heimes f81a6c5fc7
gh-95415: Make availability directive consistent (GH-95416) 2022-07-29 16:42:09 +02:00
Erlend Egeberg Aasland 2fbee85931
gh-95432: Fixup sqlite3 tutorial example (#95431)
- the insert statement should have five placeholders, not four
- missing ... in the multiline row list
2022-07-29 14:31:41 +02:00
Erlend Egeberg Aasland e003b64f40
gh-95273: Improve sqlite3 class descriptions (#95379)
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-07-29 11:53:23 +02:00
Erlend Egeberg Aasland f0bf7956e6
gh-95273: Move sqlite3 executemany examples from reference to tutorial (#95351) 2022-07-29 09:42:22 +02:00
Erlend Egeberg Aasland e9c8de669d
gh-95273: Condense sqlite3 executescript example (#95383) 2022-07-29 09:40:44 +02:00
Eric Snow 3e7cad3bca
gh-94673: Add Per-Interpreter tp_weaklist for Static Builtin Types (#95302)
* Store tp_weaklist on the interpreter state for static builtin types.

* Factor out _PyStaticType_GET_WEAKREFS_LISTPTR().

* Add _PyStaticType_ClearWeakRefs().

* Add a comment about how _PyStaticType_ClearWeakRefs() loops.

* Document the change.

* Update Doc/whatsnew/3.12.rst

* Fix a typo.
2022-07-28 19:23:47 -06:00
BenjaminHelyer 6e44bf9558
Improve documentation for adding datetime and timedelta (gh-95403) 2022-07-28 20:09:51 -04:00
[object Object] 7df2f4d787
gh-86128: Add warning to ThreadPoolExecutor docs about atexit behaviour (GH-94008) 2022-07-28 23:38:56 +01:00
Pamela Fox 70068b9336
Fix Unicode doc and replace use of macro with PyMem_New function (GH-94088) 2022-07-28 23:32:16 +01:00
JustAnotherArchivist 03da5d0f5b
gh-59200: Clarify `PyLong_FromString` documentation (GH-94363) 2022-07-28 23:12:27 +01:00
Ken Jin a1daf6e5cc
Update link to faster cpython benchmarks (GH-95391) 2022-07-29 00:22:24 +08:00
Erlend Egeberg Aasland ea269b9a38
Docs: Fix refs & tweak wording in sqlite3 'Using shortcut methods'
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-07-28 07:38:36 +02:00
Christian Heimes 0fe645d6fd
gh-95174: Add pthread stubs for WASI (GH-95234)
Co-authored-by: Brett Cannon <brett@python.org>
2022-07-27 20:28:06 +02:00
Erlend Egeberg Aasland 2361908a9d
gh-95273: Normalise sqlite3 reference wording (#95274)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-07-27 15:24:13 +02:00
Erlend Egeberg Aasland 2b37395612
gh-94630: Fixup sqlite3 argument spec docs for connection execute* methods (#95319) 2022-07-27 14:46:21 +02:00
Christian Heimes daa64d6a59
gh-95085: Promote Emscripten and WASI to PEP 11 tier 3 (GH-95086) 2022-07-27 08:18:34 +02:00
Erlend Egeberg Aasland 2e35a13e46
gh-94635: Add sqlite3 'Introduction' and 'Tutorial' doc headings (#95269) 2022-07-27 07:43:24 +02:00
Nicolas Haller b7ce4625fe
Clarifying the documentation on library/syslog (GH-92587) 2022-07-26 02:06:06 -05:00
Erlend Egeberg Aasland 5012bedc7c
gh-95235: Add explicit parameter list to some sqlite3 methods (#95240)
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-07-26 08:29:18 +02:00
Ethan Furman 4e704d7847
gh-95077: [Enum] add code-based deprecation warnings for member.member access (GH-95083)
* issue deprecation warning for member.member access
* always store member property in current class
* remove __getattr__
2022-07-25 11:05:10 -07:00
Erlend Egeberg Aasland ac6a94c669
gh-95235: Document undocumented parameters in sqlite3 functions and methods (#95236)
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-07-25 18:46:55 +02:00
Hugo van Kemenade 10b12dd92a
gh-93963: Document importlib.abc deprecations (#94546) 2022-07-25 18:24:42 +02:00
Petr Viktorin ccd7c7a0bd
gh-93610: Improve docs for importlib.resources (#93611)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2022-07-25 18:16:17 +02:00
Christian Heimes a566912049
gh-85454: Remove distutils documentation (#95239)
Most places now refer to setuptools or link to setuptools documentation.
Some examples like zipapp need to be updated later.
2022-07-25 15:50:46 +02:00
Oleg Iarygin d58be48369
gh-85454: Remove links from historical mentions of distutils (GH-95192) 2022-07-25 12:20:09 +02:00
Adam Dangoor df7c8b9537
gh-95233: Correct grp.getgrgid parameter name in documentation (gid -> id) (gh-95232) 2022-07-25 18:54:42 +09:00
Pablo Galindo Salgado 9007dec606
gh-95173: Revert commit 51ed2c56a1 (#95176) 2022-07-24 22:33:06 +01:00
Thomas Grainger 0c6f898005
gh-95051: ensure that timeouts scheduled with `asyncio.Timeout` that have already expired are deliverered promptly (#95109)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-07-24 13:18:05 -07:00
Pablo Galindo Salgado 9762572d0a
gh-93351: Add news entry and what's new entry for changes in gh-93351 (#95175) 2022-07-23 19:35:44 +01:00
Chenwei Xiao de28ee8f75
Doc: Add omitted secondary prompt in inputoutput tutorial (GH-30317)
For the continuation lines, "..." should present as secondary prompt
2022-07-23 17:25:42 +08:00
Stanislav Zmiev c1e929858a
gh-90385: Add `pathlib.Path.walk()` method (GH-92517)
Automerge-Triggered-By: GH:brettcannon
2022-07-22 16:55:46 -07:00
Chenwei Xiao 34d11f1b0c
Fix copy-friendliness of tutorial example (GH-93424) 2022-07-22 15:11:48 -05:00
July Tikhonov 79d2f549ad
Fix async method reference links in `compound_stmts` docs (GH-94935) 2022-07-22 12:03:17 -05:00
Frank Dana 9c47cf337c
Fix scheme count in `sysconfig` whatsnew entry (GH-94110) 2022-07-22 11:51:14 -05:00
oda-gitso 346aabf916
Fix incorrect directive in multiprocessing module documentation (GH-93517) 2022-07-22 11:46:42 -05:00
Alexandru Mărășteanu 2a9c227ac1
Closes gh-95133: docs, fix indentation level in TestCase.assertLogs example (GH-95134) 2022-07-22 11:37:22 -05:00
Erlend Egeberg Aasland f9b3706df6
gh-81040: Improve sqlite3.Cursor.rowcount docs (#94940) 2022-07-22 09:34:39 +02:00
Terry Jan Reedy d06c552e35
gh-95112: Fix What's New 3.12 contribution note periods (#95118)
A couple, so far, are missing.
2022-07-21 20:36:53 -04:00
Terry Jan Reedy 8df8ef9743
gh-95112: Fix What's New 3.11 contribution note periods (#95115)
Some are missing, a few placed after the ')'.
2022-07-21 20:35:56 -04:00
Terry Jan Reedy c944649ffc
gh-95112: Fix What's New 3.10 contribution note periods (#95114)
Some are missing, a few placed after the ')'.
One ') was missing.
2022-07-21 20:00:52 -04:00
Anthony Shaw b1924b1006
GH-95029: Describe Windows Store package isolation and redirection in more detail (GH-95030) 2022-07-21 01:01:23 +01:00
Ned Batchelder 6e2fbdab92
docs: use 'recursively' in the description of rglob, and mention globs in the os equivalences (GH-94954)
The r in `rglob` stands for "recursively", so use the word in the description. Also, glob and rglob can usefully be mentioned as the pathlib equivalent of os.walk.

Automerge-Triggered-By: GH:brettcannon
2022-07-20 14:47:43 -07:00
Erlend Egeberg Aasland 6dadf6ca01
gh-90016: Deprecate default sqlite3 adapters and converters (#94276)
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-07-20 21:37:59 +02:00
Guy Yagev fc0dc9203d
Fix documentation to include possible Exception (#94818) 2022-07-18 15:31:17 -04:00
Terry Jan Reedy a25a803c4c
Fix incorrect double indent in ast doc (#94976)
Warning directive indent was 4 rather than 3 spaces.
2022-07-18 13:24:18 -04:00
Mark Shannon c41d4d0917
Remove out of date reference to YIELD_FROM from docs. (#94966) 2022-07-18 18:04:07 +01:00
Terry Jan Reedy 7b617be4ab
In ast doc, update 'below' to 'above' (#94967)
The included asdl file was moved from 'below' to 'above' in 3.9.
2022-07-18 12:38:52 -04:00
Steve Dower 044a593cbb
gh-91348: Restore frame argument to sys._getframe audit event (GH-94928) 2022-07-17 16:11:24 +01:00
Brett Cannon ec4745b5f2
gh-91181: Add a What's New entry for dropping bytes support for `sys.path` (GH-94918) 2022-07-16 19:14:40 -07:00
Thomas Grainger 6da988a46c
gh-91181: drop support for bytes on sys.path (GH-31934)
Support for bytes broke sometime between Python 3.2 and 3.6 and has been broken ever since. Trying to bring back supports is surprisingly difficult in the face of -b and checking for keys in sys.path_importer_cache. Since the support was broken for so long, trying to overcome the difficulty of bringing back the support has been deemed not worth it.

Co-authored-by: Eryk Sun <eryksun@gmail.com>
Co-authored-by: Brett Cannon <brett@python.org>
2022-07-16 18:07:53 -07:00
anilbey 16b6e14cc2
gh-94698: add Subscript and Attribute targets to ast.for documentation (GH-94901)
### Summary

Add Attribute and Subscript as possible targets for the "ast for loop documentation".

Automerge-Triggered-By: GH:isidentical
2022-07-16 04:26:43 -07:00
Marco Buttu 7502af888f
Tutorial sys.argv example should not have interactive prompt (GH-94880) 2022-07-15 21:10:19 -05:00
Chris Adams 3789c63577
Add additional pointers to pathlib's mapping to os.path functions (#94828)
* Add additional pointers to pathlib's mapping to os.path functions

os.path.splitext has a somewhat quirky signature since it mixes the path and filename components but I wanted the documentation to mention `PurePath.stem` as the natural counterpart to `PurePath.suffix` for the common use of `os.path.splitext` to turn "file.py" into "file" and "py".

Technically this could have some discussion of how to handle the parent directory hierarchy but that seems a bit out of keeping with the spirit of this table so I omitted mentioning `PurePath.parents` here.

* Update Doc/library/pathlib.rst

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

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2022-07-16 00:09:27 +02:00
Vinay Sajip dc54193095
[doc] Update cookbook example and add information about queue types. (GH-94854) 2022-07-15 06:03:58 +01:00
Tin Tvrtković 08f68975ab
GH-46771: docs for asyncio.timeout and task cancellation (#94794) 2022-07-14 19:38:38 -07:00
Ikko Ashimine 9ea72e9d8d
Docs: fix typo in sqlite3.rst (#94798)
Colum -> Column
2022-07-14 23:47:46 +02:00
Christian Heimes 81dca70d70
gh-93939: Build C extensions without setup.py (GH-94474)
Combines GH-93940, GH-94452, and GH-94433
2022-07-14 00:51:49 -07:00
MonadChains b03a9e8c8a
gh-94309: Add typing.Hashable and typing.Sized for "What's New for Python 3.12" (GH-94729)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
2022-07-14 07:50:31 +01:00
Dong-hee Na 967da5febb
gh-90359: Unify documentation style for datetime.rst (gh-94836) 2022-07-14 09:40:10 +09:00
Dong-hee Na 07374cce52
gh-90359: Update documentation to follow PEP 495. (gh-94800) 2022-07-14 09:04:52 +09:00
Raymond Hettinger ed06ec1ab8
GH-81620: Add random.binomialvariate() (GH-94719) 2022-07-13 09:46:04 -05:00
Pradyun Gedam 47f50cbab7
Fix heading levels for "Deprecated" section in What's New for 3.12 (GH-94762)
These headings were at the same level as the "Deprecated" heading, but
likely intended to be a subheading within that section.

Co-authored-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
2022-07-12 20:55:32 +01:00
Max Zhenzhera 90a6e56e56
docs: typing.Self, fix typo (GH-94771)
* fix typo - double spelled word 'use'

* change methods names to the infinitive form
2022-07-12 18:45:52 +01:00
Simon-Martin Schröder 46fc584b00
gh-87822: Make traceback module robust to exceptions from repr() of local values (GH-94691) 2022-07-11 10:14:15 +01:00
John Belmonte da717519ec
gh-93883: elide traceback indicators when possible (#93994)
* gh-93883: elide traceback indicators when possible

Elide traceback column indicators when the entire line of the
frame is implicated.  This reduces traceback length and draws
even more attention to the remaining (very relevant) indicators.

Example:
```
Traceback (most recent call last):
  File "query.py", line 99, in <module>
    bar()
  File "query.py", line 66, in bar
    foo()
  File "query.py", line 37, in foo
    magic_arithmetic('foo')
  File "query.py", line 18, in magic_arithmetic
    return add_counts(x) / 25
           ^^^^^^^^^^^^^
  File "query.py", line 24, in add_counts
    return 25 + query_user(user1) + query_user(user2)
                ^^^^^^^^^^^^^^^^^
  File "query.py", line 32, in query_user
    return 1 + query_count(db, response['a']['b']['c']['user'], retry=True)
                               ~~~~~~~~~~~~~~~~~~^^^^^
TypeError: 'NoneType' object is not subscriptable
```

Rather than going out of our way to provide indicator coverage
in every traceback test suite, the indicator test suite should
be responible for sufficient coverage (e.g. by adding a basic
exception group test to ensure that margin strings are covered).
2022-07-11 07:40:53 +01:00
MonadChains e8e4b550f5
gh-94309: Deprecate typing.Hashable/Sized (GH-94626)
Deprecate typing.Hashable/Sized. Use the collections.abc counterparts directly instead.

To be consistent with PEP 585, deprecated aliases will not raise any DeprecationWarning.
2022-07-10 19:04:01 +01:00
Raymond Hettinger ef61b259e3
GH-77265: Document NaN handling in statistics functions that sort or count (#94676)
* Document NaN handling in functions that sort or count

* Update Doc/library/statistics.rst

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>

* Update Doc/library/statistics.rst

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>

* Fix trailing whitespace and rewrap text

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-07-10 17:40:27 +10:00
CAM Gerlach 761eeb62a9
gh-94700: Rewrite the logging.Formatter API ref in structured form (GH-94701) 2022-07-09 06:03:47 +01:00
Oleg Iarygin efb20a97c4
Use mdash-es consistently in the library docs index (#92762) 2022-07-08 16:44:15 +02:00
Victor Stinner 00464bbed6
gh-94199: Remove the ssl.wrap_socket() function (#94203)
Remove the ssl.wrap_socket() function, deprecated in Python 3.7:
instead, create a ssl.SSLContext object and call its
sl.SSLContext.wrap_socket() method. Any package that still uses
ssl.wrap_socket() is broken and insecure. The function neither sends
a SNI TLS extension nor validates server hostname. Code is subject to
CWE-295 : Improper Certificate Validation.
2022-07-08 15:20:15 +02:00
Erlend Egeberg Aasland e5b841a403
gh-94622: Add more references to the sqlite3 types anchor (#94623) 2022-07-08 02:38:38 +02:00
Erlend Egeberg Aasland fb6dccae34
gh-94321: Document sqlite3.PrepareProtocol (#94620) 2022-07-08 00:33:17 +02:00
finefoot b6558d768f
gh-94343: Ease initialization of reprlib.Repr attributes (GH-94581) 2022-07-07 09:55:33 -05:00
Erlend Egeberg Aasland 3eb2b9634f
gh-94628: Add explicit parameter list to sqlite3.connect docs (#94629)
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-07-07 09:00:20 +02:00
Erlend Egeberg Aasland 94988603f3
gh-94630: Update sqlite3 docs with positional-only and keyword-only symbols (#94631) 2022-07-07 01:13:30 +02:00
Erlend Egeberg Aasland 760b8cf0c8
gh-94017: Improve clarity of sqlite3 transaction handling docs (#94320)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-07-06 22:59:07 +02:00
Erik De Bonte 5f319308a8
gh-91330: Tests and docs for dataclass descriptor-typed fields (GH-94424)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2022-07-05 20:09:41 +02:00
Petr Viktorin e6ec6f5b50
Docs: Convert PEP 630 (Isolating Extension Modules) to a HOWTO (GH-94489)
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-07-05 16:37:28 +02:00
Erik Montnemery c60f125533
bpo-46755: Don't log stack info twice in QueueHandler (GH-31355) 2022-07-05 15:23:12 +01:00
Victor Stinner 92bcb26d00
gh-94379: Remove zipimport find_loader() and find_module() methods (#94380)
zipimport: Remove find_loader() and find_module() methods, deprecated
in Python 3.10: use the find_spec() method instead. See PEP 451 for
the rationale.
2022-07-05 12:11:42 +02:00
Ned Batchelder 3440d197a5
Docs: remove redundant "adverb-adjective" hyphens from compound modifiers (GH-94551)
Discussion: https://discuss.python.org/t/slight-grammar-fix-throughout-adverbs-dont-need-hyphen/17021
2022-07-05 11:16:10 +02:00
KotlinIsland 4791a8a835
gh-93626: Set the release for `__future__.annotations` to `None` (GH-93628)
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
2022-07-05 10:46:39 +02:00
Victor Stinner fd76eb547d
gh-94383: Remove ElementTree.Element.copy() method (#94384)
xml.etree: Remove the ElementTree.Element.copy() method of the pure
Python implementation, deprecated in Python 3.10, use the copy.copy()
function instead. The C implementation of xml.etree has no copy()
method, only a __copy__() method.
2022-07-04 15:51:01 +02:00
Victor Stinner fbcee570d1
gh-94352: shlex.split() no longer accepts None (#94353)
shlex.split(): Passing None for s argument now raises an exception,
rather than reading sys.stdin. The feature was deprecated in Python
3.9.
2022-07-04 15:29:19 +02:00
Vinay Sajip a391b74dbe
Update logging documentation: change cross-reference and add webapp r… (GH-94540) 2022-07-04 06:06:43 +01:00
Thomas Perl b296c7442b
gh-92869: ctypes: Add c_time_t (#92870)
Adds `ctypes.c_time_t` to represent the C `time_t` type accurately as its size varies.

Primarily-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org> [Google]
2022-07-03 11:58:02 -07:00
Terry Jan Reedy 39c29f753e
IDLE doc: Tweek RESTART and Windows console start (#94530) 2022-07-03 12:56:44 -04:00
Erlend Egeberg Aasland cc81962e69
Doc: fix sqlite3 blob reference anchor (#94505) 2022-07-02 08:35:48 +02:00
Sam Ezeh 80aaeabb8b
gh-81054: Document that SimpleHTTPRequestHandler follows symbolic links (GH-94416) 2022-07-01 18:21:27 +02:00
Mariatta Wijaya ad55147c1d
Update code sample when importing modules in queue doc (GH-94244)
In the queue documentation, the code snippet shows the import to be not PEP 8 compliant.

Since people typically copy-paste from such code samples, I think it's important to show best-practices here.
2022-07-01 17:51:46 +02:00
Irit Katriel c57aad777a
gh-94216: add pseudo instructions to the dis/opcodes modules (GH-94241) 2022-07-01 15:33:35 +01:00
Mariatta Wijaya 62bb7a3b50
multiprocessing.spawn doc: Capitalize the p in "Python" (gh-94462) 2022-06-30 10:23:04 -07:00
Guido van Rossum 594c369949
GH-94398: TaskGroup: Fail create_task() during shutdown (GH-94400)
Once the task group is shutting down, it should not be possible to create a new task.
Here "shutting down" means `self._aborting` is set, indicating that at least one task
has failed and we have cancelled all others.

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2022-06-30 19:10:46 +02:00
Jean-Christophe Helary 639e35108b
xml.dom.minidom docs: fix typo (#93437) 2022-06-30 10:06:42 -07:00
Guido van Rossum b6ec6d4041
GH-90908: Document asyncio.TaskGroup (GH-94359)
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-06-30 18:16:22 +02:00
Irit Katriel d68f2d27bb
gh-89038: [doc] update dis.findlinestarts documentation for changes related to PEP-626 (GH-94247) 2022-06-30 15:57:35 +01:00
Irit Katriel 68fb03249f
bpo-92336: [doc] clarify that the dfile is read by the traceback display code (GH-94409) 2022-06-29 20:24:43 +01:00
Cheryl Sabella 22b783aba0
Docs: Update SyntaxError message in REPL example for list comprehension (GH-93901) 2022-06-29 19:06:51 +02:00