| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
(GH-21025)
|
|
|
|
|
| |
(cherry picked from commit 19fcffa92773e008e4f5efb80047420a0cfafeec)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
| |
module. (GH-21009)
Detected by Coverity.
(cherry picked from commit eb0d5c38de7f970d8cd8524f4163d831c7720f51)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
|
|
|
|
|
|
| |
(GH-21002). (GH-21030)
(cherry picked from commit 6989af0bc7ea1e9a1acea16794e6f723d7b44110)
Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
grammar (GH-21020) (GH-21024)
`GET_INVALID_TARGET` might unexpectedly return `NULL`, which if not
caught will cause a SEGFAULT. Therefore, this commit introduces a new
inline function `RAISE_SYNTAX_ERROR_INVALID_TARGET` that always
checks for `GET_INVALID_TARGET` returning NULL and can be used in
the grammar, replacing the long C ternary operation used till now.
(cherry picked from commit 6c4e0bd974f2895d42b63d9d004587e74b286c88)
Automerge-Triggered-By: @pablogsal
|
| |
|
|
|
|
|
|
|
|
| |
Related to https://github.com/pypa/twine/issues/638 and https://github.com/pypa/packaging.python.org/issues/730, I wrote a spec based on the one that was removed in https://github.com/python/cpython/pull/13087. However, a Google search for "pypirc" turned up at least one [blog post](https://truveris.github.io/articles/configuring-pypirc/) that links to https://docs.python.org/3/distutils/packageindex.htmlGH-the-pypirc-file, which now just links to this document. So, I thought a link to the spec would be handy.
Automerge-Triggered-By: @jaraco
(cherry picked from commit af157fad286c00ff204e86d8556648cbb53ba99e)
Co-authored-by: Brian Rutledge <brian@bhrutledge.com>
|
|
|
|
|
|
| |
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
(cherry picked from commit 55460ee6dc9a4f16bd68d6b6be3a8398c7d4a596)
Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 861efc6e8fe7f030b1e193989b13287b31385939)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit a041e116db5f1e78222cbf2c22aae96457372680)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
| |
skip_if_broken_multiprocessing_synchronize() only attempts for create
a semaphore on Linux to fix multiprocessing
test_resource_tracker_reused() on macOS.
(cherry picked from commit 3358da4054b9b0b045eb47dc74dee3d58bfbb1d5)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
|
|
| |
For me as a non native English speaker, the sentence with its embedded clause was very hard to understand.
modified: Lib/email/utils.py
Automerge-Triggered-By: @csabella
(cherry picked from commit 66a65ba43cb3e68a43e32469c988dd7a6cff049c)
Co-authored-by: Jürgen Gmach <juergen.gmach@googlemail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-20973)
* bpo-40334: Produce better error messages on invalid targets (GH-20106)
The following error messages get produced:
- `cannot delete ...` for invalid `del` targets
- `... is an illegal 'for' target` for invalid targets in for
statements
- `... is an illegal 'with' target` for invalid targets in
with statements
Additionally, a few `cut`s were added in various places before the
invocation of the `invalid_*` rule, in order to speed things
up.
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
(cherry picked from commit 01ece63d42b830df106948db0aefa6c1ba24416a)
|
|
|
|
|
|
|
|
|
|
| |
(GH-20944) (GH-20962)
On Linux, skip tests using multiprocessing if the current user cannot
create a file in /dev/shm/ directory. Add the
skip_if_broken_multiprocessing_synchronize() function to the
test.support module.
(cherry picked from commit ddbeb2f3e02a510c5784ffd74c5e09e8c70b5881)
|
|
|
|
|
| |
Co-authored-by: Kyle Stanley <aeros167@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
(cherry picked from commit 2c4928d37edc5e4aeec3c0b79fa3460b1ec9b60d)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-20951)
…-20937)
test_hashlib emits some warnings when it cannot find some hashes
as it assumes they failed to compile. Since we can disable hashes
through configure, we emit the warnings only in the case that we
did not intentionaly disable them.
Automerge-Triggered-By: @tiran
(cherry picked from commit 236a0f5)
Co-authored-by: stratakis <cstratak@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Fix test_copyreg when numpy is installed: test.pickletester now
saves/restores warnings.filters when importing numpy, to ignore
filters installed by numpy.
Add the save_restore_warnings_filters() function to the
test.support.warnings_helper module.
(cherry picked from commit 8362893e3fe083df2ec8bb94c28b1a78383eadbf)
|
|
|
|
|
|
| |
Co-authored-by: Arfrever Frehtes Taifersar Arahesis <arfrever.fta@gmail.com>
(cherry picked from commit de4304dad8e035dbbb57d653e685312eead816df)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
|
|
|
|
|
|
| |
line (GH-20875) (GH-20919)
(cherry picked from commit 51c5896b6205911d29ac07f167ec7f3cf1cb600d)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
|
|
| |
C and Python coverage jobs of Travis CI are no longer run on pull
requests, only on branches like master.
(cherry picked from commit fc710ee266e9461fdba9933ec6004318db588820)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
|
|
| |
(GH-20888)
When a file ends with a line that contains a line continuation character
the text of the emitted SyntaxError is empty, contrary to the old
parser, where the error text contained the text of the last line.
(cherry picked from commit 113e2b0a07c72c0d5e3489076afb14f6b3ad1049)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 5f79f46612c351bde78a41c5264c42db21008868)
Co-authored-by: Xavier Fernandez <xav.fernandez@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Windows, GH-include "pyerrors.h" no longer defines "snprintf" and
"vsnprintf" macros.
PyOS_snprintf() and PyOS_vsnprintf() should be used to get portable
behavior.
Replace snprintf() calls with PyOS_snprintf() and replace vsnprintf()
calls with PyOS_vsnprintf().
(cherry picked from commit e822e37946f27c09953bb5733acf3b07c2db690f)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
Modify the help in cpython/PC/launcher.c to show users that "latest" can be overridden by shebang, PY_PYTHON[n] or py.ini files. Also show that script [args] is optional by enclosing in square brackets.
Automerge-Triggered-By: @zooba
(cherry picked from commit b3e6783423f58597419abae343dd1d5dcc02a7e3)
Co-authored-by: Steve (Gadget) Barnes <gadgetsteve@live.co.uk>
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Python 3.7 the behavior of parse_multipart changed requiring CONTENT-LENGTH
header, this fix remove this header as required and fix FieldStorage
read_lines_to_outerboundary, by not using limit when it's negative,
since by default it's -1 if not content-length and keeps substracting what
was read from the file object.
Also added a test case for this problem.
(cherry picked from commit d8cf3514dd4682419a66f6e834bb384ee34afc95)
Co-authored-by: roger <rogerduran@gmail.com>
|
|
|
|
|
|
| |
bpo-40910, bpo-40953: PyConfig_Clear() clears _orig_argv.
(cherry picked from commit e2d47a0568c6da9229580829917fd6aa702133b3)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
| |
(cherry picked from commit fb61c42)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 78319e373d57cd4da67660f888aa7092efbd6f24)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
| |
loaders (GH-20820)
Remove protocol that loaders can present a files method as found in importlib_resources 1.3-1.6 (added in Python 3.8b1).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using a log2n way to fill a much smaller buffer, and receiving in a cleaner way with EOF.
The failing test was reproducible using the following command thanks to @aeros :
```bash
./python -m test test_asyncio.test_sock_lowlevel --match test_sock_client_racing -j100 -F -v
```
According to test results, we may still need to bump the timeout:
https://github.com/python/cpython/blob/5aad027db9618f22f6fa2274e05dd50f928d2ed7/Lib/test/test_asyncio/test_sock_lowlevel.pyGH-L256-L257
(cherry picked from commit 8f04a84755babe516ebb5304904ea7c15b865c80)
Co-authored-by: Fantix King <fantix.king@gmail.com>
|
|
|
|
| |
(GH-20866)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(GH-20859)
(cherry picked from commit dea3223740127ac13f984c1d38f127ab6701af44)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Automerge-Triggered-By: @brettcannon
|
| |
|
|
|
|
|
|
| |
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 9672912e8f90374fd31b37ca0fb7cefbc6f4c555)
Co-authored-by: Christian Heimes <christian@python.org>
|
|
|
|
|
| |
(cherry picked from commit 29c117202e386bad1d66ae336e2fefa1a1809ee0)
Co-authored-by: An Long <aisk@users.noreply.github.com>
|
|
|
|
|
| |
(cherry picked from commit 80d827c3cb041ae72b9b0572981c50bdd1fe2cab)
Co-authored-by: Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) <thatiparthysreenivas@gmail.com>
|
|
|
|
|
|
| |
Remote host cyrus.andrew.cmu.edu is blocking incoming connections and is
causing test suite to fail.
Signed-off-by: Christian Heimes <christian@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
```
Direct leak of 8 byte(s) in 1 object(s) allocated from:
GH-0 0x7f008bf19667 in __interceptor_malloc (/lib64/libasan.so.6+0xb0667)
GH-1 0x7f007a0bee4a in subprocess_fork_exec /home/heimes/dev/python/cpython/Modules/_posixsubprocess.c:774
GH-2 0xe0305b in cfunction_call Objects/methodobject.c:546
```
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 0d3350daa8123a3e16d4a534b6e873eb12c10d7c)
Co-authored-by: Christian Heimes <christian@python.org>
|
|
|
|
|
|
|
|
| |
Use Sphinx role markup for `str.format`.
Automerge-Triggered-By: @csabella
(cherry picked from commit e2fb8a2c42ee60c72a40d93da69e9efc4e359023)
Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Followup of bpo-40854, there is one remaining usage of PLATLIBDIR
which should be replaced by config->platlibdir.
test_sys checks that sys.platlibdir attribute exists and is a string.
Update Makefile: getpath.c and sysmodule.c no longer need PLATLIBDIR
macro, PyConfig.platlibdir member is used instead.
Co-authored-by: Sandro Mani <manisandro@gmail.com>
(cherry picked from commit d72b9644a3e6eec83be48b1ebc2ec6ca776134d3)
|
|
|
|
|
|
|
|
|
|
|
| |
The GDB provided by HPE on HP-UX contains a modified version string. Therefore
the tests fail. Adapt the regex to match that string.
Patch by Michael Osipov.
Co-Authored-by: Michael Osipov <michael.osipov@siemens.com>
(cherry picked from commit b2dca49ca3769cb60713f5c2b43e5d5bbdc1f9c7)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
| |
(cherry picked from commit 9727694f08cad4b019d2939224e3416312b1c0e1)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A line with only a line continuation character should be considered
a blank line at tokenizer level so that only a single NEWLINE token
gets emitted. The old parser was working around the issue, but the
new parser threw a `SyntaxError` for valid input. For example,
an empty line following a line continuation character was interpreted
as a `SyntaxError`.
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
(cherry picked from commit 896f4cf63f9ab93e30572d879a5719d5aa2499fb)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The doccumentation at https://docs.python.org/3.10/library/weakref.html cautions that the `WeakKeyDictionary` and `WeakValueDictionary` are susceptible to the problem of dictionary mutation during iteration.
These notes present the user with a problem that has no easy solution.
I dug into the implementation and found that fortunately, Antoine Pitrou already addressed this challenge (10 years ago!) by introducing an `_IterationGuard` context manager to the implementation, which delays mutation while an iteration is in progress.
I asked for confirmation and @pitrou agreed that these notes could be removed:
https://github.com/python/cpython/commit/c1baa601e2b558deb690edfdf334fceee3b03327GH-commitcomment-39514438
(cherry picked from commit 1642c0ef750f96664a98cadb09301d492098d2fb)
Co-authored-by: Daniel Fortunov <asqui@users.noreply.github.com>
|
|
|
|
|
|
| |
test_binhex now uses import_fresh_module() to ensure that it raises
DeprecationWarning each time.
(cherry picked from commit 9c24e2e4c10705d95258558348417a28007dac66)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
test_repl.test_close_stdin() now calls
support.suppress_msvcrt_asserts() to fix the test on Windows.
* Move suppress_msvcrt_asserts() from test.libregrtest.setup to
test.support. Make its verbose parameter optional: verbose=False by
default.
* SuppressCrashReport now uses SetErrorMode() of the msvcrt module,
rather than using ctypes.
* Remove also an unused variable (deadline) in wait_process().
(cherry picked from commit f6e58aefde2e57e4cb11ea7743955da53a3f1e80)
|