Bug 965862 - RFE: python3-iso8601
RFE: python3-iso8601
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: python-iso8601 (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Pádraig Brady
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-21 16:59 EDT by Jerry James
Modified: 2016-01-04 09:45 EST (History)
2 users (show)

See Also:
Fixed In Version: python-iso8601-0.1.10-2.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-05-05 23:35:43 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jerry James 2013-05-21 16:59:07 EDT
Description of problem:
I'm working on a package that uses python-iso8601.  This package supposedly works under both python2 and python3, so I would like to make both packages, but there is no python3-iso8601.

It appears that the python-iso8601 upstream has not been active for a few years.  The bug reports are piling up.  Some people have noticed, which is why this fork exists: https://github.com/OpenLearningNet/pyiso8601.  It fixes a few bugs, so it may be worth switching upstreams.  Sadly, the fork doesn't provide python3 support, either.

Issue 23 for the current googlecode upstream has one appraoch.  The package I am working on actually bundles pyiso8601, and takes a simpler approach.  It adds "import sys" at the top, then this a little further down:

if sys.version_info < (3, 0):
    bytes = str

and then does this:

@@ -86,8 +117,8 @@
     default timezone specified in default_timezone is used. This is UTC by
     default.
     """
-    if not isinstance(datestring, basestring):
-        raise ParseError("Expecting a string %r" % datestring)
+    if not isinstance(datestring, bytes):
+        raise ParseError("Expecting bytes %r" % datestring)
     m = ISO8601_REGEX.match(datestring)
     if not m:
         raise ParseError("Unable to parse date string %r" % datestring)


Version-Release number of selected component (if applicable):
python-iso8601-0.1.4-6.fc19.noarch

How reproducible:
N/A

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Comment 1 Pádraig Brady 2013-05-29 17:09:12 EDT
Yes adding the diff from python-subunit as a patch to the exising python-iso8601 package makes sense. I know the author and will ask about getting it merged upstream too.
Comment 2 Jerry James 2014-02-13 14:36:12 EST
Pádraig, has there been any upstream movement on this?  Thanks.
Comment 3 Jerry James 2014-04-23 10:34:35 EDT
Status update, please?
Comment 4 Pádraig Brady 2014-04-23 20:22:09 EDT
Sorry, yes the patch has been merged upstream in the meantime.

I'll update the f20 package to add python3 support
Comment 5 Fedora Update System 2014-04-23 20:30:14 EDT
python-iso8601-0.1.10-2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/python-iso8601-0.1.10-2.fc20
Comment 6 Jerry James 2014-04-24 15:25:55 EDT
Fantastic.  Thanks a lot, Pádraig.
Comment 7 Fedora Update System 2014-04-25 00:25:59 EDT
Package python-iso8601-0.1.10-2.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 python-iso8601-0.1.10-2.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-5564/python-iso8601-0.1.10-2.fc20
then log in and leave karma (feedback).
Comment 8 Fedora Update System 2014-05-05 23:35:43 EDT
python-iso8601-0.1.10-2.fc20 has been pushed to the Fedora 20 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.