| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
docs gh-105269 (GH-105468) (#105478)
(cherry picked from commit acf3916e84158308660ed07c474a564e045d6884)
Co-authored-by: Federico Caselli <CaselIT@users.noreply.github.com>
|
| |
|
|
|
|
|
| |
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.
(cherry picked from commit d9c1868c25ec6466e8d8ae21fe9315a8a03836ab)
Co-authored-by: Arthur Milchior <arthur@milchior.fr>
|
| |
|
|
|
| |
(cherry picked from commit fa15df77f02ba4a66ba0b71989381a426038be01)
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
Accessing the following attributes will now fire PEP 578 style audit hooks as (object.__getattr__, obj, name):
* PyTracebackObject: tb_frame
* PyFrameObject: f_code
* PyGenObject: gi_code, gi_frame
* PyCoroObject: cr_code, cr_frame
* PyAsyncGenObject: ag_code, ag_frame
(cherry picked from commit bb2f3ff7a8f0c3565ccc1946dba7e09a3f7dc209)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
| |
|
|
|
| |
(cherry picked from commit a1a5e3c4c83c3e3fe24c96ae22dfdedc7e23a1bb)
Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
(GH-24303) (GH-25342)
(cherry picked from commit 79650d0118b0a8861428b9dd063089de405cf137)
Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
|
| |
|
|
|
|
|
| |
positional-only arguments (GH-25235) (GH-25260)
(cherry picked from commit 58d72cab89cf9652acc0bf0007aa20b2bcc98499)
Co-authored-by: Saiyang Gou <gousaiyang@163.com>
|
| |
|
|
|
|
| |
Previously, the doc at least strongly implied that it had to be an iterator.
(cherry picked from commit 2f9ef514fb24b6a95bd3272885f197752810c107)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
| |
|
|
|
| |
(cherry picked from commit 96a09df64483b70c4215c7025a19b9d2f1636c55)
Co-authored-by: Andre Delfino <adelfino@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Python 2, it was possible to use `except` with a nested tuple, and occasionally natural. For example, `zope.formlib.interfaces.InputErrors` is a tuple of several exception classes, and one might reasonably think to do something like this:
try:
self.getInputValue()
return True
except (InputErrors, SomethingElse):
return False
As of Python 3.0, this raises `TypeError: catching classes that do not inherit from BaseException is not allowed` instead: one must instead either break it up into multiple `except` clauses or flatten the tuple. However, the reference documentation was never updated to match this new restriction. Make it clear that the definition is no longer recursive.
Automerge-Triggered-By: GH:ericvsmith
(cherry picked from commit c95f8bc2700b42f4568886505a819816c9b0ba28)
Co-authored-by: Colin Watson <cjwatson@debian.org>
Co-authored-by: Colin Watson <cjwatson@debian.org>
|
| |
|
|
|
| |
follow-up to bpo-39416
Co-authored-by: kpinc <kop@karlpinc.com>
|
| |
|
|
|
| |
(cherry picked from commit 95f710c55714153f0c8cce48f8215bb3d866ac1d)
Co-authored-by: Andre Delfino <adelfino@gmail.com>
|
| |
|
|
|
|
|
|
| |
comprehensions'(GH-20272)
Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
(cherry picked from commit 2d55aa9e37c9c84f4f6a8135d0326da0bcd8f38b)
Co-authored-by: Florian Dahlitz <f2dahlitz@freenet.de>
|
| |
|
|
|
|
|
| |
object.__ne__ (GH-22874) (#22877)
See Objects/typeobject.c:object_richcompare() for the implementation of this in CPython.
Co-authored-by: Brett Cannon <brett@python.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
@ericsnowcurrently This PR will change the following:
In the library documentation importlib.rst:
- `module.__package__` can be `module.__name__` for packages;
- `spec.parent` can be `spec.__name__` for packages;
- `spec.loader` is not `None` for namespaces packages.
In the language documentation import.rst:
- `spec.loader` is not `None` for namespace packages.
Automerge-Triggered-By: GH:warsaw
(cherry picked from commit 27f1bd8787d24ac53cc3dc6ea5eb00b8a3499839)
Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
representations of numeric classes (GH-18111) (GH-22861)
[[bpo-39416]()](): Document string representations of the Numeric classes
This is a change to the specification of the Python language.
The idea here is to put sane minimal limits on the Python language's default
representations of its Numeric classes. That way "Marty's Robotic Massage Parlor
and Python Interpreter" implementation of Python won't do anything too
crazy.
Some discussion in the email thread:
Subject: Documenting Python's float.__str__()
https://mail.python.org/archives/list/python-dev@python.org/thread/FV22TKT3S2Q3P7PNN6MCXI6IX3HRRNAL/
(cherry picked from commit c60394c7fc9cc09b16e9675a3eeb5844b6d8523f)
Co-authored-by: kpinc <kop@karlpinc.com>
Automerge-Triggered-By: GH:merwok
|
| |
|
|
|
| |
(cherry picked from commit cb115e36e1aba04b90b0ecac6f043e60064ac65b)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit eba109a28f48b20b05f08abbe6604eebb07788f9)
Co-authored-by: Andre Delfino <adelfino@gmail.com>
|
| |
|
|
| |
(cherry picked from commit 3f7e990fd49dbabc1dde41ce58c1bdda9f56ead7)
|
| |
|
|
|
|
|
| |
* bpo-41855: Backport fixes from importlib_metadata 1.5.2.
* Add blurb.
* Add anchor for finders and loaders
|
| |
|
|
|
|
|
| |
is called (GH-22505)
(cherry picked from commit d02d824e05e2cb86f4df381be18832e76e2c475f)
Co-authored-by: Brett Cannon <brett@python.org>
|
| |
|
|
|
|
|
|
|
|
| |
Use an unique identifier for the different grammars documented using
the Sphinx productionlist markup.
productionlist markups of the same grammar, like "expressions" or
"compound statements", use the same identifier "python-grammar".
(cherry picked from commit 8af239eacfcf52e4e0e2b0223e7cea4672309483)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
| |
|
|
|
|
| |
Automerge-Triggered-By: @kushaldas
(cherry picked from commit 788b79fa7b6184221e68d4f1a3fbe0b3270693f6)
Co-authored-by: Andre Delfino <adelfino@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
data… (GH-22172) (GH-22175)
(cherry picked from commit 46bc21e1780016aaacd34e472f838dc792fb674c)
Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
Automerge-Triggered-By: @brettcannon
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-40204: Allow pre-Sphinx 3 syntax in the doc (GH-21844)
Enable Sphinx 3.2 "c_allow_pre_v3" option and disable the
c_warn_on_allowed_pre_v3 option to make the documentation compatible
with Sphinx 2 and Sphinx 3.
(cherry picked from commit 423e77d6de497931585d1883805a9e3fa4096b0b)
* bpo-40204: Fix Sphinx sytanx in howto/instrumentation.rst (GH-21858)
Use generic '.. object::' to declare markers, rather than abusing
'.. c:function::' which fails on Sphinx 3.
(cherry picked from commit 43577c01a2ab49122db696e9eaec6cb31d11cc81)
* bpo-40204: Fix duplicates in the documentation (GH-21857)
Fix two Sphinx 3 issues:
Doc/c-api/buffer.rst:304: WARNING: Duplicate C declaration, also defined in 'c-api/buffer'.
Declaration is 'PyBUF_ND'.
Doc/c-api/unicode.rst:1603: WARNING: Duplicate C declaration, also defined in 'c-api/unicode'.
Declaration is 'PyObject* PyUnicode_Translate(PyObject *str, PyObject *table, const char *errors)'.
(cherry picked from commit 46d10b1237c67ff8347f533eda6a5468d098f7eb)
* bpo-40204: Add :noindex: in the documentation (GH-21859)
Add :noindex: to duplicated documentation to fix "duplicate object
description" errors.
For example, fix this Sphinx 3 issue:
Doc/library/configparser.rst:1146: WARNING: duplicate object
description of configparser.ConfigParser.optionxform, other instance
in library/configparser, use :noindex: for one of them
(cherry picked from commit d3ded080482beae578faa704b13534a62d066f9f)
* bpo-40204, doc: Fix syntax of C variables (GH-21846)
For example, fix the following Sphinx 3 errors:
Doc/c-api/buffer.rst:102: WARNING: Error in declarator or parameters
Invalid C declaration: Expected identifier in nested name. [error at 5]
void \*obj
-----^
Doc/c-api/arg.rst:130: WARNING: Unparseable C cross-reference: 'PyObject*'
Invalid C declaration: Expected end of definition. [error at 8]
PyObject*
--------^
The modified documentation is compatible with Sphinx 2 and Sphinx 3.
(cherry picked from commit 474652fe9346382dbf793f20b671eb74668bebde)
* bpo-40204: Fix reference to terms in the doc (GH-21865)
Sphinx 3 requires to refer to terms with the exact case.
For example, fix the Sphinx 3 warning:
Doc/library/pkgutil.rst:71: WARNING: term Loader not found in case
sensitive match.made a reference to loader instead.
(cherry picked from commit bb0b08540cc93e56f3f1bde1b39ce086d9e35fe1)
* bpo-40204: Fix duplicated productionlist names in the doc (GH-21900)
Sphinx 3 disallows having more than one productionlist markup with
the same name. Simply remove names in this case, since names are not
shown anyway. For example, fix the Sphinx 3 warning:
Doc/reference/introduction.rst:96: duplicate token description
of *:name, other instance in reference/expressions
(cherry picked from commit 1abeda80f760134b4233608e2c288790f955b95a)
(cherry picked from commit 8f88190af529543c84d5dc78f19abbfd73335cf4)
|
| |
|
|
|
|
|
| |
Co-Authored-By: Rishi <rishi93dev@gmail.com>
(cherry picked from commit 13efaec)
Co-authored-by: amaajemyfren <32741226+amaajemyfren@users.noreply.github.com>
|
| |
|
|
|
|
|
| |
(GH-18851)
(cherry picked from commit f117cef25b5ffc4db9fbe373ddb65e14f59f0397)
Co-authored-by: Shankar Jha <shankarj67@gmail.com>
|
| |
|
|
|
|
| |
Automerge-Triggered-By: @csabella
(cherry picked from commit af23f0d3cf19343512e6ca1fe1d46a5dbe425719)
Co-authored-by: Matteo Bertucci <matteobertucci2004@gmail.com>
|
| |
|
|
|
|
| |
(cherry picked from commit 810f68f1282c917fc1ad6af540a9f08524dfe310)
Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
|
| |
|
|
|
| |
(cherry picked from commit c49016e67c3255b37599b354a8d7995d40663991)
Co-authored-by: Mathieu Dupuy <deronnax@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-19198)
* issue 40045
* Update lexical_analysis.rst
Make "dunder" method documentation easier(GH-19153)
Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>
(cherry picked from commit 5f9c131c099d6675d1a9d0228497865488afd548)
Co-authored-by: Javad Mokhtari <javadmokhtari@outlook.com>
Co-authored-by: Javad Mokhtari <javadmokhtari@outlook.com>
|
| |
|
|
|
|
| |
Co-authored-by: furkanonder <furkantahaonder@gmail.com>
(cherry picked from commit 59c644eaa72b0cc48302f59d66852c4ea8332eba)
Co-authored-by: Lahfa Samy <lahfa121999@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit e59334ebc9308b0f3ad048ef293c6b49e6456d1a)
Co-authored-by: Caleb Donovick <cdonovick@users.noreply.github.com>
|
| |
|
|
|
| |
(cherry picked from commit 8bae21962bab2fac7630982abd73676b89930902)
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
|
| |
|
|
|
|
|
|
| |
(GH-18559)
The language reference now specifies restrictions on class namespaces. Adapted from a patch by Ethan Furman.
(cherry picked from commit fbe2e0bb8a7ee75d0f9d57682436dac7d69e202e)
Co-authored-by: ananthan-123 <ananthakrishnan15.2001@gmail.com>
|
| |
|
|
|
|
| |
https://bugs.python.org/issue39545
(cherry picked from commit f632736023502816f2e6bd714d1b48c81aa2ccc1)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
| |
Replaced the period with a comma.
Automerge-Triggered-By: @Mariatta
(cherry picked from commit d47d0c8e9f2ca0f9f5d1bf0b35006a9a4d5ca684)
Co-authored-by: Bonifacio de Oliveira <bonifacio.segundo@gmail.com>
|
| |
|
|
|
|
| |
(cherry picked from commit 7de617455ed788e6730c40cf854c4b72b0432194)
Co-authored-by: alclarks <57201106+alclarks@users.noreply.github.com>
|
| |
|
|
|
| |
(cherry picked from commit abc0c4fa9970931849b3da598c5980a5b170661e)
Co-authored-by: HongWeipeng <961365124@qq.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-17608)
* __enter__ is now looked up before __exit__ to give a more intuitive error message
* add pseudo-code equivalent for the with statement
* fix pseudo-code for the async with statement to use a finally clause
* use SUITE rather than BLOCK for consistency with the language grammar
Patch by Géry Ogam.
(cherry picked from commit 226e6e7d4326cf91ef37e13528eb1f62de1bb832)
Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(cherry picked from commit d587272fe3b0fcad2f23a490e76f9f82ca7d64ef)
Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>
https://bugs.python.org/issue38316
Automerge-Triggered-By: @vstinner
|
| |
|
|
|
| |
(cherry picked from commit 02519f75d15b063914a11351da30178ca4ceb54b)
Co-authored-by: Tal Einat <taleinat+github@gmail.com>
|
| |
|
|
|
|
|
| |
__set_name__ (GH-17364)
(cherry picked from commit 1bddf890e595a865414645c6041733043c4081f8)
Co-authored-by: Florian Dahlitz <f2dahlitz@freenet.de>
|
| |
|
|
|
| |
(cherry picked from commit 4544e78ec4558b75bf95e5b7dfc1b5bbb07ae5f0)
Co-authored-by: alclarks <57201106+alclarks@users.noreply.github.com>
|
| |
|
|
|
| |
(cherry picked from commit 2d56af7a94fe7ec0bdf3011652558ae1b889b4a8)
Co-authored-by: Shu <23287722+susan-shu-c@users.noreply.github.com>
|
| |
|
|
|
| |
(cherry picked from commit 894e30ce0bcc1c509eb01c8ffa9ba6d7701aeaaf)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-15967)
Add or update assignment expression documentation for:
- FAQ - Design
- Reference - Expressions
- Reference - Lexical Analysis
https://bugs.python.org/issue35224
Automerge-Triggered-By: @matrixise
(cherry picked from commit 6357c95716d89ac1f80587fbc4133df8d2e8396c)
Co-authored-by: Emily Morehouse <emily@cuttlesoft.com>
|
| |
|
|
|
|
|
|
| |
https://bugs.python.org/issue33459
Automerge-Triggered-By: @matrixise
(cherry picked from commit dc269971091710563a0d730a0d4b084901826c15)
Co-authored-by: Andre Delfino <adelfino@gmail.com>
|
| | |
|
| |
|
|
|
|
|
| |
(GH-15589)
(cherry picked from commit 0dac68f1e593c11612ed54af9edb865d398f3b05)
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
|