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>
* -X dev: it is now possible to override the memory allocator using
PYTHONMALLOC even if the developer mode is enabled.
* Add _Py_InitializeFromConfig()
* Add _Py_Initialize_ReadEnvVars() to set global configuration
variables from environment variables
* Fix the code to initialize Python: Py_Initialize() now also reads
environment variables
* _Py_InitializeCore() can now be called twice: the second call
only replaces the configuration.
* Write unit tests on Py_Initialize() and the different ways to
configure Python
* The isolated mode now always sets Py_IgnoreEnvironmentFlag and
Py_NoUserSiteDirectory to 1.
* pymain_read_conf() now saves/restores the configuration
if the encoding changed
* make CallTip and ToolTip sub-classes of a common abstract base class
* remove ListboxToolTip (unused and ugly)
* greatly increase test coverage
* tested on Windows, Linux and macOS
(cherry picked from commit 87e59ac11e)
Co-authored-by: Tal Einat <taleinat+github@gmail.com>
Some MacOS-tk combinations need .update_idletasks().
The call is both unneeded and innocuous on Linux and Windows.
Patch by Kevin Waltzer.
(cherry picked from commit 9beaef6225)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Multiprocessing test_timeout() now accepts a delta of 100 ms instead
of just 50 ms, since the test failed with 135.8 ms instead of the
expected 200 ms.
(cherry picked from commit 5640d030e1)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
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)
Added missing .grab_release() calls to all places where we call .grab_set().
(cherry picked from commit 10ea9409ce)
Co-authored-by: Tal Einat <taleinat+github@gmail.com>
* Fix integer overflow in os.readv(), os.writev(), os.preadv()
and os.pwritev() and in os.sendfile() with headers or trailers
arguments (on BSD-based OSes and MacOS).
* Fix sending the part of the file in os.sendfile() on MacOS.
Using the trailers argument could cause sending more bytes from
the input file than was specified.
Thanks Ned Deily for testing on 32-bit MacOS.
(cherry picked from commit 9d5727326a)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* 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>
This reverts commit af810b35b4.
This is not valid syntax (see bpo-32012).
(cherry picked from commit 4b8a7f51da)
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>
Clarify how to bind to all interfaces using socket
(cherry picked from commit 95dfb9c3ae)
Co-authored-by: johnthagen <johnthagen@users.noreply.github.com>
/usr/local/lib/pythonX.Y is used by Homebrew's Python already.
(cherry picked from commit 3e7d18a54b)
Co-authored-by: INADA Naoki <methane@users.noreply.github.com>