Git Product home page Git Product logo

Comments (5)

tweedge avatar tweedge commented on July 16, 2024 3

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...

from faunadb-python.

robertcsapo avatar robertcsapo commented on July 16, 2024 2

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()
@robertcsapo ➜ /workspaces/faunadb-python (httpx ✗) $ python example.py 
started stream at 1642450065838000
on_version event at 1642450066010000
Event action: update
Changes made: None

on_version event at 1642450080180000
Event action: update
Changes made: {'lastName': 'GitHub'}

https://github.com/robertcsapo/faunadb-python/commit/a3caa9ab3afdef664a14113943c538f381506ba5#diff-835dd880822e3220bdae3adb6dfc4385cf7e2fc783eb2e2d7ddfa0f3e31566fd

https://github.com/robertcsapo/faunadb-python/blob/httpx/faunadb/streams/client.py

from faunadb-python.

twobitunicorn avatar twobitunicorn commented on July 16, 2024 2

For those who need this to work until it gets supported. you can add the following before your fauna imports

import collections.abc
collections.Iterable = collections.abc.Iterable
collections.Mapping = collections.abc.Mapping
collections.MutableSet = collections.abc.MutableSet
collections.MutableMapping = collections.abc.MutableMapping

from faunadb-python.

tigerrabbit avatar tigerrabbit commented on July 16, 2024 1

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.

from faunadb-python.

mwilde345 avatar mwilde345 commented on July 16, 2024 1

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.

from faunadb-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.