-
Notifications
You must be signed in to change notification settings - Fork 1k
fix: propagate dispatch error to current task #917
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
Conversation
Can we have a test for it? The best would be for sync and async event emitters which fail without your change. |
@mxschmitt Added test |
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 |
@mxschmitt Fixed in latest commit |
Fixes #873