Actions
Issue #2898
closedDjango 1.10 breaks content app
Start date:
Due date:
Estimated time:
Severity:
3. High
Version:
2.12.2
Platform Release:
2.13.3
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Sprint 22
Quarter:
Description
This breaks Pulp running on Fedora 26, which ships with django 1.10. I observed the bug on Pulp 2.12.2, but it appears to affect master.
According to django's warning message, "django.conf.urls.patterns() is deprecated and will be removed in Django 1.10."
https://github.com/django/django/blob/1.9.13/django/conf/urls/__init__.py#L81-L83
We fixed that in one place:
But not this one (the above commit just forgot the import statement in the file below):
https://github.com/pulp/pulp/blob/2.13-release/server/pulp/server/content/web/urls.py#L1
The result is a traceback when trying to access the content app.
[Thu Jul 13 00:28:52.190844 2017] [wsgi:error] [pid 7] [remote 172.17.0.1:53180] ImportError: cannot import name patterns
[Thu Jul 13 00:46:11.863951 2017] [wsgi:error] [pid 10] [remote 172.17.0.1:53642] mod_wsgi (pid=10): Exception occurred processing WSGI script '/usr/share/pulp/wsgi/content.wsgi'.
[Thu Jul 13 00:46:11.863992 2017] [wsgi:error] [pid 10] [remote 172.17.0.1:53642] Traceback (most recent call last):
[Thu Jul 13 00:46:11.864004 2017] [wsgi:error] [pid 10] [remote 172.17.0.1:53642] File "/usr/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 170, in __call__
[Thu Jul 13 00:46:11.864292 2017] [wsgi:error] [pid 10] [remote 172.17.0.1:53642] response = self.get_response(request)
[Thu Jul 13 00:46:11.864302 2017] [wsgi:error] [pid 10] [remote 172.17.0.1:53642] File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 124, in get_response
[Thu Jul 13 00:46:11.864318 2017] [wsgi:error] [pid 10] [remote 172.17.0.1:53642] response = self._middleware_chain(request)
[Thu Jul 13 00:46:11.864323 2017] [wsgi:error] [pid 10] [remote 172.17.0.1:53642] File "/usr/lib/python2.7/site-packages/django/core/handlers/exception.py", line 44, in inner
[Thu Jul 13 00:46:11.864333 2017] [wsgi:error] [pid 10] [remote 172.17.0.1:53642] response = response_for_exception(request, exc)
[Thu Jul 13 00:46:11.864337 2017] [wsgi:error] [pid 10] [remote 172.17.0.1:53642] File "/usr/lib/python2.7/site-packages/django/core/handlers/exception.py", line 94, in response_for_exception
[Thu Jul 13 00:46:11.864346 2017] [wsgi:error] [pid 10] [remote 172.17.0.1:53642] response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
[Thu Jul 13 00:46:11.864350 2017] [wsgi:error] [pid 10] [remote 172.17.0.1:53642] File "/usr/lib/python2.7/site-packages/django/core/handlers/exception.py", line 139, in handle_uncaught_exception
[Thu Jul 13 00:46:11.864358 2017] [wsgi:error] [pid 10] [remote 172.17.0.1:53642] if resolver.urlconf_module is None:
[Thu Jul 13 00:46:11.864362 2017] [wsgi:error] [pid 10] [remote 172.17.0.1:53642] File "/usr/lib/python2.7/site-packages/django/utils/functional.py", line 35, in __get__
[Thu Jul 13 00:46:11.864370 2017] [wsgi:error] [pid 10] [remote 172.17.0.1:53642] res = instance.__dict__[self.name] = self.func(instance)
[Thu Jul 13 00:46:11.864374 2017] [wsgi:error] [pid 10] [remote 172.17.0.1:53642] File "/usr/lib/python2.7/site-packages/django/urls/resolvers.py", line 306, in urlconf_module
[Thu Jul 13 00:46:11.864383 2017] [wsgi:error] [pid 10] [remote 172.17.0.1:53642] return import_module(self.urlconf_name)
[Thu Jul 13 00:46:11.864387 2017] [wsgi:error] [pid 10] [remote 172.17.0.1:53642] File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
[Thu Jul 13 00:46:11.864396 2017] [wsgi:error] [pid 10] [remote 172.17.0.1:53642] __import__(name)
[Thu Jul 13 00:46:11.864418 2017] [wsgi:error] [pid 10] [remote 172.17.0.1:53642] File "/usr/lib/python2.7/site-packages/pulp/server/content/web/urls.py", line 1, in <module>
[Thu Jul 13 00:46:11.864430 2017] [wsgi:error] [pid 10] [remote 172.17.0.1:53642] from django.conf.urls import patterns, url
[Thu Jul 13 00:46:11.864441 2017] [wsgi:error] [pid 10] [remote 172.17.0.1:53642] ImportError: cannot import name patterns
Updated by mhrivnak over 5 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to mhrivnak
- Sprint/Milestone set to 41
- Version set to 2.12.2
Added by mhrivnak over 5 years ago
Updated by mhrivnak over 5 years ago
- Status changed from ASSIGNED to POST
Updated by mhrivnak over 5 years ago
- Status changed from POST to MODIFIED
Applied in changeset pulp|cbfb0c51cdec9695c8d89aeb8a0019174a2b9d79.
Updated by pcreech over 5 years ago
- Status changed from 5 to CLOSED - CURRENTRELEASE
Actions
Removes a stray import that was incompatible with django >= 1.10
https://pulp.plan.io/issues/2898 fixes #2898