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
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
From d5fdae993da87ef29f37af71db1e0d7e5c124e6c Mon Sep 17 00:00:00 2001
From: Aninda <v-anipradhan@microsoft.com>
Date: Thu, 2 Apr 2026 16:34:19 -0400
Subject: [PATCH] One of the ptest was failing for python-google-auth-oauthlib for arm64 architecture
Failure Description: socket.gaierror: [Errno -2] Name or service not known when resolving socket.gethostbyname(socket.gethostname()).
Fix for host name resolution for local IP issue on core-arm64 during ptest

---
tests/unit/test_flow.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/unit/test_flow.py b/tests/unit/test_flow.py
index d9c9f8b..9df45e0 100644
--- a/tests/unit/test_flow.py
+++ b/tests/unit/test_flow.py
@@ -380,8 +380,12 @@ class TestInstalledAppFlow(object):
return mock.Mock()

make_server_mock.side_effect = assign_last_request_uri
+
+ try:
+ my_ip = socket.gethostbyname(socket.gethostname())
+ except socket.gaierror:
+ my_ip = "127.0.0.1"

- my_ip = socket.gethostbyname(socket.gethostname())
instance.run_local_server(bind_addr=my_ip, host="localhost")

assert webbrowser_mock.open.called
--
2.34.1

Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
Summary: Google oAuth Authentication Library
Name: python-%{pypi_name}
Version: 1.0.0
Release: 1%{?dist}
Release: 2%{?dist}
License: ASL 2.0
Vendor: Microsoft Corporation
Distribution: Azure Linux
URL: https://github.com/googleapis/google-auth-library-python-oauthlib
Source0: https://files.pythonhosted.org/packages/e3/b4/ef2170c5f6aa5bc2461bab959a84e56d2819ce26662b50038d2d0602223e/%{pypi_name}-%{version}.tar.gz
Patch0: 0001-Fix-ptest-host-name-resolution-for-local-IP-issue.patch
BuildRequires: python3-click
BuildRequires: python3-devel
BuildRequires: python3-google-auth
Expand All @@ -32,7 +33,7 @@ Summary: %{summary}
This library provides oauthlib integration with google-auth.

%prep
%autosetup -n %{pypi_name}-%{version}
%autosetup -n %{pypi_name}-%{version} -p1
rm -rf %{pypi_name}.egg-info

%build
Expand All @@ -53,6 +54,9 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} pytest -v tests
%{python3_sitelib}/google_auth_oauthlib-%{version}-py%{python3_version}.egg-info

%changelog
* Thu Apr 02 2026 Aninda Pradhan <v-anipradhan@microsoft.com> - 1.0.0-2
- patch to fix ptest host name resolution for local IP issue

* Thu Nov 02 2023 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 1.0.0-1
- Auto-upgrade to 1.0.0 - Azure Linux 3.0 - package upgrades

Expand Down
Loading