Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.7 syntax error: async is a reserved keyword #4849

Closed
hroncok opened this issue Jun 26, 2018 · 17 comments
Closed

Python 3.7 syntax error: async is a reserved keyword #4849

hroncok opened this issue Jun 26, 2018 · 17 comments
Milestone

Comments

@hroncok
Copy link

hroncok commented Jun 26, 2018

Checklist

Happens on master and previously released versions as well.

Steps to reproduce

See

from . import async, base
and
from .async import AsyncBackendMixin, BaseResultConsumer
and https://github.com/celery/celery/blob/master/celery/backends/async.py

Expected behavior

Module should not be named async.

Actual behavior

Module is named async.

More info

I fail to run 3.7 test easily, but this leads to:

  File "celery/backends/redis.py", line 22
    from . import async, base
                      ^
SyntaxError: invalid syntax
@georgepsarakis
Copy link
Contributor

Nice catch. This is already handled in #4500. The module will be renamed to asynchronous soon. @auvipy should we close as duplicate?

@hroncok
Copy link
Author

hroncok commented Jun 26, 2018

Sure. Sorry I haven't noticed that one.

@hroncok hroncok closed this as completed Jun 26, 2018
@auvipy
Copy link
Member

auvipy commented Jun 27, 2018

i will take care of this today

@hroncok
Copy link
Author

hroncok commented Jun 28, 2018

Since #4500 is closed, I'm reopening this one.

@hroncok hroncok reopened this Jun 28, 2018
@auvipy
Copy link
Member

auvipy commented Jun 29, 2018

yeah ok I have already started working

@auvipy
Copy link
Member

auvipy commented Jul 5, 2018

work in progress #4852

@auvipy
Copy link
Member

auvipy commented Jul 9, 2018

work is merged in master

@auvipy auvipy closed this as completed Jul 9, 2018
@hroncok
Copy link
Author

hroncok commented Jul 9, 2018

Can we anticipate a quick release or not? Just want to make sure whether we need to patch the Fedora package or wait.

@auvipy
Copy link
Member

auvipy commented Jul 9, 2018

we have a plan to release a minor on before the end of this month

@hroncok
Copy link
Author

hroncok commented Jul 9, 2018

Thanks.

@Avamander
Copy link

If anyone needs the changes right now then you can do pip install --upgrade https://github.com/celery/celery/tarball/master to get the fixes temporarily directly from development branch. Maybe it saves people finding this issue from Google some effort.

@sklarsa
Copy link
Contributor

sklarsa commented Aug 28, 2018

I'm still getting this error when trying to run celery 4.2.1, will this fix be available in an upcoming release?

@auvipy
Copy link
Member

auvipy commented Aug 29, 2018

yes, try master branch if you are in hurry for python 3.7

@metakermit
Copy link

metakermit commented Sep 5, 2018

Yup, would be nice to have this fix released soon, since Python 3.7 is the default you get on python.org / homebrew etc.

For anyone looking for a way to install Celery from master using Pipenv:

pipenv install -e git+https://github.com/celery/celery.git@master#egg=celery

@metakermit
Copy link

metakermit commented Sep 20, 2018

OK, correction – the above doesn't work in pipenv (at least not as part of a Docker build with a step RUN pipenv install --system --dev). I'm getting ImportErrors for celery not being there (I think it's because it gets placed in some local src folder that doesn't remain there for some reason).

I've also tried the following:

pipenv install https://github.com/celery/celery/tarball/master

in which case celery does get installed and can get imported, but it seems that this command doesn't install the dependencies… (might be related to this issue)

web_1     |   File "/usr/local/lib/python3.7/site-packages/celery/five.py", line 7, in <module>
web_1     |     import vine.five
web_1     | ModuleNotFoundError: No module named 'vine'

So, Celery is now broken if you want to use latest stable Python, Pipenv + Docker 😢.

@metakermit
Copy link

Regarding installation of Celery from GitHub as editable which seems to be a Pipenv issue, I've opened a bug there.

@auvipy
Copy link
Member

auvipy commented Sep 20, 2018

better stick with python 3.6 for celery 4.2, there are some other small issues regarding python 3.7 in the dependencies.

@celery celery locked as resolved and limited conversation to collaborators Sep 20, 2018
@auvipy auvipy added this to the v4.3 milestone Sep 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants