bug: Test connector - asyncio
See original GitHub issueMeltano Version
2.4.0
Python Version
3.9
Bug scope
CLI (options, error messages, logging, etc.)
Operating System
Rocky Linux release 8.6
Description
meltano config tap-postgres test
above command works fine till version 2.1.0 and python 3.9.7.
But it fails when i switched to 2.2.0,2.3.0 and 2.4.0
Exception ignored in: <function BaseSubprocessTransport.__del__ at 0x7fcad8ae8670>
Traceback (most recent call last):
File "/usr/lib64/python3.9/asyncio/base_subprocess.py", line 126, in __del__
self.close()
File "/usr/lib64/python3.9/asyncio/base_subprocess.py", line 104, in close
proto.pipe.close()
File "/usr/lib64/python3.9/asyncio/unix_events.py", line 536, in close
self._close(None)
File "/usr/lib64/python3.9/asyncio/unix_events.py", line 560, in _close
self._loop.call_soon(self._call_connection_lost, exc)
File "/usr/lib64/python3.9/asyncio/base_events.py", line 746, in call_soon
self._check_closed()
File "/usr/lib64/python3.9/asyncio/base_events.py", line 510, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
To fix it , I changed file in cli/config.y
:
-- is_valid, detail = asyncio.run(_validate()) (removed)
++is_valid, detail = asyncio.new_event_loop().run_until_complete(_validate()) (added)
Kindly get it check at your end and fix it in coming releases.
Code
To fix it, I changed file in cli/config.py
:
- is_valid, detail = asyncio.run(_validate())
+ is_valid, detail = asyncio.new_event_loop().run_until_complete(_validate())
Issue Analytics
- State:
- Created a year ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
Files reproducing a bug in `pytest-asyncio` · GitHub
This Gist contains files reproducing a bug in `pytest-asyncio` that appears. when testing an aiohttp application. The bug is a regression. The last...
Read more >In some cases asyncio.wait_for can lead to socket leak.
Proposed test case calls cancel for inner future and set_result for outer task in the same loop step. The old (prior to this...
Read more >Async IO in Python: A Complete Walkthrough
This tutorial will give you a firm grasp of Python's approach to async IO, which is a concurrent programming design that has received...
Read more >Finding and reporting an asyncio bug in Python 3.10
Annoyingly the root error wasn't displayed directly in the tests, because it was triggered and then caught by Datasette's own error handling and ......
Read more >1739895 – python-asynctest fails to build with Python 3.8
side_effect = asyncio.coroutine(lambda: 'ProbeValue') ../builddir/build/BUILD/asynctest-0.13.0/test/test_mock.py:163: DeprecationWarning: "@ ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@pandemicsyn , I have already informed with code changes done at my end to resolve the issue faced by me.
@AvinashGupta802 if you would like to take a stab at fixing this we’d definitely be open to a PR that implements the fix from https://github.com/python/cpython/issues/88050#issuecomment-1093911484 for https://github.com/meltano/meltano/blob/ecac36b7d1094955e3ba2c7fd98d4f4201c4fe25/src/meltano/core/plugin_test_service.py#L70-L75.
@tayloramurphy if this goes on the backlog, realistically it’s probably a 2, but I assigned a 4 in case some unexpected side effects pop up.