Django-celery-beat: django-timezone-field breaking celery-beat for Django 3

Created on 3 Feb 2020  路  8Comments  路  Source: celery/django-celery-beat

Summary:

django-celery-beat-1.6.0 does not work with Django 3 because of it's dependency on django-timezone-field<4.0 because timezone-field<4.0 does not support Django 3. The breaking dependency change was introduced as a reaction to #296

  • Celery Version: 4.4.0 (cliffs)
  • Celery-Beat Version: django-celery-beat-1.6.0
  • Djang Version: 3.0.3

Exact steps to reproduce the issue:

  1. Install django-celery-beat-1.6.0 and Django 3.0.3
  2. call django.setup() in your code (or do python3 manage.py shell I guess)
Traceback (most recent call last):

[...]
  File "/usr/local/lib/python3.7/dist-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/local/lib/python3.7/dist-packages/django/apps/registry.py", line 114, in populate
    app_config.import_models()
  File "/usr/local/lib/python3.7/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 "/usr/local/lib/python3.7/dist-packages/django_celery_beat/models.py", line 6, in <module>
    import timezone_field
  File "/usr/local/lib/python3.7/dist-packages/timezone_field/__init__.py", line 1, in <module>
    from timezone_field.fields import TimeZoneField
  File "/usr/local/lib/python3.7/dist-packages/timezone_field/fields.py", line 5, in <module>
    from django.utils import six
ImportError: cannot import name 'six' from 'django.utils' (/usr/local/lib/python3.7/dist-packages/django/utils/__init__.py)

Most helpful comment

All 8 comments

django.utils.six was dropped in django 3.0: https://docs.djangoproject.com/en/3.0/releases/3.0/#removed-private-python-2-compatibility-apis

Have just faced the same issue.

Does anybody know when the hotfix could be published?

@auvipy @thedrow Please, an early release is needed to support Django 3.0

Fixed this issue in #300

Uninstall the existing version using this code

pip uninstall django-celery-beat==1.6.0

Install the fixed version from master using the below code

pip install https://github.com/celery/django-celery-beat/zipball/master#egg=django-celery-beat

@auvipy You can close this issue now. Thanks

For those who install from pinned releases, is a numbered release with this fix coming soon?

yes

This appears to be related to #308 - still awaiting a release with this fix.

Was this page helpful?
0 / 5 - 0 ratings