Mention the implicit cache in struct.Struct() docs.
Consistent with the re.compile documentation note.
(cherry picked from commit 3666b3c1f6)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Remove ellipsis that look like continuation prompts,
has a side benefit of putting rest of error message in proper text color.
(cherry picked from commit f019579828)
Co-authored-by: Lew Kurtz <37632626+lew18@users.noreply.github.com>
Some methods of the SMTP class use mutable default arguments. Specially
`send_message` is affected as it mutates one of the args by appending items
to it, which has side effects on further calls.
(cherry picked from commit d5fbe9b1a3)
Co-authored-by: Pablo Aguiar <scorphus@gmail.com>
... by removing a superfluous "either".
Reported by Никита Люшненко on docs@.
(cherry picked from commit 98b976a2f8)
Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
If a globals dictionary without a '__builtins__' key is passed to
eval(), a '__builtins__' key will be inserted to the dictionary:
>>> eval("print('__builtins__' in globals())", {})
True
(As a result of this behavior, we can use the builtins
print() and globals() even if we passed a dictionary without a
'__builtins__' key to eval().)
(cherry picked from commit 225b055480)
Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
The http_response() and https_response() methods of the HTTPErrorProcessor
class have two required parameters, 'request' and 'response'.
(cherry picked from commit c53aaec793)
Co-authored-by: Sebastian Rittau <srittau@rittau.org>
In the documentation, the `env` directory is specified when we execute
the `make venv` command. But in the code, `make venv` will create the
virtualenv inside the `venv` directory (defined by `VENVDIR`)
(cherry picked from commit 599bfa18f8)
Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>
* bpo-34273: Change 'Fixed point' to 'Fixed-point notation'.
The change in the mini language floating point and decimal table
is consistent with 'Exponential notation' and clarifies that we
are referring to the output notation, not an object type.
* Update string.rst
* Update string.rst
* Update string.rst
* Update string.rst
(cherry picked from commit 28c7f8c8ce)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
In the documentation for the traceback module, the definitions of functions
extract_tb(), format_list() and classmethod StackSummary.from_list()
mention the old style 4-tuples that these functions used to return or accept.
Since Python 3.5, however, they return or accept a FrameSummary object
instead of a 4-tuple, or a StackSummary object instead of a list of 4-tuples.
Co-authored-by: torsava <torsava@redhat.com>
Co-Authored-By: Berker Peksag <berker.peksag@gmail.com>
(cherry picked from commit f394ee5eaf)
* help(hashlib) didn't work because of incorrect module name in blake2b and
blake2s classes.
* Constructors blake2*(), sha3_*(), shake_*() and keccak_*() incorrectly
accepted keyword argument "string" for binary data, but documented as
accepting the "data" keyword argument. Now this parameter is positional-only.
* Keyword-only parameters in blake2b() and blake2s() were not documented as
keyword-only.
* Default value for some parameters of blake2b() and blake2s() was None,
which is not acceptable value.
* The length argument for shake_*.digest() was wrapped out to 32 bits.
* The argument for shake_128.digest() and shake_128.hexdigest() was not
positional-only as intended.
* TypeError messages for incorrect arguments in all constructors sha3_*(),
shake_*() and keccak_*() incorrectly referred to sha3_224.
Also made the following enhancements:
* More accurately specified input and result types for strings, bytes and
bytes-like objects.
* Unified positional parameter names for update() and constructors.
* Improved formatting.
(cherry picked from commit f1d36d8efa)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Mathematically, bitwise operations on integers behave as if there were an
infinite number of sign bits. Pragmatically, that gives the same answer as
using one extra sign bit for the bitwise logical operations.
(cherry picked from commit b4bc5cab82)
Co-authored-by: Sanyam Khurana <8039608+CuriousLearner@users.noreply.github.com>