Skip to content

Imrove error when pulling the version from the NEWS fails #131

@StanFromIreland

Description

@StanFromIreland

Currently, it is:

$ tox -e update
update: recreate env because python changed version_info=[3, 13, 7, 'final', 0]->[3, 14, 3, 'final', 0] | executable='/usr/bin/python3.13'->'/usr/bin/python3.14' | virtualenv version='20.31.2'->'21.2.4'
update: remove tox env folder /home/stan/dev/tzdata/.tox/update
update: install_deps> python -I -m pip install click parver python-gnupg requests
update: commands[0]> python update.py
INFO:root:File tmp/2026b/download/tzdata2026b.tar.gz already exists, skipping
INFO:root:Downloading tzcode2026b.tar.gz from https://data.iana.org/time-zones/releases/tzcode2026b.tar.gz
INFO:root:Downloading tzdata2026b.tar.gz.asc from https://data.iana.org/time-zones/releases/tzdata2026b.tar.gz.asc
INFO:root:Downloading tzcode2026b.tar.gz.asc from https://data.iana.org/time-zones/releases/tzcode2026b.tar.gz.asc
INFO:root:Unpacking tmp/2026b/download/tzdata2026b.tar.gz to tmp/2026b/tzdb
INFO:root:Unpacking tmp/2026b/download/tzcode2026b.tar.gz to tmp/2026b/tzdb
Traceback (most recent call last):
  File "/home/stan/dev/tzdata/update.py", line 522, in <module>
    main()
    ~~~~^^
  File "/home/stan/dev/tzdata/.tox/update/lib/python3.14/site-packages/click/core.py", line 1514, in __call__
    return self.main(*args, **kwargs)
           ~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/home/stan/dev/tzdata/.tox/update/lib/python3.14/site-packages/click/core.py", line 1435, in main
    rv = self.invoke(ctx)
  File "/home/stan/dev/tzdata/.tox/update/lib/python3.14/site-packages/click/core.py", line 1298, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/stan/dev/tzdata/.tox/update/lib/python3.14/site-packages/click/core.py", line 853, in invoke
    return callback(*args, **kwargs)
  File "/home/stan/dev/tzdata/update.py", line 513, in main
    news_entry = read_news(tzdb_location, version=version)
  File "/home/stan/dev/tzdata/update.py", line 416, in read_news
    assert m is not None
           ^^^^^^^^^^^^^
AssertionError
update: exit 1 (2.96 seconds) /home/stan/dev/tzdata> python update.py pid=1205762
  update: FAIL code 1 (5.23=setup[2.27]+cmd[2.96] seconds)
  evaluation failed :( (5.29 seconds)

This is because, per the release announcement:

There is an embarrassing typo in the 2026b release: its NEWS file's third line has the wrong release number. I applied the following patch to the development version on GitHub and this patch should appear in the 2026c release.

diff --git a/NEWS b/NEWS
index a0042701..ea52e67e 100644
--- a/NEWS
+++ b/NEWS
@@ -3 +3 @@ News for the tz database
-Release 2026a - 2026-04-22 23:06:43 -0700
+Release 2026b - 2026-04-22 23:06:43 -0700

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions