Piston missing support for Django 2.2

Bug #1859751 reported by Lee Trager on 2020-01-15
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
High
Unassigned
django-piston3 (Ubuntu)
Undecided
Unassigned

Bug Description

Focal has upgraded Django to 2.2. Piston requires changes to work with the newer version of Django. This breaks MAAS on Focal/base 20.04.

Traceback (most recent call last):
  File "/usr/bin/maas", line 11, in <module>
    load_entry_point('maas==2.7.0rc1', 'console_scripts', 'maas')()
  File "/usr/lib/python3/dist-packages/maascli/__init__.py", line 39, in main
    parser = prepare_parser(argv)
  File "/usr/lib/python3/dist-packages/maascli/parser.py", line 71, in prepare_parser
    register_cli_commands(parser)
  File "/usr/lib/python3/dist-packages/maascli/cli.py", line 283, in register_cli_commands
    django_setup()
  File "/usr/lib/python3/dist-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/lib/python3/dist-packages/django/apps/registry.py", line 114, in populate
    app_config.import_models()
  File "/usr/lib/python3/dist-packages/django/apps/config.py", line 211, in import_models
    self.models_module = import_module(models_module_name)
  File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/lib/python3/dist-packages/maasserver/models/__init__.py", line 99, in <module>
    from piston3.doc import HandlerDocumentation
  File "/usr/lib/python3/dist-packages/piston3/doc.py", line 3, in <module>
    from . import handler
  File "/usr/lib/python3/dist-packages/piston3/handler.py", line 5, in <module>
    from .utils import rc
  File "/usr/lib/python3/dist-packages/piston3/utils.py", line 8, in <module>
    from django.core.urlresolvers import reverse
ModuleNotFoundError: No module named 'django.core.urlresolvers'
Traceback (most recent call last):
  File "/usr/bin/maas", line 11, in <module>
    load_entry_point('maas==2.7.0rc1', 'console_scripts', 'maas')()
  File "/usr/lib/python3/dist-packages/maascli/__init__.py", line 39, in main
    parser = prepare_parser(argv)
  File "/usr/lib/python3/dist-packages/maascli/parser.py", line 71, in prepare_parser
    register_cli_commands(parser)
  File "/usr/lib/python3/dist-packages/maascli/cli.py", line 283, in register_cli_commands
    django_setup()
  File "/usr/lib/python3/dist-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/lib/python3/dist-packages/django/apps/registry.py", line 114, in populate
    app_config.import_models()
  File "/usr/lib/python3/dist-packages/django/apps/config.py", line 211, in import_models
    self.models_module = import_module(models_module_name)
  File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/lib/python3/dist-packages/maasserver/models/__init__.py", line 99, in <module>
    from piston3.doc import HandlerDocumentation
  File "/usr/lib/python3/dist-packages/piston3/doc.py", line 3, in <module>
    from . import handler
  File "/usr/lib/python3/dist-packages/piston3/handler.py", line 5, in <module>
    from .utils import rc
  File "/usr/lib/python3/dist-packages/piston3/utils.py", line 8, in <module>
    from django.core.urlresolvers import reverse
ModuleNotFoundError: No module named 'django.core.urlresolvers'
Traceback (most recent call last):
  File "/usr/bin/maas", line 11, in <module>
    load_entry_point('maas==2.7.0rc1', 'console_scripts', 'maas')()
  File "/usr/lib/python3/dist-packages/maascli/__init__.py", line 39, in main
    parser = prepare_parser(argv)
  File "/usr/lib/python3/dist-packages/maascli/parser.py", line 71, in prepare_parser
    register_cli_commands(parser)
  File "/usr/lib/python3/dist-packages/maascli/cli.py", line 283, in register_cli_commands
    django_setup()
  File "/usr/lib/python3/dist-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/lib/python3/dist-packages/django/apps/registry.py", line 114, in populate
    app_config.import_models()
  File "/usr/lib/python3/dist-packages/django/apps/config.py", line 211, in import_models
    self.models_module = import_module(models_module_name)
  File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/lib/python3/dist-packages/maasserver/models/__init__.py", line 99, in <module>
    from piston3.doc import HandlerDocumentation
  File "/usr/lib/python3/dist-packages/piston3/doc.py", line 3, in <module>
    from . import handler
  File "/usr/lib/python3/dist-packages/piston3/handler.py", line 5, in <module>
    from .utils import rc
  File "/usr/lib/python3/dist-packages/piston3/utils.py", line 8, in <module>
    from django.core.urlresolvers import reverse
ModuleNotFoundError: No module named 'django.core.urlresolvers'
Traceback (most recent call last):
  File "/usr/bin/maas", line 11, in <module>
    load_entry_point('maas==2.7.0rc1', 'console_scripts', 'maas')()
  File "/usr/lib/python3/dist-packages/maascli/__init__.py", line 39, in main
    parser = prepare_parser(argv)
  File "/usr/lib/python3/dist-packages/maascli/parser.py", line 71, in prepare_parser
    register_cli_commands(parser)
  File "/usr/lib/python3/dist-packages/maascli/cli.py", line 283, in register_cli_commands
    django_setup()
  File "/usr/lib/python3/dist-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/lib/python3/dist-packages/django/apps/registry.py", line 114, in populate
    app_config.import_models()
  File "/usr/lib/python3/dist-packages/django/apps/config.py", line 211, in import_models
    self.models_module = import_module(models_module_name)
  File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/lib/python3/dist-packages/maasserver/models/__init__.py", line 99, in <module>
    from piston3.doc import HandlerDocumentation
  File "/usr/lib/python3/dist-packages/piston3/doc.py", line 3, in <module>
    from . import handler
  File "/usr/lib/python3/dist-packages/piston3/handler.py", line 5, in <module>
    from .utils import rc
  File "/usr/lib/python3/dist-packages/piston3/utils.py", line 8, in <module>
    from django.core.urlresolvers import reverse
ModuleNotFoundError: No module named 'django.core.urlresolvers'
Traceback (most recent call last):
  File "/usr/bin/maas", line 11, in <module>
    load_entry_point('maas==2.7.0rc1', 'console_scripts', 'maas')()
  File "/usr/lib/python3/dist-packages/maascli/__init__.py", line 39, in main
    parser = prepare_parser(argv)
  File "/usr/lib/python3/dist-packages/maascli/parser.py", line 71, in prepare_parser
    register_cli_commands(parser)
  File "/usr/lib/python3/dist-packages/maascli/cli.py", line 283, in register_cli_commands
    django_setup()
  File "/usr/lib/python3/dist-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/lib/python3/dist-packages/django/apps/registry.py", line 114, in populate
    app_config.import_models()
  File "/usr/lib/python3/dist-packages/django/apps/config.py", line 211, in import_models
    self.models_module = import_module(models_module_name)
  File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/lib/python3/dist-packages/maasserver/models/__init__.py", line 99, in <module>
    from piston3.doc import HandlerDocumentation
  File "/usr/lib/python3/dist-packages/piston3/doc.py", line 3, in <module>
    from . import handler
  File "/usr/lib/python3/dist-packages/piston3/handler.py", line 5, in <module>
    from .utils import rc
  File "/usr/lib/python3/dist-packages/piston3/utils.py", line 8, in <module>
    from django.core.urlresolvers import reverse
ModuleNotFoundError: No module named 'django.core.urlresolvers'
Traceback (most recent call last):
  File "/usr/bin/maas", line 11, in <module>
    load_entry_point('maas==2.7.0rc1', 'console_scripts', 'maas')()
  File "/usr/lib/python3/dist-packages/maascli/__init__.py", line 39, in main
    parser = prepare_parser(argv)
  File "/usr/lib/python3/dist-packages/maascli/parser.py", line 71, in prepare_parser
    register_cli_commands(parser)
  File "/usr/lib/python3/dist-packages/maascli/cli.py", line 283, in register_cli_commands
    django_setup()
  File "/usr/lib/python3/dist-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/lib/python3/dist-packages/django/apps/registry.py", line 114, in populate
    app_config.import_models()
  File "/usr/lib/python3/dist-packages/django/apps/config.py", line 211, in import_models
    self.models_module = import_module(models_module_name)
  File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/lib/python3/dist-packages/maasserver/models/__init__.py", line 99, in <module>
    from piston3.doc import HandlerDocumentation
  File "/usr/lib/python3/dist-packages/piston3/doc.py", line 3, in <module>
    from . import handler
  File "/usr/lib/python3/dist-packages/piston3/handler.py", line 5, in <module>
    from .utils import rc
  File "/usr/lib/python3/dist-packages/piston3/utils.py", line 8, in <module>
    from django.core.urlresolvers import reverse
ModuleNotFoundError: No module named 'django.core.urlresolvers'

Lee Trager (ltrager) on 2020-01-15
Changed in maas:
importance: Undecided → Critical
milestone: none → 2.7.0rc2
status: New → Triaged
Björn Tillenius (bjornt) wrote :

This is not a critical bug. We don't support running 2.7 on Focal.

Changed in maas:
importance: Critical → High
milestone: 2.7.0rc2 → none
Lee Trager (ltrager) wrote :

I marked it as critical because MAAS 2.6.0 is in Focal main.

https://packages.ubuntu.com/focal/maas

tags: added: focal
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers