fix: propagate dispatch error to current task#917
Merged
mxschmitt merged 2 commits intomicrosoft:masterfrom Oct 1, 2021
kumaraditya303:master
Merged
fix: propagate dispatch error to current task#917mxschmitt merged 2 commits intomicrosoft:masterfrom kumaraditya303:master
mxschmitt merged 2 commits intomicrosoft:masterfrom
kumaraditya303:master
Conversation
Contributor
|
Can we have a test for it? The best would be for sync and async event emitters which fail without your change. |
Contributor
Author
@mxschmitt Added test |
Contributor
|
When executing the test on my environment it leads to the following: (env) ➜ playwright-python git:(master) ✗ pytest --browser chromium tests/common/test_events.py
Test session starts (platform: darwin, Python 3.9.7, pytest 6.2.4, pytest-sugar 0.9.4)
cachedir: .pytest_cache
rootdir: /Users/max/development/playwright-python, configfile: setup.cfg
plugins: cov-2.12.1, sugar-0.9.4, asyncio-0.15.1, flaky-3.7.0, xdist-2.3.0, repeat-0.9.1, timeout-1.4.2, forked-1.3.0
collecting ...
tests/common/test_events.py::test_events[chromium] ✓ 100% ██████████
Results (3.15s):
1 passed
Exception ignored in: <function BaseSubprocessTransport.__del__ at 0x1060550d0>
Traceback (most recent call last):
File "/Users/max/.pyenv/versions/3.9.7/lib/python3.9/asyncio/base_subprocess.py", line 126, in __del__
self.close()
File "/Users/max/.pyenv/versions/3.9.7/lib/python3.9/asyncio/base_subprocess.py", line 104, in close
proto.pipe.close()
File "/Users/max/.pyenv/versions/3.9.7/lib/python3.9/asyncio/unix_events.py", line 536, in close
self._close(None)
File "/Users/max/.pyenv/versions/3.9.7/lib/python3.9/asyncio/unix_events.py", line 560, in _close
self._loop.call_soon(self._call_connection_lost, exc)
File "/Users/max/.pyenv/versions/3.9.7/lib/python3.9/asyncio/base_events.py", line 746, in call_soon
self._check_closed()
File "/Users/max/.pyenv/versions/3.9.7/lib/python3.9/asyncio/base_events.py", line 510, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed |
Contributor
Author
@mxschmitt Fixed in latest commit |
mxschmitt
reviewed
Sep 27, 2021
mxschmitt
reviewed
Sep 27, 2021
mxschmitt
reviewed
Sep 30, 2021
mxschmitt
approved these changes
Oct 1, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #873