Bug 1183382 - Update subscription-manager Requires for python-dateutil
Summary: Update subscription-manager Requires for python-dateutil
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: subscription-manager
Version: 22
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
Assignee: Devan Goodwin
QA Contact: Fedora Extras Quality Assurance
URL: https://lists.fedoraproject.org/piper...
Whiteboard:
Depends On: 1197791
Blocks: 1126521
TreeView+ depends on / blocked
 
Reported: 2015-01-18 21:06 UTC by Pete Travis
Modified: 2015-10-14 20:44 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-10-14 20:44:40 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Pete Travis 2015-01-18 21:06:06 UTC
python-dateutil will be updated to version 2.x and there may be changes that affect this package.  

If subscription-manager will work with the newer python-dateutil, you can safely close this bug.  If subscription-manager really does require python-dateutil 1.5, please use Requires: python-dateutil15 for Fedora versions of the package until it can be updated.

Comment 1 Pete Travis 2015-02-18 06:52:00 UTC
A few interesting things here:

- The spec cites an upstream URL and SCM of https://git.fedorahosted.org/cgit/subscription-manager.git/ . That repo hasn't been touched in more than two years, where are the updates coming from?

- The package source is a manually assembled tarball. If you *are* using fedorahosted, you don't have to do that.  "http://git/fedorahosted.org/cgit/%{name}/snapshot/${name}-%{version}" works nicely if you `git tag` the version.  In any case, publicly available sources would be nice.

- dateutil.tz.tzutc and dateutil.parser.parse should not have changed at all.  Usage of dateutil.tz.tzlocal is probably fine, but I'd suggest focusing any testing there.

- I don't have RHEL subscriptions for any of my Fedora boxes, so I did no direct testing. On a personal note, I don't understand why this package exists for Fedora...

Comment 2 Zbigniew Jędrzejewski-Szmek 2015-02-22 00:25:50 UTC
Should this package be retired?

Comment 3 Devan Goodwin 2015-02-25 14:52:14 UTC
Subscription-manager is actively used and developed and shouldn't be retired.

We moved to github several years ago, looks like the spec updates were missed, I will fix this in the upstream spec today and it will appear in Fedora on our next build cycle.

Package exists for Fedora for Katello/Satellite users who wish to register Fedora/CentOS systems to their servers and have them consume content. We control upstream as well as do the Fedora builds so any changes necessary can be made. I'll get someone on the team looking into that this sprint.

Comment 4 Adrian Likins 2015-03-02 15:12:40 UTC
This should be doable, but I do see a couple unexpected unittest
failures, if I use upstream python-dateutil 2.4.0 from pip

======================================================================
ERROR: test_system_dst (test.test_format_time.TestFormatTime)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/freezegun/api.py", line 244, in wrapper
    result = func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/mock.py", line 1201, in patched
    return func(*args, **keywargs)
  File "/home/adrian/src/subscription-manager/test/test_format_time.py", line 30, in test_system_dst
    mock_tz.return_value = tzstr('EST5EDT')
  File "/usr/lib/python2.7/site-packages/dateutil/tz.py", line 595, in __init__
    res = parser._parsetz(s)
  File "/usr/lib/python2.7/site-packages/dateutil/parser.py", line 923, in _parsetz
    return DEFAULTTZPARSER.parse(tzstr)
  File "/usr/lib/python2.7/site-packages/dateutil/parser.py", line 767, in parse
    l = _timelex.split(tzstr)
  File "/usr/lib/python2.7/site-packages/dateutil/parser.py", line 139, in split
    return list(cls(s))
  File "/usr/lib/python2.7/site-packages/dateutil/parser.py", line 136, in next
    return self.__next__()  # Python 2.x support
  File "/usr/lib/python2.7/site-packages/dateutil/parser.py", line 130, in __next__
    token = self.get_token()
  File "/usr/lib/python2.7/site-packages/dateutil/parser.py", line 61, in get_token
    nextchar = self.instream.read(1)
AttributeError: 'str' object has no attribute 'read'

======================================================================
ERROR: test_system_est (test.test_format_time.TestFormatTime)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/freezegun/api.py", line 244, in wrapper
    result = func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/mock.py", line 1201, in patched
    return func(*args, **keywargs)
  File "/home/adrian/src/subscription-manager/test/test_format_time.py", line 60, in test_system_est
    mock_tz.return_value = tzstr('EST5EDT')
  File "/usr/lib/python2.7/site-packages/dateutil/tz.py", line 595, in __init__
    res = parser._parsetz(s)
  File "/usr/lib/python2.7/site-packages/dateutil/parser.py", line 923, in _parsetz
    return DEFAULTTZPARSER.parse(tzstr)
  File "/usr/lib/python2.7/site-packages/dateutil/parser.py", line 767, in parse
    l = _timelex.split(tzstr)
  File "/usr/lib/python2.7/site-packages/dateutil/parser.py", line 139, in split
    return list(cls(s))
  File "/usr/lib/python2.7/site-packages/dateutil/parser.py", line 136, in next
    return self.__next__()  # Python 2.x support
  File "/usr/lib/python2.7/site-packages/dateutil/parser.py", line 130, in __next__
    token = self.get_token()
  File "/usr/lib/python2.7/site-packages/dateutil/parser.py", line 61, in get_token
    nextchar = self.instream.read(1)
AttributeError: 'str' object has no attribute 'read'


This looks to be a bug in python-dateutil:
https://bugs.launchpad.net/dateutil/+bug/1331576

I'll test on recent fedora and see if the fedora patches to dateutil fixes this
(The fedora patch to use system tzinfo may work around it).

Either way, it's an error in test code, we could work around it.

Comment 5 Adrian Likins 2015-03-02 16:19:12 UTC
pr for a workaround at https://github.com/candlepin/subscription-manager/pull/1149

That fixes the test case for dateutil 1.5 and 2.4. Otherwise we
seem to be okay with dateutil2.

Comment 6 Jaroslav Reznik 2015-03-03 16:43:55 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22


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