Bug 2486045

Summary: fedora-third-party: scriptlet errors with python 3.15
Product: [Fedora] Fedora Reporter: Kevin Fenzi <kevin>
Component: python3.15Assignee: Python Maintainers <python-maint>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: gnome-sig, ksurma, mhroncok, otaylor, python-maint, python-packagers-sig
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
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-23 12:58:39 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 Kevin Fenzi 2026-06-07 01:39:56 UTC
Got this output applying update from the post python 3.15 rawhide: 

>>> Running %triggerpostun scriptlet: fedora-third-party-0:0.10-20.fc45.noarch
>>> Finished %triggerpostun scriptlet: fedora-third-party-0:0.10-20.fc45.noarch
>>> Scriptlet output:
>>> Error in import line from /usr/lib/python3.15/site-packages/Paste-3.10.1-py3.15-nspkg.pth: imp
ort sys, types, os;p = os.path.join(sys._getframe(1).f_locals['sitedir'], *('paste',));importlib =
 __import__('importlib.util');__import__('importlib.machinery');m = sys.modules.setdefault('paste'
, importlib.util.module_from_spec(importlib.machinery.PathFinder.find_spec('paste', [os.path.dirna
me(p)])));m = m or sys.modules.setdefault('paste', types.ModuleType('paste'));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/straight.plugin-1.5.0-py3.15-nspkg
.pth: import sys, types, os;p = os.path.join(sys._getframe(1).f_locals['sitedir'], *('straight',))
;importlib = __import__('importlib.util');__import__('importlib.machinery');m = sys.modules.setdef
ault('straight', importlib.util.module_from_spec(importlib.machinery.PathFinder.find_spec('straigh
t', [os.path.dirname(p)])));m = m or sys.modules.setdefault('straight', types.ModuleType('straight
'));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"
>>> 
>>> Running %triggerin scriptlet: fedora-third-party-0:0.10-20.fc45.noarch
>>> Finished %triggerin scriptlet: fedora-third-party-0:0.10-20.fc45.noarch
>>> Scriptlet output:
>>> Error in import line from /usr/lib/python3.15/site-packages/Paste-3.10.1-py3.15-nspkg.pth: imp
ort sys, types, os;p = os.path.join(sys._getframe(1).f_locals['sitedir'], *('paste',));importlib =
 __import__('importlib.util');__import__('importlib.machinery');m = sys.modules.setdefault('paste'
, importlib.util.module_from_spec(importlib.machinery.PathFinder.find_spec('paste', [os.path.dirna
me(p)])));m = m or sys.modules.setdefault('paste', types.ModuleType('paste'));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/straight.plugin-1.5.0-py3.15-nspkg
.pth: import sys, types, os;p = os.path.join(sys._getframe(1).f_locals['sitedir'], *('straight',))
;importlib = __import__('importlib.util');__import__('importlib.machinery');m = sys.modules.setdef
ault('straight', importlib.util.module_from_spec(importlib.machinery.PathFinder.find_spec('straigh
t', [os.path.dirname(p)])));m = m or sys.modules.setdefault('straight', types.ModuleType('straight
'));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"
>>>

Reproducible: Always

Comment 1 Miro Hrončok 2026-06-07 06:45:41 UTC
Note that this error is notcritical, only anoying. See https://github.com/python/cpython/issues/149671

Also, it needs to be fixed in packages owning /usr/lib/python3.15/site-packages/straight.plugin-1.5.0-py3.15-nspkg and /usr/lib/python3.15/site-packages/Paste-3.10.1-py3.15-nspkg.pth:

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

Comment 4 Kevin Fenzi 2026-06-23 01:16:22 UTC
Yes, seems to be. Thanks!