Skip to content

Commit 679e45e

Browse files
committed
fix typing and tune tests for copy on write
1 parent 7a967fc commit 679e45e

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

pandas/io/gbq.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from pandas.util._exceptions import find_stack_level
1212

1313
if TYPE_CHECKING:
14-
import google.auth
14+
from google.auth.credentials import Credentials
1515

1616
from pandas import DataFrame
1717

@@ -37,7 +37,7 @@ def read_gbq(
3737
dialect: str | None = None,
3838
location: str | None = None,
3939
configuration: dict[str, Any] | None = None,
40-
credentials: google.auth.credentials.Credentials | None = None,
40+
credentials: Credentials | None = None,
4141
use_bqstorage_api: bool | None = None,
4242
max_results: int | None = None,
4343
progress_bar_type: str | None = None,
@@ -230,7 +230,7 @@ def to_gbq(
230230
table_schema: list[dict[str, str]] | None = None,
231231
location: str | None = None,
232232
progress_bar: bool = True,
233-
credentials: google.auth.credentials.Credentials | None = None,
233+
credentials: Credentials | None = None,
234234
) -> None:
235235
warnings.warn(
236236
"to_gbq is deprecated and will be removed in a future version. "

pandas/tests/io/test_parquet.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1315,7 +1315,10 @@ def test_empty_dataframe(self, fp):
13151315
check_round_trip(df, fp, expected=expected)
13161316

13171317
@pytest.mark.xfail(
1318-
reason="fastparquet bug, see https://github.com/dask/fastparquet/issues/929"
1318+
not using_copy_on_write()
1319+
and _HAVE_FASTPARQUET
1320+
and Version(fastparquet.__version__) > Version("2022.12"),
1321+
reason="fastparquet bug, see https://github.com/dask/fastparquet/issues/929",
13191322
)
13201323
def test_timezone_aware_index(self, fp, timezone_aware_date_list):
13211324
idx = 5 * [timezone_aware_date_list]

0 commit comments

Comments
 (0)