Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/).

## [0.13.1] - 2026-06-07

### Fixed

- Suppressed the spurious `googleapiclient.discovery_cache: file_cache is only supported with oauth2client<4.0.0` warning by passing `cache_discovery=False` when building the YouTube service. The file cache is incompatible with `google-auth` (which we use via `google-auth-oauthlib`); discovery docs are still cached in-memory for the life of the subprocess, which is all the dock's short-lived hook invocations need.

## [0.13.0] - 2026-04-20

### Added
Expand Down
8 changes: 8 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ ignore_missing_imports = true
module = "google.*"
ignore_missing_imports = true

# ``google-auth`` ships without inline type hints — ``Credentials.refresh``,
# ``Credentials.from_authorized_user_file`` etc. all trip mypy's strict
# ``no-untyped-call`` check on newer mypy releases. Silence for our own
# auth module so CI and local environments agree regardless of mypy version.
[[tool.mypy.overrides]]
module = "reeln_google_plugin.auth"
disallow_untyped_calls = false

[[tool.mypy.overrides]]
module = "google_auth_oauthlib.*"
ignore_missing_imports = true
Expand Down
2 changes: 1 addition & 1 deletion reeln_google_plugin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

__version__ = "0.13.0"
__version__ = "0.13.1"

from reeln_google_plugin.plugin import GooglePlugin

Expand Down
10 changes: 8 additions & 2 deletions reeln_google_plugin/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def get_credentials(
creds: Credentials | None = None

if credentials_cache.exists():
creds = Credentials.from_authorized_user_file( # type: ignore[no-untyped-call]
creds = Credentials.from_authorized_user_file(
str(credentials_cache), effective_scopes
)

Expand Down Expand Up @@ -107,4 +107,10 @@ def build_youtube_service(credentials: Any) -> Any:
except ImportError as exc:
raise AuthError(f"Google API client library not installed: {exc}") from exc

return build("youtube", "v3", credentials=credentials)
# ``cache_discovery=False`` suppresses the noisy
# ``file_cache is only supported with oauth2client<4.0.0`` warning.
# The file cache is incompatible with ``google-auth`` (we use it via
# ``google-auth-oauthlib``), and discovery docs are still cached
# in-memory for the life of the process — which is all we need given
# that each CLI hook invocation runs in a short-lived subprocess.
return build("youtube", "v3", credentials=credentials, cache_discovery=False)
2 changes: 1 addition & 1 deletion reeln_google_plugin/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class GooglePlugin:
"""

name: str = "google"
version: str = "0.13.0"
version: str = "0.13.1"
api_version: int = 1

config_schema: PluginConfigSchema = PluginConfigSchema(
Expand Down
9 changes: 8 additions & 1 deletion tests/unit/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,14 @@ def test_builds_service(self) -> None:
result = build_youtube_service(fake_creds)

assert result is mock_service
mock_build.assert_called_once_with("youtube", "v3", credentials=fake_creds)
# ``cache_discovery=False`` is intentional: silences the
# ``file_cache only supported with oauth2client<4.0.0`` warning.
mock_build.assert_called_once_with(
"youtube",
"v3",
credentials=fake_creds,
cache_discovery=False,
)

def test_import_error_raises_auth_error(self) -> None:
with (
Expand Down
Loading