Test for sortedness of all_timezones and common_timezones is missing

Bug #1720794 reported by Tim Landscheidt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pytz
Triaged
Medium
Unassigned

Bug Description

Fedora replaces the hard-coded list of timezones with one dynamically read from /usr/share/zoneinfo (cf. https://src.fedoraproject.org/rpms/pytz/blob/master/f/pytz-zoneinfo.patch). This breaks the promise in python-tz's README.txt that all_timezones and common_timezones are sorted, i. e. for example on Fedora 25:

| [tim@passepartout ~]$ python2 -c 'from pytz import all_timezones, common_timezones; print all_timezones == sorted(all_timezones), common_timezones == sorted(common_timezones)'
| False False
| [tim@passepartout ~]$ python3 -c 'from pytz import all_timezones, common_timezones; print(all_timezones == sorted(all_timezones), common_timezones == sorted(common_timezones))'
| False False
| [tim@passepartout ~]$

This is not python-tz's fault, but it would be helpful if the test suite would assert that all_timezones == sorted(all_timezones) && common_timezones == sorted(common_timezones) so that this becomes a regression easier to detect.

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

You want the upstream project, not Ubuntu.

affects: python-tz (Ubuntu) → pytz
Stuart Bishop (stub)
Changed in pytz:
status: New → Triaged
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.