Bug 1033596 - dnf API base.do_transaction fails in python3
Summary: dnf API base.do_transaction fails in python3
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1033594 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-22 12:56 UTC by Tim Lauridsen
Modified: 2014-04-09 01:01 UTC (History)
11 users (show)

Fixed In Version: rpm-4.11.2-1.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-16 23:22:31 UTC
Type: Bug


Attachments (Terms of Use)
test py file (1.63 KB, text/plain)
2013-11-22 12:58 UTC, Tim Lauridsen
no flags Details

Description Tim Lauridsen 2013-11-22 12:56:07 UTC
Description of problem:

Attached example fails in python3, works in python2


Version-Release number of selected component (if applicable):

0.4.8-1


How reproducible:
every time


Steps to Reproduce:
1. sudo python3 dnf-api.py
2.
3.

Actual results:

cachedir: /var/cache/dnf/i386/20
=============== install btanks =====================
# of packages added : 1
<hawkey.Goal object at 0xb6c3ef2c>
   Install - btanks-0.9.8083-7.fc20.i686
   Install - btanks-data-0.9.8083-7.fc20.noarch
[<hawkey.Package object id 3038, btanks-0.9.8083-7.fc20.i686, fedora>, <hawkey.Package object id 3039, btanks-data-0.9.8083-7.fc20.noarch, fedora>]
Downloading Packages
{}
Running Transaction
Traceback (most recent call last):
  File "test.py", line 84, in <module>
    base.do_install()
  File "test.py", line 78, in do_install
    print(self.do_transaction())
  File "/usr/lib/python3.3/site-packages/dnf/base.py", line 627, in do_transaction
    self.transaction.populate_rpm_ts(self.ts)
  File "/usr/lib/python3.3/site-packages/dnf/transaction.py", line 183, in populate_rpm_ts
    ts.addInstall(hdr, tsi, 'i')
  File "/usr/lib/python3.3/site-packages/rpm/transaction.py", line 48, in addInstall
    if isinstance(item, basestring):
NameError: global name 'basestring' is not defined

Expected results:
No Traceback

Additional info:

Comment 1 Tim Lauridsen 2013-11-22 12:58:54 UTC
Created attachment 827765 [details]
test py file

Comment 2 Ales Kozumplik 2013-11-22 13:09:28 UTC
Tim is this an unitended dupe of bug 1033594?

Comment 3 Ales Kozumplik 2013-11-22 13:13:01 UTC
Jan, is this the same bug you've been fixing in rpm? (looks like an RPM bug from the last line of the traceback).

Comment 4 Panu Matilainen 2013-11-25 07:23:59 UTC
Yeah that's the one. Rawhide rpm has the fix, F20 not currently.

Comment 5 Tim Lauridsen 2013-11-25 07:55:22 UTC
*** Bug 1033594 has been marked as a duplicate of this bug. ***

Comment 6 Tim Lauridsen 2013-11-25 08:36:55 UTC
Yes, looks like bugzilla played me a trick.

Comment 7 Fedora Update System 2014-02-13 09:18:14 UTC
rpm-4.11.2-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/rpm-4.11.2-1.fc20

Comment 8 Fedora Update System 2014-02-13 09:44:34 UTC
rpm-4.11.2-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/rpm-4.11.2-1.fc19

Comment 9 Fedora Update System 2014-02-14 07:56:39 UTC
Package rpm-4.11.2-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing rpm-4.11.2-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-2467/rpm-4.11.2-1.fc20
then log in and leave karma (feedback).

Comment 10 Fedora Update System 2014-02-16 23:22:31 UTC
rpm-4.11.2-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2014-04-09 01:01:05 UTC
rpm-4.11.2-2.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.


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