Skip to content

Commit ee07933

Browse files
authored
ENH: Use standard SQL as default. (#245)
Removes the warning when a SQL dialect is unspecified.
1 parent b0254c4 commit ee07933

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

pandas_gbq/gbq.py

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ def __init__(
302302
reauth=False,
303303
private_key=None,
304304
auth_local_webserver=False,
305-
dialect="legacy",
305+
dialect="standard",
306306
location=None,
307307
credentials=None,
308308
):
@@ -732,8 +732,8 @@ def read_gbq(
732732
http://google-auth-oauthlib.readthedocs.io/en/latest/reference/google_auth_oauthlib.flow.html#google_auth_oauthlib.flow.InstalledAppFlow.run_console
733733
734734
.. versionadded:: 0.2.0
735-
dialect : str, default 'legacy'
736-
Note: The default value is changing to 'standard' in a future verion.
735+
dialect : str, default 'standard'
736+
Note: The default value changed to 'standard' in version 0.10.0.
737737
738738
SQL syntax dialect to use. Value can be one of:
739739
@@ -796,14 +796,7 @@ def read_gbq(
796796
dialect = context.dialect
797797

798798
if dialect is None:
799-
dialect = "legacy"
800-
warnings.warn(
801-
'The default value for dialect is changing to "standard" in a '
802-
'future version. Pass in dialect="legacy" or set '
803-
'pandas_gbq.context.dialect="legacy" to disable this warning.',
804-
FutureWarning,
805-
stacklevel=2,
806-
)
799+
dialect = "standard"
807800

808801
_test_google_api_imports()
809802

tests/unit/test_gbq.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -429,11 +429,6 @@ def test_read_gbq_with_invalid_dialect():
429429
assert "is not valid for dialect" in str(excinfo.value)
430430

431431

432-
def test_read_gbq_without_dialect_warns_future_change():
433-
with pytest.warns(FutureWarning):
434-
gbq.read_gbq("SELECT 1")
435-
436-
437432
def test_generate_bq_schema_deprecated():
438433
# 11121 Deprecation of generate_bq_schema
439434
with pytest.warns(FutureWarning):

0 commit comments

Comments
 (0)