You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 6, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 6, 2026. It is now read-only.
Also, we have some version comparisons for features. I think it'd be cleaner to implement these as properties like we do in BQStorageVersions that I propose adding in #748
importpackaging.version_MIN_BQ_STORAGE_VERSION=packaging.version.Version("2.0.0")
_BQ_STORAGE_OPTIONAL_READ_SESSION_VERSION=packaging.version.Version("2.6.0")
classBQStorageVersions:
def__init__(self):
self._installed_version=None@propertydefinstalled_version(
self,
) ->Union[packaging.version.LegacyVersion, packaging.version.Version]:
ifself._installed_versionisNone:
fromgoogle.cloudimportbigquery_storageself._installed_version=packaging.version.parse(
getattr(bigquery_storage, "__version__", "legacy")
)
returnself._installed_version@propertydefis_read_session_optional(self) ->bool:
returnself.installed_version>=_BQ_STORAGE_OPTIONAL_READ_SESSION_VERSIONdefverify_version(self):
"""Verify that a recent enough version of BigQuery Storage extra is installed. The function assumes that google-cloud-bigquery-storage extra is installed, and should thus be used in places where this assumption holds. Because `pip` can install an outdated version of this extra despite the constraints in setup.py, the the calling code can use this helper to verify the version compatibility at runtime. Raises: LegacyBigQueryStorageError: If google-cloud-bigquery-storage is outdated. """ifself.installed_version<_MIN_BQ_STORAGE_VERSION:
msg= (
"Dependency google-cloud-bigquery-storage is outdated, please upgrade "f"it to version >= 2.0.0 (version found: {self.installed_version})."
)
raiseLegacyBigQueryStorageError(msg)
BQ_STORAGE_VERSIONS=BQStorageVersions()
changed the title [-]refactor version checks for pandas, pyarrow, google-cloud-core[/-][+]refactor version checks for pandas, pyarrow, ~google-cloud-core~[/+]on Nov 6, 2023
changed the title [-]refactor version checks for pandas, pyarrow, ~google-cloud-core~[/-][+]refactor version checks for pandas, pyarrow[/+]on Nov 6, 2023
Activity
plamut commentedon Jul 15, 2021
I support this.
As a bonus, this will make it easier to break the dependency on
setuptoolsif we choose to switch to a different build system at some point.tswast commentedon Nov 6, 2023
We don't have any version checks for google-cloud-core as of #1487
[-]refactor version checks for pandas, pyarrow, google-cloud-core[/-][+]refactor version checks for pandas, pyarrow, ~google-cloud-core~[/+][-]refactor version checks for pandas, pyarrow, ~google-cloud-core~[/-][+]refactor version checks for pandas, pyarrow[/+]