Skip to content
This repository has been archived by the owner on Jul 25, 2024. It is now read-only.

requirements: add min version 'celery>=5.3' #1101

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

roxell
Copy link
Contributor

@roxell roxell commented Aug 17, 2023

When running 'manage.py migrete' with Python version 3.11 the following Traceback could be seen:

$ ./manage.py migrate [242/884]
Traceback (most recent call last):
File "/home/anders/src/squad/venv-foo/lib/python3.11/site-packages/vine/five.py", line 361, in
from inspect import formatargspec, getfullargspec
ImportError: cannot import name 'formatargspec' from 'inspect' (/usr/lib/python3.11/inspect.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/anders/src/squad/./manage.py", line 3, in
from squad.manage import main
File "/home/anders/src/squad/squad/init.py", line 10, in
raise e
File "/home/anders/src/squad/squad/init.py", line 7, in
from .celery import app as celery_app # noqa
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/anders/src/squad/squad/celery.py", line 9, in
from celery import Celery
File "/home/anders/src/squad/venv-foo/lib/python3.11/site-packages/celery/init.py", line 19, in
from . import local # noqa
^^^^^^^^^^^^^^^^^^^
File "/home/anders/src/squad/venv-foo/lib/python3.11/site-packages/celery/local.py", line 17, in
from .five import PY3, bytes_if_py2, items, string, string_t
File "/home/anders/src/squad/venv-foo/lib/python3.11/site-packages/celery/five.py", line 7, in
import vine.five
File "/home/anders/src/squad/venv-foo/lib/python3.11/site-packages/vine/init.py", line 8, in
from .abstract import Thenable
File "/home/anders/src/squad/venv-foo/lib/python3.11/site-packages/vine/abstract.py", line 6, in
from .five import with_metaclass, Callable
File "/home/anders/src/squad/venv-foo/lib/python3.11/site-packages/vine/five.py", line 364, in
from inspect import formatargspec, getargspec as _getargspec # noqa
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: cannot import name 'formatargspec' from 'inspect' (/usr/lib/python3.11/inspect.py)

When dropping the hardcoded version lock '>=5.3' it looks like it passed ok.

When running 'manage.py migrete' with Python version 3.11 the following
Traceback could be seen:

$ ./manage.py migrate                                                                                                           [242/884]
Traceback (most recent call last):
  File "/home/anders/src/squad/venv-foo/lib/python3.11/site-packages/vine/five.py", line 361, in <module>
    from inspect import formatargspec, getfullargspec
ImportError: cannot import name 'formatargspec' from 'inspect' (/usr/lib/python3.11/inspect.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/anders/src/squad/./manage.py", line 3, in <module>
    from squad.manage import main
  File "/home/anders/src/squad/squad/__init__.py", line 10, in <module>
    raise e
  File "/home/anders/src/squad/squad/__init__.py", line 7, in <module>
    from .celery import app as celery_app  # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/anders/src/squad/squad/celery.py", line 9, in <module>
    from celery import Celery
  File "/home/anders/src/squad/venv-foo/lib/python3.11/site-packages/celery/__init__.py", line 19, in <module>
    from . import local  # noqa
    ^^^^^^^^^^^^^^^^^^^
  File "/home/anders/src/squad/venv-foo/lib/python3.11/site-packages/celery/local.py", line 17, in <module>
    from .five import PY3, bytes_if_py2, items, string, string_t
  File "/home/anders/src/squad/venv-foo/lib/python3.11/site-packages/celery/five.py", line 7, in <module>
    import vine.five
  File "/home/anders/src/squad/venv-foo/lib/python3.11/site-packages/vine/__init__.py", line 8, in <module>
    from .abstract import Thenable
  File "/home/anders/src/squad/venv-foo/lib/python3.11/site-packages/vine/abstract.py", line 6, in <module>
    from .five import with_metaclass, Callable
  File "/home/anders/src/squad/venv-foo/lib/python3.11/site-packages/vine/five.py", line 364, in <module>
    from inspect import formatargspec, getargspec as _getargspec  # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: cannot import name 'formatargspec' from 'inspect' (/usr/lib/python3.11/inspect.py)

When dropping the hardcoded version lock '>=5.3' it looks like it passed ok.

Signed-off-by: Anders Roxell <[email protected]>
@chaws
Copy link
Collaborator

chaws commented Aug 22, 2023

I'll review your patch today, as celery tagging was done by this commit: 47fd9f9

@chaws
Copy link
Collaborator

chaws commented Aug 22, 2023

Bummer!

Changing celery to that also changed django-celery-results, which is used when fetching android test jobs (+2M tests) and got this error while fetching

  File "/home/chaws/.local/lib/python3.10/site-packages/django_celery_results/backends/database.py", line 123, in <listcomp>
    results = [r.as_tuple() for r in header_result]
AttributeError: 'str' object has no attribute 'as_tuple'

I'll continue investigating

@chaws
Copy link
Collaborator

chaws commented Aug 22, 2023

This has been fixed in django-celery-results: celery/django-celery-results@d5c4456

@chaws
Copy link
Collaborator

chaws commented Aug 22, 2023

Updating django-celery-results require a database migration

django.db.utils.ProgrammingError: column django_celery_results_taskresult.periodic_task_name does not exist
LINE 1: ...d", "django_celery_results_taskresult"."task_id", "django_ce...

I'll put this PR in the back burner as higher priority things popped up.

@@ -1,5 +1,5 @@
aiohttp
celery<5.0,>=4.4
celery>=5.3
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test, will this work?

@@ -1,5 +1,5 @@
aiohttp
celery<5.0,>=4.4
celery>=5.3
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simply another comment...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants