Support the latest version of Django
See original GitHub issuePy3.6 system test would fail with the latest version of Django, need to get it fixed.
============================= test session starts ==============================
platform linux -- Python 3.6.0, pytest-3.2.2, py-1.8.0, pluggy-0.4.0
rootdir: /root/repo, inifile:
plugins: cov-2.5.1
collected 14 items
tests/system/stats/prometheus/prometheus_stats_test.py .
tests/system/stats/stackdriver/stackdriver_stats_test.py Dropping 1 non-positive bucket boundaries
.Dropping 1 non-positive bucket boundaries
.
tests/system/trace/basic_trace/basic_trace_system_test.py Test simple tracing...
Test simple tracing...
.
tests/system/trace/django/django_system_test.py 95ba383f898c4fc1abf49ccc23f50ad9/a226ee08ca664278;o=1
--2019-03-04 22:55:31-- http://localhost:8000/
Resolving localhost (localhost)... 127.0.0.1, 127.0.0.1, ::1
Connecting to localhost (localhost)|127.0.0.1|:8000... failed: Connection refused.
Connecting to localhost (localhost)|127.0.0.1|:8000... failed: Connection refused.
Connecting to localhost (localhost)|::1|:8000... failed: Cannot assign requested address.
Retrying.
Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x7f148153fa60>
Traceback (most recent call last):
File "/root/repo/.nox/sys-3-6/lib/python3.6/site-packages/django/urls/conf.py", line 17, in include
urlconf_module, app_name = arg
ValueError: too many values to unpack (expected 2)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/repo/.nox/sys-3-6/lib/python3.6/site-packages/django/utils/autoreload.py", line 225, in wrapper
fn(*args, **kwargs)
File "/root/repo/.nox/sys-3-6/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 117, in inner_run
self.check(display_num_errors=True)
File "/root/repo/.nox/sys-3-6/lib/python3.6/site-packages/django/core/management/base.py", line 379, in check
include_deployment_checks=include_deployment_checks,
File "/root/repo/.nox/sys-3-6/lib/python3.6/site-packages/django/core/management/base.py", line 366, in _run_checks
return checks.run_checks(**kwargs)
File "/root/repo/.nox/sys-3-6/lib/python3.6/site-packages/django/core/checks/registry.py", line 71, in run_checks
new_errors = check(app_configs=app_configs)
File "/root/repo/.nox/sys-3-6/lib/python3.6/site-packages/django/core/checks/urls.py", line 40, in check_url_namespaces_unique
all_namespaces = _load_all_namespaces(resolver)
File "/root/repo/.nox/sys-3-6/lib/python3.6/site-packages/django/core/checks/urls.py", line 57, in _load_all_namespaces
url_patterns = getattr(resolver, 'url_patterns', [])
File "/root/repo/.nox/sys-3-6/lib/python3.6/site-packages/django/utils/functional.py", line 37, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/root/repo/.nox/sys-3-6/lib/python3.6/site-packages/django/urls/resolvers.py", line 533, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/root/repo/.nox/sys-3-6/lib/python3.6/site-packages/django/utils/functional.py", line 37, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/root/repo/.nox/sys-3-6/lib/python3.6/site-packages/django/urls/resolvers.py", line 526, in urlconf_module
return import_module(self.urlconf_name)
File "/root/repo/.nox/sys-3-6/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 978, in _gcd_import
File "<frozen importlib._bootstrap>", line 961, in _find_and_load
File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
File "/root/repo/tests/system/trace/django/app/urls.py", line 37, in <module>
url(r'^admin/', include(admin.site.urls)),
File "/root/repo/.nox/sys-3-6/lib/python3.6/site-packages/django/urls/conf.py", line 27, in include
'provide the namespace argument to include() instead.' % len(arg)
django.core.exceptions.ImproperlyConfigured: Passing a 3-tuple to include() is not supported. Pass a 2-tuple containing the list of patterns and app_name, and provide the namespace argument to include() instead.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Download Django
We recommend using the latest version of Python 3. The last version to support Python 2.7 is Django 1.11 LTS. See the FAQ...
Read more >Django - endoflife.date
The last feature release for a major version will be designated as long-term support (LTS) release. These releases will get security and data...
Read more >Django - PyPI
Django 4.1.4 · Project description · Supporting the Development of Django · Project details · Release history Release notifications | RSS feed ·...
Read more >Release Notes - Django REST framework
This is the last Django REST Framework release that will support Python 2. Be sure to upgrade to Python 3 before upgrading to...
Read more >Django support - PyCharm Documentation - JetBrains
PyCharm supports the latest Django versions. The corresponding Python versions depend on Django. See What Python version can I use with Django?
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 Free
Top 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
@odeke-em FYI, @zoidbergwill is working on supporting Django 2.x in #358, which is using
connection.execute_wrappers
.It looks to me like existing versions of
OpencensusMiddleware
should work with fine with Django 2.x. The test failures only required changes in tests (#694). https://github.com/census-instrumentation/opencensus-python/pull/697 removes theinstall_requires
restriction for Django 2.x.As far as I can tell, #358 is a new feature and has nothing to do with getting existing functionality working with Django 2.x.