summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* bpo-32872: Avoid regrtest compatibility issue with namespace packages. ↵Miss Islington (bot)2018-03-281-1/+1
| | | | | | | (GH-6276) (GH-6278) (cherry picked from commit e52ac045972a4f75d7f52e4ee0d6de128259134d) Co-authored-by: Ned Deily <nad@python.org>
* [3.7] bpo-17288: Prevent jumps from 'return' and 'exception' trace events. ↵Miss Islington (bot)2018-03-131-11/+57
| | | | | | | (GH-5928) (cherry picked from commit e32bbaf376a09c149fa7c7f2919d7c9ce4e2a055) Co-authored-by: xdegaye <xdegaye@gmail.com>
* [3.6] bpo-31804: Fix multiprocessing.Process with broken standard streams ↵Antoine Pitrou2018-03-111-2/+29
| | | | | | | | (GH-6079) (GH-6081) In some conditions the standard streams will be None or closed in the child process (for example if using "pythonw" instead of "python" on Windows). Avoid failing with a non-0 exit code in those conditions. Report and initial patch by poxthegreat.. (cherry picked from commit e756f66c83786ee82f5f7d45931ae50a6931dd7f)
* [3.6] bpo-33026: Fix jumping out of "with" block by setting f_lineno. ↵Miss Islington (bot)2018-03-111-0/+28
| | | | | | | | (GH-6026). (GH-6074) (GH-6075) (cherry picked from commit 26c9f565d016db21257a60d29ab2c99383dd5ac7) (cherry picked from commit 04aadf23eac51fec2e436c5960c1362bbb7d03de) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.6] bpo-33037: Skip sending/receiving after SSL transport closing ↵Andrew Svetlov2018-03-101-19/+36
| | | | | | (GH-6044) (GH-6058) * Skip write()/data_received() if sslpipe is destroyed. (cherry picked from commit 5e80a71ab67045fecec46573a1892e240b569ace)
* bpo-32517: fix test_read_pty_output() hangs on macOS 10.13.2+ (GH-6037)Nathan Henrie2018-03-091-0/+1
| | | | | test_asyncio hangs indefinitely on macOS 10.13.2+ on `read_pty_output()` using the KqueueSelector. Closing `proto.transport` (as is done in `write_pty_output()`) seems to fix it.
* bpo-32969: Expose some missing constants in zlib and fix the doc (GH-5988)Miss Islington (bot)2018-03-071-1/+2
| | | | | (cherry picked from commit bc3f2289b9007396bfb7f986bee477b6176c1822) Co-authored-by: Xiang Zhang <angwerzx@126.com>
* bpo-33009: Fix inspect.signature() for single-parameter partialmethods. ↵Miss Islington (bot)2018-03-061-0/+10
| | | | | | | (GH-6004) (cherry picked from commit 8a387219bdfb6ee34928d6168ac42ca559f11c9a) Co-authored-by: Yury Selivanov <yury@magic.io>
* [3.6] bpo-33001: Prevent buffer overrun in os.symlink (GH-5989) (GH-5990)Steve Dower2018-03-051-0/+35
|
* [3.6] bpo-32981: Fix catastrophic backtracking vulns (GH-5955)Benjamin Peterson2018-03-042-2/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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)
* [3.6] bpo-32964: Reuse a testing implementation of the path protocol in ↵Serhiy Storchaka2018-03-0310-95/+69
| | | | | | | tests. (GH-5930). (GH-5958) (cherry picked from commit b21d155f57d284aecf9092a9bd24258293965c2f) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.6] bpo-32922: dbm.open() now encodes filename with the filesystem ↵Serhiy Storchaka2018-02-273-1/+87
| | | | | | | encoding. (GH-5832). (GH-5906) (cherry picked from commit 6f600ff1734ca2fdcdd37a809adf8130f0d8cc4e) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-32713: Fix tarfile.itn for large/negative float values. (GH-5434)Miss Islington (bot)2018-02-271-0/+8
| | | | | (cherry picked from commit 72d9b2be36f091793ae7ffc5ad751f040c6e6ad3) Co-authored-by: Joffrey F <f.joffrey@gmail.com>
* bpo-32222: Fix pygettext skipping docstrings for funcs with arg typehints ↵Miss Islington (bot)2018-02-261-0/+88
| | | | | | | (GH-4745) (cherry picked from commit eee72d4778a5513038edd5236cdd87ccce2bc60a) Co-authored-by: Tobotimus <Tobotimus@users.noreply.github.com>
* Revert "[3.6] bpo-32303 - Consistency fixes for namespace loaders (GH-5481) ↵Barry Warsaw2018-02-262-20/+2
| | | | | (#5504)" (#5911) This reverts commit a71397fb6603d0fe673acd7765c74699cd28fe7b.
* [3.6] bpo-32394: Remove some TCP options on older version Windows. (GH-5585)animalize2018-02-261-0/+19
|
* bpo-18533: Avoid RecursionError from repr() of recursive dictview (GH-4823)Miss Islington (bot)2018-02-262-0/+29
| | | | | | | | | | | | | | | | | | 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)
* bpo-31518: Change TLS protocol for Debian (#3660)Christian Heimes2018-02-245-12/+12
| | | | | | | 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>
* bpo-31966: Fixed WindowsConsoleIO.write() for writing empty data. (GH-5754)Miss Islington (bot)2018-02-241-0/+4
| | | | | (cherry picked from commit 42c35d9c0c8175332f50fbe034a001fe52f057b9) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.6] bpo-30028: make test.support.temp_cwd() fork-safe (GH-1066) (GH-5826)Anselm Kruis2018-02-232-1/+34
| | | | | | | 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>
* bpo-32457: Improves handling of denormalized executable path when launching ↵Steve Dower2018-02-221-0/+12
| | | | Python (GH-5756) (#5818)
* bpo-31848: Fix broken error handling in Aifc_read.initfp() when the SSND ↵Miss Islington (bot)2018-02-201-0/+8
| | | | | | | | | 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>
* bpo-32409: Ensures activate.bat can handle Unicode contents (GH-5766)Miss Islington (bot)2018-02-201-0/+18
| | | | | (cherry picked from commit 6240917b773b52f8883387b9e3a5f327a4372068) Co-authored-by: Steve Dower <steve.dower@microsoft.com>
* bpo-30121: Fix test_subprocess for Windows Debug builds (GH-5758)Miss Islington (bot)2018-02-191-1/+1
| | | | | (cherry picked from commit 5537646bfacec463b450871dde31cb06c44a0556) Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
* bpo-32682: Improve libz version parsing in test_zilb (GH-5347)Miss Islington (bot)2018-02-191-4/+9
| | | | | (cherry picked from commit 4c7108a77144493d0aa6fc0105b67d3797e143f5) Co-authored-by: pmp-p <pmp-p@users.noreply.github.com>
* [3.6] Improves the ability to build in CI (GH-5730)Steve Dower2018-02-182-7/+13
|
* bpo-32852: Fix trace changing sys.argv to tuple. (GH-5692)Miss Islington (bot)2018-02-171-0/+10
| | | | | (cherry picked from commit 9f4223261fd129ad7b9a09b2b0d625d1bb90b22b) Co-authored-by: Kyle Altendorf <sda@fstab.net>
* bpo-32841: Fix cancellation in awaiting asyncio.Condition (GH-5665) (GH-5683)Miss Islington (bot)2018-02-141-4/+27
| | | | | (cherry picked from commit 5746510b7aef423fa4afc92b2abb919307b1dbb9) Co-authored-by: Bar Harel <bzvi7919@gmail.com>
* bpo-31787: Skip refleak check when _hashlib is not available (GH-5660)Miss Islington (bot)2018-02-131-0/+1
| | | | | (cherry picked from commit f0bc645dfede8118c84844bad319cd952c4d1905) Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
* bpo-31787: Prevent refleaks when calling __init__() more than once (GH-3995)INADA Naoki2018-02-136-0/+74
| | | (cherry picked from commit d019bc8319ea35e93bf4baa38098ff1b57cd3ee5)
* bpo-29248: Fix os.readlink() on Windows (GH-5577)Miss Islington (bot)2018-02-121-0/+15
| | | | | | | | The PrintNameOffset field of the reparse data buffer was treated as a number of characters instead of bytes. (cherry picked from commit 3c34aad4e7a95913ec7db8e5e948a8fc69047bf7) Co-authored-by: SSE4 <tomskside@gmail.com>
* [3.6] bpo-30157: Fix csv.Sniffer.sniff() regex pattern. (GH-5601) (GH-5603)Serhiy Storchaka2018-02-091-0/+10
| | | | | Co-authored-by: Jake Davis <jcdavis@awedge.net>. (cherry picked from commit 2411292ba8155327125d8a1da8a4c9fa003d5909)
* [3.6] bpo-32746: Fix multiple typos (GH-5144) (GH-5522)Terry Jan Reedy2018-02-044-6/+6
| | | | | | | | | Fix typos found by codespell in docs, docstrings, and comments. Fixes for the following files were in post-3.6 code and not backported: Lib/ctypes/_aix.py (new), Lib/test/test_concurrent_futures.py, Modules/_asynciomodule.c, Modules/_pickle.c, Objects/obmalloc.c. (cherry picked from commit c3d9508ff22ece9a96892b628dd5813e2fb0cd80)
* [3.6] bpo-32303 - Consistency fixes for namespace loaders (GH-5481) (#5504)Barry Warsaw2018-02-032-2/+20
| | | | | | | | | | * Make sure ``__spec__.loader`` matches ``__loader__`` for namespace packages. * Make sure ``__spec__.origin` matches ``__file__`` for namespace packages. https://bugs.python.org/issue32303 https://bugs.python.org/issue32305. (cherry picked from commit bbbcf8693b876daae4469765aa62f8924f39a7d2) Co-authored-by: Barry Warsaw <barry@python.org>
* [3.6] bpo-32734: Fix asyncio.Lock multiple acquire safety issue (GH-5466) ↵Bar Harel2018-02-021-0/+50
| | | | | | | (#5502) (cherry picked from commit d41e9e0952393e64f2f9756d778553d704191086)
* bpo-31106: Fix handling of erros in posix_fallocate() and posix_fadvise() ↵Miss Islington (bot)2018-02-011-0/+19
| | | | | (GH-3000) (GH-3000) (#4101) (cherry picked from commit d4b93e21c2664d6a78e0656e7a7be0807be1c352)
* bpo-32137: The repr of deeply nested dict now raises a RecursionError ↵Miss Islington (bot)2018-02-013-3/+19
| | | | | | | | (GH-4570) (GH-4689) instead of crashing due to a stack overflow. This perhaps will fix similar problems in other extension types. (cherry picked from commit 1fb72d2ad243c965d4432b4e93884064001a2607)
* bpo-32727: smtplib's SMTP.send_message behaves differently with from_addr ↵Miss Islington (bot)2018-01-311-1/+18
| | | | | | | | and to_addrs (GH-5451) (#5455) Do not pass the name field in the 'from' address in the SMTP envelope. (cherry picked from commit 8d83e4ba7823827bcbc119db887004d5c3a63dc6) Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>
* [3.6] bpo-32583: Fix possible crashing in builtin Unicode decoders (GH-5325) ↵Xiang Zhang2018-01-311-0/+52
| | | | | | | (#5459) When using customized decode error handlers, it is possible for builtin decoders to write out-of-bounds and then crash.. (cherry picked from commit 2c7fd46e11333ef5e5cce34212f7d087694f3658)
* closes bpo-32721: do not fail test_hashlib if _md5 isn't available (GH-5441) ↵Miss Islington (bot)2018-01-301-1/+1
| | | | | | | (GH-5442) (cherry picked from commit 95441809ef77a8df5e14601ade6c054ef7114c02) Co-authored-by: Benjamin Peterson <benjamin@python.org>
* [3.6] replace dynamic import with 'exec' with importlib.import_module ↵Benjamin Peterson2018-01-301-3/+4
| | | | | (GH-5433) (GH-5440) (cherry picked from commit 77526f05fa788d6fb12f2121fe6b96c130d9b717)
* bpo-27931: Fix email address header parsing error (GH-5329) (GH-5431)Miss Islington (bot)2018-01-291-0/+17
| | | | | | Correctly handle addresses whose username is an empty quoted string. (cherry picked from commit aa218d1649690d1c1ba86a9972f7fae646bf1a8f) Co-authored-by: jayyyin <jayyin11043@hotmail.com>
* bpo-20891: Remove test_capi.test_bpo20891() (#5425)Victor Stinner2018-01-291-13/+0
| | | | | | | | | | My first fix is not enough to make test_bpo20891() reliable. A second fix is needed and it was decided to not backport it, so remove the test instead. For Python 3.6, the workaround is to call PyEval_InitThreads() before spawning the first C thread. Python 3.7 will have both fixes.
* Add a test for pdb until command in coroutine (GH-5427) (#5428)Miss Islington (bot)2018-01-291-0/+46
| | | (cherry picked from commit 4f4ef0acbad81f4b05f370e8ff14ddf949773291)
* bpo-32650: Add an asyncgen pdb test (GH-5406) (#5419)Miss Islington (bot)2018-01-291-0/+60
| | | (cherry picked from commit 9ee1bf9ab5af8233ed8ec5c53d12a29dc1bd9c9d)
* [3.6] bpo-32650 Add support for async generators and more test for ↵Andrew Svetlov2018-01-291-1/+42
| | | | | coroutines in pdb (GH-5403). (#5411) (cherry picked from commit c7ab581db216aeeb1c2aa7af2f2198d2b7516383)
* bpo-32650: Add native coroutine support to bdb when stepping over line ↵Miss Islington (bot)2018-01-291-0/+55
| | | | | (GH-5400) (#5402) (cherry picked from commit 46877024423e98d1b872bf308dacacd583327207)
* [3.6] bpo-32228: Reset raw_pos after unwinding the raw stream (GH-4858) (#5389)Antoine Pitrou2018-01-281-0/+17
| | | | | Ensure that ``truncate()`` preserves the file position (as reported by ``tell()``) after writes longer than the buffer size.. (cherry picked from commit 059f58ce938d9c3f0286412a4efb1b9131339421)
* bpo-32685: Improve suggestion for print statement (GH-5380)Miss Islington (bot)2018-01-281-0/+17
| | | | | | | | Better account for single-line compound statements and semi-colon separated statements when suggesting Py3 replacements for Py2 print statements. Initial patch by Nitish Chandra. (cherry picked from commit 43c0f1ac5ed8bc9c3bd048d2ce4de4c98a83de99)
* [3.6] bpo-32664: Add missing "|" connector in Exceptions doc (GH-1173) (GH-5372)Miss Islington (bot)2018-01-281-1/+1
| | | (cherry picked from commit 992ae6444cc745c23d3bcc604983cc8e39405bd2)