Bug 1811697

Summary: AttributeError: module 'subunit.iso8601' has no attribute 'Utc'
Product: [Fedora] Fedora Reporter: Fabien Boucher <fboucher>
Component: subunitAssignee: Jerry James <loganjerry>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: apevec, loganjerry
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: subunit-1.3.0-19.fc32 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-18 02:50:30 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: 1809967    

Description Fabien Boucher 2020-03-09 15:02:34 UTC
Description of problem:


Version-Release number of selected component (if applicable):
python3-subunit-1.3.0-17.fc32.noarch

How reproducible:
Everytime


Steps to Reproduce:

[root@ff28cb5a9bf0 subunit]# python --version
Python 3.8.2
[root@ff28cb5a9bf0 subunit]# python
Python 3.8.2 (default, Feb 28 2020, 00:00:00) 
[GCC 10.0.1 20200216 (Red Hat 10.0.1-0.8)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import subunit.iso8601
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.8/site-packages/subunit/__init__.py", line 142, in <module>
    from subunit.v2 import ByteStreamToStreamResult, StreamResultToBytes
  File "/usr/lib/python3.8/site-packages/subunit/v2.py", line 52, in <module>
    EPOCH = datetime.datetime.utcfromtimestamp(0).replace(tzinfo=iso8601.Utc())
AttributeError: module 'subunit.iso8601' has no attribute 'Utc'
>>> 


Actual results:
>>> import subunit.iso8601
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.8/site-packages/subunit/__init__.py", line 142, in <module>
    from subunit.v2 import ByteStreamToStreamResult, StreamResultToBytes
  File "/usr/lib/python3.8/site-packages/subunit/v2.py", line 52, in <module>
    EPOCH = datetime.datetime.utcfromtimestamp(0).replace(tzinfo=iso8601.Utc())
AttributeError: module 'subunit.iso8601' has no attribute 'Utc'
>>> 

Expected results:
no traceback.

Additional info:

Comment 1 Jerry James 2020-03-09 22:24:26 UTC
Yes, python-iso8601 0.1.12 has been built recently for F32 and Rawhide.  It has some backwards incompatible changes.  I think at this point that we should give up on trying to unbundle iso8601 from subunit.

Comment 2 Fedora Update System 2020-03-10 14:36:56 UTC
FEDORA-2020-4453da8a1c has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-4453da8a1c

Comment 3 Fabien Boucher 2020-03-11 14:49:01 UTC
Thanks for the update, I've tested the 1.3.0-18 through a scratch build but I'm getting an issue 'Expecting bytes '2020-03-11 08:46:18.994405Z'.
Please could you double check if that could be related to the recent change ? Here is the scratch build https://koji.fedoraproject.org/koji/taskinfo?taskID=42402231
I see in root.log python3-subunit 1.3.0-18 is installed. But in build.log I see the %check with testr fails on a curious error.

Comment 4 Jerry James 2020-03-11 15:56:51 UTC
Yes, subunit-decode-binary-to-unicode.patch doesn't work with the bundled version of iso8601.  I have dropped that patch, and added a couple more upstream commits to fix other bugs.  It has been built for Rawhide, and I have updated the Fedora 32 update.  I also did a local mock build of python-gear to verify that that works now.

I'd like to make two suggestions for python-gear, things I noticed while doing the mock build.
- The sources file lists both gear-0.13.0.tar.gz and gear-0.14.0.tar.gz; the former should be removed.
- In the spec file, the source0 line can be replaced with "Source0: %pypi_source"; then it never has to be updated again.

Comment 5 Fabien Boucher 2020-03-11 17:01:34 UTC
Thanks. That looks good now. The scratch build by the CI was successful.
Also thanks for the suggestions, this pypi_source macro is perfect :). I've added them part as the bump proposed here https://src.fedoraproject.org/rpms/python-gear/pull-request/23

Comment 6 Fedora Update System 2020-03-12 18:49:03 UTC
subunit-1.3.0-19.fc32 has been pushed to the Fedora 32 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-4453da8a1c

Comment 7 Fedora Update System 2020-03-18 02:50:30 UTC
subunit-1.3.0-19.fc32 has been pushed to the Fedora 32 stable repository. If problems still persist, please make note of it in this bug report.