Bug 1497572 - Package building fails due to tzdata updates
Summary: Package building fails due to tzdata updates
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: pytz
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Matěj Cepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1497568
TreeView+ depends on / blocked
 
Reported: 2017-10-01 23:19 UTC by Tim Landscheidt
Modified: 2020-10-22 09:18 UTC (History)
6 users (show)

Fixed In Version: pytz-2017.2-7.fc27 pytz-2017.2-7.fc26 pytz-2017.2-7.fc28
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-20 18:23:24 UTC
Type: Bug


Attachments (Terms of Use)

Description Tim Landscheidt 2017-10-01 23:19:11 UTC
pytz-2016.6.1-1 contains tests that check assertions for the data contained in this specific version.  Fedora however patches pytz to read timezone data from /usr/share/zoneinfo.  If the latter has been updated (as part of package tzdata) and thus diverged from the data shipped with pytz, pytz cannot be built; example failures from https://kojipkgs.fedoraproject.org//work/tasks/4885/22194885/build.log:

| […]
| =================================== FAILURES ===================================
| ___________________ NoumeaHistoryStartTestCase.testDayAfter ____________________
| self = <test_tzinfo.NoumeaHistoryStartTestCase testMethod=testDayAfter>
|     def testDayAfter(self):
|         self._test_all(
| >               self.transition_time + timedelta(days=1), self.after
|                 )
| pytz/tests/test_tzinfo.py:337:
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
| pytz/tests/test_tzinfo.py:292: in _test_all
|     self._test_tzname(utc_dt, wanted)
| pytz/tests/test_tzinfo.py:241: in _test_tzname
|     tzname, str(utc_dt), dt.tzname()
| E   AssertionError: Expected NCT as tzname for 1912-01-13 12:54:12+00:00. Got +11
| ___________________ NoumeaHistoryStartTestCase.testHourAfter ___________________
| self = <test_tzinfo.NoumeaHistoryStartTestCase testMethod=testHourAfter>
|     def testHourAfter(self):
|         self._test_all(
| >               self.transition_time + timedelta(hours=1), self.after
|                 )
| pytz/tests/test_tzinfo.py:327:
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
| pytz/tests/test_tzinfo.py:292: in _test_all
|     self._test_tzname(utc_dt, wanted)
| pytz/tests/test_tzinfo.py:241: in _test_tzname
|     tzname, str(utc_dt), dt.tzname()
| E   AssertionError: Expected NCT as tzname for 1912-01-12 13:54:12+00:00. Got +11
| _________________ NoumeaHistoryStartTestCase.testInstantAfter __________________
| self = <test_tzinfo.NoumeaHistoryStartTestCase testMethod=testInstantAfter>
|     def testInstantAfter(self):
|         self._test_all(
| >               self.transition_time + self.instant, self.after
|                 )
| pytz/tests/test_tzinfo.py:322:
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
| […]

AFAICT there are three ways to approach this:

1. Backport the updated tests from the pytz version corresponding to tzdata's version.  This would let it remain a moving target, keeping it non-obvious if a package build will succeed or not.
2. Add a versioned (build-)requirement on tzdata, i. e. pytz-2016.6.1 would (build-)require tzdata = 2016f (untested if those match up).  IMHO this is optimal because it does what it says it does, but it also adds the necessity to update the pytz package every time tzdata gets updated.
3. Remove by patch all tests in pytz/tests/test_tzinfo.py that depend on (dynamically read) timezone data (does that leave any?).  This will work, but it also removes a layer of protection against regressions.

Comment 1 Fedora End Of Life 2017-11-16 18:49:35 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 2 Matěj Cepl 2018-03-15 17:56:30 UTC
(In reply to Tim Landscheidt from comment #0)
> 3. Remove by patch all tests in pytz/tests/test_tzinfo.py that depend on
> (dynamically read) timezone data (does that leave any?).  This will work,
> but it also removes a layer of protection against regressions.

I am afraid that this is the only viable option. Updates of tzdata are too frequent to follow with Fedora/EPEL package.

Comment 3 Fedora Update System 2018-03-17 21:42:42 UTC
pytz-2017.2-7.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-e537a443ca

Comment 4 Fedora Update System 2018-03-17 21:42:55 UTC
pytz-2017.2-7.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-5c1b46d495

Comment 5 Fedora Update System 2018-03-17 21:43:05 UTC
pytz-2017.2-7.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2018-ebb3a0ad9d

Comment 6 Fedora Update System 2018-03-18 17:43:36 UTC
pytz-2017.2-7.fc28 has been pushed to the Fedora 28 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-2018-5c1b46d495

Comment 7 Fedora Update System 2018-03-18 18:32:41 UTC
pytz-2017.2-7.fc26 has been pushed to the Fedora 26 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-2018-ebb3a0ad9d

Comment 8 Fedora Update System 2018-03-18 18:59:36 UTC
pytz-2017.2-7.fc27 has been pushed to the Fedora 27 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-2018-e537a443ca

Comment 9 Fedora Update System 2018-03-20 18:23:24 UTC
pytz-2017.2-7.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2018-03-27 19:27:50 UTC
pytz-2017.2-7.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2018-03-30 13:06:01 UTC
pytz-2017.2-7.fc28 has been pushed to the Fedora 28 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.