GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Firestore Client Doesn't Work in Python 3.3 · Issue #4115 · googleapis/google-cloud-python

Firestore Client Doesn't Work in Python 3.3 #4115

New issue
Copy link
New issue
Copy link
Closed
Closed
Firestore Client Doesn't Work in Python 3.3#4115
Copy link
Assignees
lukesneeringer
Labels
api: firestoreIssues related to the Firestore API.packaging

Description

@hiranya911
hiranya911
opened on Oct 3, 2017
Issue body actions

Firestore library doesn't work on Python 3.3. Here's a sequence of steps to reproduce:

$ virtualenv sandbox
$ cd sandbox
$ source bin/activate
$ pip install google-cloud-firestore --upgrade
$ python --version
Python 3.3.0

$ python -c 'from google.cloud import firestore'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/google/home/hkj/Projects/firebase-admin-python/public/sandbox/lib/python3.3/site-packages/google/cloud/firestore.py", line 18, in <module>
    from google.cloud.firestore_v1beta1 import __version__
  File "/usr/local/google/home/hkj/Projects/firebase-admin-python/public/sandbox/lib/python3.3/site-packages/google/cloud/firestore_v1beta1/__init__.py", line 20, in <module>
    from google.cloud.firestore_v1beta1 import types
ImportError: cannot import name types

The issue seems to be grpc-related. The dependency takes an unusually long time to install.

Here's a link to a Travis build of the Firebase Admin SDK which depends on Firestore. Note how things fail only in the Python 3.3 environment.

Activity

  1. lukesneeringer commented on Oct 3, 2017

    @lukesneeringer
    lukesneeringer
    on Oct 3, 2017
    Contributor
    More actions

    Officially, we only support Python 3.4 and up (and 2.7), in keeping with the policy if most other large open source projects. That said, we will take a look at this and fix it if it is straightforward. :-)

    Reacted by Hiranya Jayathilaka
  2. dhermes
    added
    api: firestoreIssues related to the Firestore API.
    on Oct 3, 2017
  3. tseaver commented on Oct 4, 2017

    @tseaver
    tseaver
    on Oct 4, 2017
    Contributor
    More actions

    This is most likely down to pip / setuptools bugs WRT namespace packages. @hiranya911, can you please try adding the following:

    $ pip install --upgrade setuptools pip
    

    Before installing google-cloud-firestore?

  4. tseaver
    added
    packaging
    on Oct 4, 2017
  5. hiranya911 commented on Oct 6, 2017

    @hiranya911
    hiranya911
    on Oct 6, 2017
    ContributorAuthor
    More actions

    @tseaver Same error as before. Nothing was updated when I tried to upgrade setuptools and pip. My versions are:

    • pip 9.0.1
    • setuptools 36.5.0

    Given that this also occurs in a Travis CI environment, I doubt that it is due to outdated tools.

  6. dhermes commented on Oct 6, 2017

    @dhermes
    dhermes
    on Oct 6, 2017
    Contributor
    More actions

    Given that this also occurs in a Travis CI environment, I doubt that it is due to outdated tools.

    Travis CI is not notorious for having up-to-date environments, e.g. their latest Ubuntu image is the previous LTS from April 2014.

  7. lukesneeringer commented on Oct 12, 2017

    @lukesneeringer
    lukesneeringer
    on Oct 12, 2017
    Contributor
    More actions

    Hi @hiranya911,
    I looked into this, and the ImportError is actually coming from grpc, which is issuing import enum.

    enum was added to the standard library in Python 3.4, but there is a backport on PyPI for previous versions (pip install enum34). If you install enum34 from pip when using Python 3.3, things might work.

    What I mean by "things might work" -- doing so will get you past that particular ImportError. I do not guarantee everything will work past that, since we do not officially support or test on Python 3.3. (Your chances are decent that everything will work fine, though.)

  8. lukesneeringer commented on Oct 12, 2017

    @lukesneeringer
    lukesneeringer
    on Oct 12, 2017
    Contributor
    More actions

    @hiranya911 I also filed grpc/grpc#12976 that will fix this on their side.

    Again, no promises of Python 3.3 support, but this seems like sufficiently low hanging fruit.

    Reacted by Hiranya Jayathilaka
  9. lukesneeringer
    closed this as completedon Oct 12, 2017
  10. JustinBeckwith
    assigned
    lukesneeringer
    on Feb 1, 2021
  11. parthea
    added 2 commits that reference this issue on Jun 4, 2023

    Update dependency google-cloud-datacatalog to v1 [(#4115)](GoogleClou…

    b0ac5a2

    feat: Migrate API client to Microgenerator (#54)

    b7bb815
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @lukesneeringer
    lukesneeringer

Labels

api: firestoreIssues related to the Firestore API.packaging

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.