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
I think ddtrace uses an API that was changed in pytest 8. Now, when running pytest in a project with ddtrace enabled, instead of running tests, it crashes.
Try upgrading to pytest 8 and see if you can run tests with the ddtrace plugin enabled.
What is the result that you get?
A pytest INTERNALERROR that ends with:
INTERNALERROR> File "/.../site-packages/ddtrace/contrib/pytest/plugin.py", line 835, in pytest_ddtrace_get_item_module_name
INTERNALERROR> return pytest_package_item.module.__name__
INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR> AttributeError: 'Package' object has not attribute 'module'
What is the result that you expected?
The tests should run.
The text was updated successfully, but these errors were encountered:
Thanks for bringing this to our attention, @leifwalsh. I've added a ticket about this to an internal backlog, and it will be included in future prioritization passes.
Summary of problem
I think ddtrace uses an API that was changed in pytest 8. Now, when running pytest in a project with ddtrace enabled, instead of running tests, it crashes.
The crash is on this line:
dd-trace-py/ddtrace/contrib/pytest/plugin.py
Line 835 in bf8c08d
I believe the explanation is that pytest-dev/pytest#11137 broke the ddtrace plugin's expectation that
Package
is aModule
. This is explained more plainly in the changelog: https://github.com/pytest-dev/pytest/blob/c0dfc451861a0fbf9b9659e8f8d723ea730a5619/doc/en/changelog.rst#L137-L147Which version of dd-trace-py are you using?
2.5.1
Which version of pip are you using?
23.3.2
Which libraries and their versions are you using?
pytest 8.0.0
How can we reproduce your problem?
Try upgrading to pytest 8 and see if you can run tests with the ddtrace plugin enabled.
What is the result that you get?
A pytest
INTERNALERROR
that ends with:What is the result that you expected?
The tests should run.
The text was updated successfully, but these errors were encountered: