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

bpo-39010: Improve test shutdown #22066

Merged
merged 1 commit into from
Sep 3, 2020

Conversation

bdarnell
Copy link
Contributor

@bdarnell bdarnell commented Sep 2, 2020

Simply closing the event loop isn't enough to avoid warnings. If we
don't also shut down the event loop's default executor, it sometimes
logs a "dangling thread" warning.

Follow-up to GH-22017

Since GH-22017 is being backported to the 3.8 and 3.9 branches, this one should be too.

https://bugs.python.org/issue39010

Simply closing the event loop isn't enough to avoid warnings. If we
don't also shut down the event loop's default executor, it sometimes
logs a "dangling thread" warning.

Follow-up to pythonGH-22017
@bedevere-bot
Copy link

@1st1: Please replace # with GH- in the commit message next time. Thanks!

@miss-islington
Copy link
Contributor

Thanks @bdarnell for the PR, and @1st1 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8, 3.9.
🐍🍒⛏🤖

@1st1
Copy link
Member

1st1 commented Sep 3, 2020

Thanks, Ben!

@miss-islington
Copy link
Contributor

Sorry, @bdarnell and @1st1, I could not cleanly backport this to 3.9 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker be435ae2b064dc64f04475bec632862e1dbf605f 3.9

@miss-islington
Copy link
Contributor

Sorry @bdarnell and @1st1, I had trouble checking out the 3.8 backport branch.
Please backport using cherry_picker on command line.
cherry_picker be435ae2b064dc64f04475bec632862e1dbf605f 3.8

@1st1
Copy link
Member

1st1 commented Sep 3, 2020

Hm, the automatic backport has failed. Ben, could you please manually backport and open PRs against 3.8 and 3.9?

@bdarnell
Copy link
Contributor Author

bdarnell commented Sep 3, 2020

The backports failed because the backports of #22017 (#22035 for 3.8, #22034 for 3.9) haven't merged yet. I see an automerge label on those PRs; should i wait for them or make a new manual backport that combines #22017 and this one? (or if they get merged, can the auto-backports of this one be retried?)

@miss-islington
Copy link
Contributor

Thanks @bdarnell for the PR, and @1st1 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Thanks @bdarnell for the PR, and @1st1 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 3, 2020
Simply closing the event loop isn't enough to avoid warnings. If we
don't also shut down the event loop's default executor, it sometimes
logs a "dangling thread" warning.

Follow-up to pythonGH-22017
(cherry picked from commit be435ae)

Co-authored-by: Ben Darnell <[email protected]>
@bedevere-bot
Copy link

GH-22082 is a backport of this pull request to the 3.9 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label Sep 3, 2020
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 3, 2020
Simply closing the event loop isn't enough to avoid warnings. If we
don't also shut down the event loop's default executor, it sometimes
logs a "dangling thread" warning.

Follow-up to pythonGH-22017
(cherry picked from commit be435ae)

Co-authored-by: Ben Darnell <[email protected]>
@bedevere-bot
Copy link

GH-22083 is a backport of this pull request to the 3.8 branch.

@1st1
Copy link
Member

1st1 commented Sep 3, 2020

The backports failed because the backports of #22017 (#22035 for 3.8, #22034 for 3.9) haven't merged yet. I see an automerge label on those PRs; should i wait for them or make a new manual backport that combines #22017 and this one? (or if they get merged, can the auto-backports of this one be retried?)

Oh, it's weird that automerge did nothing. Anyways, I merged them and triggered backports again. Thanks, Ben.

1st1 pushed a commit that referenced this pull request Sep 3, 2020
Simply closing the event loop isn't enough to avoid warnings. If we
don't also shut down the event loop's default executor, it sometimes
logs a "dangling thread" warning.

Follow-up to GH-22017
(cherry picked from commit be435ae)

Co-authored-by: Ben Darnell <[email protected]>

Co-authored-by: Ben Darnell <[email protected]>
1st1 pushed a commit that referenced this pull request Sep 3, 2020
Simply closing the event loop isn't enough to avoid warnings. If we
don't also shut down the event loop's default executor, it sometimes
logs a "dangling thread" warning.

Follow-up to GH-22017
(cherry picked from commit be435ae)

Co-authored-by: Ben Darnell <[email protected]>

Co-authored-by: Ben Darnell <[email protected]>
shihai1991 added a commit to shihai1991/cpython that referenced this pull request Sep 5, 2020
…lots1

* origin/master: (63 commits)
  bpo-41627: Distinguish 32 and 64-bit user site packages on Windows (pythonGH-22098)
  bpo-38585: Remove references to defusedexpat (pythonGH-22095)
  bpo-41721: Add xlc options (pythonGH-22096)
  bpo-40486: Specify what happens if directory content change diring iteration (pythonGH-22025)
  bpo-41638: Improve ProgrammingError message for absent parameter. (pythonGH-21999)
  bpo-41713: _signal doesn't use multi-phase init (pythonGH-22087)
  bpo-41700: Skip test if the locale is not supported (pythonGH-22081)
  [doc] Update documentation on logging optimization. (pythonGH-22075)
  Fix 'gather' rules in the python parser generator (pythonGH-22021)
  bpo-41697: Correctly handle KeywordOrStarred when parsing arguments in the parser (pythonGH-22077)
  [doc] Fix a typo in the graphlib docs (python#22030)
  bpo-1635741: Port _signal module to multi-phase init (PEP 489) (pythonGH-22049)
  bpo-39883: Use BSD0 license for code in docs (pythonGH-17635)
  bpo-39010: Improve test shutdown (python#22066)
  bpo-41696: Fix handling of debug mode in asyncio.run (python#22069)
  bpo-41690: Use a loop to collect args in the parser instead of recursion (pythonGH-22053)
  closes bpo-41689: Preserve text signature from tp_doc in C heap type creation. (pythonGH-22058)
  Fix invalid escape sequences in the peg_highlight Sphinx extension (pythonGH-22047)
  bpo-41675: Modernize siginterrupt calls (pythonGH-22028)
  bpo-41685: Don't pin setuptools version anymore in Doc/Makefile (pythonGH-22062)
  ...
xzy3 pushed a commit to xzy3/cpython that referenced this pull request Oct 18, 2020
Simply closing the event loop isn't enough to avoid warnings. If we
don't also shut down the event loop's default executor, it sometimes
logs a "dangling thread" warning.

Follow-up to pythonGH-22017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants