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

Upgrade minimum version of google-cloud-core to 1.4.4 #1014

Closed
parthea opened this issue Sep 30, 2023 · 0 comments · Fixed by #1015
Closed

Upgrade minimum version of google-cloud-core to 1.4.4 #1014

parthea opened this issue Sep 30, 2023 · 0 comments · Fixed by #1015
Assignees
Labels
api: spanner Issues related to the googleapis/python-spanner API.

Comments

@parthea
Copy link
Contributor

parthea commented Sep 30, 2023

There is a dependency on google-cloud-core>=1.4.1 in setup.py. We should bump the minimum version to 1.4.4. In older versions of google-cloud-core, six was used in the code but was not explicitly listed as a dependency resulting in runtime errors in environments where it is not already installed.

https://github.com/googleapis/python-cloud-core/releases/tag/v1.4.4

python-spanner/setup.py

Lines 38 to 40 in 498dba2

dependencies = [
"google-api-core[grpc] >= 1.34.0, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,!=2.10.*",
"google-cloud-core >= 1.4.1, < 3.0dev",

This is causing the unit-3.7 continuous build to fail. See build log here

nox > Running session unit-3.7
nox > Creating virtual environment (virtualenv) using python3.7 in .nox/unit-3-7
nox > python -m pip install mock asyncmock pytest pytest-cov pytest-asyncio -c /tmpfs/src/github/python-spanner/testing/constraints-3.7.txt
nox > python -m pip install -e . -c /tmpfs/src/github/python-spanner/testing/constraints-3.7.txt
nox > py.test --quiet --cov=google.cloud.spanner --cov=google.cloud --cov=tests.unit --cov-append --cov-config=.coveragerc --cov-report= --cov-fail-under=0 tests/unit
/tmpfs/src/github/python-spanner/.nox/unit-3-7/lib/python3.7/site-packages/coverage/inorout.py:507: CoverageWarning: Module google.cloud.spanner was never imported. (module-not-imported)
  self.warn(f"Module {pkg} was never imported.", slug="module-not-imported")
/tmpfs/src/github/python-spanner/.nox/unit-3-7/lib/python3.7/site-packages/coverage/inorout.py:523: CoverageWarning: Module google.cloud was previously imported, but not measured (module-not-measured)
  self.warn(msg, slug="module-not-measured")

==================================== ERRORS ====================================
__________ ERROR collecting tests/unit/test__opentelemetry_tracing.py __________
ImportError while importing test module '/tmpfs/src/github/python-spanner/tests/unit/test__opentelemetry_tracing.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.7/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/unit/test__opentelemetry_tracing.py:13: in <module>
    from google.cloud.spanner_v1 import _opentelemetry_tracing
google/cloud/spanner_v1/__init__.py:65: in <module>
    from google.cloud.spanner_v1.client import Client
google/cloud/spanner_v1/client.py:33: in <module>
    from google.cloud.client import ClientWithProject
.nox/unit-3-7/lib/python3.7/site-packages/google/cloud/client.py:21: in <module>
    import six
E   ModuleNotFoundError: No module named 'six'
__________________ ERROR collecting tests/unit/test_batch.py ___________________
ImportError while importing test module '/tmpfs/src/github/python-spanner/tests/unit/test_batch.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.7/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/unit/test_batch.py:18: in <module>
    from google.cloud.spanner_v1 import RequestOptions
google/cloud/spanner_v1/__init__.py:65: in <module>
    from google.cloud.spanner_v1.client import Client
google/cloud/spanner_v1/client.py:33: in <module>
    from google.cloud.client import ClientWithProject
.nox/unit-3-7/lib/python3.7/site-packages/google/cloud/client.py:21: in <module>
    import six
E   ModuleNotFoundError: No module named 'six'
_________________ ERROR collecting tests/unit/test_database.py _________________
ImportError while importing test module '/tmpfs/src/github/python-spanner/tests/unit/test_database.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.7/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/unit/test_database.py:25: in <module>
    from google.cloud.spanner_v1 import RequestOptions
google/cloud/spanner_v1/__init__.py:65: in <module>
    from google.cloud.spanner_v1.client import Client
google/cloud/spanner_v1/client.py:33: in <module>
    from google.cloud.client import ClientWithProject
.nox/unit-3-7/lib/python3.7/site-packages/google/cloud/client.py:21: in <module>
    import six
E   ModuleNotFoundError: No module named 'six'
_________________ ERROR collecting tests/unit/test_session.py __________________
ImportError while importing test module '/tmpfs/src/github/python-spanner/tests/unit/test_session.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.7/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/unit/test_session.py:17: in <module>
    from google.cloud.spanner_v1 import RequestOptions
google/cloud/spanner_v1/__init__.py:65: in <module>
    from google.cloud.spanner_v1.client import Client
google/cloud/spanner_v1/client.py:33: in <module>
    from google.cloud.client import ClientWithProject
.nox/unit-3-7/lib/python3.7/site-packages/google/cloud/client.py:21: in <module>
    import six
E   ModuleNotFoundError: No module named 'six'
_________________ ERROR collecting tests/unit/test_snapshot.py _________________
ImportError while importing test module '/tmpfs/src/github/python-spanner/tests/unit/test_snapshot.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.7/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/unit/test_snapshot.py:19: in <module>
    from google.cloud.spanner_v1 import RequestOptions
google/cloud/spanner_v1/__init__.py:65: in <module>
    from google.cloud.spanner_v1.client import Client
google/cloud/spanner_v1/client.py:33: in <module>
    from google.cloud.client import ClientWithProject
.nox/unit-3-7/lib/python3.7/site-packages/google/cloud/client.py:21: in <module>
    import six
E   ModuleNotFoundError: No module named 'six'
_________________ ERROR collecting tests/unit/test_spanner.py __________________
ImportError while importing test module '/tmpfs/src/github/python-spanner/tests/unit/test_spanner.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.7/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/unit/test_spanner.py:18: in <module>
    from google.cloud.spanner_v1 import (
google/cloud/spanner_v1/__init__.py:65: in <module>
    from google.cloud.spanner_v1.client import Client
google/cloud/spanner_v1/client.py:33: in <module>
    from google.cloud.client import ClientWithProject
.nox/unit-3-7/lib/python3.7/site-packages/google/cloud/client.py:21: in <module>
    import six
E   ModuleNotFoundError: No module named 'six'
_______________ ERROR collecting tests/unit/test_transaction.py ________________
ImportError while importing test module '/tmpfs/src/github/python-spanner/tests/unit/test_transaction.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.7/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/unit/test_transaction.py:18: in <module>
    from google.cloud.spanner_v1 import RequestOptions
google/cloud/spanner_v1/__init__.py:65: in <module>
    from google.cloud.spanner_v1.client import Client
google/cloud/spanner_v1/client.py:33: in <module>
    from google.cloud.client import ClientWithProject
.nox/unit-3-7/lib/python3.7/site-packages/google/cloud/client.py:21: in <module>
    import six
E   ModuleNotFoundError: No module named 'six'
________ ERROR collecting tests/unit/spanner_dbapi/test_parse_utils.py _________
ImportError while importing test module '/tmpfs/src/github/python-spanner/tests/unit/spanner_dbapi/test_parse_utils.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.7/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/unit/spanner_dbapi/test_parse_utils.py:18: in <module>
    from google.cloud.spanner_v1 import param_types
google/cloud/spanner_v1/__init__.py:65: in <module>
    from google.cloud.spanner_v1.client import Client
google/cloud/spanner_v1/client.py:33: in <module>
    from google.cloud.client import ClientWithProject
.nox/unit-3-7/lib/python3.7/site-packages/google/cloud/client.py:21: in <module>
    import six
E   ModuleNotFoundError: No module named 'six'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/python-spanner API.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants