Skip to content

Conversation

@parthea
Copy link
Contributor

@parthea parthea commented Jan 20, 2026

This PR is needed to address the following failure in the core_deps_from_source-3.14 presubmit in google-cloud-python here. See the stack trace below


==================================== ERRORS ====================================
____________ ERROR collecting tests/unit/gapic/test_client_info.py _____________
ImportError while importing test module '/home/runner/work/google-cloud-python/google-cloud-python/packages/google-api-core/tests/unit/gapic/test_client_info.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/opt/hostedtoolcache/Python/3.14.2/x64/lib/python3.14/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/unit/gapic/test_client_info.py:23: in <module>
    from google.api_core.gapic_v1 import client_info
google/api_core/gapic_v1/__init__.py:18: in <module>
    from google.api_core.gapic_v1 import method
google/api_core/gapic_v1/method.py:24: in <module>
    from google.api_core import grpc_helpers
google/api_core/grpc_helpers.py:23: in <module>
    import google.auth.transport.grpc
.nox/core_deps_from_source-protobuf_implementation-python/lib/python3.14/site-packages/google/auth/transport/grpc.py:23: in <module>
    from google.oauth2 import service_account
.nox/core_deps_from_source-protobuf_implementation-python/lib/python3.14/site-packages/google/oauth2/service_account.py:78: in <module>
    from google.auth import _service_account_info
.nox/core_deps_from_source-protobuf_implementation-python/lib/python3.14/site-packages/google/auth/_service_account_info.py:20: in <module>
    from google.auth import crypt
.nox/core_deps_from_source-protobuf_implementation-python/lib/python3.14/site-packages/google/auth/crypt/__init__.py:41: in <module>
    from google.auth.crypt import es
.nox/core_deps_from_source-protobuf_implementation-python/lib/python3.14/site-packages/google/auth/crypt/es.py:21: in <module>
    import cryptography.exceptions

Dependencies are installed with the --no-deps option during this pre-release test in order to ensure that pre-release versions of dependencies are not downgraded to the stable versions. In this case, we want to ensure that pre-release versions are used for the purpose of having a comprehensive pre-release test. This means that when a new dependency is added to a core dependency, we need to manually add it to the constraints file which is used during the pre-release test.

for dep in core_dependencies_from_source:
session.install(dep, "--no-deps", "--ignore-installed")
print(f"Installed {dep}")

# Because we test minimum dependency versions on the minimum Python
# version, the first version we test with in the unit tests sessions has a
# constraints file containing all dependencies and extras.
with open(
CURRENT_DIRECTORY / "testing" / f"constraints-{ALL_PYTHON[0]}.txt",
encoding="utf-8",
) as constraints_file:
constraints_text = constraints_file.read()

@parthea parthea requested a review from a team as a code owner January 20, 2026 10:26
@product-auto-label product-auto-label bot added the size: xs Pull request size is extra small. label Jan 20, 2026
@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: xs Pull request size is extra small. labels Jan 20, 2026
@parthea parthea enabled auto-merge (squash) January 20, 2026 16:40
@parthea parthea merged commit 595f58f into main Jan 20, 2026
140 checks passed
@parthea parthea deleted the add-cryptography-to-constraints branch January 20, 2026 16:45
parthea added a commit to googleapis/google-cloud-python that referenced this pull request Jan 20, 2026
This PR is needed to address the following failure in the `Kokoro Deps
at HEAD Tests` presubmit in PR
#15468


```
________________ ERROR collecting tests/unit/test_writer_v1.py _________________
ImportError while importing test module '/tmpfs/src/github/google-cloud-python/packages/google-cloud-bigquery-storage/tests/unit/test_writer_v1.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.14/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/unit/test_writer_v1.py:25: in 
    from google.cloud.bigquery_storage_v1 import exceptions as bqstorage_exceptions
google/cloud/bigquery_storage_v1/__init__.py:31: in 
    from google.cloud.bigquery_storage_v1 import client, types
google/cloud/bigquery_storage_v1/client.py:24: in 
    from google.api_core import gapic_v1
.nox/core_deps_from_source-protobuf_implementation-upb/lib/python3.14/site-packages/google/api_core/gapic_v1/__init__.py:18: in 
    from google.api_core.gapic_v1 import method
.nox/core_deps_from_source-protobuf_implementation-upb/lib/python3.14/site-packages/google/api_core/gapic_v1/method.py:24: in 
    from google.api_core import grpc_helpers
.nox/core_deps_from_source-protobuf_implementation-upb/lib/python3.14/site-packages/google/api_core/grpc_helpers.py:23: in 
    import google.auth.transport.grpc
.nox/core_deps_from_source-protobuf_implementation-upb/lib/python3.14/site-packages/google/auth/transport/grpc.py:23: in 
    from google.oauth2 import service_account
.nox/core_deps_from_source-protobuf_implementation-upb/lib/python3.14/site-packages/google/oauth2/service_account.py:78: in 
    from google.auth import _service_account_info
.nox/core_deps_from_source-protobuf_implementation-upb/lib/python3.14/site-packages/google/auth/_service_account_info.py:20: in 
    from google.auth import crypt
.nox/core_deps_from_source-protobuf_implementation-upb/lib/python3.14/site-packages/google/auth/crypt/__init__.py:41: in 
    from google.auth.crypt import es
.nox/core_deps_from_source-protobuf_implementation-upb/lib/python3.14/site-packages/google/auth/crypt/es.py:21: in 
    import cryptography.exceptions
E   ModuleNotFoundError: No module named 'cryptography'
```

See googleapis/gapic-generator-python#2527 for
more details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants