File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 1717from __future__ import annotations
1818
1919from typing import Optional
20+ import warnings
2021
2122import google .api_core .exceptions
2223import google .auth .credentials
@@ -123,6 +124,11 @@ def bq_connection(self, value: Optional[str]):
123124 def use_regional_endpoints (self ) -> bool :
124125 """Flag to connect to regional API endpoints.
125126
127+ .. deprecated:: 0.13.0
128+ BigQuery regional endpoints is a feature in preview and
129+ available only to selected projects.
130+ Enable it only if your project has regional endpoints access.
131+
126132 Requires ``location`` to also be set. For example, set
127133 ``location='asia-northeast1'`` and ``use_regional_endpoints=True`` to
128134 connect to asia-northeast1-bigquery.googleapis.com.
@@ -135,4 +141,12 @@ def use_regional_endpoints(self, value: bool):
135141 raise ValueError (
136142 SESSION_STARTED_MESSAGE .format (attribute = "use_regional_endpoints" )
137143 )
144+
145+ if value :
146+ warnings .warn (
147+ "BigQuery regional endpoints is a feature in preview and "
148+ "available only to selected projects. "
149+ "Enable it only if your project has regional endpoints access."
150+ )
151+
138152 self ._use_regional_endpoints = value
You can’t perform that action at this time.
0 commit comments