| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Like Python, IDLE optionally runs one startup file in the Shell window
before presenting the first interactive input prompt. For IDLE,
option -s runs a file named in environmental variable IDLESTARTUP or
PYTHONSTARTUP; -r file runs file. Python sets __file__ to the startup
file name before running the file and unsets it before the first
prompt. IDLE now does the same when run normally, without the -n
option.
(cherry picked from commit 22c82be5df70c3d51e3f89b54fe1d4fb84728c1e)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
|
|
|
|
|
|
| |
(GH-5701)
(cherry picked from commit 74382a3f175ac285cc924a73fd758e8dc3cc41bb)
Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Prevent low-grade poplib REDOS (CVE-2018-1060)
The regex to test a mail server's timestamp is susceptible to
catastrophic backtracking on long evil responses from the server.
Happily, the maximum length of malicious inputs is 2K thanks
to a limit introduced in the fix for CVE-2013-1752.
A 2KB evil response from the mail server would result in small slowdowns
(milliseconds vs. microseconds) accumulated over many apop calls.
This is a potential DOS vector via accumulated slowdowns.
Replace it with a similar non-vulnerable regex.
The new regex is RFC compliant.
The old regex was non-compliant in edge cases.
* Prevent difflib REDOS (CVE-2018-1061)
The default regex for IS_LINE_JUNK is susceptible to
catastrophic backtracking.
This is a potential DOS vector.
Replace it with an equivalent non-vulnerable regex.
Also introduce unit and REDOS tests for difflib.
Co-authored-by: Tim Peters <tim.peters@gmail.com>
Co-authored-by: Christian Heimes <christian@python.org>.
(cherry picked from commit 0e6c8ee2358a2e23117501826c008842acb835ac)
|
|
|
|
|
| |
(cherry picked from commit 13cfd57dcf58485d6242fd8118c6ea4b10e29aab)
Co-authored-by: Joongi Kim <me@daybreaker.info>
|
|
|
|
|
|
|
| |
tests. (GH-5930). (GH-5958)
(cherry picked from commit b21d155f57d284aecf9092a9bd24258293965c2f)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 3e197c7a6740d564ad52fb7901c07d5ff49460f5)
Co-authored-by: Alexey Izbyshev <izbyshev@users.noreply.github.com>
|
|
|
|
|
|
| |
The new code also runs faster.
(cherry picked from commit f0daa880a405c8de6743e44fa46006754aa145c9)
Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 0954c9e9c8fbea452f56120df592f2061d3209c7)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
|
|
|
|
|
|
| |
encoding. (GH-5832). (GH-5906)
(cherry picked from commit 6f600ff1734ca2fdcdd37a809adf8130f0d8cc4e)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 72d9b2be36f091793ae7ffc5ad751f040c6e6ad3)
Co-authored-by: Joffrey F <f.joffrey@gmail.com>
|
|
|
|
|
|
|
| |
(GH-4745)
(cherry picked from commit eee72d4778a5513038edd5236cdd87ccce2bc60a)
Co-authored-by: Tobotimus <Tobotimus@users.noreply.github.com>
|
|
|
| |
(cherry picked from commit 63ae04461fb0cc93ca57cd151103a8dd295581d6)
|
|
|
|
|
| |
(#5504)" (#5911)
This reverts commit a71397fb6603d0fe673acd7765c74699cd28fe7b.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
dictview_repr(): Use a Py_ReprEnter() / Py_ReprLeave() pair to check
for recursion, and produce "..." if so.
test_recursive_repr(): Check for the string rather than a
RecursionError. (Test cannot be any tighter as contents are
implementation-dependent.)
test_deeply_nested_repr(): Add new test, replacing the original
test_recursive_repr(). It checks that a RecursionError is raised in
the case of a non-recursive but deeply nested structure. (Very
similar to what test_repr_deep() in test/test_dict.py does for a
normal dict.)
OrderedDictTests: Add new test case, to test behavior on OrderedDict
instances containing their own values() or items().
(cherry picked from commit d7773d92bd11640a8c950d6c36a9cef1cee36f96)
|
|
|
|
|
|
|
| |
(GH-4041)
(cherry picked from commit fbee88244e8921afdb29fde51a9a010a8ae18277)
Co-authored-by: Mario Corchero <mariocj89@gmail.com>
|
|
|
|
|
|
| |
By default `print` adds spaces between its arguments.
(cherry picked from commit 84c4b0cc67ceb4b70842b78c718b6e8214874d6a)
Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
|
|
|
|
|
|
| |
This code never did anything correct or useful. The class attribute will never be affected, and the condition will never be true.
(cherry picked from commit 5fb632e83136399bad9427ee23ec8b771695290a)
Co-authored-by: Aaron Gallagher <habnabit@users.noreply.github.com>
|
|
|
|
|
|
| |
Signed-off-by: Christian Heimes <christian@python.org>.
(cherry picked from commit 29eab55309b9f78b79074d26db16a44e7841c639)
Co-authored-by: Christian Heimes <christian@python.org>
|
|
|
|
|
|
|
|
|
| |
The ctypes module used to depend on indirect linking for dlopen. The shared
extension is now explicitly linked against libdl on platforms with dl.
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 5bb9692575f10f4a7c7f1c2c0c70956baf6d5c23)
Co-authored-by: Christian Heimes <christian@python.org>
|
|
|
|
|
|
|
|
|
| |
The ssl module now detects missing NPN support in LibreSSL.
Co-Authored-By: Bernard Spil <brnrd@FreeBSD.org>
Signed-off-by: Christian Heimes <christian@python.org>.
(cherry picked from commit 6cdb7954b0a578d899e4b78b868ea59eef08480a)
Co-authored-by: Christian Heimes <christian@python.org>
|
|
|
|
|
|
| |
The SSL module no longer sends IP addresses in SNI TLS extension on
platforms with OpenSSL 1.0.2+ or inet_pton.
Signed-off-by: Christian Heimes <christian@python.org>
|
|
|
|
|
|
| |
The 'optimization' is for space in the executable file, not for run time.
(cherry picked from commit 186b606d8a2ea4fd51b7286813302c8e8c7006cc)
Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
|
|
|
|
|
|
|
| |
Debian Unstable has disabled TLS 1.0 and 1.1 for SSLv23_METHOD(). Change
TLS/SSL protocol of some tests to PROTOCOL_TLS or PROTOCOL_TLSv1_2 to
make them pass on Debian.
Signed-off-by: Christian Heimes <christian@python.org>
|
|
|
|
|
| |
(cherry picked from commit 42c35d9c0c8175332f50fbe034a001fe52f057b9)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
| |
Adjust tests and user modules to match.
(cherry picked from commit c29c03a34a9f3c82704b66f323ce5ea9dc89c8af)
Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
|
|
|
|
|
|
|
| |
`whilst` and `while` are both english words, `whilst` is not as commonly used.
This can be confusing to readers whose primary language is not english.
(cherry picked from commit 98f42aac23f3863973cb6e9964c5212cfd3a1d98)
Co-authored-by: Mariatta <Mariatta@users.noreply.github.com>
|
|
|
|
|
|
|
| |
Make test.support.temp_cwd() fork-safe. The context manager test.support.temp_cwd() no longer removes the temporary directory when executing in a process other than the parent it entered from.
If a forked child exits the context manager it won't do the cleanup..
(cherry picked from commit 33dddac00ba8d9b72cf21b8698504077eb3c23ad)
Co-authored-by: Anselm Kruis <a.kruis@science-computing.de>
|
|
|
|
|
| |
(cherry picked from commit 0febc053736112d7bb9081742b3ac0ece7b973e7)
Co-authored-by: cocoatomo <cocoatomo77@gmail.com>
|
|
|
|
| |
Python (GH-5756) (#5818)
|
|
|
|
|
|
| |
(cherry picked from commit 2b44e302ec3079363c4d5c875677945953705c58)
Co-authored-by: Aaron Hall, MBA <aaronchall@yahoo.com>
|
|
|
|
|
|
| |
dump is similar to print but less flexible. lastopenbracketpos is now always initialized in _study2, as was stmt_bracketing, so the class settings are not needed. get_last_open_bracket_pos is never called.
(cherry picked from commit 451d1edaf4d27c4e632d81246d308e8dd6ea945f)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
|
|
|
|
|
| |
There are no code changes other than comments and docstrings.
(cherry picked from commit c84cf6c03fce1fb73bfaf91d7909f1c2708f14a2)
Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
|
|
|
|
|
|
|
| |
Py_ADDRESS_IN_RANGE was renamed address_in_range in 3.6
(commit 3924f93794fd740c547b44884f73303196475cd5).
(cherry picked from commit ba518804bf4c1ea01df5e622b333d3116cbaa3bd)
Co-authored-by: Paul Price <price@astro.princeton.edu>
|
|
|
|
|
|
|
| |
It's bad form to pin to an old version of TLS. ssl.SSLContext has the right
protocol default, so let's not pass anyway.
(cherry picked from commit e9edee0b65650c4f9db90cefc2e9a8125bad762c)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
|
|
|
|
|
| |
(cherry picked from commit 52c6b89796a7ec391db20281e05b256f57e97b35)
Co-authored-by: Harshul jain <harshulrobo@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
os.dup2() tests for dup3() system call availability at runtime,
but doesn't remember the result across calls, repeating
the test on each call with inheritable=False.
Since the caller of os.dup2() is expected to hold the GIL,
fix this by making the variable holding the test result static.
(cherry picked from commit b3caf388a0418f6c031e4dbdcc0c1ce7e5cc36bd)
Co-authored-by: Alexey Izbyshev <izbyshev@users.noreply.github.com>
|
|
|
|
|
|
|
| |
If the directory already exists, it will be re-used.
(cherry picked from commit e8eb972514cad6086b752754c1d34d703c04dd82)
Co-authored-by: TROUVERIE Joachim <joachim.trouverie@linoame.fr>
|
|
|
|
|
|
|
|
|
| |
chunk is not found (GH-5240)
Initialize self._ssnd_chunk so that aifc.Error is raised as intended,
not AttributeError.
(cherry picked from commit 80d20b918bd8a882043c493a7f958333ecb41727)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
|
|
|
|
|
|
|
| |
PySequence_Length() (GH-5767)
Dropped the part that says: "For objects that do not provide sequence protocol".
(cherry picked from commit 7a1e1786f98ad49caa157dcdf14ada9d0b07d0fd)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 6240917b773b52f8883387b9e3a5f327a4372068)
Co-authored-by: Steve Dower <steve.dower@microsoft.com>
|
|
|
|
|
| |
(cherry picked from commit 5537646bfacec463b450871dde31cb06c44a0556)
Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 4c7108a77144493d0aa6fc0105b67d3797e143f5)
Co-authored-by: pmp-p <pmp-p@users.noreply.github.com>
|
|
|
|
|
| |
(cherry picked from commit 08a6926b2584040fe3c3f06263b0b5f1fbbdc24c)
Co-authored-by: Éric Araujo <merwok@netwok.org>
|
|
|
|
|
| |
(cherry picked from commit dfa015cf77a148d229ddc0a5b063562c9f9664f2)
Co-authored-by: chason <chason@gmail.com>
|
|
|
| |
(cherry picked from commit 7eb3f8226ea7b79dae4e4e8b05730cfe0d9af7c1)
|
|
|
|
|
|
|
| |
This function expects the destination buffer size to be given
in wide characters, not bytes.
(cherry picked from commit b3b4a9d3001f1fc7df8efcccdce081de54fa5eab)
Co-authored-by: Alexey Izbyshev <izbyshev@users.noreply.github.com>
|
| |
|
|
|
|
| |
Also, use PYTHON_FOR_REGEN for clinic and blake2s_impl.c rather than PYTHON_FOR_BUILD, and update .travis.yml to make use of the change.
(cherry picked from commit d6ff8a7037903497eff95fa32bdac2b6adf71505)
|