diff --git a/bigquery_magics/bigquery.py b/bigquery_magics/bigquery.py index 98469e4..742a9ec 100644 --- a/bigquery_magics/bigquery.py +++ b/bigquery_magics/bigquery.py @@ -97,10 +97,8 @@ from google.api_core import client_info from google.api_core.exceptions import NotFound from google.cloud import bigquery -from google.cloud.bigquery import _versions_helpers, exceptions -from google.cloud.bigquery import _versions_helpers, exceptions +from google.cloud.bigquery import exceptions from google.cloud.bigquery.dbapi import _helpers -from google.cloud.bigquery import _versions_helpers from bigquery_magics import line_arg_parser as lap import bigquery_magics.config @@ -612,7 +610,9 @@ def _make_bqstorage_client(client, use_bqstorage_api, client_options): return None try: - _versions_helpers.BQ_STORAGE_VERSIONS.try_import(raise_if_error=True) + bigquery_magics._versions_helpers.BQ_STORAGE_VERSIONS.try_import( + raise_if_error=True + ) except exceptions.BigQueryStorageNotFoundError as err: customized_error = ImportError( "The default BigQuery Storage API client cannot be used, install " diff --git a/samples/snippets/query_params_scalars.py b/samples/snippets/query_params_scalars.py index e833ef9..74f665a 100644 --- a/samples/snippets/query_params_scalars.py +++ b/samples/snippets/query_params_scalars.py @@ -24,7 +24,7 @@ def query_with_parameters() -> "pandas.DataFrame": ip = IPython.get_ipython() - ip.extension_manager.load_extension("google.cloud.bigquery") + ip.extension_manager.load_extension("bigquery_magics") sample = """ # [START bigquery_jupyter_query_params_scalars] diff --git a/samples/snippets/requirements.txt b/samples/snippets/requirements.txt index 605d081..9179db0 100644 --- a/samples/snippets/requirements.txt +++ b/samples/snippets/requirements.txt @@ -4,6 +4,6 @@ google-cloud-bigquery-storage==2.24.0 ipython===7.31.1; python_version == '3.7' ipython===8.0.1; python_version == '3.8' ipython===8.18.1; python_version >= '3.9' -pandas==1.3.5; python_version == '3.7' -pandas==2.0.0; python_version == '3.8' +pandas===1.3.5; python_version == '3.7' +pandas===2.0.3; python_version == '3.8' pandas==2.2.1; python_version >= '3.9'