Commit Graph

44095 Commits

Author SHA1 Message Date
Miss Islington (bot) 8200ee6669
bpo-42794: Update test_nntplib to use offical group name for testing (GH-24037) (GH-24041)
(cherry picked from commit ec3165320e)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
2021-01-01 13:37:35 -05:00
Serhiy Storchaka 225e365955
[3.7] bpo-42103: Improve validation of Plist files. (GH-22882) (#23117)
* Prevent some possible DoS attacks via providing invalid Plist files
  with extremely large number of objects or collection sizes.
* Raise InvalidFileException for too large bytes and string size instead of returning garbage.
* Raise InvalidFileException instead of ValueError for specific invalid datetime (NaN).
* Raise InvalidFileException instead of TypeError for non-hashable dict keys.
* Add more tests for invalid Plist files..
(cherry picked from commit 34637a0ce2)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-11-10 14:54:15 -05:00
Miss Skeleton (bot) 43e5231038
bpo-41944: No longer call eval() on content received via HTTP in the CJK codec tests (GH-22566) (GH-22578)
(cherry picked from commit 2ef5caa58f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-10-19 22:38:40 -04:00
Ned Deily e512bc799e
bpo-42051: Reject XML entity declarations in plist files (#22760) (GH-22801)
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2020-10-19 22:36:27 -04:00
Pablo Galindo 9b5a023a5d
[3.7] bpo-41976: Fix the fallback to gcc of ctypes.util.find_library when using gcc>9 (GH-22598). (GH-22601)
(cherry picked from commit 27ac19cca2)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-10-08 19:50:37 +01:00
Ned Deily 13c94747c7
3.7.9 2020-08-15 01:20:16 -04:00
Ned Deily a0ad829596
bpo-41100: additional fixes for testing on macOS 11 Big Sur Intel
Note: macOS 11 is not yet released, this release of Python is not
fully supported on 11.0, and not all tests pass.
2020-08-15 01:08:56 -04:00
Miss Islington (bot) cf79cbf447
bpo-33786: Fix asynchronous generators to handle GeneratorExit in athrow() (GH-7467) (GH-21878)
(cherry picked from commit 52698c7ad9)

Co-authored-by: Yury Selivanov <yury@magic.io>
2020-08-14 05:44:00 -04:00
Miss Islington (bot) ca75fec1ed
bpo-39603: Prevent header injection in http methods (GH-18485) (GH-21538)
reject control chars in http method in http.client.putrequest to prevent http header injection
(cherry picked from commit 8ca8a2e8fb)

Co-authored-by: AMIR <31338382+amiremohamadi@users.noreply.github.com>
2020-07-19 05:27:35 -04:00
Steve Dower 4bfcffe16e
bpo-41304: Ensure python3x._pth is loaded on Windows (GH-21495) (#21499) 2020-07-15 18:24:56 -04:00
Miss Islington (bot) 79c6b602ef
bpo-39017: Avoid infinite loop in the tarfile module (GH-21454) (GH-21484)
Avoid infinite loop when reading specially crafted TAR files using the tarfile module
(CVE-2019-20907).
(cherry picked from commit 5a8d121a1f)

Co-authored-by: Rishi <rishi_devan@mail.com>
2020-07-15 08:35:08 -04:00
Miss Islington (bot) 620e276a8c
bpo-41288: Fix a crash in unpickling invalid NEWOBJ_EX. (GH-21458) (GH-21461)
Automerge-Triggered-By: @tiran
(cherry picked from commit 4f309abf55)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-07-13 14:17:01 -04:00
Tapas Kundu b98e7790c7
[3.7] bpo-41004: Resolve hash collisions for IPv4Interface and IPv6Interface (GH-21033) (GH-21231)
CVE-2020-14422
The __hash__() methods of classes IPv4Interface and IPv6Interface had issue
of generating constant hash values of 32 and 128 respectively causing hash collisions.
The fix uses the hash() function to generate hash values for the objects
instead of XOR operation
(cherry picked from commit b30ee26e36)

Co-authored-by: Ravi Teja P <rvteja92@gmail.com>

Signed-off-by: Tapas Kundu <tkundu@vmware.com>
2020-06-30 15:20:21 -04:00
Christian Heimes d3798ed9f1
[3.7] bpo-41009: fix requires_OS_version() class decorator (GH-20942) (GH-20949)
Signed-off-by: Christian Heimes <christian@python.org>

Automerge-Triggered-By: @tiran.
(cherry picked from commit bb6ec14479)

Co-authored-by: Christian Heimes <christian@python.org>
2020-06-25 08:11:13 -04:00
Ned Deily 5f3933d61d
3.7.8rc1 2020-06-17 04:48:12 -04:00
Miss Islington (bot) 678ffc4281
bpo-38488: Upgrade bundled versions of pip & setuptools (GH-20491) (GH-20900)
Co-authored-by: Xavier Fernandez <xav.fernandez@gmail.com>
(cherry picked from commit e63cc2f646)

Co-authored-by: Ned Deily <nad@python.org>
2020-06-15 15:01:19 -07:00
Miss Islington (bot) b46beb25e4
bpo-40448: ensurepip: Do not use cache (GH-19812)
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 4a3a682b12)

Co-authored-by: Krzysztof Konopko <kkonopko@users.noreply.github.com>
2020-06-15 10:44:34 -07:00
Miss Islington (bot) aa83935a56
[3.7] bpo-34226: fix cgi.parse_multipart without content_length (GH-8530) (GH-20892)
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 d8cf3514dd)


Co-authored-by: roger <rogerduran@gmail.com>

Automerge-Triggered-By: @ned-deily
2020-06-15 08:33:32 -07:00
Christian Heimes 0abb70ec93
bpo-40964: disable remote IMAP tests (GH-20836)
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>
2020-06-12 15:10:43 -04:00
Miss Islington (bot) ebd44003c9
bpo-40025: Require _generate_next_value_ to be defined before members (GH-19762)
require `_generate_next_value_` to be defined before members
(cherry picked from commit d9a43e20fa)
2020-06-11 14:48:47 -07:00
Miss Islington (bot) f881c86975
bpo-29620: iterate over a copy of sys.modules (GH-4800) (GH-20817)
unittest.TestCase.assertWarns no longer raises a RuntimeException
when accessing a module's ``__warningregistry__`` causes importation of a new
module, or when a new module is imported in another thread.
(cherry picked from commit 46398fba4d)

Co-authored-by: kernc <kerncece@gmail.com>
2020-06-11 14:34:42 -04:00
Miss Islington (bot) 4b378acb97
Add quotes to code to be a string 2020-06-09 05:39:01 -07:00
Stefan Krah 22faf6ad3b
[3.7] Revert bpo-39576: Prevent memory error for overly optimistic precisions (GH-20748)
This reverts commit c6f95543b4.
2020-06-09 01:55:47 +02:00
Miss Islington (bot) 12d3061c78
[3.8] bpo-40807: Backport test_codeop change [GH-19670]
A tiny sliver of a 3.9 PEG parser patch needed to backport the test added by GH-20486.
(cherry picked from commit a5d6aba318)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-06-04 23:00:47 -04:00
Miss Islington (bot) 911c35d5d3
bpo-40767: Allow pure Wayland to get default XDG web browser (GH-20382)
Would be nice to backport to python 3.7+. I don't think it's worth the hassle to backport this all the way down to 3.10. But I'll let the maintainers decide.

This is hard to test because the test setup already includes this [environment variable](https://github.com/python/cpython/blob/master/Lib/test/pythoninfo.pyGH-L292)

Let me know if something doesn't match the PR guidelines. This is my first PR in the python source code.
(cherry picked from commit c822efeda9)

Co-authored-by: Jeremy Attali <jeremy.attali@gmail.com>
2020-06-03 06:01:23 -07:00
Miss Islington (bot) 80b6a05d38
bpo-39885: Make IDLE context menu cut and copy work again (GH-18951)
Leave selection when right click within.  This exception to clearing selections when right-clicking was omitted from the previous commit, 4ca060d.  I did not realize that this completely disabled the context menu entries, and  I should have merged a minimal fix immediately.  An automated test should follow.
(cherry picked from commit 97e4e0f53d)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-05-29 16:11:28 -07:00
Miss Islington (bot) 852e8a7ed4
[3.8] bpo-25872: Fix KeyError in linecache when multithreaded (GH-18007) (GH-20092)
Backporting to 3.8 and adding a NEWS item (I should have added one to the master branch -- oh well).
(cherry picked from commit b86636bff4)

Co-authored-by: Andrew Kuchling <amk@amk.ca>
2020-05-29 05:17:42 -07:00
Miss Islington (bot) 5f977e09e8
bpo-39040: Fix parsing of email mime headers with whitespace between encoded-words. (gh-17620)
* bpo-39040: Fix parsing of email headers with encoded-words inside a quoted string.

It is fairly common to find malformed mime headers (especially content-disposition
headers) where the parameter values, instead of being encoded to RFC
standards, are "encoded" by doing RFC 2047 "encoded word" encoding, and
then enclosing the whole thing in quotes.  The processing of these malformed
headers was incorrectly leaving the spaces between encoded words in the decoded
text (whitespace between adjacent encoded words is supposed to be stripped on
decoding).  This changeset fixes the encoded word processing inside quoted strings
(bare-quoted-string) to do correct RFC 2047 decoding by stripping that
whitespace.
(cherry picked from commit 21017ed904)

Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
2020-05-29 04:43:47 -07:00
Miss Islington (bot) 1c4dcafd0b
bpo-13097: ctypes: limit callback to 1024 arguments (GH-19914)
ctypes now raises an ArgumentError when a callback
is invoked with more than 1024 arguments.

The ctypes module allocates arguments on the stack in
ctypes_callproc() using alloca(), which is problematic
when large numbers of arguments are passed. Instead
of a stack overflow, this commit raises an ArgumentError
if more than 1024 parameters are passed.
(cherry picked from commit 29a1384c04)

Co-authored-by: Sean Gillespie <sean@swgillespie.me>
2020-05-27 08:51:23 -07:00
Miss Islington (bot) a93bf82980
bpo-39073: validate Address parts to disallow CRLF (GH-19007)
Disallow CR or LF in email.headerregistry.Address arguments to guard against header injection attacks.
(cherry picked from commit 614f17211c)

Co-authored-by: Ashwin Ramaswami <aramaswamis@gmail.com>
2020-05-27 06:38:14 -07:00
Miss Islington (bot) 4ea8028684
[3.8] bpo-35714: Reject null characters in struct format strings (GH-16928) (GH-20419)
struct.error is now raised if there is a null character in a struct
format string.
(cherry picked from commit 3f59b55316)
(cherry picked from commit 5ff5edfef6)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2020-05-26 02:16:36 -07:00
Terry Jan Reedy 3269a0e56b
bpo-37309: Update NEWS.txt for 3.7.8 (GH-20353) 2020-05-24 09:40:19 -04:00
Miss Islington (bot) 82397e2d97
bpo-40723: Make IDLE autocomplete test run without __main__.__file__ (GH-20311)
This was the only failure running unittest.main(test.test_idle) after imports.
(cherry picked from commit 905b3cd05f)

Co-authored-by: Florian Dahlitz <f2dahlitz@freenet.de>
2020-05-24 04:12:11 -07:00
Batuhan Taskaya 43300148c5
[3.7] bpo-40663: Correctly handle annotations with subscripts in ast_unparse.c (GH-20156). (GH-20192)
(cherry picked from commit 2135e10dc7)

Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
2020-05-22 23:32:34 +01:00
Miss Islington (bot) e91032b677
s/wakup/wakeup (GH-20250)
(as title)

Automerge-Triggered-By: @Mariatta
(cherry picked from commit f2947e354c)

Co-authored-by: Kunal Bhalla <bhalla.kunal@gmail.com>
2020-05-20 10:59:00 -07:00
Miss Islington (bot) 7ef2751609
bpo-40055: test_distutils leaves warnings filters unchanged (GH-20095)
distutils.tests now saves/restores warnings filters to leave them
unchanged. Importing tests imports docutils which imports
pkg_resources which adds a warnings filter.
(cherry picked from commit 6e57237faf)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-05-15 09:22:54 -07:00
Miss Islington (bot) c1203b75ff
bpo-38872: Document exec symbol for codeop.compile_command (GH-20047) (#20099)
* Document exec symbol for codeop.compile_command

* Remove extra statements

Co-authored-by: nanjekyejoannah <joannah.nanjekye@ibm.com>
(cherry picked from commit 7ba1f75f3f)

Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>

Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>
2020-05-14 22:19:38 -03:00
Miss Islington (bot) 61b49a00e7
bpo-40561: Add docstrings for webbrowser open functions (GH-19999)
Co-authored-by: Brad Solomon <brsolomon@deloitte.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit ef7973a981)

Co-authored-by: Brad Solomon <brad.solomon.1124@gmail.com>
2020-05-11 12:06:32 -07:00
Miss Islington (bot) 8ddf915438
bpo-40459: Fix NameError in platform.py (GH-19855)
(cherry picked from commit 1e7e4519a8)

Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
2020-05-04 19:51:33 -07:00
Miss Islington (bot) 4eec39a98c
bpo-40419: timeit CLI docs now mention 1,2,5,10,... trials instead of powers of 10 (GH-19752)
(cherry picked from commit 766352320f)

Co-authored-by: Sander <svr003@gmail.com>
2020-05-02 09:29:49 -07:00
Miss Islington (bot) 48ef06b626
bpo-40443: Remove unused imports in idlelib (GH-19801)
(cherry picked from commit 6900f16d22)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-04-29 18:45:54 -07:00
Miss Islington (bot) beba1a8080
bpo-40436: Fix code parsing gdb version (GH-19792)
test_gdb and test.pythoninfo now check gdb command exit code.
(cherry picked from commit ec9bea4a37)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-04-29 08:30:46 -07:00
Miss Islington (bot) adb1f85348
[3.8] bpo-40431: Fix syntax typo in turtledemo (GH-19777) (GH-19784)
[3.8] bpo-40431: Fix syntax typo in turtledemo (GH-19777)

* Addresses a syntax typo that mistakenly used a undefined string prefix due to a missing space.

(cherry picked from commit 49f70db83e)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
(cherry picked from commit cc011b5190)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
2020-04-29 02:42:05 -07:00
Victor Stinner fd32a0e2ee
[3.7] bpo-38546: Backport multiprocessing tests fixes from master (GH-19689)
* bpo-37421: multiprocessing tests call _run_finalizers() (GH-14527)

multiprocessing tests now call explicitly _run_finalizers() to remove
immediately temporary directories created by
multiprocessing.util.get_temp_dir().
(cherry picked from commit 039fb49c18)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
(cherry picked from commit 632cb36084)

* bpo-37421: multiprocessing tests now stop ForkServer (GH-14601)

multiprocessing tests now stop the ForkServer instance if it's
running: close the "alive" file descriptor to ask the server to stop
and then remove its UNIX address.
(cherry picked from commit 8fbeb14312)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
(cherry picked from commit 229f6e85f8)

* bpo-38546: multiprocessing tests stop the resource tracker (GH-17641) (GH-17647)

Multiprocessing and concurrent.futures tests now stop the resource
tracker process when tests complete.

Add ResourceTracker._stop() method to
multiprocessing.resource_tracker.

Add _cleanup_tests() helper function to multiprocessing.util: share
code between multiprocessing and concurrent.futures tests.

(cherry picked from commit 9707e8e22d)
(cherry picked from commit 35acb35972)

* Remove NEWS about resource tracker

Python 3.7 multiprocessing does not have resource tracker.

Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
2020-04-24 00:44:08 +02:00
Victor Stinner 857d573257
bpo-39932: Fix multiprocessing test_heap() (GH-19690)
bpo-32759, bpo-39932: Fix multiprocessing test_heap():
a new Heap object is now created for each test run.

Partial backport of commit e4679cd644
by Antoine Pitrou.
2020-04-24 00:20:00 +02:00
Miss Islington (bot) e7f8684ef7
bpo-38360: macOS: support alternate form of -isysroot flag (GH-16480)
It is possible to use either '-isysroot /some/path' (with a space) or
'-isysroot/some/path' (no space in between). Support both forms in
places where special handling of -isysroot is done, rather than just
the first form.
Co-authored-by: Ned Deily <nad@python.org>
(cherry picked from commit b310700976)

Co-authored-by: Joshua Root <jmr@macports.org>
2020-04-22 09:27:24 -07:00
Miss Islington (bot) de5dcfa3bc
bpo-40138: Fix Windows os.waitpid() for large exit code (GH-19654)
Fix the Windows implementation of os.waitpid() for exit code
larger than "INT_MAX >> 8". The exit status is now interpreted as an
unsigned number.
(cherry picked from commit b07350901c)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-04-22 09:16:42 -07:00
Miss Islington (bot) abdfb3b471
bpo-38439: Add 256px IDLE icon (GH-17473)
Icon author: Andrew Clover, bpo-1490384
(cherry picked from commit 3a69f3caee)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
2020-04-22 00:38:37 -07:00
Miss Islington (bot) 694a95ff43
bpo-39942:Fix failure in `TypeVar` when missing `__name__` (GH-19616)
https://bugs.python.org/issue39942
(cherry picked from commit a25a04fea5)

Co-authored-by: HongWeipeng <hongweichen8888@sina.com>
2020-04-20 13:22:34 -07:00
Miss Islington (bot) d0d4e33d26
Fix typo in Lib/tracepack.py (GH-19605)
Typo fix: "emites" -> "emit".
(cherry picked from commit df8913f7c4)

Co-authored-by: Galden <wudenggang0@163.com>
2020-04-19 19:36:52 -07:00