From 0249e0dfbeacddb6d054563b92ccb69d2bafeae5 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 21 Jul 2026 20:41:06 +0000 Subject: [PATCH] chore: remove `apiclient` (backport #57339) (#57340) * chore: remove `apiclient` (#57339) (cherry picked from commit 6d31af3a523198edaec4563b1ad1eaa07c6a29c5) # Conflicts: # pyproject.toml * chore: resolve conflict * chore: bump python-youtube to 0.9.9 --------- Co-authored-by: Diptanil Saha --- erpnext/utilities/doctype/video_settings/video_settings.py | 4 ++-- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/utilities/doctype/video_settings/video_settings.py b/erpnext/utilities/doctype/video_settings/video_settings.py index 762a795a733..fb7da9ed754 100644 --- a/erpnext/utilities/doctype/video_settings/video_settings.py +++ b/erpnext/utilities/doctype/video_settings/video_settings.py @@ -3,9 +3,9 @@ import frappe -from apiclient.discovery import build from frappe import _ from frappe.model.document import Document +from pyyoutube import Api, PyYouTubeException class VideoSettings(Document): @@ -28,7 +28,7 @@ class VideoSettings(Document): def validate_youtube_api_key(self): if self.enable_youtube_tracking and self.api_key: try: - build("youtube", "v3", developerKey=self.api_key) + Api(api_key=self.api_key).get_i18n_languages(parts="snippet") except Exception: title = _("Failed to Authenticate the API key.") self.log_error("Failed to authenticate API key") diff --git a/pyproject.toml b/pyproject.toml index b6702cb873b..07b27ddec03 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,7 @@ dependencies = [ # integration dependencies "googlemaps", "plaid-python~=7.2.1", - "python-youtube~=0.8.0", + "python-youtube~=0.9.9", # Not used directly - required by PyQRCode for PNG generation "pypng~=0.20220715.0",