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

Pika is not compatible with python 3.7 #921

Closed
aolefira opened this issue Jan 16, 2018 · 6 comments
Closed

Pika is not compatible with python 3.7 #921

aolefira opened this issue Jan 16, 2018 · 6 comments
Assignees
Milestone

Comments

@aolefira
Copy link
Contributor

"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.7/whatsnew/3.5.html#new-keywords

So, you catch error in python 3.7:
/envs/plarin-3.7.0a4/lib/python3.7/site-packages/pika/adapters/libev_connection.py", line 106
self.async = None
^
SyntaxError: invalid syntax

@lukebakken
Copy link
Member

We would be glad to accept a PR to address this, thanks!

@clarabez
Copy link

Had the same using python 3.9. Just downgraded to 3.6 (into my venv) and worked fine.

@lukebakken
Copy link
Member

@clarabez could you provide more detail? Specifically, what errors? I just ran the test suite successfully using Python 3.9.1 -

---------------------------------------------------------------------------------
TOTAL                                             6888   2394   1506    164    66%
----------------------------------------------------------------------
Ran 1181 tests in 61.305s

OK (SKIP=61)
(venv) lbakken@shostakovich ~/development/pika/pika (lrb-update-python-versions=)
$ python --version
Python 3.9.1

andreas-mausch added a commit to andreas-mausch/csgo-skinscreenshot that referenced this issue Sep 13, 2021
- Set fixed version for Python docker image (3.6.15)
- Don't use deprecated 3-onbuild python image anymore
- Latest Python didn't work with pika: pika/pika#921
@aditi-sharma27
Copy link

Hi,

I am also facing this issue.

`Python 3.9.9 (main, Nov 21 2021, 03:23:42)
[Clang 13.0.0 (clang-1300.0.29.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

from broker_rabbit import BrokerRabbitMQ
Traceback (most recent call last):
File "", line 1, in
File "/Users/saditi/workspace/nstriagetodb/broker_rabbit/init.py", line 1, in
from broker_rabbit.broker import BrokerRabbitMQ
File "/Users/saditi/workspace/nstriagetodb/broker_rabbit/broker.py", line 4, in
from broker_rabbit.channels import ProducerChannel
File "/Users/saditi/workspace/nstriagetodb/broker_rabbit/channels.py", line 4, in
import pika
File "/Users/saditi/workspace/nstriagetodb/venv/lib/python3.9/site-packages/pika/init.py", line 22, in
from pika.adapters import BaseConnection
File "/Users/saditi/workspace/nstriagetodb/venv/lib/python3.9/site-packages/pika/adapters/init.py", line 39, in
from pika.adapters.libev_connection import LibevConnection
File "/Users/saditi/workspace/nstriagetodb/venv/lib/python3.9/site-packages/pika/adapters/libev_connection.py", line 103
self.async = None
^
SyntaxError: invalid syntax

`

@lukebakken
Copy link
Member

@meaditisharma this was fixed in #924. Please upgrade Pika.

@aditi-sharma27
Copy link

@lukebakken Thanks, It got fixed with pika update

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

No branches or pull requests

4 participants