Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leaked tasks cause IsolatedAsyncioTestCase to throw an exception #89074

Closed
bharel mannequin opened this issue Aug 14, 2021 · 4 comments
Closed

Leaked tasks cause IsolatedAsyncioTestCase to throw an exception #89074

bharel mannequin opened this issue Aug 14, 2021 · 4 comments
Labels
3.10 only security fixes 3.11 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@bharel
Copy link
Mannequin

bharel mannequin commented Aug 14, 2021

BPO 44911
Nosy @voidspace, @ambv, @bharel, @miss-islington
PRs
  • bpo-44911: Fixed IsolatedAsyncioTestCase from throwing an exception on leaked tasks #27765
  • [3.10] bpo-44911: Fixed IsolatedAsyncioTestCase from throwing an exception on leaked tasks (GH-27765) #27777
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2021-08-16.10:40:05.015>
    created_at = <Date 2021-08-14.00:36:43.088>
    labels = ['type-bug', 'library', '3.10', '3.11']
    title = 'Leaked tasks cause IsolatedAsyncioTestCase to throw an exception'
    updated_at = <Date 2021-08-16.10:40:05.015>
    user = 'https://github.com/bharel'

    bugs.python.org fields:

    activity = <Date 2021-08-16.10:40:05.015>
    actor = 'lukasz.langa'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-08-16.10:40:05.015>
    closer = 'lukasz.langa'
    components = ['Library (Lib)']
    creation = <Date 2021-08-14.00:36:43.088>
    creator = 'bar.harel'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 44911
    keywords = ['patch']
    message_count = 4.0
    messages = ['399577', '399635', '399641', '399646']
    nosy_count = 4.0
    nosy_names = ['michael.foord', 'lukasz.langa', 'bar.harel', 'miss-islington']
    pr_nums = ['27765', '27777']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue44911'
    versions = ['Python 3.10', 'Python 3.11']

    @bharel
    Copy link
    Mannequin Author

    bharel mannequin commented Aug 14, 2021

    Writing a test that leaks a running asyncio task will cause IsolatedAsyncioTestCase to crash while attempting to cancel.

    Seems like the loop argument wasn't removed from the usage of asyncio.gather() in IsolatedAsyncioTestCase._tearDownAsyncioLoop

    Pushing a fix as we speak

    @bharel bharel mannequin added 3.10 only security fixes 3.11 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Aug 14, 2021
    @ambv
    Copy link
    Contributor

    ambv commented Aug 16, 2021

    New changeset 2cb1a68 by Bar Harel in branch 'main':
    bpo-44911: Fixed IsolatedAsyncioTestCase from throwing an exception on leaked tasks (GH-27765)
    2cb1a68

    @miss-islington
    Copy link
    Contributor

    New changeset 8516ca5 by Miss Islington (bot) in branch '3.10':
    bpo-44911: Fixed IsolatedAsyncioTestCase from throwing an exception on leaked tasks (GH-27765)
    8516ca5

    @ambv
    Copy link
    Contributor

    ambv commented Aug 16, 2021

    Thanks, Bar! ✨ 🍰 ✨

    @ambv ambv closed this as completed Aug 16, 2021
    @ambv ambv closed this as completed Aug 16, 2021
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    zware pushed a commit that referenced this issue Apr 12, 2022
    …ion on leaked tasks (GH-27765) (#91471)
    
    (cherry picked from commit 2cb1a68)
    
    Co-authored-by: Bar Harel <bar.harel@biocatch.com>
    hello-adam pushed a commit to hello-adam/cpython that referenced this issue Jun 2, 2022
    …exception on leaked tasks (pythonGH-27765) (python#91471)
    
    (cherry picked from commit 2cb1a68)
    
    Co-authored-by: Bar Harel <bar.harel@biocatch.com>
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.10 only security fixes 3.11 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants