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

Support `async` keyword in python 3.7 #4500

Closed
libre-man opened this issue Jan 24, 2018 · 33 comments · Fixed by #4679
Closed

Support `async` keyword in python 3.7 #4500

libre-man opened this issue Jan 24, 2018 · 33 comments · Fixed by #4679

Comments

@libre-man
Copy link

@libre-man libre-man commented Jan 24, 2018

Checklist

  • I have included the output of celery -A proj report in the issue.
    (if you are not able to do this, then at least specify the Celery
    version affected).
  • I have verified that the issue exists against the master branch of Celery.

Steps to reproduce

When importing celery in python 3.7 this fails with a syntax error. This is because async is used as a property on at least one object. The first error is in worker.py on line 243. This is still a issue on the master branch and I think it at least affects 4.1.0.

Expected behavior

I can import celery.

Actual behavior

I cannot import celery when running python 3.7

libre-man added a commit to CodeGra-de/CodeGra.de that referenced this issue Jan 24, 2018
* Fix assignment state buttons for LTI assignment

* Allow python dev versions to fail on Travis

This was done because of this issue: celery/celery#4500
@auvipy

This comment has been minimized.

Copy link
Member

@auvipy auvipy commented Jan 24, 2018

3.7 is not officially supported yet. that will be supported on v5 of celery after 4.2 release

@thedrow

This comment has been minimized.

Copy link
Member

@thedrow thedrow commented Feb 10, 2018

We could support 3.7 with 4.x as well. It will require some work though.

olmokramer added a commit to CodeGra-de/CodeGra.de that referenced this issue Feb 14, 2018
* Fix assignment state buttons for LTI assignment

* Allow python dev versions to fail on Travis

This was done because of this issue: celery/celery#4500
DevinHillenius added a commit to CodeGra-de/CodeGra.de that referenced this issue Mar 5, 2018
* Make sure assignment title is only updated after submitting (#328)

* Make sure existing users are added to course during BB-zip upload (#327)

* Add the first implementation of TA communication tools (#313)

* Scheduled weekly dependency update for week 00 (#331)

* Update sqlalchemy from 1.1.15 to 1.2.0

* Update werkzeug from 0.13 to 0.14.1

* Revert "Update werkzeug from 0.13 to 0.14.1"

This reverts commit 016ea22.

* Speedup `/assignment/{assignment_id}/submissions/` route (#332)

* Speedup `/assignment/{assignment_id}/submissions/` route

This route was very slow because a very large amount of requests were being
made. This stops sending the `comment` field by default on this route as this
field can become quite large. Furthermore it calculates the grade way more
efficiently if the grade is a rubric grade (otherwise the grade is not
calculated but simply stored in the database) by pre loading the
`selected_items` field on the `Work` objects it also converts the
`max_rubric_points` property to a cached property as a database request is done
to lookup this field.

* Add autocomplete for adding students to a course (#330)

* Add autocomplete for adding students to a course

* Make sure the deadline object is cloned before modification (#333)

* Split can manage course permission (#319)

* Split can_manage_course permission

Instead, we now have these permissions for more fine-grained control:

* can_edit_assignment_info
* can_assign_graders
* can_edit_cgignore
* can_upload_bb_zip
* can_edit_course_roles
* can_edit_course_users
* can_create_assignment

* Add db migration

* Use new permissions in frontend

* Make it possible to migrate without permissions in database

* Parametrise queries in migration

* Add autocomplete for adding students to a course

* Make sure dark mode looks OK

* Add new requirement to requirements.txt

* Make sure rate limiting is also tested

* Make sure limiter is reset before each test function

* Add a new way to check if a user has certain permissions

This way we are able to make sure calling `hasPermission` twice will always
result in a single http request as the http requests are cached as well.

* Revert adding a new javascript dependency

This dependency is not used after all as caching was implemented by hand as this
is more useful for our use case.

* Fix wrong error message when search string is not large enough

* Fix issues pointed out by @olmokramer during review

* Remove conditional container

This makes loading the manage course page way faster.

* Change the way the permission routes work

This makes it way easier to implement a lot of functions. This also corresponds
better to the way the permissions routes were being used by the front end.

* Replace <b-form-input>s with <input>s

* Correctly clear permissions on logout

* Add registration page (#336)

* Increase the speed of multiple pages (#341)

The following pages or routes should be faster:
- `/api/v1/assignments/` - Fix a `N + 1` query problem for the `MixedWhitespace`
    linter by joining in the initial query.
- `/api/v1/assignments/{assig_id}/submissions/?extended` - This route used the
    `CustomExtendedJSONEncoder` encoder, but as submissions contain two `User`
    fields they were also encoded with a extended format. This was unnecessary
    and slow. The `extended_jsonify` now takes a callback that can be used to
    determine which objects should be encoded using `__extended_to_json__`.
- The submission page - this page contains a multi step process for the first
    load: first we load some data, after this has finished we load some
    more. The amount of steps are reduced from three to two. The first stat
- The submissions page - this page also contained such steps, but they were
    completely removed as they were not needed. This page now also does a
    request less as it doesn't request the course info but instead takes this
    info from the `course` property on the requested assignment object.
- `/api/v1/assignments/{assig_id}/submissions/` (POST) - this request is used
    for uploading blackboard zips. This was quite slow as it was
    syncing (`db.session.add`) every new object to the database, now we only do
    this syncing at the end of the loop. Some queries in the loop are also
    removed, this reduces the amount of queries for a normal sized zip (around
    100) users from 1000 to 500.

This commit also includes improving of the type safety of the `db.session.query`
function call as this was needed to implement these speedups.

* Email graders when their status is reset to not done (#339)

* Email graders when their status is reset to not done

This is not done if they toggle themselves back to not done. Not all options are
implemented just yet, still left to do are
- [x] Uploading a new submission that gets assigned to a grader
- [x] Uploading a blackboard zip

* Make sure graders are mailed when uploading blackboard toggle status

* Set grader to not done if assigned a single submission

* Make sure very large rubrics do not overflow the interface (#343)

* Fix the reload behavior of snippets (#344)

Make sure snippets are always reloaded when a user tries to expand
snippets. Also don't reload snippets on verify login as this call is done every
time a user reloads a page. Furthermore we don't retry getting snippets if this
call fails, as this not really needed and can lead (and it did) to a infinite
loop of getting snippets if a user does not have the permission to use
snippets. This PR also closes #290 as I can't reproduce it on this branch.

* Make the way dividing and assigning works more intuitive (#342)

Make the way dividing and assigning works more intuitive

* Add done grading notification email (#346)

* Make the way dividing and assigning works more intuitive

I tried to explain how assigning and redividing works to somebody and a lot of
small things were unclear. This commit will change that by using the following
starting point: you divide an assignment by assigning submissions, but you do
not assign a submission by dividing. This makes it more logical that the
dividing dialog is not updated when assigning (as assigning does not lead to
dividing). However we should send reminder emails to all graders that are
assigned, not divided. This commit tries to explain this with
`description-popover` elements wherever possible.

* Add initial implementation the done email

This changes the UI for setting reminders, however the backend tests for the API
are not yet updated and as the API was changed in a breaking fashion the tests
will now fail.

* Add tests and documentation for the new features

* Add forgotten new files

* Change the name of the ``change_reminder`` function

The new name better reflects what is actually does

* Fix failing travis tests

Revert the renaming of `send_reminder_mails` to `send_reminder_mail` as the
previous name was better.

* Make sure no other functions use `_send_mail` out during tests

Otherwise checking if mails are send becomes way more difficult and the other
functions are already tested.

* Fix building the documentation

* Use correct tag

* Fixed all issues raised by @olmokramer during review

The things fixed are:
- Leading underscores are removed from the docstrings as they were not present
in the names of the variables anymore.
- The default done grading template was updated to make more sense.

* Create a `cancel` method in the submit button

This makes the code to show a warning in `Notifications.vue` way cleaner. This
might also be useful in the future.

* Improve the error messages

This also creates a descriptive message when no reminder type has been chosen by
the user.

* Fix timezone issues with the reminder type

As the time returned by the server is UTC and not local time this caused the
time to decrease with an hour every time it was submitted. This now always first
parses the time returned by the server using `moment`.

* Fix more typo's as pointed out by @olmokramer

* Rename 'can_update_grading' reminder to 'can_update_course_notification'

This also fixes a bug where permissions were not checked correctly. This also
adds tests for these cases.

* Fix the failing `test_warning_grading_done_email` test (#357)

This was happening because the wrong user was used during testing. This was
fixed by using the `teacher_user`.

* Make it possible to force reset of email when using LTI (#347)

* Make it possible to force reset of email when using LTI

This makes it possible to reset your password even if the initially given email
by the LMS was wrong.

* Add tests for new reset email functionality

This also split the function used for the PATCH login route as this makes it
easier to understand what is going on and also what still needed to be tested.

* Fix issues raised in review by @olmokramer

The issues that are fixed are:
- Remove the period after the button in the popover, this looks better.
- Replace a useless loop with `Element.closest`.
- Fix a typo.
- Remove a `console.log` call.

* Update a old migration to make sure it works with the new data (#360)

* Fix the reset password page (#361)

This was done by adding a single = on this page.

* Fix open icon not always showing correctly (#362)

If the state of an assignment was changed to `open` this was not displayed
correctly by highlighting the correct icon.

* Make sure snippets property is always valid (#363)

Initialize `.snippets` on the store to a valid snippet item to make sure no
errors will happen when adding new snippets. This should fix #290 once and for
all.

* Save snippets on ctrl+enter (#364)

* Fix the notifications dialog on webkit (#366)

The issue was that if the `max-height` or `height` of an input was changed
webkit cleared this input. This component now uses `b-collapse` elements which
do not have these problems.

* Fix assignment state buttons for LTI assignment (#367)

* Fix assignment state buttons for LTI assignment

* Allow python dev versions to fail on Travis

This was done because of this issue: celery/celery#4500

* Edit welcome message of docs

* ADD new structure + content to readme

* ADD technologies used and contributing sections

* Finish readme

* Fix minor errors and add links|

* Fix mistakenly added file

* Fix mistakenly added file

* Fix minor suggestions

* Add email

* Add Erik Kooistra to original team
olmokramer added a commit to CodeGra-de/CodeGra.de that referenced this issue Mar 7, 2018
* Make sure assignment title is only updated after submitting (#328)

* Make sure existing users are added to course during BB-zip upload (#327)

* Add the first implementation of TA communication tools (#313)

* Scheduled weekly dependency update for week 00 (#331)

* Update sqlalchemy from 1.1.15 to 1.2.0

* Update werkzeug from 0.13 to 0.14.1

* Revert "Update werkzeug from 0.13 to 0.14.1"

This reverts commit 016ea22.

* Speedup `/assignment/{assignment_id}/submissions/` route (#332)

* Speedup `/assignment/{assignment_id}/submissions/` route

This route was very slow because a very large amount of requests were being
made. This stops sending the `comment` field by default on this route as this
field can become quite large. Furthermore it calculates the grade way more
efficiently if the grade is a rubric grade (otherwise the grade is not
calculated but simply stored in the database) by pre loading the
`selected_items` field on the `Work` objects it also converts the
`max_rubric_points` property to a cached property as a database request is done
to lookup this field.

* Add autocomplete for adding students to a course (#330)

* Add autocomplete for adding students to a course

* Make sure the deadline object is cloned before modification (#333)

* Split can manage course permission (#319)

* Split can_manage_course permission

Instead, we now have these permissions for more fine-grained control:

* can_edit_assignment_info
* can_assign_graders
* can_edit_cgignore
* can_upload_bb_zip
* can_edit_course_roles
* can_edit_course_users
* can_create_assignment

* Add db migration

* Use new permissions in frontend

* Make it possible to migrate without permissions in database

* Parametrise queries in migration

* Add autocomplete for adding students to a course

* Make sure dark mode looks OK

* Add new requirement to requirements.txt

* Make sure rate limiting is also tested

* Make sure limiter is reset before each test function

* Add a new way to check if a user has certain permissions

This way we are able to make sure calling `hasPermission` twice will always
result in a single http request as the http requests are cached as well.

* Revert adding a new javascript dependency

This dependency is not used after all as caching was implemented by hand as this
is more useful for our use case.

* Fix wrong error message when search string is not large enough

* Fix issues pointed out by @olmokramer during review

* Remove conditional container

This makes loading the manage course page way faster.

* Change the way the permission routes work

This makes it way easier to implement a lot of functions. This also corresponds
better to the way the permissions routes were being used by the front end.

* Replace <b-form-input>s with <input>s

* Correctly clear permissions on logout

* Add registration page (#336)

* Increase the speed of multiple pages (#341)

The following pages or routes should be faster:
- `/api/v1/assignments/` - Fix a `N + 1` query problem for the `MixedWhitespace`
    linter by joining in the initial query.
- `/api/v1/assignments/{assig_id}/submissions/?extended` - This route used the
    `CustomExtendedJSONEncoder` encoder, but as submissions contain two `User`
    fields they were also encoded with a extended format. This was unnecessary
    and slow. The `extended_jsonify` now takes a callback that can be used to
    determine which objects should be encoded using `__extended_to_json__`.
- The submission page - this page contains a multi step process for the first
    load: first we load some data, after this has finished we load some
    more. The amount of steps are reduced from three to two. The first stat
- The submissions page - this page also contained such steps, but they were
    completely removed as they were not needed. This page now also does a
    request less as it doesn't request the course info but instead takes this
    info from the `course` property on the requested assignment object.
- `/api/v1/assignments/{assig_id}/submissions/` (POST) - this request is used
    for uploading blackboard zips. This was quite slow as it was
    syncing (`db.session.add`) every new object to the database, now we only do
    this syncing at the end of the loop. Some queries in the loop are also
    removed, this reduces the amount of queries for a normal sized zip (around
    100) users from 1000 to 500.

This commit also includes improving of the type safety of the `db.session.query`
function call as this was needed to implement these speedups.

* Email graders when their status is reset to not done (#339)

* Email graders when their status is reset to not done

This is not done if they toggle themselves back to not done. Not all options are
implemented just yet, still left to do are
- [x] Uploading a new submission that gets assigned to a grader
- [x] Uploading a blackboard zip

* Make sure graders are mailed when uploading blackboard toggle status

* Set grader to not done if assigned a single submission

* Make sure very large rubrics do not overflow the interface (#343)

* Fix the reload behavior of snippets (#344)

Make sure snippets are always reloaded when a user tries to expand
snippets. Also don't reload snippets on verify login as this call is done every
time a user reloads a page. Furthermore we don't retry getting snippets if this
call fails, as this not really needed and can lead (and it did) to a infinite
loop of getting snippets if a user does not have the permission to use
snippets. This PR also closes #290 as I can't reproduce it on this branch.

* Make the way dividing and assigning works more intuitive (#342)

Make the way dividing and assigning works more intuitive

* Add done grading notification email (#346)

* Make the way dividing and assigning works more intuitive

I tried to explain how assigning and redividing works to somebody and a lot of
small things were unclear. This commit will change that by using the following
starting point: you divide an assignment by assigning submissions, but you do
not assign a submission by dividing. This makes it more logical that the
dividing dialog is not updated when assigning (as assigning does not lead to
dividing). However we should send reminder emails to all graders that are
assigned, not divided. This commit tries to explain this with
`description-popover` elements wherever possible.

* Add initial implementation the done email

This changes the UI for setting reminders, however the backend tests for the API
are not yet updated and as the API was changed in a breaking fashion the tests
will now fail.

* Add tests and documentation for the new features

* Add forgotten new files

* Change the name of the ``change_reminder`` function

The new name better reflects what is actually does

* Fix failing travis tests

Revert the renaming of `send_reminder_mails` to `send_reminder_mail` as the
previous name was better.

* Make sure no other functions use `_send_mail` out during tests

Otherwise checking if mails are send becomes way more difficult and the other
functions are already tested.

* Fix building the documentation

* Use correct tag

* Fixed all issues raised by @olmokramer during review

The things fixed are:
- Leading underscores are removed from the docstrings as they were not present
in the names of the variables anymore.
- The default done grading template was updated to make more sense.

* Create a `cancel` method in the submit button

This makes the code to show a warning in `Notifications.vue` way cleaner. This
might also be useful in the future.

* Improve the error messages

This also creates a descriptive message when no reminder type has been chosen by
the user.

* Fix timezone issues with the reminder type

As the time returned by the server is UTC and not local time this caused the
time to decrease with an hour every time it was submitted. This now always first
parses the time returned by the server using `moment`.

* Fix more typo's as pointed out by @olmokramer

* Rename 'can_update_grading' reminder to 'can_update_course_notification'

This also fixes a bug where permissions were not checked correctly. This also
adds tests for these cases.

* Fix the failing `test_warning_grading_done_email` test (#357)

This was happening because the wrong user was used during testing. This was
fixed by using the `teacher_user`.

* Make it possible to force reset of email when using LTI (#347)

* Make it possible to force reset of email when using LTI

This makes it possible to reset your password even if the initially given email
by the LMS was wrong.

* Add tests for new reset email functionality

This also split the function used for the PATCH login route as this makes it
easier to understand what is going on and also what still needed to be tested.

* Fix issues raised in review by @olmokramer

The issues that are fixed are:
- Remove the period after the button in the popover, this looks better.
- Replace a useless loop with `Element.closest`.
- Fix a typo.
- Remove a `console.log` call.

* Update a old migration to make sure it works with the new data (#360)

* Fix the reset password page (#361)

This was done by adding a single = on this page.

* Fix open icon not always showing correctly (#362)

If the state of an assignment was changed to `open` this was not displayed
correctly by highlighting the correct icon.

* Make sure snippets property is always valid (#363)

Initialize `.snippets` on the store to a valid snippet item to make sure no
errors will happen when adding new snippets. This should fix #290 once and for
all.

* Save snippets on ctrl+enter (#364)

* Fix the notifications dialog on webkit (#366)

The issue was that if the `max-height` or `height` of an input was changed
webkit cleared this input. This component now uses `b-collapse` elements which
do not have these problems.

* Fix assignment state buttons for LTI assignment (#367)

* Fix assignment state buttons for LTI assignment

* Allow python dev versions to fail on Travis

This was done because of this issue: celery/celery#4500

* Edit welcome message of docs

* ADD new structure + content to readme

* ADD technologies used and contributing sections

* Finish readme

* Fix minor errors and add links|

* Fix mistakenly added file

* Fix mistakenly added file

* Fix minor suggestions

* Add email

* Add Erik Kooistra to original team
@auvipy

This comment has been minimized.

Copy link
Member

@auvipy auvipy commented Apr 10, 2018

I saw kombu renamed async keyword, what to be need in celer? @thedrow I can do if needed

@thedrow

This comment has been minimized.

Copy link
Member

@thedrow thedrow commented Apr 10, 2018

I don't know yet. We need to scan the code and see if we use async as a module name or a variable name anywhere.

@auvipy

This comment has been minimized.

@thedrow

This comment has been minimized.

Copy link
Member

@thedrow thedrow commented Apr 11, 2018

Change all async names to asynchronous like we did in Kombu.

@auvipy

This comment has been minimized.

Copy link
Member

@auvipy auvipy commented Apr 11, 2018

ok

@auvipy auvipy self-assigned this Apr 11, 2018
@auvipy auvipy added this to the v4.2 milestone Apr 17, 2018
@auvipy

This comment has been minimized.

Copy link
Member

@auvipy auvipy commented Apr 17, 2018

@carlwgeorge

This comment has been minimized.

Copy link

@carlwgeorge carlwgeorge commented Jun 26, 2018

The codebase is still not compatible with Python 3.7. While building an RPM, bytecompiling fails.

Bytecompiling .py files below /builddir/build/BUILDROOT/python-celery-4.2.0-2.fc29.noarch/usr/lib/python3.7 using /usr/bin/python3.7
*** Error compiling '/builddir/build/BUILDROOT/python-celery-4.2.0-2.fc29.noarch/usr/lib/python3.7/site-packages/celery/backends/redis.py'...
  File "/usr/lib/python3.7/redis.py", line 22
    from . import async, base
                      ^
SyntaxError: invalid syntax

from . import async, base

Please reopen.

@auvipy

This comment has been minimized.

Copy link
Member

@auvipy auvipy commented Jun 26, 2018

I will take care of those soon, for 4.2.1

@m3talstorm

This comment has been minimized.

Copy link

@m3talstorm m3talstorm commented Jun 28, 2018

@auvipy I hope I am not imposing, but I needed a fix for some Python3.7 testing, so I did a simple replace in the repo for 'async' -> 'asynchronous' (in the relevant places)., as seen above.

@auvipy

This comment has been minimized.

Copy link
Member

@auvipy auvipy commented Jun 29, 2018

just check my open pr plz

@m3talstorm

This comment has been minimized.

Copy link

@m3talstorm m3talstorm commented Jun 29, 2018

@auvipy Ah, I didn't see it because the PR or the commits didn't include the title/number of this issue.

@auvipy

This comment has been minimized.

Copy link
Member

@auvipy auvipy commented Jul 9, 2018

merged

@george-silva

This comment has been minimized.

Copy link

@george-silva george-silva commented Jul 26, 2018

I'm using Python 3.7.0 and just upgraded to version 4.2.1.

Error still persists:

  File "/home/george/projects/.virtualenvs/nswa/lib/python3.7/site-packages/celery/backends/redis.py", line 22
    from . import async, base
                      ^
SyntaxError: invalid syntax
@huangsam

This comment has been minimized.

Copy link
Contributor

@huangsam huangsam commented Jul 26, 2018

@george-silva encountering the same issue as well with 4.2.1 on Python 3.7.

@huangsam

This comment has been minimized.

Copy link
Contributor

@huangsam huangsam commented Jul 26, 2018

@auvipy

This comment has been minimized.

Copy link
Member

@auvipy auvipy commented Jul 27, 2018

4.2.x branch dont support python 3.7. you have use master or wait for 4.3 release.

@auvipy auvipy modified the milestones: v4.2, v4.3 Jul 27, 2018
@trolley813

This comment has been minimized.

Copy link

@trolley813 trolley813 commented Aug 2, 2018

@auvipy why this change cannot be backported to 4.2.x? 4.3 probably won't be soon.

@thedrow

This comment has been minimized.

Copy link
Member

@thedrow thedrow commented Aug 5, 2018

Bug fix versions should not add support for new Python versions.

@coldnight

This comment has been minimized.

Copy link

@coldnight coldnight commented Aug 5, 2018

Do we have a schedule for release 4.3?

@thedrow

This comment has been minimized.

Copy link
Member

@thedrow thedrow commented Aug 5, 2018

No, not currently.

@coldnight

This comment has been minimized.

Copy link

@coldnight coldnight commented Aug 5, 2018

I do have work around of re._pattern_type, but I haven't work around for async keyword problem. Any suggestions?

@amirouche

This comment has been minimized.

Copy link

@amirouche amirouche commented Aug 5, 2018

Maybe will work for you:

@celery.task
def def my_task(a, b, c):
    loop.run_until_complete(async_task(a, b, c))

IMO, the support of async in celery is very difficult topic as it's seems to me it requires to much care from human ware to make it workable in production. Still having a way to use the same syntax in web handler and asynchronous backend task in SQL layer for instance, or re-use some client code with the web handler, I use that. Basically it helps share code around without the need to implement a complicated code in celery...

@amirouche

This comment has been minimized.

Copy link

@amirouche amirouche commented Aug 5, 2018

I might be wrong. I will investigate use of celery in asyncio world.

@thedrow

This comment has been minimized.

Copy link
Member

@thedrow thedrow commented Aug 5, 2018

@amirouche The purpose of this issue is to remove the async name from our code base since in 3.7+ async is a keyword.
We're not talking about asyncio yet.

@trolley813

This comment has been minimized.

Copy link

@trolley813 trolley813 commented Aug 6, 2018

@thedrow It's actually (most of) not "adding support for Python 3.7", but "fixing a bug in 3.7 which results in a syntax error only because async is a keyword". So sorry, but your statement sounds much like "bug fix version should not fix bugs happening only in new Python versions".
P.S. The async and await keywords were introduced into Python back in 3.5, so it was unwise to continue using them as identifiers after that release, because they could become reserved at some point in the future (which actually happened upon the 3.7 release)

@haakenlid

This comment has been minimized.

Copy link

@haakenlid haakenlid commented Aug 16, 2018

The use of async as a variable name in python was deprecated in 2015. Why wait three years to fix this bug in celery?

async and await are not recommended to be used as variable, class, function or module names. Introduced by PEP 492 in Python 3.5, they will become proper keywords in Python 3.7.

https://docs.python.org/3/whatsnew/3.5.html#deprecated

@thedrow

This comment has been minimized.

Copy link
Member

@thedrow thedrow commented Aug 16, 2018

Because it has just occurred to us.
We didn't notice the fact that we have modules named async.
None of us are the original creator of Celery so we're not familiar with the project as @ask was.

@Madi7

This comment has been minimized.

Copy link

@Madi7 Madi7 commented Aug 20, 2018

Im using Python_3.7 with Celery_4.2.1. The problem still exists so I had to change "async" to "asynchronous" manually. Obviously it solved the problem, but I don't like the fact that I had to rename those variables by my own. Please release a new version with a fix asap

@auvipy

This comment has been minimized.

Copy link
Member

@auvipy auvipy commented Aug 20, 2018

try from master branch. celery 4.2 do not support python 3.7

@rubenwardy

This comment has been minimized.

Copy link

@rubenwardy rubenwardy commented Aug 25, 2018

Please release a patch fix with this included (ie: 4.2.2). This is quite a big issue.

@ddliu

This comment has been minimized.

Copy link

@ddliu ddliu commented Aug 30, 2018

The renaming script works for me: https://github.com/ddliu/dockerfiles/blob/master/special/nc/ns/fix.sh

#!/bin/sh

TARGET=/usr/local/lib/python3.7/site-packages/celery/backends
cd $TARGET
if [ -e async.py ]
then
    mv async.py asynchronous.py
    sed -i 's/async/asynchronous/g' redis.py
    sed -i 's/async/asynchronous/g' rpc.py
fi
@celery celery locked and limited conversation to collaborators Aug 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

You can’t perform that action at this time.