Bug 2487621

Summary: Installing the python3-google-cloud-storage RPM causes pcp-testsuite tests to fail
Product: [Fedora] Fedora Reporter: William Cohen <wcohen>
Component: python3.15Assignee: Python Maintainers <python-maint>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: code, fkolwa, jonathan, ksurma, mhroncok, python-maint, python-packagers-sig
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: python3.15-3.15.0~b2-5.fc45 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2026-06-22 19:10:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2412434    

Description William Cohen 2026-06-10 18:05:35 UTC
On Fedora Rawhide having python3-google-cloud-storage installed is causing a number of the pcp-testsuite tests that use python to fail.  If the python3-google-cloud-storage rpm is removed the tests run successfully.  The failure with python3-google-cloud-storage was seen on fedora rawhide, but NOT on fedora 44.  On fedora 44 have python3-google-cloud-storage-2.14.0-12.fc44.noarch  on the failing fedora rawhide have python3-google-cloud-storage-2.14.0-13.fc45.noarch.



Reproducible: Always

Steps to Reproduce:
As root:
1. dnf install "pcp*" pcp-testsuite python3-google-cloud-storage
2. cd /var/lib/pcp/testsuite
3. ./check -g python

Actual Results:
When most of the tests that use python (in the python group) fail with messages like the following for test 35:

[1%] 035 2s ... - output mismatch (see 035.out.bad)
23a24,38
> Error in import line from /usr/lib/python3.15/site-packages/google_cloud_core-
2.3.3-py3.15-nspkg.pth: import sys, types, os;p = os.path.join(sys._getframe(1).
f_locals['sitedir'], *('google',));importlib = __import__('importlib.util');__im
port__('importlib.machinery');m = sys.modules.setdefault('google', importlib.uti
l.module_from_spec(importlib.machinery.PathFinder.find_spec('google', [os.path.d
irname(p)])));m = m or sys.modules.setdefault('google', types.ModuleType('google
'));mp = (m or []) and m.__dict__.setdefault('__path__',[]);(p not in mp) and mp
.append(p)
>   Traceback (most recent call last):
>     File "<frozen site>", line 533, in _exec_imports
>     File "<string>", line 1, in <module>
>   KeyError: "local variable ''sitedir'' is not defined"
> Error in import line from /usr/lib/python3.15/site-packages/google_cloud_core-
2.3.3-py3.15-nspkg.pth: import sys, types, os;p = os.path.join(sys._getframe(1).
f_locals['sitedir'], *('google', 'cloud'));importlib = __import__('importlib.uti
l');__import__('importlib.machinery');m = sys.modules.setdefault('google.cloud',
 importlib.util.module_from_spec(importlib.machinery.PathFinder.find_spec('googl
e.cloud', [os.path.dirname(p)])));m = m or sys.modules.setdefault('google.cloud'
, types.ModuleType('google.cloud'));mp = (m or []) and m.__dict__.setdefault('__
path__',[]);(p not in mp) and mp.append(p);m and setattr(sys.modules['google'], 
'cloud', m)
>   Traceback (most recent call last):
>     File "<frozen site>", line 533, in _exec_imports
>     File "<string>", line 1, in <module>
>   KeyError: "local variable ''sitedir'' is not defined"
> Error in import line from /usr/lib/python3.15/site-packages/protobuf-3.19.6-py
3.15-nspkg.pth: import sys, types, os;p = os.path.join(sys._getframe(1).f_locals
['sitedir'], *('google',));importlib = __import__('importlib.util');__import__('
importlib.machinery');m = sys.modules.setdefault('google', importlib.util.module
_from_spec(importlib.machinery.PathFinder.find_spec('google', [os.path.dirname(p
)])));m = m or sys.modules.setdefault('google', types.ModuleType('google'));mp =
 (m or []) and m.__dict__.setdefault('__path__',[]);(p not in mp) and mp.append(
p)
>   Traceback (most recent call last):
>     File "<frozen site>", line 533, in _exec_imports
>     File "<string>", line 1, in <module>
>   KeyError: "local variable ''sitedir'' is not defined"


Expected Results:
The tests not to have the failures due to the python3-google-cloud-storage.  The output shoud start looking something like:

 ./check -g python
[0%] 035
[0%] 053
[0%] 056
[1%] 064
[1%] 073
[2%] 109
[2%] 317
[3%] 536
[3%] 544
[4%] 547
[4%] 550
...


Additional Information:
On Fedora 44 the tests work fine regardless whether python3-google-cloud-storage rpm is installed.

Comment 1 Ben Beasley 2026-06-11 05:33:29 UTC
The fix for this is likely to be in Python itself.

https://github.com/python/cpython/issues/149671

Comment 3 Miro Hrončok 2026-06-13 19:35:50 UTC
Also note that pcp-testsuite seems to assert certain stderr content. Anything can produce extra stderr content (e.g. a deprecation warning etc.), and the testuite should likely be a tad more robust. Anyway, this will be fixed soon.

Comment 4 Miro Hrončok 2026-06-19 08:58:44 UTC
Please test with python3.15-3.15.0~b2-5.fc45 -- should be fixed now.

Comment 5 William Cohen 2026-06-22 15:15:39 UTC
With the python3-google-cloud-storage rpm install the pcp tests are running fine with this newer version of python.

[0%] 035 1s ...
[0%] 053 4s ...
[0%] 056 11s ...
[1%] 064 0s ...
[1%] 073 4s ...
[2%] 109 6s ...
[2%] 317 1s ...
[3%] 536 1s ...
[3%] 544 2s ...
[4%] 547 0s ...
[4%] 550 1s ...
[5%] 551 11s ...
[5%] 553 1s ...
[6%] 561 2s ...
[6%] 567 0s ...
[7%] 576 0s ...
[7%] 606 5s ...

Comment 6 Miro Hrončok 2026-06-22 19:10:33 UTC
Thanks for verification and sorry for the breakage.