Bug 1811697 - AttributeError: module 'subunit.iso8601' has no attribute 'Utc'
Summary: AttributeError: module 'subunit.iso8601' has no attribute 'Utc'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: subunit
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jerry James
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1809967
TreeView+ depends on / blocked
 
Reported: 2020-03-09 15:02 UTC by Fabien Boucher
Modified: 2020-03-18 02:50 UTC (History)
2 users (show)

Fixed In Version: subunit-1.3.0-19.fc32
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-18 02:50:30 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


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