Fedora Account System
Red Hat Associate
Red Hat Customer
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.
The fix for this is likely to be in Python itself. https://github.com/python/cpython/issues/149671
https://src.fedoraproject.org/rpms/python3.15/pull-request/80
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.
Please test with python3.15-3.15.0~b2-5.fc45 -- should be fixed now.