python-django icon indicating copy to clipboard operation
python-django copied to clipboard

Django 4.1 all tests fail with 'OpenTracingMiddleware' object has no attribute '_is_coroutine'

Open jayvdb opened this issue 3 years ago • 1 comments

[   37s] ERROR: test_middleware_untraced_no_trace_all (test_site.test_middleware.TestDjangoOpenTracingMiddleware)
[   37s] ----------------------------------------------------------------------
[   37s] Traceback (most recent call last):
[   37s]   File "/usr/lib/python3.8/site-packages/django/test/utils.py", line 460, in inner
[   37s]     return func(*args, **kwargs)
[   37s]   File "/home/abuild/rpmbuild/BUILD/python-django-1.1.0/tests/test_site/test_middleware.py", line 37, in test_middleware_untraced_no_trace_all
[   37s]     response = client.get('/untraced/')
[   37s]   File "/usr/lib/python3.8/site-packages/django/test/client.py", line 836, in get
[   37s]     response = super().get(path, data=data, secure=secure, **extra)
[   37s]   File "/usr/lib/python3.8/site-packages/django/test/client.py", line 424, in get
[   37s]     return self.generic(
[   37s]   File "/usr/lib/python3.8/site-packages/django/test/client.py", line 541, in generic
[   37s]     return self.request(**r)
[   37s]   File "/usr/lib/python3.8/site-packages/django/test/client.py", line 810, in request
[   37s]     self.check_exception(response)
[   37s]   File "/usr/lib/python3.8/site-packages/django/test/client.py", line 663, in check_exception
[   37s]     raise exc_value
[   37s]   File "/usr/lib/python3.8/site-packages/django/core/handlers/exception.py", line 55, in inner
[   37s]     response = get_response(request)
[   37s]   File "/usr/lib/python3.8/site-packages/django/utils/deprecation.py", line 131, in __call__
[   37s]     if self._is_coroutine:
[   37s] AttributeError: 'OpenTracingMiddleware' object has no attribute '_is_coroutine'
[   37s] 

jayvdb avatar Sep 18 '22 02:09 jayvdb

@jayvdb Code has been fixed but is unreleased: https://github.com/census-instrumentation/opencensus-python/pull/1159

I've left a comment with a temp patch here: https://github.com/census-instrumentation/opencensus-python/pull/1159#issuecomment-1279893833

oscarhermoso avatar Oct 16 '22 05:10 oscarhermoso