summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* [3.7] bpo-39389: gzip: fix compression level metadata (GH-18077) (GH-18101)Miss Islington (bot)2020-03-041-0/+20
| | | | | | | | | | | | * bpo-39389: gzip: fix compression level metadata (GH-18077) As described in RFC 1952, section 2.3.1, the XFL (eXtra FLags) byte of a gzip member header should indicate whether the DEFLATE algorithm was tuned for speed or compression ratio. Prior to this patch, archives emitted by the `gzip` module always indicated maximum compression. (cherry picked from commit eab3b3f1c60afecfb4db3c3619109684cb04bd60) Co-authored-by: William Chargin <wchargin@gmail.com>
* bpo-37953: Fix ForwardRef hash and equality checks (GH-15400) (GH-18751)Ryan Rowe2020-03-031-0/+116
| | | | | | | | | Ideally if we stick a ForwardRef in a dictionary we would like to reliably be able to get it out again. https://bugs.python.org/issue37953 (cherry picked from commit e082e7c) Co-authored-by: plokmijnuhby <39633434+plokmijnuhby@users.noreply.github.com>
* bpo-39778: Don't traverse weak-reference lists OrderedDict's tp_traverse and ↵Miss Islington (bot)2020-03-021-0/+20
| | | | | | | | | tp_clear (GH-18749) Objects do not own weak references to them directly through the __weakref__ list so these do not need to be traversed by the GC. (cherry picked from commit 0c2b509f9d1d3a9065bc62c2407e1dc2ed70e9c2) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-38971: Open file in codecs.open() closes if exception raised. (GH-17666)Miss Islington (bot)2020-03-021-0/+9
| | | | | | | | Open issue in the BPO indicated a desire to make the implementation of codecs.open() at parity with io.open(), which implements a try/except to assure file stream gets closed before an exception is raised. (cherry picked from commit 2565edec2c974b2acca03b4cc5025e83f903ddd7) Co-authored-by: Chris A <christopher.aporta@gmail.com>
* [3.7] bpo-39769: Fix compileall ddir for subpkgs. (GH-18676) (GH-18718) ↵Gregory P. Smith2020-03-012-0/+52
| | | | | | | | | | | | | | | | | | | | | | (GH-18725) Fix compileall.compile_dir() ddir= behavior on sub-packages. Fixes compileall.compile_dir's ddir parameter and compileall command line flag `-d` to no longer write the wrong pathname to the generated pyc file for submodules beneath the root of the directory tree being compiled. This fixes a regression introduced with Python 3.5. Tests backported from GH 02673352b5db6ca4d3dc804965facbedfe66425d, the implementation is different due to intervening code changes. But still quiet simple. Why was the bug ever introduced? The refactoring to add parallel execution kept the ddir -> dfile computations but discarded the results instead of sending them to compile_file(). This fixes that. Lack of tests meant this went unnoticed.. (cherry picked from commit ce720d3e0674d6ac6f1b950c20a89be4cfde7853) Co-authored-by: Gregory P. Smith <greg@krypto.org> [Google]
* [3.7] bpo-39794: Add --without-decimal-contextvar (GH-18702)Stefan Krah2020-02-291-0/+1
| | | | | | | * bpo-39794: Add --without-decimal-contextvar (#18702) (cherry picked from commit 815280eb160af637e1347213659f9236adf78f80)
* bpo-30566: Fix IndexError when using punycode codec (GH-18632)Miss Islington (bot)2020-02-251-0/+12
| | | | | | | | | Trying to decode an invalid string with the punycode codec shoud raise UnicodeError. (cherry picked from commit ba22e8f174309979d90047c5dc64fcb63bc2c32e) Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
* Give proper credit for figuring out and writing PEP-3118 tests. (GH-18644) ↵Miss Islington (bot)2020-02-241-0/+2
| | | | | | | (#18645) (cherry picked from commit b942ba03b8530f26240d4e36567d2ff42d701420) Authored-by: Stefan Krah <skrah@bytereef.org>
* bpo-39382: Avoid dangling object use in abstract_issubclass() (GH-18530)Miss Islington (bot)2020-02-221-0/+21
| | | | | | | Hold reference of __bases__ tuple until tuple item is done with, because by dropping the reference the item may be destroyed. (cherry picked from commit 1c56f8ffad44478b4214a2bf8eb7cf51c28a347a) Co-authored-by: Yonatan Goldschmidt <yon.goldschmidt@gmail.com>
* bpo-39576: Prevent memory error for overly optimistic precisions (GH-18581) ↵Miss Islington (bot)2020-02-211-0/+35
| | | | | | | | (#18585) (cherry picked from commit 90930e65455f60216f09d175586139242dbba260) Authored-by: Stefan Krah <skrah@bytereef.org>
* [3.8] bpo-39453: Fix contains method of list to hold strong references ↵Miss Islington (bot)2020-02-171-0/+7
| | | | | | | (GH-18204) (cherry picked from commit f64abd10563c25a94011f9e3335fd8a1cf47c205) Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
* Revert "bpo-27657: Fix urlparse() with numeric paths (GH-661)" (#18526)Senthil Kumaran2020-02-161-6/+4
| | | | | | | | | | | | | | | | | | | | | This reverts commit 82b5f6b16e051f8a2ac6e87ba86b082fa1c4a77f. The change broke the backwards compatibility of parsing behavior in a patch release of Python (3.7.6). A decision was taken to revert this patch in 3.7.7. In https://bugs.python.org/issue27657 it was decided that the previous behavior like >>> urlparse('localhost:8080') ParseResult(scheme='', netloc='', path='localhost:8080', params='', query='', fragment='') >>> urlparse('undefined:8080') ParseResult(scheme='', netloc='', path='undefined:8080', params='', query='', fragment='') needs to be preserved in patch releases as number of users rely upon it. Explicitly mention the releases involved with the revert in NEWS. Adopt the wording suggested by @ned-deily.
* bpo-39606: allow closing async generators that are already closed (GH-18475) ↵Nathaniel J. Smith2020-02-131-2/+28
| | | | | | | | | | | | | | | | (GH-18502) The fix for [bpo-39386](https://bugs.python.org/issue39386) attempted to make it so you couldn't reuse a agen.aclose() coroutine object. It accidentally also prevented you from calling aclose() at all on an async generator that was already closed or exhausted. This commit fixes it so we're only blocking the actually illegal cases, while allowing the legal cases. The new tests failed before this patch. Also confirmed that this fixes the test failures we were seeing in Trio with Python dev builds: https://github.com/python-trio/trio/pull/1396 https://bugs.python.org/issue39606 (cherry picked from commit 925dc7fb1d0db85dc137afa4cd14211bf0d67414)
* bpo-39274: Ensure Fraction.__bool__() returns a bool (GH-18017)Miss Islington (bot)2020-02-061-0/+37
| | | | | | | | Some numerator types used (specifically NumPy) decides to not return a Python boolean for the "a != b" operation. Using the equivalent call to bool() guarantees a bool return also for such types. (cherry picked from commit 427c84f13f7719e6014a21bd1b81efdc02a046fb) Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
* closes bpo-39510: Fix use-after-free in BufferedReader.readinto() (GH-18295)Miss Islington (bot)2020-02-041-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | When called on a closed object, readinto() segfaults on account of a write to a freed buffer: ==220553== Process terminating with default action of signal 11 (SIGSEGV): dumping core ==220553== Access not within mapped region at address 0x2A ==220553== at 0x48408A0: memmove (vg_replace_strmem.c:1272) ==220553== by 0x58DB0C: _buffered_readinto_generic (bufferedio.c:972) ==220553== by 0x58DCBA: _io__Buffered_readinto_impl (bufferedio.c:1053) ==220553== by 0x58DCBA: _io__Buffered_readinto (bufferedio.c.h:253) Reproducer: reader = open ("/dev/zero", "rb") _void = reader.read (42) reader.close () reader.readinto (bytearray (42)) GH-GH-GH- BANG! The problem exists since 2012 when commit dc469454ec added code to free the read buffer on close(). Signed-off-by: Philipp Gesang <philipp.gesang@intra2net.com> (cherry picked from commit cb1c0746f277052e45a60d6c436a765e34722821) Co-authored-by: Philipp Gesang <phg@phi-gamma.net>
* Fixes in sorting descriptions (GH-18317)Miss Islington (bot)2020-02-041-1/+1
| | | | | | | | Improvements in listsort.txt and a comment in sortperf.py. Automerge-Triggered-By: @csabella (cherry picked from commit 24e5ad4689de9adc8e4a7d8c08fe400dcea668e6) Co-authored-by: Stefan Pochmann <stefan.pochmann@gmail.com>
* [3.7] bpo-35182: fix communicate() crash after child closes its pipes ↵Alex Rebert2020-01-231-0/+11
| | | | | | | | | | | | | | | | | | | | | (GH-18117) (GH-18151) When communicate() is called in a loop, it crashes when the child process has already closed any piped standard stream, but still continues to be running Co-authored-by: Andriy Maletsky <andriy.maletsky@gmail.com>. (cherry picked from commit d3ae95e1e945ed20297e1c38ba43a18b7a868ab6) Co-authored-by: Alex Rebert <alex@forallsecure.com> https://bugs.python.org/issue35182 Automerge-Triggered-By: @gpshead
* bpo-39421: Fix posible crash in heapq with custom comparison operators ↵Miss Islington (bot)2020-01-231-0/+31
| | | | | | | | | | | | (GH-18118) * bpo-39421: Fix posible crash in heapq with custom comparison operators * fixup! bpo-39421: Fix posible crash in heapq with custom comparison operators * fixup! fixup! bpo-39421: Fix posible crash in heapq with custom comparison operators (cherry picked from commit 79f89e6e5a659846d1068e8b1bd8e491ccdef861) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-39386: Prevent double awaiting of async iterator (GH-18081)Miss Islington (bot)2020-01-201-0/+36
| | | | | (cherry picked from commit a96e06db77dcbd3433d39761ddb4615d7d96284a) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-38293: Allow shallow and deep copying of property objects (GH-16438)Miss Islington (bot)2020-01-121-2/+2
| | | | | | | | | | | | | | | | | | | | Copying property objects results in a TypeError. Steps to reproduce: ``` >>> import copy >>> obj = property() >>> copy.copy(obj) ```` This affects both shallow and deep copying. My idea for a fix is to add property objects to the list of "atomic" objects in the copy module. These already include types like functions and type objects. I also added property objects to the unit tests test_copy_atomic and test_deepcopy_atomic. This is my first PR, and it's highly likely I've made some mistake, so please be kind :) https://bugs.python.org/issue38293 (cherry picked from commit 9f3fc6c5b4993f2b362263b494f84793a21aa073) Co-authored-by: Guðni Natan Gunnarsson <1493259+GudniNatan@users.noreply.github.com>
* [3.7] Add test cases for dataclasses. (GH-17909) (GH-17920)Miss Islington (bot)2020-01-101-0/+19
| | | | | | | | | | | | * Add test cases for dataclasses. * Add test for repr output of field. * Add test for ValueError to be raised when both default and default_factory are passed. (cherry picked from commit eef1b027ab70704bcaa60a089e4ae1592c504b86) Co-authored-by: Karthikeyan Singaravelan <tir.karthi@gmail.com> Automerge-Triggered-By: @ericvsmith
* bpo-39242: Updated the Gmane domain into news.gmane.io (GH-17903)Miss Islington (bot)2020-01-081-2/+2
| | | | | (cherry picked from commit 2e6a8efa837410327b593dc83c57492253b1201e) Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
* bpo-39056: Fix handling invalid warning category in the -W option. (GH-17618)Miss Islington (bot)2020-01-051-0/+23
| | | | | | No longer import the re module if it is not needed. (cherry picked from commit 41ec17e45d54473d32f543396293256f1581e44d) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-39055: Reject a trailing \n in base64.b64decode() with validate=True. ↵Miss Islington (bot)2020-01-051-0/+1
| | | | | | | (GH-17616) (cherry picked from commit b19c0d77e6f25ea831ab608c71f15d0d9266c8c4) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-39057: Fix urllib.request.proxy_bypass_environment(). (GH-17619)Miss Islington (bot)2020-01-051-0/+22
| | | | | | Ignore leading dots and no longer ignore a trailing newline. (cherry picked from commit 6a265f0d0c0a4b3b8fecf4275d49187a384167f4) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-39142: Avoid converting namedtuple instances to ConvertingTuple. ↵Miss Islington (bot)2020-01-011-0/+31
| | | | | (GH-17773) (GH-17786) (cherry picked from commit 46abfc1416ff8e450999611ef8f231ff871ab133)
* [3.7] bpo-38588: Fix possible crashes in dict and list when calling P… ↵Dong-hee Na2019-12-312-1/+36
| | | | | | | | | | | | | | | | | | | | (GH-17765) * [3.7] bpo-38588: Fix possible crashes in dict and list when calling PyObject_RichCompareBool (GH-17734) Take strong references before calling PyObject_RichCompareBool to protect against the case where the object dies during the call.. (cherry picked from commit 2d5bf568eaa5059402ccce9ba5a366986ba27c8a) Co-authored-by: Dong-hee Na <donghee.na92@gmail.com> * methane's suggestion methane's suggestion Co-Authored-By: Inada Naoki <songofacandy@gmail.com> Co-authored-by: Inada Naoki <songofacandy@gmail.com>
* [3.7] bpo-38610: Fix possible crashes in several list methods (GH-17022) ↵Pablo Galindo2019-12-301-0/+26
| | | | | | | | | | | (GH-17759) Hold strong references to list elements while calling PyObject_RichCompareBool().. (cherry picked from commit d9e561d23d994e3ed15f4fcbd7ee5c8fe50f190b) Co-authored-by: Zackery Spytz <zspytz@gmail.com> Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* [3.7] bpo-38878: Fix os.PathLike __subclasshook__ (GH-17336) (GH-17685)Bar Harel2019-12-231-0/+8
| | | https://bugs.python.org/issue38878
* bpo-38546: Fix concurrent.futures test_ressources_gced_in_workers() ↵Miss Islington (bot)2019-12-181-3/+11
| | | | | | | | | | | | (GH-17652) (GH-17655) Fix test_ressources_gced_in_workers() of test_concurrent_futures: explicitly stop the manager to prevent leaking a child process running in the background after the test completes. (cherry picked from commit 673c39331f844a80c465efd7cff88ac55c432bfb) (cherry picked from commit b0eb046cbd0dbb7b17f16aad6de20fac5305f387) Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-38295: prevent test_relative_path of test_py_compile failure on macOS ↵Miss Islington (bot)2019-12-171-1/+1
| | | | | | | Catalina (GH-17636) (cherry picked from commit bf3aa1060a29a05813abbe877193af16e3e7131e) Co-authored-by: Ned Deily <nad@python.org>
* Fix warnings in test_asyncio.test_base_events (GH-17577) (GH-17580)Miss Islington (bot)2019-12-171-3/+4
| | | | | | Co-authored-by: tirkarthi (cherry picked from commit 1988344a6bff253f017e053f69318ecf03587294) Co-authored-by: Kyle Stanley <aeros167@gmail.com>
* [3.7] Fix elif start column offset when there is an else following ↵Pablo Galindo2019-12-141-0/+9
| | | | | | | (GH-17596) (GH-17601) (cherry picked from commit 5936a4ce914d42af97b9238e5090dedc8d5b0bd2) Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
* bpo-36406: Handle namespace packages in doctest (GH-12520) (GH-17592)Miss Islington (bot)2019-12-131-1/+5
| | | | | (cherry picked from commit 8289e27393395ee903bd096d42e07c112d7f15c6) Co-authored-by: Xtreak <tir.karthi@gmail.com>
* [3.7] bpo-39031: Include elif keyword when producing lineno/col-offset info ↵Pablo Galindo2019-12-131-0/+9
| | | | | | | | | | | | for if_stmt (GH-17582) (#17584) When parsing an "elif" node, lineno and col_offset of the node now point to the "elif" keyword and not to its condition, making it consistent with the "if" node. https://bugs.python.org/issue39031 Automerge-Triggered-By: @pablogsal. (cherry picked from commit 025a602af7ee284d8db6955c26016f3f27d35536) Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
* bpo-37228: Fix loop.create_datagram_endpoint()'s usage of SO_REUSEADDR ↵Ned Deily2019-12-111-17/+24
| | | | | | | (GH-17311) (GH-17570) (cherry picked from commit ab513a38c98695f271e448fe2cb7c5e39eeaaaaf) Co-authored-by: Kyle Stanley <aeros167@gmail.com>
* bpo-34776: Fix dataclasses to support __future__ "annotations" mode ↵Miss Islington (bot)2019-12-092-0/+24
| | | | | | | (GH-9518) (#17532) (cherry picked from commit d219cc4180e7589807ebbef7421879f095e72a98) Co-authored-by: Yury Selivanov <yury@magic.io>
* bpo-38547: Fix test_pty if the process is the session leader (GH-17519)Miss Islington (bot)2019-12-091-3/+16
| | | | | | | | Fix test_pty: if the process is the session leader, closing the master file descriptor raises a SIGHUP signal: simply ignore SIGHUP when running the tests. (cherry picked from commit a1838ec2592e5082c75c77888f2a7a3eb21133e5) Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-38979: fix ContextVar "__class_getitem__" method (GH-17497)Miss Islington (bot)2019-12-081-3/+4
| | | | | | | | | | now contextvars.ContextVar "__class_getitem__" method returns ContextVar class, not None. https://bugs.python.org/issue38979 Automerge-Triggered-By: @asvetlov (cherry picked from commit 28c91631c24e53713ad0e8a2bbae716373f5e53d) Co-authored-by: AMIR <31338382+amiremohamadi@users.noreply.github.com>
* [3.7] bpo-38820: OpenSSL 3.0.0 compatibility. (GH-17190) (GH-17500)Miss Islington (bot)2019-12-071-6/+6
| | | | | | | | | | | | | | | | | | | | | test_openssl_version now accepts version 3.0.0. getpeercert() no longer returns IPv6 addresses with a trailing new line. Signed-off-by: Christian Heimes <christian@python.org> https://bugs.python.org/issue38820 (cherry picked from commit 2b7de6696bf2f924cd2cd9ff0a539c8aa37c6244) Co-authored-by: Christian Heimes <christian@python.org> https://bugs.python.org/issue38820 Automerge-Triggered-By: @tiran
* bpo-33684: json.tool: Use utf-8 for infile and outfile. (GH-17460)Inada Naoki2019-12-041-3/+18
| | | | | (cherry picked from commit 808769f3a4cbdc47cf1a5708dd61b1787bb192d4) Co-authored-by: Inada Naoki <songofacandy@gmail.com>
* bpo-38945: UU Encoding: Don't let newline in filename corrupt the output ↵Miss Islington (bot)2019-12-021-0/+9
| | | | | | | format (GH-17418) (cherry picked from commit a62ad4730c9b575f140f24074656c0257c86a09a) Co-authored-by: Matthew Rollings <1211162+stealthcopter@users.noreply.github.com>
* bpo-38815: Accept TLSv3 default in min max test (GH-NNNN) (GH-17437)Miss Islington (bot)2019-12-021-2/+8
| | | | | | | | | Make ssl tests less strict and also accept TLSv3 as the default maximum version. This change unbreaks test_min_max_version on Fedora 32. https://bugs.python.org/issue38815 (cherry picked from commit 34864d1cffdbfc620f8517dab9a68ae9a37b8c53) Co-authored-by: torsava <torsava@redhat.com>
* bpo-38449: Add URL delimiters test cases (GH-16729)Miss Islington (bot)2019-12-011-0/+15
| | | | | | | | * bpo-38449: Add tricky test cases * bpo-38449: Reflect codereview (cherry picked from commit 2fe4c48917c2d1b40cf063c6ed22ae2e71f4cb62) Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
* bpo-26730: Fix SpooledTemporaryFile data corruption (GH-17400)Inada Naoki2019-11-281-8/+11
| | | | | | | SpooledTemporaryFile.rollback() might cause data corruption when it is in text mode. Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com>. (cherry picked from commit ea9835c5d154ab6a54eed627958473b6768b28cc)
* bpo-38804: Fix REDoS in http.cookiejar (GH-17157)Miss Islington (bot)2019-11-221-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The regex http.cookiejar.LOOSE_HTTP_DATE_RE was vulnerable to regular expression denial of service (REDoS). LOOSE_HTTP_DATE_RE.match is called when using http.cookiejar.CookieJar to parse Set-Cookie headers returned by a server. Processing a response from a malicious HTTP server can lead to extreme CPU usage and execution will be blocked for a long time. The regex contained multiple overlapping \s* capture groups. Ignoring the ?-optional capture groups the regex could be simplified to \d+-\w+-\d+(\s*\s*\s*)$ Therefore, a long sequence of spaces can trigger bad performance. Matching a malicious string such as LOOSE_HTTP_DATE_RE.match("1-c-1" + (" " * 2000) + "!") caused catastrophic backtracking. The fix removes ambiguity about which \s* should match a particular space. You can create a malicious server which responds with Set-Cookie headers to attack all python programs which access it e.g. from http.server import BaseHTTPRequestHandler, HTTPServer def make_set_cookie_value(n_spaces): spaces = " " * n_spaces expiry = f"1-c-1{spaces}!" return f"b;Expires={expiry}" class Handler(BaseHTTPRequestHandler): def do_GET(self): self.log_request(204) self.send_response_only(204) GH- Don't bother sending Server and Date n_spaces = ( int(self.path[1:]) GH- Can GET e.g. /100 to test shorter sequences if len(self.path) > 1 else 65506 GH- Max header line length 65536 ) value = make_set_cookie_value(n_spaces) for i in range(99): GH- Not necessary, but we can have up to 100 header lines self.send_header("Set-Cookie", value) self.end_headers() if __name__ == "__main__": HTTPServer(("", 44020), Handler).serve_forever() This server returns 99 Set-Cookie headers. Each has 65506 spaces. Extracting the cookies will pretty much never complete. Vulnerable client using the example at the bottom of https://docs.python.org/3/library/http.cookiejar.html : import http.cookiejar, urllib.request cj = http.cookiejar.CookieJar() opener = urllib.request.build_opener(urllib.request.HTTPCookieProcessor(cj)) r = opener.open("http://localhost:44020/") The popular requests library was also vulnerable without any additional options (as it uses http.cookiejar by default): import requests requests.get("http://localhost:44020/") * Regression test for http.cookiejar REDoS If we regress, this test will take a very long time. * Improve performance of http.cookiejar.ISO_DATE_RE A string like "444444" + (" " * 2000) + "A" could cause poor performance due to the 2 overlapping \s* groups, although this is not as serious as the REDoS in LOOSE_HTTP_DATE_RE was. (cherry picked from commit 1b779bfb8593739b11cbb988ef82a883ec9d077e) Co-authored-by: bcaller <bcaller@users.noreply.github.com>
* bpo-22367: Update test_fcntl.py for spawn process mode (GH-17154) (GH-17253)Miss Islington (bot)2019-11-221-9/+19
| | | | | (cherry picked from commit 9960230f76eb555d6dfbe8a324efed35610c85f9) Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
* bpo-37838: get_type_hints for wrapped functions with forward reference ↵Miss Islington (bot)2019-11-212-0/+22
| | | | | | | | (GH-17126) https://bugs.python.org/issue37838 (cherry picked from commit 0aca3a3a1e68b4ca2d334ab5255dfc267719096e) Co-authored-by: benedwards14 <53377856+benedwards14@users.noreply.github.com>
* bpo-35409: Ignore GeneratorExit in async_gen_athrow_throw (GH-14755)Miss Islington (bot)2019-11-191-0/+27
| | | | | | | | Ignore `GeneratorExit` exceptions when throwing an exception into the `aclose` coroutine of an asynchronous generator. https://bugs.python.org/issue35409 (cherry picked from commit 8e0de2a4808d7c2f4adedabff89ee64e0338790a) Co-authored-by: Vincent Michel <vxgmichel@gmail.com>
* bpo-38785: Prevent asyncio from crashing (GH-17144)Miss Islington (bot)2019-11-131-0/+39
| | | | | | | | if parent `__init__` is not called from a constructor of object derived from `asyncio.Future` https://bugs.python.org/issue38785 (cherry picked from commit dad6be5ffe48beb74fad78cf758b886afddc7aed) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>