python-dateutil 2.9.0.post0__tar.gz → 3.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/.gitattributes +4 -1
  2. python_dateutil-3.0.0/.github/workflows/publish.yml +56 -0
  3. python_dateutil-3.0.0/.github/workflows/validate.yml +328 -0
  4. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/.gitignore +1 -0
  5. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/.pre-commit-config.yaml +3 -2
  6. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/AUTHORS.md +6 -0
  7. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/CONTRIBUTING.md +1 -1
  8. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/MANIFEST.in +1 -1
  9. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/NEWS +109 -0
  10. {python-dateutil-2.9.0.post0/src/python_dateutil.egg-info → python_dateutil-3.0.0}/PKG-INFO +16 -16
  11. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/README.rst +4 -13
  12. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/RELEASING +14 -6
  13. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/appveyor.yml +2 -6
  14. python_dateutil-3.0.0/ci_tools/run_tz_master_env.sh +97 -0
  15. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/docs/Makefile +32 -29
  16. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/docs/conf.py +17 -10
  17. python_dateutil-3.0.0/docs/tz.rst +109 -0
  18. python_dateutil-3.0.0/docs/zoneinfo.rst +10 -0
  19. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/pyproject.toml +0 -1
  20. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/setup.cfg +11 -6
  21. python_dateutil-3.0.0/setup.py +31 -0
  22. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/src/dateutil/__init__.py +7 -5
  23. python_dateutil-3.0.0/src/dateutil/_tzdata_impl.py +147 -0
  24. python_dateutil-3.0.0/src/dateutil/_version.py +4 -0
  25. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/src/dateutil/relativedelta.py +0 -3
  26. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/src/dateutil/rrule.py +28 -1
  27. python_dateutil-3.0.0/src/dateutil/tz/__init__.py +60 -0
  28. python_dateutil-3.0.0/src/dateutil/tz/_tzfile.py +1428 -0
  29. python_dateutil-3.0.0/src/dateutil/tz/_tzpath.py +104 -0
  30. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/src/dateutil/tz/tz.py +201 -578
  31. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/src/dateutil/zoneinfo/__init__.py +107 -41
  32. python_dateutil-3.0.0/src/dateutil/zoneinfo/rebuild.py +42 -0
  33. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0/src/python_dateutil.egg-info}/PKG-INFO +16 -16
  34. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/src/python_dateutil.egg-info/SOURCES.txt +17 -9
  35. python_dateutil-3.0.0/src/python_dateutil.egg-info/requires.txt +2 -0
  36. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/tests/_common.py +155 -3
  37. python_dateutil-3.0.0/tests/conftest.py +52 -0
  38. python_dateutil-3.0.0/tests/property/test_isoparse_prop.py +62 -0
  39. python_dateutil-3.0.0/tests/property/test_rrule_prop.py +117 -0
  40. python_dateutil-3.0.0/tests/property/test_tz_prop.py +95 -0
  41. python_dateutil-3.0.0/tests/resources/__init__.py +0 -0
  42. python_dateutil-3.0.0/tests/resources/data/__init__.py +0 -0
  43. python_dateutil-3.0.0/tests/resources/data/keys.json +13 -0
  44. python_dateutil-3.0.0/tests/resources/data/metadata.json +3 -0
  45. python_dateutil-3.0.0/tests/resources/data/zoneinfo_fat.json +13 -0
  46. python_dateutil-3.0.0/tests/resources/data/zoneinfo_slim.json +13 -0
  47. python_dateutil-3.0.0/tests/resources/data/zoneinfo_v1.json +13 -0
  48. python_dateutil-3.0.0/tests/resources/liliput_tzif +0 -0
  49. python_dateutil-3.0.0/tests/resources/update_tzif.py +256 -0
  50. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/tests/test_import_star.py +0 -2
  51. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/tests/test_imports.py +82 -38
  52. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/tests/test_isoparser.py +9 -6
  53. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/tests/test_parser.py +1 -0
  54. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/tests/test_relativedelta.py +5 -0
  55. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/tests/test_rrule.py +233 -9
  56. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/tests/test_tz.py +262 -127
  57. python_dateutil-3.0.0/tests/test_tzfile.py +3089 -0
  58. python_dateutil-3.0.0/tests/test_tzpath_data.py +377 -0
  59. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/tests/test_utils.py +14 -8
  60. python_dateutil-3.0.0/tests/test_zoneinfo.py +146 -0
  61. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/tox.ini +22 -22
  62. python-dateutil-2.9.0.post0/.github/workflows/publish.yml +0 -63
  63. python-dateutil-2.9.0.post0/.github/workflows/validate.yml +0 -150
  64. python-dateutil-2.9.0.post0/.travis.yml +0 -35
  65. python-dateutil-2.9.0.post0/azure-pipelines.yml +0 -79
  66. python-dateutil-2.9.0.post0/ci_tools/make_zonefile_metadata.py +0 -61
  67. python-dateutil-2.9.0.post0/ci_tools/retry.bat +0 -18
  68. python-dateutil-2.9.0.post0/ci_tools/retry.sh +0 -10
  69. python-dateutil-2.9.0.post0/ci_tools/run_tz_master_env.sh +0 -97
  70. python-dateutil-2.9.0.post0/docs/tz.rst +0 -60
  71. python-dateutil-2.9.0.post0/docs/zoneinfo.rst +0 -19
  72. python-dateutil-2.9.0.post0/setup.py +0 -58
  73. python-dateutil-2.9.0.post0/src/dateutil/_version.py +0 -4
  74. python-dateutil-2.9.0.post0/src/dateutil/tz/__init__.py +0 -12
  75. python-dateutil-2.9.0.post0/src/dateutil/zoneinfo/dateutil-zoneinfo.tar.gz +0 -0
  76. python-dateutil-2.9.0.post0/src/dateutil/zoneinfo/rebuild.py +0 -75
  77. python-dateutil-2.9.0.post0/src/python_dateutil.egg-info/requires.txt +0 -1
  78. python-dateutil-2.9.0.post0/tests/conftest.py +0 -41
  79. python-dateutil-2.9.0.post0/tests/property/test_isoparse_prop.py +0 -27
  80. python-dateutil-2.9.0.post0/tests/property/test_tz_prop.py +0 -35
  81. python-dateutil-2.9.0.post0/updatezinfo.py +0 -71
  82. python-dateutil-2.9.0.post0/zonefile_metadata.json +0 -22
  83. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/.github/pull_request_template.md +0 -0
  84. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/.readthedocs.yml +0 -0
  85. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/LICENSE +0 -0
  86. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/changelog.d/.gitignore +0 -0
  87. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/changelog.d/template.rst +0 -0
  88. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/codecov.yml +0 -0
  89. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/docs/changelog.rst +0 -0
  90. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/docs/easter.rst +0 -0
  91. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/docs/examples.rst +0 -0
  92. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/docs/exercises/index.rst +0 -0
  93. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/docs/exercises/solutions/mlk-day-rrule.rst +0 -0
  94. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/docs/exercises/solutions/mlk_day_rrule_solution.py +0 -0
  95. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/docs/index.rst +0 -0
  96. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/docs/make.bat +0 -0
  97. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/docs/parser.rst +0 -0
  98. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/docs/relativedelta.rst +0 -0
  99. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/docs/requirements-docs.txt +0 -0
  100. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/docs/rrule.rst +0 -0
  101. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/docs/samples/EST5EDT.ics +0 -0
  102. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/docs/tzwin.rst +0 -0
  103. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/docs/utils.rst +0 -0
  104. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/requirements/3.3/constraints.txt +0 -0
  105. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/requirements/3.3/requirements-dev.txt +0 -0
  106. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/requirements-dev.txt +0 -0
  107. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/src/dateutil/_common.py +0 -0
  108. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/src/dateutil/easter.py +0 -0
  109. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/src/dateutil/parser/__init__.py +0 -0
  110. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/src/dateutil/parser/_parser.py +0 -0
  111. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/src/dateutil/parser/isoparser.py +0 -0
  112. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/src/dateutil/tz/_common.py +0 -0
  113. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/src/dateutil/tz/_factories.py +0 -0
  114. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/src/dateutil/tz/win.py +0 -0
  115. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/src/dateutil/tzwin.py +0 -0
  116. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/src/dateutil/utils.py +0 -0
  117. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/src/python_dateutil.egg-info/dependency_links.txt +0 -0
  118. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/src/python_dateutil.egg-info/top_level.txt +0 -0
  119. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/src/python_dateutil.egg-info/zip-safe +0 -0
  120. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/tests/__init__.py +0 -0
  121. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/tests/property/test_parser_prop.py +0 -0
  122. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/tests/test_easter.py +0 -0
  123. {python-dateutil-2.9.0.post0 → python_dateutil-3.0.0}/tests/test_internals.py +0 -0
@@ -15,4 +15,7 @@ RELEASING text
15
15
 
16
16
  # NEWS and Windows batch files should be crlf
17
17
  NEWS eol=crlf
18
- *.bat eol=crlf
18
+ *.bat eol=crlf
19
+
20
+ # Generated test data
21
+ tests/resources/data/zoneinfo_*.json linguist-generated=true
@@ -0,0 +1,56 @@
1
+ # This workflow is triggered three ways:
2
+ #
3
+ # 1. Manually triggering the workflow via the GitHub UI (Actions > Upload
4
+ # package) will upload to test.pypi.org without the need to create a tag.
5
+ # 2. When a tag is created, the workflow will upload the package to
6
+ # test.pypi.org.
7
+ # 3. When a GitHub Release is made, the workflow will upload the package to pypi.org.
8
+ #
9
+ # It is done this way until PyPI has draft reviews, to allow for a two-stage
10
+ # upload with a chance for manual intervention before the final publication.
11
+ #
12
+ # Nothing is uploaded unless the validate workflow passes first, including
13
+ # installing the built sdist and wheel on every supported version of Python.
14
+ #
15
+ # Uploads use PyPI trusted publishing (OIDC), so no API tokens are stored as
16
+ # secrets. The trusted publisher on both PyPI and Test PyPI must be configured
17
+ # with workflow "publish.yml" and environment "release".
18
+ name: Upload package
19
+
20
+ on:
21
+ release:
22
+ types: [created]
23
+ push:
24
+ tags:
25
+ - '*'
26
+ workflow_dispatch:
27
+
28
+ jobs:
29
+ # Run the full validation suite, including installing the sdist on every
30
+ # supported Python. This builds the distributions that are uploaded below,
31
+ # so the files that get published are exactly the files that were tested.
32
+ validate:
33
+ uses: ./.github/workflows/validate.yml
34
+ with:
35
+ release: true
36
+
37
+ publish:
38
+ needs: validate
39
+ runs-on: ubuntu-latest
40
+ environment: release
41
+ permissions:
42
+ id-token: write # Required for trusted publishing
43
+ steps:
44
+ - name: Download distributions
45
+ uses: actions/download-artifact@v8
46
+ with:
47
+ name: dist
48
+ path: dist/
49
+ - name: Publish package to Test PyPI
50
+ if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
51
+ uses: pypa/gh-action-pypi-publish@release/v1
52
+ with:
53
+ repository-url: https://test.pypi.org/legacy/
54
+ - name: Publish package to PyPI
55
+ if: github.event_name == 'release'
56
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,328 @@
1
+ name: Validate
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ pull_request:
8
+ # Called by publish.yml, so that a release is validated (and the exact files
9
+ # that were validated are what gets uploaded) before it is published.
10
+ workflow_call:
11
+ inputs:
12
+ release:
13
+ description: "Also install the sdist on every supported Python"
14
+ type: boolean
15
+ default: false
16
+
17
+ env:
18
+ pypi-hosts: "pypi.python.org pypi.org files.pythonhosted.org"
19
+ TZDATA_VERSION: "2024a"
20
+
21
+ jobs:
22
+ build-tzdata:
23
+ runs-on: ubuntu-latest
24
+ steps:
25
+ - name: Cache tzdata
26
+ id: cache-tzdata
27
+ uses: actions/cache@v6
28
+ with:
29
+ path: tzdata_built
30
+ key: tzdata-${{ env.TZDATA_VERSION }}
31
+
32
+ - name: Build tzdata
33
+ if: steps.cache-tzdata.outputs.cache-hit != 'true'
34
+ run: |
35
+ sudo apt-get update
36
+ sudo apt-get install -y lzip curl
37
+ mkdir -p tzdata_built
38
+ TMP_DIR=$(mktemp -d)
39
+ cd $TMP_DIR
40
+ curl --fail --location "https://data.iana.org/time-zones/releases/tzdb-${{ env.TZDATA_VERSION }}.tar.lz" -o tzdb.tar.lz
41
+ tar --lzip -xf tzdb.tar.lz
42
+ cd tzdb-${{ env.TZDATA_VERSION }}
43
+ make install DESTDIR=$GITHUB_WORKSPACE/tzdata_built \
44
+ DATAFORM=main
45
+
46
+ - name: Upload tzdata artifact
47
+ uses: actions/upload-artifact@v7
48
+ with:
49
+ name: tzdata
50
+ path: tzdata_built/usr/share/zoneinfo
51
+
52
+ test:
53
+ strategy:
54
+ matrix:
55
+ python-version: [
56
+ "3.8",
57
+ "3.9",
58
+ "3.10",
59
+ "3.11",
60
+ "3.12",
61
+ "3.13",
62
+ "3.14",
63
+ "3.14t",
64
+ "3.15",
65
+ "3.15t",
66
+ "pypy-2.7",
67
+ "pypy-3.8",
68
+ ]
69
+ os: [ubuntu-latest, windows-latest, macos-latest]
70
+ include:
71
+ # Older versions (<=3.7) are included separately since they need
72
+ # special handling (using an older os or a container)
73
+ - os: "macos-15-intel"
74
+ python-version: "3.5"
75
+ - os: "macos-15-intel"
76
+ python-version: "3.6"
77
+ - os: "macos-15-intel"
78
+ python-version: "3.7"
79
+ - os: "windows-latest"
80
+ python-version: "3.5"
81
+ - os: "windows-latest"
82
+ python-version: "3.6"
83
+ - os: "windows-latest"
84
+ python-version: "3.7"
85
+ - os: "ubuntu-latest"
86
+ python-version: "2.7"
87
+ use-container: true
88
+ - os: "ubuntu-latest"
89
+ python-version: "3.5"
90
+ use-container: true
91
+ - os: "ubuntu-latest"
92
+ python-version: "3.6"
93
+ use-container: true
94
+ - os: "ubuntu-latest"
95
+ python-version: "3.7"
96
+ use-container: true
97
+ runs-on: ${{ matrix.os }}
98
+ needs: [build-tzdata, build-dist]
99
+ container:
100
+ image: ${{ matrix.use-container && format('python:{0}', matrix.python-version) || '' }}
101
+ env:
102
+ TOXENV: py
103
+ PIP_TRUSTED_HOST: pypi.python.org
104
+ SUDO: ${{ !matrix.use-container && 'sudo' || '' }}
105
+ TZ: ${{ !startsWith(matrix.os, 'windows-latest') && 'America/New_York' || null }}
106
+ steps:
107
+ - name: Checkout code
108
+ uses: actions/checkout@v7
109
+ - name: Set timezone (Windows)
110
+ if: startsWith(matrix.os, 'windows-latest')
111
+ run: tzutil /s "Eastern Standard Time"
112
+ - if: ${{ !matrix.use-container }}
113
+ name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }} (non-containers)
114
+ uses: actions/setup-python@v7
115
+ with:
116
+ python-version: ${{ matrix.python-version }}
117
+ allow-prereleases: true
118
+ env:
119
+ PIP_TRUSTED_HOST: ${{ contains(fromJson('["2.7", "3.5", "3.6", "3.7"]'), matrix.python-version) && env.pypi-hosts || '' }}
120
+ - name: Download distributions
121
+ uses: actions/download-artifact@v8
122
+ with:
123
+ name: dist
124
+ path: dist
125
+ - name: Download tzdata artifact
126
+ uses: actions/download-artifact@v8
127
+ if: startsWith(matrix.os, 'ubuntu')
128
+ with:
129
+ name: tzdata
130
+ path: tzdata_download
131
+ - name: Install specific tzdata version
132
+ run: |
133
+ $SUDO rm -rf /usr/share/zoneinfo
134
+ $SUDO mv tzdata_download /usr/share/zoneinfo
135
+
136
+ head -n 1 /usr/share/zoneinfo/tzdata.zi
137
+ if: startsWith(matrix.os, 'ubuntu')
138
+ - name: Install dependencies
139
+ run: python -m pip install -U tox
140
+ # Test the wheel that was built once, on a recent Python, rather than
141
+ # building a package from source on each interpreter. Run locally,
142
+ # `tox` still builds and installs an sdist itself.
143
+ - name: Run tox on the wheel
144
+ shell: bash
145
+ run: python -m tox --installpkg "$(ls dist/*.whl)"
146
+ - name: Generate coverage.xml
147
+ run: python -m tox -e coverage
148
+ - name: Report coverage to Codecov
149
+ uses: codecov/codecov-action@v7
150
+ with:
151
+ files: ./.tox/coverage.xml
152
+ name: ${{ matrix.os }}:${{ matrix.python-version }}
153
+ fail_ci_if_error: false
154
+
155
+ # Only run for releases: install the sdist, which is what pip builds from on
156
+ # platforms that have no wheel, on every supported Python.
157
+ test-sdist:
158
+ if: ${{ inputs.release }}
159
+ strategy:
160
+ matrix:
161
+ python-version: [
162
+ "3.8",
163
+ "3.9",
164
+ "3.10",
165
+ "3.11",
166
+ "3.12",
167
+ "3.13",
168
+ "3.14",
169
+ "3.14t",
170
+ "3.15",
171
+ "3.15t",
172
+ "pypy-2.7",
173
+ "pypy-3.8",
174
+ ]
175
+ include:
176
+ - python-version: "2.7"
177
+ use-container: true
178
+ - python-version: "3.5"
179
+ use-container: true
180
+ - python-version: "3.6"
181
+ use-container: true
182
+ - python-version: "3.7"
183
+ use-container: true
184
+ runs-on: ubuntu-latest
185
+ needs: [build-tzdata, build-dist]
186
+ container:
187
+ image: ${{ matrix.use-container && format('python:{0}', matrix.python-version) || '' }}
188
+ env:
189
+ TOXENV: py
190
+ PIP_TRUSTED_HOST: pypi.python.org
191
+ SUDO: ${{ !matrix.use-container && 'sudo' || '' }}
192
+ TZ: America/New_York
193
+ steps:
194
+ - name: Checkout code
195
+ uses: actions/checkout@v7
196
+ - if: ${{ !matrix.use-container }}
197
+ name: Set up Python ${{ matrix.python-version }} (non-containers)
198
+ uses: actions/setup-python@v7
199
+ with:
200
+ python-version: ${{ matrix.python-version }}
201
+ allow-prereleases: true
202
+ env:
203
+ PIP_TRUSTED_HOST: ${{ contains(fromJson('["2.7", "3.5", "3.6", "3.7"]'), matrix.python-version) && env.pypi-hosts || '' }}
204
+ - name: Download distributions
205
+ uses: actions/download-artifact@v8
206
+ with:
207
+ name: dist
208
+ path: dist
209
+ - name: Download tzdata artifact
210
+ uses: actions/download-artifact@v8
211
+ with:
212
+ name: tzdata
213
+ path: tzdata_download
214
+ - name: Install specific tzdata version
215
+ run: |
216
+ $SUDO rm -rf /usr/share/zoneinfo
217
+ $SUDO mv tzdata_download /usr/share/zoneinfo
218
+
219
+ head -n 1 /usr/share/zoneinfo/tzdata.zi
220
+ - name: Install dependencies
221
+ env:
222
+ # tox 4.8, the newest tox that supports Python 3.7, deadlocks on exit
223
+ # when it is given an sdist: its build backend process is waiting for
224
+ # a command while tox is waiting for that process to exit.
225
+ TOX_SPEC: ${{ matrix.python-version == '3.7' && 'tox<4' || 'tox' }}
226
+ run: python -m pip install -U "$TOX_SPEC"
227
+ # tox installs the sdist with pip, as a user would with --no-binary.
228
+ - name: Run tox on the sdist
229
+ run: python -m tox --installpkg "$(ls dist/*.tar.gz)"
230
+
231
+ other:
232
+ runs-on: "ubuntu-latest"
233
+ needs: build-tzdata
234
+ strategy:
235
+ matrix:
236
+ toxenv: ["docs", "tz-fat", "tz-slim", "tz-vanguard", "tz-rearguard", "precommit"]
237
+ env:
238
+ TOXENV: ${{ matrix.toxenv }}
239
+ TZ: ${{ !startsWith(matrix.os, 'windows-latest') && 'America/New_York' || null }}
240
+
241
+ steps:
242
+ - uses: actions/checkout@v7
243
+ with:
244
+ fetch-depth: 0
245
+ - name: Set timezone (Windows)
246
+ if: startsWith(matrix.os, 'windows-latest')
247
+ run: tzutil /s "Eastern Standard Time"
248
+ - name: ${{ matrix.toxenv }}
249
+ uses: actions/setup-python@v7
250
+ with:
251
+ python-version: "3.13"
252
+ - name: Download tzdata artifact
253
+ uses: actions/download-artifact@v8
254
+ with:
255
+ name: tzdata
256
+ path: tzdata_download
257
+ - name: Install specific tzdata version
258
+ run: |
259
+ sudo rm -rf /usr/share/zoneinfo
260
+ sudo mv tzdata_download /usr/share/zoneinfo
261
+
262
+ cat /usr/share/zoneinfo/tzdata.zi | head -n 1
263
+ - name: Install tox
264
+ run: |
265
+ python -m pip install --upgrade pip
266
+ python -m pip install -U tox
267
+ - name: Run action
268
+ run: tox
269
+
270
+ darker:
271
+ # This checks the lines changed by a push or PR, so it is meaningless when
272
+ # called from the publish workflow.
273
+ if: ${{ !inputs.release }}
274
+ runs-on: ubuntu-latest
275
+ steps:
276
+ - uses: actions/checkout@v7
277
+ with:
278
+ fetch-depth: 0
279
+ - uses: actions/setup-python@v7
280
+ with:
281
+ python-version: "3.13"
282
+ - name: Install darker
283
+ run: python -m pip install "darker[black,isort]==3.0.0"
284
+ - name: Run darker
285
+ # Check only the lines changed relative to the merge base of the PR
286
+ # (or the commit before a push). The darker GitHub action is not used
287
+ # because its released versions refer to a commit-range action by a
288
+ # path local to the darker repo, so it fails for everyone else; see
289
+ # https://github.com/akaihola/darker/issues/847
290
+ env:
291
+ REVISION: ${{ github.event_name == 'pull_request' && format('{0}...', github.event.pull_request.base.sha) || format('{0}...', github.event.before) }}
292
+ run: darker --check --diff --color --isort --revision "$REVISION" .
293
+
294
+ build-dist:
295
+ runs-on: ubuntu-latest
296
+ steps:
297
+ - uses: actions/checkout@v7
298
+ with:
299
+ # The version comes from git tags, so we need the history.
300
+ fetch-depth: 0
301
+ - name: Set up Python
302
+ uses: actions/setup-python@v7
303
+ with:
304
+ python-version: "3.14"
305
+ - name: Install tox
306
+ run: python -m pip install -U tox
307
+ - name: Run tox
308
+ run: python -m tox -e build
309
+ - name: Check generation
310
+ run: |
311
+ exactly_one() {
312
+ value=$(find dist -iname $1 | wc -l)
313
+ if [ $value -ne 1 ]; then
314
+ echo "Found $value instances of $1, not 1"
315
+ return 1
316
+ else
317
+ echo "Found exactly 1 instance of $value"
318
+ fi
319
+ }
320
+ # Check that exactly one tarball and one wheel are created
321
+ exactly_one '*.tar.gz'
322
+ exactly_one '*.whl'
323
+ - name: Upload distributions
324
+ uses: actions/upload-artifact@v7
325
+ with:
326
+ name: dist
327
+ path: dist/
328
+ if-no-files-found: error
@@ -21,6 +21,7 @@ src/dateutil/_version.py
21
21
 
22
22
  # Sphinx documentation
23
23
  docs/_build/
24
+ docs/docs_venv
24
25
 
25
26
  # Timezone information
26
27
  tzdata*.tar.gz
@@ -1,14 +1,15 @@
1
1
  repos:
2
2
  - repo: https://github.com/akaihola/darker
3
- rev: 1.7.1
3
+ rev: v3.0.0
4
4
  hooks:
5
5
  - id: darker
6
6
  args: [--isort]
7
7
  additional_dependencies:
8
+ - "black"
8
9
  - "isort>5.9"
9
10
 
10
11
  - repo: https://github.com/pre-commit/pre-commit-hooks
11
- rev: v4.4.0
12
+ rev: v6.0.0
12
13
  hooks:
13
14
  - id: trailing-whitespace
14
15
  - id: debug-statements
@@ -11,6 +11,7 @@ switch, and thus all their contributions are dual-licensed.
11
11
 
12
12
  ## Contributors (alphabetical order)
13
13
 
14
+ - Aarni Koskela <akx@iki.fi> **D**
14
15
  - Adam Chainz <adam@MASKED>
15
16
  - Adrien Cossa <cossa@MASKED>
16
17
  - Alec Nikolas Reiter <alecreiter@MASKED>
@@ -59,14 +60,17 @@ switch, and thus all their contributions are dual-licensed.
59
60
  - Igor <mrigor83@MASKED>
60
61
  - Ionuț Ciocîrlan <jdxlark@MASKED>
61
62
  - Jacqueline Chen <jacqueline415@outlook.com> (gh: @jachen20) **D**
63
+ - Jairo Llopis (gh: @yajo) **D**
62
64
  - Jake Chorley (gh: @jakec-github) **D**
63
65
  - Jakub Kulík (gh: @kulikjak) **D**
64
66
  - Jan Studený <jendas1@MASKED>
67
+ - JAY (gh: @Jay1023CN) **D**
65
68
  - Jay Weisskopf <jay@jayschwa.net> (gh: @jayschwa) **D**
66
69
  - Jitesh <jitesh@MASKED>
67
70
  - John Purviance <jpurviance@MASKED> (gh @jpurviance) **D**
68
71
  - Jon Dufresne <jon.dufresne@MASKED> (gh: @jdufresne) **R**
69
72
  - Jonas Neubert <jonas@MASKED> (gh: @jonemo) **R**
73
+ - Juan Arias <jdarias3@gmail.com> (gh: @jdarias3) **D**
70
74
  - Kevin Nguyen <kvn219@MASKED> **D**
71
75
  - Kirit Thadaka <kirit.thadaka@gmail.com> (gh: @kirit93) **D**
72
76
  - Kubilay Kocak <koobs@MASKED>
@@ -99,6 +103,7 @@ switch, and thus all their contributions are dual-licensed.
99
103
  - Raymond Cha (gh: @weatherpattern) **D**
100
104
  - Ridhi Mahajan <ridhikmahajan@MASKED> **D**
101
105
  - Robin Henriksson Törnström <gh: @MrRawbin> **D**
106
+ - Rowan Walsh (gh: @rowan-walsh) **D**
102
107
  - Roy Williams <rwilliams@MASKED>
103
108
  - Rustem Saiargaliev (gh: @amureki) **D**
104
109
  - Satyabrat Bhol <satyabrat35@MASKED> (gh: @Satyabrat35) **D**
@@ -124,6 +129,7 @@ switch, and thus all their contributions are dual-licensed.
124
129
  - Zbigniew Jędrzejewski-Szmek <zbyszek@MASKED>
125
130
  - bachmann <bachmann.matt@MASKED>
126
131
  - bjv <brandon.vanvaerenbergh@MASKED> (@bjamesvERT)
132
+ - friskysaga (gh: @kevinkt1) **D**
127
133
  - gl <gl@MASKED>
128
134
  - gfyoung <gfyoung17@gmail.com> **D**
129
135
  - Labrys <labrys.git@gmail.com> (gh: @labrys) **R**
@@ -109,4 +109,4 @@ This will pass the `-m tzstr` parameter to `pytest`, running only the tests with
109
109
 
110
110
  The tests can also be run directly by running `pytest` or `python -m pytest` in the root directory. This will be likely be less thorough but is often faster and is a good first pass to check your changes.
111
111
 
112
- All GitHub pull requests are automatically tested using [Travis](https://travis-ci.org/dateutil/dateutil/) and [Appveyor](https://ci.appveyor.com/project/dateutil/dateutil).
112
+ All GitHub pull requests are automatically tested using [GitHub Actions](https://github.com/dateutil/dateutil/actions/) and [Appveyor](https://ci.appveyor.com/project/dateutil/dateutil).
@@ -1,4 +1,4 @@
1
- include LICENSE NEWS zonefile_metadata.json updatezinfo.py pyproject.toml
1
+ include LICENSE NEWS pyproject.toml
2
2
  recursive-include tests/ *
3
3
  global-exclude __pycache__
4
4
  global-exclude *.py[co]
@@ -1,3 +1,112 @@
1
+ Version 3.0.0 (2026-10-21)
2
+ ==========================
3
+
4
+ **This is the last major version of** ``dateutil`` **that will support any
5
+ version of Python older than 3.11.** The next release will be the 4.x series,
6
+ which will support Python 3.11 and later. We may release fixes for serious bugs
7
+ in the 3.0.x series, but there are no plans for new features there.
8
+
9
+ The biggest change in this release is a rewrite of ``tz.tzfile``, which affects
10
+ nearly every user of ``dateutil.tz`` and changes the UTC offset of
11
+ nonexistent times (see below). ``dateutil`` also now depends on the ``tzdata``
12
+ package, and no longer ships its own time zone database.
13
+
14
+
15
+ Data updates
16
+ ------------
17
+
18
+ - ``dateutil`` no longer bundles a copy of the IANA time zone database. Time
19
+ zone data now comes from the system (see ``dateutil.tz.TZPATH``) or, failing
20
+ that, from the new ``tzdata`` dependency, so the data version is whatever
21
+ version of ``tzdata`` is installed. (gh pr #1130)
22
+
23
+
24
+ Features
25
+ --------
26
+
27
+ - Rewrote ``tz.tzfile`` based on a backport of the ``zoneinfo`` module's pure-Python
28
+ implementation. This adds support for Version 2 and Version 3 ``tzfile(5)`` binaries,
29
+ resolving issues with timestamps beyond 2038 and "slim" format binaries. (gh issues #462, #1059, gh pr #1130)
30
+ - Added ``dateutil.tz.TZPATH`` and ``dateutil.tz.reset_tzpath`` to allow for
31
+ runtime configuration of the IANA time zone data search path. These replace the
32
+ mutable ``dateutil.tz.TZPATHS`` list, which has been removed. (gh pr #1130)
33
+ - ``dateutil`` now depends on the ``tzdata`` package, which ``gettz`` consults after the search
34
+ path and before the Windows registry. On Windows this means that names that are
35
+ both IANA keys and Windows time zone names, such as ``"UTC"``, now return a
36
+ ``tzfile`` rather than a ``tzwin``. (gh pr #1130)
37
+
38
+
39
+ Bugfixes
40
+ --------
41
+
42
+ - ``tz.tzfile`` now follows PEP 495 for times that fall in a gap: with ``fold=0``
43
+ it uses the offset from before the transition, and with ``fold=1`` the offset
44
+ from after it. Previously it always used the offset from after the transition,
45
+ so for example ``datetime(2003, 4, 6, 2, 30, tzinfo=tz.gettz("America/New_York"))``
46
+ had a UTC offset of -04:00, where it now has -05:00, the same as with
47
+ ``zoneinfo``. (gh pr #1130)
48
+ - ``tz.tzfile`` objects for fixed-offset zones, such as ``tz.gettz("UTC")``, now
49
+ return their offset, DST offset and abbreviation when ``utcoffset``, ``dst``
50
+ and ``tzname`` are called with ``None``, as ``tz.tzutc``, ``tz.tzoffset`` and
51
+ ``zoneinfo.ZoneInfo`` do. This means that ``datetime.time`` objects with such
52
+ a zone attached are now aware: ``time(12, tzinfo=tz.gettz("UTC")).isoformat()``
53
+ is now ``"12:00:00+00:00"`` rather than ``"12:00:00"``. (gh pr #1130)
54
+ - ``tz.tzfile`` now infers ``dst()`` from the standard time on both sides of
55
+ each DST period, rather than only the one before it, and does so for each
56
+ transition rather than for each local time type. This fixes ``dst()`` for
57
+ double summer time (e.g. in ``Europe/London`` in the 1940s), for half-hour DST
58
+ (e.g. in ``Pacific/Rarotonga``) and where the standard offset changed at the
59
+ same time as a DST transition (e.g. in ``America/Bahia_Banderas`` in 2010).
60
+ Against the standard offsets in the tz database source, the only remaining
61
+ errors are in ``Europe/Paris`` in 1944 and 1945. (gh pr #1130)
62
+ - Fixed ``rrulestr`` raising ``ValueError`` on experimental ``X-`` parameters in
63
+ an ``RRULE`` line (such as GNOME Evolution's ``X-EVOLUTION-ENDDATE``); these are
64
+ now ignored as RFC 5545 permits. Fixed by @yajo (gh pr #1374)
65
+ - Enabled pickling and deepcopy of cached ``rrule`` and ``rruleset`` instances.
66
+ The cache setting is preserved, and cached results are regenerated on demand
67
+ without copying locks or generators. Reported by @niccokunzmann (gh issue #1369).
68
+ Fixed by @Jay1023CN (gh pr #1600).
69
+ - Fixed ``relativedelta.__ne__`` raising ``TypeError`` when comparing against an
70
+ unsupported type such as ``None``; it now returns ``True``. Reported and fixed
71
+ by @kevinkt1 (gh issue #1157, gh pr #1158)
72
+ - Raised the minimum version of ``six`` to 1.6, fixing ``No module named
73
+ 'six.moves'`` errors with older versions. Reported by @skytreader (gh issue #1415),
74
+ fixed by @jdarias3 (gh pr #1424).
75
+
76
+
77
+ Deprecations
78
+ ------------
79
+
80
+ - Deprecated the ``dateutil.zoneinfo`` module. The module now acts as a wrapper
81
+ around the ``tzdata`` package and will be removed in a future version. Users are
82
+ encouraged to migrate to ``dateutil.tz.gettz`` or the standard library's
83
+ ``zoneinfo`` module. ``dateutil.zoneinfo.rebuild.rebuild`` no longer does
84
+ anything, and by default raises ``RebuildDeprecationWarning`` as an error;
85
+ filter the warning to call it as a no-op. (gh pr #1130)
86
+ - Deprecated passing ``gettz`` a relative key that refers to a file outside of
87
+ every directory on ``TZPATH``, such as ``"../../etc/localtime"``. By default
88
+ this now raises ``dateutil.tz.DeprecatedTzKeyWarning`` as an error; filter the
89
+ warning to keep the old behavior for now, or pass an absolute path instead.
90
+ (gh pr #1130)
91
+
92
+
93
+ Documentation changes
94
+ ---------------------
95
+
96
+ - Added intersphinx to the docs build and cleaned up some broken links. (gh pr #1463)
97
+
98
+
99
+ Misc
100
+ ----
101
+
102
+ - Releases are now uploaded to PyPI using trusted publishing, and the built
103
+ sdist and wheel are tested on all supported platforms before upload.
104
+ (gh pr #1619, #1622)
105
+ - Changes to CI, tests and release tooling that do not affect users of the
106
+ package: gh pr #1417, #1462, #1464, #1465, #1466, #1467, #1468, #1469, #1470,
107
+ #1499, #1501, #1504, #1576, #1577, #1578, #1581, #1585.
108
+
109
+
1
110
  Version 2.9.0.post0 (2024-03-01)
2
111
  ================================
3
112
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: python-dateutil
3
- Version: 2.9.0.post0
3
+ Version: 3.0.0
4
4
  Summary: Extensions to the standard Python datetime module
5
5
  Home-page: https://github.com/dateutil/dateutil
6
6
  Author: Gustavo Niemeyer
@@ -28,11 +28,20 @@ Classifier: Programming Language :: Python :: 3.9
28
28
  Classifier: Programming Language :: Python :: 3.10
29
29
  Classifier: Programming Language :: Python :: 3.11
30
30
  Classifier: Programming Language :: Python :: 3.12
31
+ Classifier: Programming Language :: Python :: 3.13
32
+ Classifier: Programming Language :: Python :: 3.14
33
+ Classifier: Programming Language :: Python :: 3.15
34
+ Classifier: Programming Language :: Python :: Free Threading :: 2 - Beta
35
+ Classifier: Programming Language :: Python :: Implementation :: CPython
36
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
31
37
  Classifier: Topic :: Software Development :: Libraries
32
38
  Requires-Python: !=3.0.*,!=3.1.*,!=3.2.*,>=2.7
33
39
  Description-Content-Type: text/x-rst
34
40
  License-File: LICENSE
35
- Requires-Dist: six>=1.5
41
+ Requires-Dist: six>=1.6
42
+ Requires-Dist: tzdata
43
+ Dynamic: description
44
+ Dynamic: license-file
36
45
 
37
46
  dateutil - powerful extensions to datetime
38
47
  ==========================================
@@ -41,7 +50,7 @@ dateutil - powerful extensions to datetime
41
50
 
42
51
  |gitter| |readthedocs|
43
52
 
44
- |travis| |appveyor| |pipelines| |coverage|
53
+ |appveyor| |gha| |coverage|
45
54
 
46
55
  .. |pypi| image:: https://img.shields.io/pypi/v/python-dateutil.svg?style=flat-square
47
56
  :target: https://pypi.org/project/python-dateutil/
@@ -51,17 +60,13 @@ dateutil - powerful extensions to datetime
51
60
  :target: https://pypi.org/project/python-dateutil/
52
61
  :alt: supported Python version
53
62
 
54
- .. |travis| image:: https://img.shields.io/travis/dateutil/dateutil/master.svg?style=flat-square&label=Travis%20Build
55
- :target: https://travis-ci.org/dateutil/dateutil
56
- :alt: travis build status
57
-
58
63
  .. |appveyor| image:: https://img.shields.io/appveyor/ci/dateutil/dateutil/master.svg?style=flat-square&logo=appveyor
59
64
  :target: https://ci.appveyor.com/project/dateutil/dateutil
60
65
  :alt: appveyor build status
61
66
 
62
- .. |pipelines| image:: https://dev.azure.com/pythondateutilazure/dateutil/_apis/build/status/dateutil.dateutil?branchName=master
63
- :target: https://dev.azure.com/pythondateutilazure/dateutil/_build/latest?definitionId=1&branchName=master
64
- :alt: azure pipelines build status
67
+ .. |gha| image:: https://github.com/dateutil/dateutil/actions/workflows/validate.yml/badge.svg
68
+ :target: https://github.com/dateutil/dateutil/actions
69
+ :alt: github actions build status
65
70
 
66
71
  .. |coverage| image:: https://codecov.io/gh/dateutil/dateutil/branch/master/graphs/badge.svg?branch=master
67
72
  :target: https://codecov.io/gh/dateutil/dateutil?branch=master
@@ -189,11 +194,6 @@ Releases Signing key fingerprint
189
194
  New releases *may* have signed tags, but binary and source distributions
190
195
  uploaded to PyPI will no longer have GPG signatures attached.
191
196
 
192
- Contact
193
- =======
194
- Our mailing list is available at `dateutil@python.org <https://mail.python.org/mailman/listinfo/dateutil>`_. As it is hosted by the PSF, it is subject to the `PSF code of
195
- conduct <https://www.python.org/psf/conduct/>`_.
196
-
197
197
  License
198
198
  =======
199
199