Bug 1251917 - rpm-python3 AttributeError: 'module' object has no attribute 'spec'
Summary: rpm-python3 AttributeError: 'module' object has no attribute 'spec'
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1248960
TreeView+ depends on / blocked
 
Reported: 2015-08-10 09:58 UTC by Michael Mráka
Modified: 2015-08-10 13:30 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-10 13:30:29 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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


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