Bug 1251917

Summary: rpm-python3 AttributeError: 'module' object has no attribute 'spec'
Product: [Fedora] Fedora Reporter: Michael Mráka <mmraka>
Component: rpmAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jzeleny, lkardos, novyjindrich, packaging-team-maint, pknirsch
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-10 13:30:29 UTC Type: Bug
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: 1248960    

Description Michael Mráka 2015-08-10 09:58:05 UTC
Description of problem:
rpm-python3 has no rpm.spec() function which exists in rpm-python (python2 module)

Version-Release number of selected component (if applicable):
rpm-python3-4.12.90-6.fc24.x86_64
rpm-python-4.12.90-6.fc24.x86_64

How reproducible:
always

Steps to Reproduce:
1. python2 -c 'import rpm; rpm.spec'
2. python3 -c 'import rpm; rpm.spec'
3.

Actual results:
# python2 -c 'import rpm; rpm.spec'
# python3 -c 'import rpm; rpm.spec'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: 'module' object has no attribute 'spec'


Expected results:
# python2 -c 'import rpm; rpm.spec'
# python3 -c 'import rpm; rpm.spec'
(no errors)

Additional info:

Comment 1 Ľuboš Kardoš 2015-08-10 13:30:29 UTC
Fixed in rawhide in rpm-4.12.90-7.fc24. The problem was using function that is available in python2 but it is not available in python3. Have a look at upstream commit:

https://github.com/rpm-software-management/rpm/commit/aec4f88ed585aedae1b35f447ee730a9054d6a4a