| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-23335)
Literal equality no longer depends on the order of arguments.
Fix issue related to `typing.Literal` caching by adding `typed` parameter to `typing._tp_cache` function.
Add deduplication of `typing.Literal` arguments.
(cherry picked from commit f03d318ca42578e45405717aedd4ac26ea52aaed)
Co-authored-by: Yurii Karabas <1998uriyyo@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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
tarfile writes full path to FNAME field of GZIP format instead of just basename if user specified absolute path. Some archive viewers may process file incorrectly. Also it creates security issue because anyone can know structure of directories on system and know username or other personal information.
RFC1952 says about FNAME:
This is the original name of the file being compressed, with any directory components removed.
So tarfile must remove directory names from FNAME and write only basename of file.
Automerge-Triggered-By: @jaraco
(cherry picked from commit 22748a83d927d3da1beaed771be30887c42b2500)
Co-authored-by: Artem Bulgakov <ArtemSBulgakov@ya.ru>
|
|
|
|
|
|
| |
Co-authored-by: Andrey Darascheka <andrei.daraschenka@leverx.com>
(cherry picked from commit ec42789e6e14f6b6ac13569aeadc13798d7173a8)
Closes bpo-39693.
|
|
|
|
|
|
|
|
| |
(GH-22691)
Reduces the rate at which the ENV CHANGED failure occurs in test_asyncio SSL tests (due to unclosed transport), but does not 100% resolve it.
(cherry picked from commit de73d432bb29f6439f2db16cb991e15e09c70c26)
Co-authored-by: Justin Turner Arthur <justinarthur@gmail.com>
|
|
|
|
|
|
| |
(cherry picked from commit c304c9a7efa8751b5bc7526fa95cd5f30aac2b92)
Co-authored-by: scaramallion <scaramallion@users.noreply.github.com>
|
|
|
|
|
| |
(cherry picked from commit 62e40d8450b9c78346ec3617de7fe3f0ad381510)
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
|
|
|
|
|
|
|
| |
fix default `_missing_` to return `None` instead of raising a `ValueError`
Co-authored-by: Andrey Darascheka <andrei.daraschenka@leverx.com>
(cherry picked from commit c95ad7a91fbd7636f33a098d3b39964ab083bf49)
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
|
|
|
|
|
|
|
| |
encoding (GH-20998)
(cherry picked from commit 7f569c9bc0079906012b3034d30fe8abc742e7fc)
Co-authored-by: Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) <thatiparthysreenivas@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ensurepip optionally installs or upgrades 'pip' and 'setuptools' using
the version of those modules bundled with Python. The internal PIP
installation routine by default temporarily uses its cache, if it
exists. This is undesirable as Python builds and installations may be
independent of the user running the build, whilst PIP cache location
is dependent on the user's environment and outside of the build
environment.
At the same time, there's no value in using the cache while installing
bundled modules.
This change disables PIP caching when used in ensurepip.
(cherry picked from commit 4a3a682b12f93a03888e8b59f439bc5fe30d6055)
Co-authored-by: Krzysztof Konopko <kkonopko@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-40630: Add tracemalloc.reset_peak (GH-20102, cherrypick 8b62644)
The reset_peak function sets the peak memory size to the current size,
representing a resetting of that metric. This allows for recording the
peak of specific sections of code, ignoring other code that may have
had a higher peak (since the most recent `tracemalloc.start()` or
tracemalloc.clear_traces()` call).
* Adjust docs to point to 3.9
|
|
|
|
|
|
|
|
|
| |
(GH-20176)" (GH-20182)
This reverts commit 0da546665075aefbb476e192ed64122d340164f4.
The commit is causing make failures on a FreeBSD buildbot.
Due to the imminent 3.9.0b1 cutoff, revert this commit for
now pending further investigation.
|
|
|
|
|
|
| |
Add support to the configure script for OBJC and OBJCXX command line options so that the macOS builds can use the clang compiler for the macOS-specific Objective C source files. This allows third-party compilers, like GNU gcc, to be used to build the rest of the project since some of the Objective C system header files are not compilable by GNU gcc.
Co-authored-by: Jeffrey Kintscher <websurfer@surf2c.net>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
| |
|
|
|
|
| |
This updates ACKS for commit 003708bcf8f2c58d4b65f68318acf164d713e008
contributed by Andrew York.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-20054)
Currently, if asyncio.wait_for() timeout expires, it cancels
inner future and then always raises TimeoutError. In case
those future is task, it can handle cancelation mannually,
and those process can lead to some other exception. Current
implementation silently loses thoses exception.
To resolve this, wait_for will check was the cancelation
successfull or not. In case there was exception, wait_for
will reraise it.
Co-authored-by: Roman Skurikhin <roman.skurikhin@cruxlab.com>
|
|
|
|
|
|
|
| |
compileall is now able to use hardlinks to prevent duplicates in a
case when .pyc files for different optimization levels have the same content.
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
| |
A similar formulation was added in bpo-21596
(db74d982d43d98040e38665d843cbc8de4a082b1) but was lost in bpo-33649
(3faaa8857a42a36383bb18425444e597fc876797).
|
| |
|
|
|
|
|
| |
* bpo-40394 - difflib.SequenceMatched.find_longest_match default args
Added default args to find_longest_match, as well as related tests.
|
|
|
|
|
| |
This PR adds the functionality requested by https://github.com/ericsnowcurrently/multi-core-python/issues/52.
Automerge-Triggered-By: @ericsnowcurrently
|
|
|
| |
require `_generate_next_value_` to be defined before members
|
|
|
|
|
| |
Added str.removeprefix and str.removesuffix methods and corresponding
bytes, bytearray, and collections.UserString methods to remove affixes
from a string if present. See PEP 616 for a full description.
|
|
|
| |
Co-Authored-By: Stefan Tatschner <stefan@rumpelsepp.org>
|
|
|
|
|
| |
whose loader has a get_data method (GH-17385)
This pull request fixes the newline conversion bug originally reported in bpo-1812. When that issue was originally submitted, the open builtin did not default to universal newline mode; now it does, which makes the issue fix simpler, since the only code path that needs to be changed is the one in doctest._load_testfile where the file is loaded from a package whose loader has a get_data method.
|
|
|
| |
Co-authored-by: furkanonder <furkantahaonder@gmail.com>
|
|
|
|
|
|
| |
assignments (GH-19168)
Co-Authored-By: Batuhan Taşkaya <isidentical@gmail.com>
Co-Authored-By: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Update ChainMap to include | and |=
Created __ior__, __or__ and __ror__ methods in ChainMap class.
* Update ACKS
* Update docs
* Update test_collections.py to include test_issue584().
Added testing for | and |= operators for ChainMap objects.
* Update test_union_operators
Renamed test_union operators, fixed errors and style problems raised by brandtbucher.
* Update test_union_operators in TestChainMap
Added testing for union operator between ChainMap and iterable of key-value pairs.
* Update test_union operators in test_collections.py
Gave more descriptive variable names and eliminated unnecessary tmp variable.
* Update test_union_operators in test_collections.py
Added cm3
* Check .maps rather than Chainmap equality.
* Add news entry
* Update Lib/test/test_collections.py
Co-Authored-By: Brandt Bucher <brandtbucher@gmail.com>
* Removed whitespace
* Added Guido's changes
* Fixed Docs
* Removed whitespace
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
|
| |
|
|
|
|
|
|
| |
networks (GH-18757)
The `.hosts()` method now returns the single address present in a /32 or /128 network.
|
|
|
| |
Automerge-Triggered-By: @pablogsal
|
|
|
|
|
|
| |
statements (GH-16994)
|
|
|
|
| |
documents (GH-14912)
|
|
|
|
|
| |
Hold reference of __bases__ tuple until tuple item is done with, because by
dropping the reference the item may be destroyed.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Update math.rst
* Update math.rst
* updated whats new
* Update test_math.py
* Update mathmodule.c
* Update mathmodule.c.h
* Update ACKS
* 📜🤖 Added by blurb_it.
* Update 3.9.rst
* Update 2020-02-18-12-37-16.bpo-39479.j3UcCq.rst
* Update math.rst
* Update 2020-02-18-12-37-16.bpo-39479.j3UcCq.rst
* Update test_math.py
* Update ACKS
* Update mathmodule.c.h
* Update mathmodule.c
* Update mathmodule.c.h
* Update mathmodule.c.h
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-18337)
When `allow_abbrev` was first added, disabling the abbreviation of
long options broke the grouping of short flags ([bpo-26967](https://bugs.python.org/issue26967)). As a fix,
b1e4d1b603 (contained in v3.8) ignores `allow_abbrev=False` for a
given argument string if the string does _not_ start with "--"
(i.e. it doesn't look like a long option).
This fix, however, doesn't take into account that long options can
start with alternative characters specified via `prefix_chars`,
introducing a regression: `allow_abbrev=False` has no effect on long
options that start with an alternative prefix character.
The most minimal fix would be to replace the "starts with --" check
with a "starts with two prefix_chars characters". But
`_get_option_tuples` already distinguishes between long and short
options, so let's instead piggyback off of that check by moving the
`allow_abbrev` condition into `_get_option_tuples`.
https://bugs.python.org/issue39546
|
|
|
|
|
|
| |
The GNU docs describe the `devmajor` and `devminor` fields of the tar
header struct only in the context of character and block special files,
suggesting that in other cases they are not populated. Typical utilities
behave accordingly; this patch teaches `tarfile` to do the same.
|
| |
|
|
|
|
|
| |
Improve multi-threaded performance by dropping the GIL in the fast path
of bytes.join. To avoid increasing overhead for small joins, it is only
done if the output size exceeds a threshold.
|
|
|
| |
`is_tarfile()` now supports `name` being a file or file-like object.
|
|
|
|
|
|
| |
* Reorder the __aenter__ and __aexit__ checks for async with
* Add assertions for async with body being skipped
* Swap __aexit__ and __aenter__ loading in the documentation
|
| |
|
|
|
|
|
|
|
| |
The importlib.metadata documentation uses hardcoded links to internal
pages. This results in minor rendering issues. This change replaces
the hardcoded links with suitable Sphinx roles.
Signed-off-by: Oleg Höfling <oleg.hoefling@gmail.com>
|
| |
|
| |
|
|
|
|
| |
Patch by Karthikeyan Singaravelan.
|
| |
|
|
|
| |
https://bugs.python.org/issue38652
|