Bug 2487621 - Installing the python3-google-cloud-storage RPM causes pcp-testsuite tests to fail [NEEDINFO]
Summary: Installing the python3-google-cloud-storage RPM causes pcp-testsuite tests to...
Keywords:
Status: ON_QA
Alias: None
Product: Fedora
Classification: Fedora
Component: python3.15
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Python Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.15
TreeView+ depends on / blocked
 
Reported: 2026-06-10 18:05 UTC by William Cohen
Modified: 2026-06-19 08:58 UTC (History)
7 users (show)

Fixed In Version: python3.15-3.15.0~b2-5.fc45
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:
mhroncok: needinfo? (wcohen)


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Fedora Package Sources python3.15 pull-request 80 0 None None None 2026-06-13 19:33:03 UTC
Github python cpython issues 149671 0 None open PEP 829: `KeyError: "local variable ''sitedir'' is not defined"` 2026-06-11 05:33:28 UTC

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.


Note You need to log in before you can comment on or make changes to this bug.