Skip to content

Commit 1ac219e

Browse files
Merge branch 'refs/heads/master' into sbom
2 parents 0900609 + 5bb6232 commit 1ac219e

20 files changed

Lines changed: 113 additions & 43 deletions

.github/dependabot.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,9 @@ updates:
77
groups:
88
actions:
99
patterns:
10-
- "*"
10+
- "*"
11+
cooldown:
12+
# https://blog.yossarian.net/2025/11/21/We-should-all-be-using-dependency-cooldowns
13+
# Cooldowns protect against supply chain attacks by avoiding the
14+
# highest-risk window immediately after new releases.
15+
default-days: 14

.github/workflows/auto-tag.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,33 @@ jobs:
1414
contents: write
1515
steps:
1616
- name: Check out repository
17-
uses: actions/checkout@v6
17+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
18+
with:
19+
persist-credentials: true # Needed to push the tag
1820

1921
- name: Get current version
2022
id: version
2123
run: |
2224
VERSION=$(cat VERSION)
23-
echo "version=$VERSION" >> $GITHUB_OUTPUT
25+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
2426
2527
- name: Check if tag already exists
2628
id: checktag
29+
env:
30+
VERSION: ${{ steps.version.outputs.version }}
2731
run: |
28-
if git rev-parse "v${{ steps.version.outputs.version }}" >/dev/null 2>&1; then
29-
echo "skip=true" >> $GITHUB_OUTPUT
32+
if git rev-parse "${VERSION}" >/dev/null 2>&1; then
33+
echo "skip=true" >> "$GITHUB_OUTPUT"
3034
else
31-
echo "skip=false" >> $GITHUB_OUTPUT
35+
echo "skip=false" >> "$GITHUB_OUTPUT"
3236
fi
3337
3438
- name: Push tag
3539
if: steps.checktag.outputs.skip == 'false'
40+
env:
41+
VERSION: ${{ steps.version.outputs.version }}
3642
run: |
3743
git config user.name "github-actions[bot]"
3844
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
39-
git tag "${{ steps.version.outputs.version }}"
40-
git push origin "${{ steps.version.outputs.version }}"
45+
git tag "${VERSION}"
46+
git push origin "${VERSION}"

.github/workflows/check-for-updates.yml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@ on:
55
- cron: '0 9 * * *' # Runs daily at 9AM UTC
66
workflow_dispatch:
77

8+
permissions: {}
9+
810
jobs:
911
check-pr-exists:
1012
runs-on: ubuntu-latest
13+
permissions:
14+
pull-requests: read
1115
outputs:
1216
pr_exists: ${{ steps.check_pr_exists.outputs.pr_exists }}
1317
steps:
@@ -16,15 +20,15 @@ jobs:
1620
env:
1721
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1822
run: |
19-
PR_EXISTS=$(gh pr --repo $GITHUB_REPOSITORY \
23+
PR_EXISTS=$(gh pr --repo "$GITHUB_REPOSITORY" \
2024
list --search "Update tzdata to version" \
2125
--json number --jq '.[] | .number')
2226
if [ -n "$PR_EXISTS" ]; then
2327
echo "A PR updating the tzdata version already exists: https://github.com/python/tzdata/pulls/${PR_EXISTS}"
24-
echo "pr_exists=true" >> $GITHUB_OUTPUT
28+
echo "pr_exists=true" >> "$GITHUB_OUTPUT"
2529
exit 0
2630
else
27-
echo "pr_exists=false" >> $GITHUB_OUTPUT
31+
echo "pr_exists=false" >> "$GITHUB_OUTPUT"
2832
fi
2933
3034
check-for-updates:
@@ -36,12 +40,13 @@ jobs:
3640
if: needs.check-pr-exists.outputs.pr_exists == 'false' # Run only if no PR exists
3741
steps:
3842
- name: Check out repository (shallow)
39-
uses: actions/checkout@v6
43+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4044
with:
4145
fetch-depth: 1 # Shallow clone to save time
46+
persist-credentials: true # Needed to push the update
4247

4348
- name: Set up Python 3.12
44-
uses: actions/setup-python@v6
49+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
4550
with:
4651
python-version: '3.12'
4752

@@ -62,7 +67,7 @@ jobs:
6267
# Check for changes
6368
if git diff --quiet; then
6469
echo "No changes detected."
65-
echo "CHANGES_DETECTED=false" >> $GITHUB_ENV
70+
echo "CHANGES_DETECTED=false" >> "$GITHUB_ENV"
6671
exit 0
6772
fi
6873
@@ -75,19 +80,19 @@ jobs:
7580
exit 1
7681
fi
7782
78-
if [ $(echo "$news_files" | wc -l) -ne 1 ]; then
83+
if [ "$(echo "$news_files" | wc -l)" -ne 1 ]; then
7984
echo "More than one new file added in news.d, failing the job."
8085
exit 1
8186
fi
82-
echo "CHANGES_DETECTED=true" >> $GITHUB_ENV
87+
echo "CHANGES_DETECTED=true" >> "$GITHUB_ENV"
8388
8489
# Extract TZDATA_VERSION from filename
8590
TZDATA_VERSION=$(basename "$news_files" .md)
8691
8792
# Extract TZDATA_NEWS from file content
8893
TZDATA_NEWS=$(cat "$news_files")
8994
90-
echo "TZDATA_VERSION=$TZDATA_VERSION" >> $GITHUB_ENV
95+
echo "TZDATA_VERSION=$TZDATA_VERSION" >> "$GITHUB_ENV"
9196
{
9297
echo "TZDATA_NEWS<<EOF"
9398
echo "$TZDATA_NEWS"
@@ -111,5 +116,5 @@ jobs:
111116
gh pr create --title "Update tzdata to version $TZDATA_VERSION" \
112117
--body "$TZDATA_NEWS" \
113118
--base master \
114-
--head $(git rev-parse --abbrev-ref HEAD) \
119+
--head "$(git rev-parse --abbrev-ref HEAD)" \
115120
--label "automatic-updates"

.github/workflows/publish.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ jobs:
2424
permissions:
2525
id-token: write
2626
steps:
27-
- uses: actions/checkout@v6
27+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
28+
with:
29+
persist-credentials: false
2830
- name: Set up Python
29-
uses: actions/setup-python@v6
31+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
3032
with:
3133
python-version: '3.x'
3234
- name: Install dependencies
@@ -44,12 +46,12 @@ jobs:
4446
tox -e build
4547
- name: Publish package (TestPyPI)
4648
if: github.event_name == 'push'
47-
uses: pypa/gh-action-pypi-publish@release/v1
49+
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
4850
with:
4951
repository-url: https://test.pypi.org/legacy/
5052
verbose: true
5153
- name: Publish package
5254
if: github.event_name == 'release'
53-
uses: pypa/gh-action-pypi-publish@release/v1
55+
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
5456
with:
5557
verbose: true

.github/workflows/tests.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
pull_request:
88
workflow_dispatch:
99

10+
permissions: {}
11+
1012
jobs:
1113
tests:
1214

@@ -25,12 +27,14 @@ jobs:
2527
env:
2628
TOXENV: py
2729
container:
28-
image: ${{ matrix.use-container && format('python:{0}', matrix.python-version) || '' }}
30+
image: ${{ matrix.use-container && format('python:{0}', matrix.python-version) || '' }} # zizmor: ignore[unpinned-images]
2931
steps:
30-
- uses: actions/checkout@v6
32+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
33+
with:
34+
persist-credentials: false
3135
- if: ${{ !matrix.use-container }}
3236
name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }} (non-containers)
33-
uses: actions/setup-python@v6
37+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
3438
with:
3539
python-version: ${{ matrix.python-version }}
3640
allow-prereleases: true
@@ -51,9 +55,11 @@ jobs:
5155
TOXENV: ${{ matrix.toxenv }}
5256

5357
steps:
54-
- uses: actions/checkout@v6
58+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
59+
with:
60+
persist-credentials: false
5561
- name: ${{ matrix.toxenv }}
56-
uses: actions/setup-python@v6
62+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
5763
with:
5864
python-version: "3.x"
5965
- name: Install tox

.pre-commit-config.yaml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
repos:
22
- repo: https://github.com/psf/black
3-
rev: 25.9.0
3+
rev: 26.3.1
44
hooks:
55
- id: black
66
language_version: "python3.12"
77

88
- repo: https://github.com/pycqa/isort
9-
rev: 7.0.0
9+
rev: 8.0.1
1010
hooks:
1111
- id: isort
1212
additional_dependencies: [ toml ]
@@ -18,7 +18,28 @@ repos:
1818
- id: trailing-whitespace
1919
- id: debug-statements
2020

21+
- repo: https://github.com/python-jsonschema/check-jsonschema
22+
rev: 0.37.1
23+
hooks:
24+
- id: check-dependabot
25+
- id: check-github-workflows
26+
27+
- repo: https://github.com/rhysd/actionlint
28+
rev: v1.7.12
29+
hooks:
30+
- id: actionlint
31+
32+
- repo: https://github.com/zizmorcore/zizmor-pre-commit
33+
rev: v1.24.1
34+
hooks:
35+
- id: zizmor
36+
2137
- repo: https://github.com/asottile/setup-cfg-fmt
22-
rev: v3.1.0
38+
rev: v3.2.0
2339
hooks:
2440
- id: setup-cfg-fmt
41+
42+
- repo: meta
43+
hooks:
44+
- id: check-hooks-apply
45+
- id: check-useless-excludes

NEWS.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
# Version 2026.2
2+
Upstream version 2026b released 2026-04-23T06:06:43+00:00
3+
4+
## Briefly:
5+
6+
British Columbia moved to permanent -07 on 2026-03-09. Some more overflow bugs
7+
have been fixed in zic.
8+
9+
## Changes to future timestamps
10+
11+
British Columbia’s 2026-03-08 spring forward was its last foreseeable clock
12+
change, as it moved to permanent -07 thereafter. (Thanks to Arthur David Olson.)
13+
Although the change to permanent -07 legally took place on 2026-03-09,
14+
temporarily model the change to occur on 2026-11-01 at 02:00 instead. This
15+
works around a limitation in CLDR v48.2 (2026-03-17). This temporary hack is
16+
planned to be removed after CLDR is fixed.
17+
18+
---
19+
120
# Version 2026.1
221
Upstream version 2026a released 2026-03-02T06:59:49+00:00
322

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ tzdata: Python package providing IANA time zone data
44
This is a Python package containing ``zic``-compiled binaries for the IANA time
55
zone database. It is intended to be a fallback for systems that do not have
66
system time zone data installed (or don't have it installed in a standard
7-
location), as a part of `PEP 615 <https://www.python.org/dev/peps/pep-0615/>`_
7+
location), as a part of `PEP 615 <https://www.python.org/dev/peps/pep-0615/>`_.
88

99
This repository generates a ``pip``-installable package, published on PyPI as
1010
`tzdata <https://pypi.org/project/tzdata>`_.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2026.1
1+
2026.2

docs/index.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ tzdata: Python package providing IANA time zone data
44
This is a Python package containing ``zic``-compiled binaries for the IANA time
55
zone database. It is intended to be a fallback for systems that do not have
66
system time zone data installed (or don't have it installed in a standard
7-
location), as a part of `PEP 615 <https://www.python.org/dev/peps/pep-0615/>`_
7+
location), as a part of `PEP 615 <https://www.python.org/dev/peps/pep-0615/>`_.
88

9-
This repository generates a ``pip``-installable package, published on PyPI as
9+
The `python/tzdata <https://github.com/python/tzdata>`_ repository generates a
10+
``pip``-installable package, published on PyPI as
1011
`tzdata <https://pypi.org/project/tzdata>`_.
1112

1213
Overview

0 commit comments

Comments
 (0)