Commit graph

24634 commits

Author SHA1 Message Date
Andre Delfino 48824fa1e2
[doc] Link to section File input (GH-28941) 2021-11-02 22:34:00 +01:00
LincolnPuzey 3551bf16ee
bpo-45457: Minor fix to documentation for SSLContext.load_default_certs. (GH-28947)
Specify that SSLContext.set_default_verify_paths is called on ALL systems.

The code of SSLContext.load_default_certs was changed in bpo-22449 to do this,
this fix corrects the documentation to match that change.
2021-11-02 22:27:44 +01:00
Dmitry Smirnov 454cdb99ab
bpo-45633: Fix newtypes doc typo (GH-29318) 2021-11-02 22:47:06 +08:00
Erlend Egeberg Aasland b6b38a8226
bpo-45243: Add support for setting/getting sqlite3 connection limits (GH-28463) 2021-11-01 22:50:53 +00:00
m-aciek 14a4fce457
bpo-45618: Update Sphinx version used to build the documentation to 4.2.0 (GH-29256)
Updating version of Sphinx to most recent one, 4.2.0. Documentation builds without warnings.

Sphinx 4.2.0 release notes: https://www.sphinx-doc.org/en/master/changes.html#release-4-2-0-released-sep-12-2021.

cc @JulienPalard

Automerge-Triggered-By: GH:JulienPalard
2021-10-31 13:51:33 -07:00
Olaf van der Spek ee464322eb
Move field width to the right field (GH-29344)
Automerge-Triggered-By: GH:vsajip
2021-10-31 10:44:23 -07:00
Filipe Laíns bc8fd7c9c2
bpo-45516: fix Traversable.name documentation (GH-29194)
Here we go again... Sorrry!

Signed-off-by: Filipe Laíns <lains@riseup.net>

Automerge-Triggered-By: GH:jaraco
2021-10-31 07:57:21 -07:00
Philipp A aae18a1740
Fix docs source link for importlib.metadata (GH-29025)
The link broke for Python 3.10 since importlib.metadata was made from a module into a package

I think this is trivial enough to not need a bpo issue.

Automerge-Triggered-By: GH:jaraco
2021-10-30 08:12:47 -07:00
andrei kulakov b17cfd150f
bpo-45600: Enhanced / clarified the docs for os.environ and os.environb (GH-29204)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-10-29 22:18:45 +02:00
Ian Fisher 3877fc02f7
bpo-45335: Add note to sqlite3 docs about "timestamp" converter (GH-29200) 2021-10-29 22:17:22 +02:00
Christian Heimes f0150ac94a
bpo-45548: Some test modules must be built as shared libs (GH-29268)
Some test cases don't work when test modules are static extensions.

Add dependency on Modules/config.c to trigger a rebuild whenever a
module build type is changed.

``makesetup`` puts shared extensions into ``Modules/`` directory. Create
symlinks from pybuilddir so the extensions can be imported.

Note: It is not possible to use the content of pybuilddir.txt as a build
target. Makefile evaluates target variables in the first pass. The
pybuilddir.txt file does not exist at that point.
2021-10-29 17:49:57 +02:00
Alex Waygood d9575218d7
bpo-45655: Add ref to union type expressions at top of typing docs (GH-29309) 2021-10-29 21:56:21 +08:00
Eric Snow 074fa57506
bpo-45395: Make custom frozen modules additions instead of replacements. (gh-28778)
Currently custom modules (the array set on PyImport_FrozenModules) replace all the frozen stdlib modules. That can be problematic and is unlikely to be what the user wants. This change treats the custom frozen modules as additions instead. They take precedence over all other frozen modules except for those needed to bootstrap the import system. If the "code" field of an entry in the custom array is NULL then that frozen module is treated as disabled, which allows a custom entry to disable a frozen stdlib module.

This change allows us to get rid of is_essential_frozen_module() and simplifies the logic for which frozen modules should be ignored.

https://bugs.python.org/issue45395
2021-10-28 15:04:33 -06:00
Alex Waygood 03db1bbfd2
bpo-45655: Add "relevant PEPs" section to `typing` documentation (GH-29280)
The list of PEPs at the top of the documentation for the ``typing`` module has
become too long to be readable. This PR proposes presenting this
information in a more structured and readable way by adding a new "relevant
PEPs" section to the ``typing`` docs.

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-10-28 21:55:50 +02:00
Arthur Milchior d9c1868c25
bpo-45583: Correct datamodel documentation of int() (GH-29182)
It should be noted that this part of the documentation is redundant with
function.rst's documentation of int. This one was correctly updated with Python 3.8.
2021-10-28 21:48:37 +02:00
Nikita Sobolev 1fb968c07a
bpo-45604: add level argument to multiprocessing.log_to_stderr func (GH-29226)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2021-10-28 21:38:14 +02:00
Erlend Egeberg Aasland 88d8a1a340
bpo-45608: Document missing sqlite3 DB-API attributes and methods (GH-29219) 2021-10-28 21:35:51 +02:00
Justinas Petuchovas 0a68b3603f
Fix typo in Counter documentation (GH-29223)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
2021-10-28 18:43:09 +08:00
Sam Gross 35e1ff38ee
bpo-28737: Document when tp_dealloc should call PyObject_GC_UnTrack() (GH-29246)
Objects that support garbage collection ("container" objects) should
call PyObject_GC_UnTrack() from their destructors before clearing any
fields which may point to other "container" objects.
2021-10-27 21:15:13 +02:00
m-aciek bcee6aa315
bpo-45618: Fix documentation build by pinning Docutils version to 0.17.1 (GH-29230)
Co-authored-by: Maciej Olko <maciej.olko@yougov.com>
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-10-27 10:21:29 -04:00
Brandt Bucher 82a662e521
bpo-44511: Improve the bytecode for class and mapping patterns (GH-26922)
* Refactor mapping patterns and speed up class patterns.

* Simplify MATCH_KEYS and MATCH_CLASS.

* Add COPY opcode.
2021-10-27 10:45:35 +01:00
Tim Golden aea5ecc458
bpo-40915: Fix mmap resize bugs on Windows (GH-29213)
(original patch by eryksun)

Correctly hand various failure modes when resizing an mmap on Windows:

* Resizing a pagefile-backed mmap now creates a new mmap and copies data
* Attempting to resize when another mapping is held on the same file raises an OSError
* Attempting to resize a nametagged mmap raises an OSError if another mapping is held with the same nametag
2021-10-26 22:56:43 +01:00
Tim Peters 51ed2c56a1
bpo-45530: speed listobject.c's unsafe_tuple_compare() (GH-29076)
Keep track of whether unsafe_tuple_compare() calls are resolved by the very
first tuple elements, and adjust strategy accordingly. This can significantly
cut the number of calls made to the full-blown PyObject_RichCompareBool(),
and especially when duplicates are rare.

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-10-24 22:27:24 -05:00
William Andrea 9e05da6224
Expand about soft keywords in the docs for keyword.py (GH-29139)
Add link at the top and fix the existing links to point to the "[soft keywords](https://docs.python.org/3.10/reference/lexical_analysis.html#soft-keywords)" section created in the Python 3.10 docs.

Changes should be backported to 3.10 as well.
2021-10-23 09:24:02 -07:00
Filipe Laíns 8ce20bbdd6
bpo-45516: add protocol description to the TraversableResources documentation (#29173)
Signed-off-by: Filipe Laíns <lains@riseup.net>
2021-10-23 11:47:55 -04:00
Irit Katriel f30ad65dbf
bpo-45292: [PEP 654] add the ExceptionGroup and BaseExceptionGroup classes (GH-28569) 2021-10-23 00:13:46 +01:00
Mark Dickinson d1b24775b4
bpo-44547: Make Fractions objects instances of typing.SupportsInt (GH-27851)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-10-22 00:09:47 +02:00
andrei kulakov 51375388be
bpo-41983: add availability info to socket docs (GH-27519)
* add availability info to AF_PACKET section

* add availability for AF_QIPCRTR as well
2021-10-21 23:13:37 +02:00
Mark Dickinson 887a55705b
bpo-44344: Document that pow can return a complex number for non-complex inputs. (GH-27853)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-10-21 22:57:49 +02:00
Christian Heimes 9942f42a93
bpo-45522: Allow to disable freelists on build time (GH-29056)
Freelists for object structs can now be disabled. A new ``configure``
option ``--without-freelists`` can be used to disable all freelists
except empty tuple singleton. Internal Py*_MAXFREELIST macros can now
be defined as 0 without causing compiler warnings and segfaults.

Signed-off-by: Christian Heimes <christian@python.org>
2021-10-21 06:12:20 -07:00
Thomas 5a14f71fe8
bpo-34451: Document prompt and output toggle feature in html tutorial (GH-27105) 2021-10-21 12:19:20 +02:00
Ken Jin 2cbf50e812
bpo-44220: Export PyStructSequence_UnnamedField in the limited API (GH-26331) 2021-10-21 10:46:48 +02:00
Ethan Furman 7c4d96103c
bpo-44174: [Enum] add reference to name mangling (GH-29116) 2021-10-20 20:32:11 -07:00
Barry Warsaw 876fc7fcec
bpo-35673: Add a public alias for namespace package __loader__ attribute (#29049)
Rename namespace package __loader__ class to be public.

Make the old name, i.e. _NamespaceLoader, an alias for the public name, for backward compatibility.
2021-10-20 14:05:29 -07:00
Hugo van Kemenade d89fb9a5a6
bpo-45320: Remove long-deprecated inspect methods (GH-28618) 2021-10-20 20:48:55 +02:00
Łukasz Langa dff0b71343
bpo-45464: [doc] Explain that subclassing multiple exceptions is fragile (GH-29094)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-10-20 18:54:31 +02:00
Alex Waygood d9e1dae35a
Add PEPs 593 & 647 to list of PEPs at top of typing docs (GH-29097) 2021-10-20 23:15:59 +08:00
Thomas Grainger a774285e7d
bpo-25625: [doc] fix async/aync typo (GH-29091) 2021-10-20 15:51:07 +02:00
Petr Viktorin 98fa3b53e2
bpo-45474: Exclude all of marshal.h if Py_LIMITED_API is defined (GH-29061)
Also, reword the What's New messages: this doesn't change the limited API, it only brings the Py_LIMITED_API macro closer to the ideal of only allowing the limited API.

Automerge-Triggered-By: GH:encukou
2021-10-20 02:32:14 -07:00
Filipe Laíns 3592980f91
bpo-25625: add contextlib.chdir (GH-28271)
Added non parallel-safe :func:`~contextlib.chdir` context manager to change
the current working directory and then restore it on exit. Simple wrapper
around :func:`~os.chdir`.

Signed-off-by: Filipe Laíns <lains@riseup.net>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-10-20 00:19:27 +02:00
Julien Palard bda69abe84
[doc]: Fix missing space in c-api/init.rst and add rstlint rule (GH-28988) 2021-10-19 21:13:24 +02:00
Filipe Laíns 236e301b8a
bpo-42174: fallback to sane values if the columns or lines are 0 in get_terminal_size (GH-29046)
I considered only falling back when both were 0, but that still seems
wrong, and the highly popular rich[1] library does it this way, so I
thought we should probably inherit that behavior.

[1] https://github.com/willmcgugan/rich

Signed-off-by: Filipe Laíns <lains@riseup.net>

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-10-19 20:42:13 +02:00
Gregory P. Smith fdbdf3f735
bpo-40360: Make the 2to3 deprecation more obvious. (GH-29064) 2021-10-19 20:28:27 +02:00
Filipe Laíns 7bafa0cf58
bpo-45449: add note about PEP 585 in collections.abc's documentation (GH-29047)
Signed-off-by: Filipe Laíns <lains@riseup.net>

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-10-19 20:18:50 +02:00
Paul Ganssle 8e40ca127f
Add zoneinfo to the datetime documentation (GH-29038)
We should have done this way back when 3.9 was released, but it fell off
the radar.

Co-authored-by: Paul Ganssle <git@m.ganssle.io>
2021-10-19 20:09:41 +02:00
Victor Stinner 52af0756b2
bpo-45434: Only exclude <stdlib.h> in Python 3.11 limited C API (GH-29027)
The Python 3.11 limited C API no longer includes stdlib.h, stdio.h,
string.h and errno.h.

* Exclude Py_MEMCPY() from Python 3.11 limited C API.
* xxlimited C extension is now built with Python 3.11 limited C API.
2021-10-19 12:10:22 +02:00
Filipe Laíns c029567530
bpo-45516: use documentation links in TraversableResources' description (GH-29045)
I think this makes the documentation much more digestible :)

Signed-off-by: Filipe Laíns <lains@riseup.net>
2021-10-18 20:52:28 -04:00
Victor Stinner aad88d33d9
bpo-35134: Split warnings.h and weakrefobject.h (GH-29042)
Split header files to move the non-limited API to Include/cpython/:

* Include/warnings.h => Include/cpython/warnings.h
* Include/weakrefobject.h => Include/cpython/weakrefobject.h

Exclude PyWeakref_GET_OBJECT() from the limited C API. It never
worked since the PyWeakReference structure is opaque in the limited C
API.

Move _PyWarnings_Init() and _PyErr_WarnUnawaitedCoroutine() to the
internal C API.
2021-10-19 01:31:57 +02:00
Filipe Laíns 4d03de3329
bpo-45516: add protocol description to the Traversable documentation (#29039)
* bpo-45516: add protocol description to the Traversable documentation

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Update Doc/library/importlib.rst

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>

* Update Lib/importlib/abc.py

* Update Doc/library/importlib.rst

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2021-10-18 18:58:13 -04:00
Raymond Hettinger 54a4e1b53a
Improve multiserver queue recipe (GH-29012) 2021-10-17 18:20:34 -05:00