You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as I can tell, the aiopg integration is broken. Testing does not run properly due to the pytest.mark.asyncio method decorator. Once replaced by the mark_asyncio decorator, tests do run, but fail due to problems with the patch. Also, aiopg.connect is not patched correctly (only aiopg.connection.connect is patched)
Summary of problem
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/Users/william.conti/Documents/dd-trace/dd-trace-py/_aiopg.py", line 95, in
loop.run_until_complete(go_patched())
File "/Users/william.conti/.pyenv/versions/3.11.3/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/Users/william.conti/Documents/dd-trace/dd-trace-py/ddtrace/contrib/asyncio/patch.py", line 50, in traced_coro
return await coro
^^^^^^^^^^
File "/Users/william.conti/Documents/dd-trace/dd-trace-py/_aiopg.py", line 56, in go_patched
async with conn.cursor() as cur:
^^^^^^^^^^^^^
File "/Users/william.conti/Documents/dd-trace/dd-trace-py/ddtrace/contrib/aiopg/connection.py", line 103, in cursor
self.close_cursor()
^^^^^^^^^^^^^^^^^
AttributeError: 'Connection' object has no attribute 'close_cursor'
Which version of dd-trace-py are you using?
most recent pull of main
Which version of pip are you using?
Which libraries and their versions are you using?
`pip freeze`
How can we reproduce your problem?
What is the result that you get?
What is the result that you expected?
The text was updated successfully, but these errors were encountered:
@wconti27 Can you add the test error from the failed run?
As an aside, it'd be also useful to validate the integration is broken with a sample app. Put another way, we want to know if its the integration patch or the integration's tests that are broken.
The sample app has two functions, the first is untraced (though it should be traced, but aiopg.connect is not correctly patched). The second function uses aiopg.connection.connect, and results in tracing, but conn.cursor fails since no conn.close_cursor() exists for aiopg.
pip install .
docker-compose up -d postgres
python -m _aiopg
As far as I can tell, the aiopg integration is broken. Testing does not run properly due to the
pytest.mark.asyncio
method decorator. Once replaced by themark_asyncio
decorator, tests do run, but fail due to problems with the patch. Also,aiopg.connect
is not patched correctly (onlyaiopg.connection.connect
is patched)Summary of problem
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/Users/william.conti/Documents/dd-trace/dd-trace-py/_aiopg.py", line 95, in
loop.run_until_complete(go_patched())
File "/Users/william.conti/.pyenv/versions/3.11.3/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/Users/william.conti/Documents/dd-trace/dd-trace-py/ddtrace/contrib/asyncio/patch.py", line 50, in traced_coro
return await coro
^^^^^^^^^^
File "/Users/william.conti/Documents/dd-trace/dd-trace-py/_aiopg.py", line 56, in go_patched
async with conn.cursor() as cur:
^^^^^^^^^^^^^
File "/Users/william.conti/Documents/dd-trace/dd-trace-py/ddtrace/contrib/aiopg/connection.py", line 103, in cursor
self.close_cursor()
^^^^^^^^^^^^^^^^^
AttributeError: 'Connection' object has no attribute 'close_cursor'
Which version of dd-trace-py are you using?
most recent pull of main
Which version of pip are you using?
Which libraries and their versions are you using?
`pip freeze`
How can we reproduce your problem?
What is the result that you get?
What is the result that you expected?
The text was updated successfully, but these errors were encountered: