-
Notifications
You must be signed in to change notification settings - Fork 25
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.10 support #220
Comments
Probably not recommended, but here is a workaround I used to get fauna working on my dev (not production) script. Commented out line 12 from the file ..REDACTED/site-packages/faunadb/streams. #from hyper import HTTP20Connection. Probably will impact other functions, but did make it past the error with collections so far. |
I've replaced hyper with httpx in my fork and it seems to work. doc = client.query(q.get(q.ref(q.collection("customers"), "101")))
indexes = client.query(q.paginate(q.indexes()))
options = {"fields": ["document", "diff", "action"]}
stream = client.stream(doc["ref"], options, on_start, on_error, on_version)
stream.start()
https://github.com/robertcsapo/faunadb-python/blob/httpx/faunadb/streams/client.py |
Just adding another comment here as Python 3.10 is shipping in more distros, and FaunaDB is the last dependency in several projects of mine to support it... |
For those who need this to work until it gets supported. you can add the following before your fauna imports
|
Thanks @robertcsapo for the contribution 👏 , apologies all for the delay on official support. It's been added in 4.5.0 Let us know if any issues are encountered during usage. |
ImportError: cannot import name 'Iterable' from 'collections' (/usr/local/lib/python3.10/collections/__init__.py)
This is due to
hyper
, for stream function (http/2)faunadb-python/faunadb/streams/client.py
Line 12 in 1e16d79
faunadb-python/faunadb/streams/client.py
Line 48 in 1e16d79
https://github.com/python-hyper/hyper
(faunadb-python works with python 3.9)
The text was updated successfully, but these errors were encountered: