Repository navigation
Commit a620283
authored
Build(deps-dev): Bump flake8-datetimez from 20.10.0 to 26.8.1 (#298)
Bumps [flake8-datetimez](https://github.com/pjknkda/flake8-datetimez)
from 20.10.0 to 26.8.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pjknkda/flake8-datetimez/releases">flake8-datetimez's
releases</a>.</em></p>
<blockquote>
<h2>26.8.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix README rendering on PyPI and update project metadata by <a
href="https://github.com/pjknkda"><code>@pjknkda</code></a> in <a
href="https://redirect.github.com/pjknkda/flake8-datetimez/pull/16">pjknkda/flake8-datetimez#16</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/pjknkda/flake8-datetimez/compare/26.8.0...26.8.1">https://github.com/pjknkda/flake8-datetimez/compare/26.8.0...26.8.1</a></p>
<h2>26.8.0</h2>
<h2>What's Changed</h2>
<p><strong>Breaking</strong></p>
<ul>
<li>Python 3.8 is now the minimum. Support for 3.6 and 3.7 is dropped —
both have been end-of-life for years, and the checker already relied on
<code>ast.Constant</code>, which only the 3.8+ parser produces. Tested
on 3.8 through 3.14.</li>
</ul>
<p><strong>Added</strong></p>
<ul>
<li><code>DTZ901</code>, for naive <code>datetime.datetime.min</code>
and <code>datetime.datetime.max</code>. They overflow when converted to
another timezone, and <code>.timestamp()</code> raises for any timezone
west of UTC. The code matches Ruff's rule. Closes <a
href="https://redirect.github.com/pjknkda/flake8-datetimez/issues/13">#13</a>.</li>
</ul>
<p><strong>Changed</strong></p>
<ul>
<li><code>.astimezone()</code> is accepted as a fix for DTZ001, DTZ002,
DTZ005 and DTZ006, alongside DTZ007 which already did. It stays rejected
for <code>utcnow()</code> and <code>utcfromtimestamp()</code>: those
return a UTC wall clock, and reading it as local time shifts the instant
by the local UTC offset rather than fixing it. Closes <a
href="https://redirect.github.com/pjknkda/flake8-datetimez/issues/9">#9</a>,
<a
href="https://redirect.github.com/pjknkda/flake8-datetimez/issues/11">#11</a>.</li>
</ul>
<p><strong>Fixed</strong></p>
<ul>
<li>On Python 3.14, DTZ007 raised <code>AttributeError</code> and flake8
aborted on any file containing <code>datetime.strptime(x,
"...")</code>, because the <code>ast.Constant.s</code> alias
was removed.</li>
<li><code>datetime.n()</code>, <code>datetime.o()</code> and
<code>datetime.w()</code> were reported as <code>now()</code>, because
the attribute was compared with a substring test.</li>
<li>The source of every linted file was read from disk a second time and
discarded, even though flake8 already hands the plugin a parsed
tree.</li>
</ul>
<p>All of the above landed in <a
href="https://redirect.github.com/pjknkda/flake8-datetimez/pull/15">pjknkda/flake8-datetimez#15</a>,
except the first step toward newer Python versions, contributed by <a
href="https://github.com/Kristinita"><code>@Kristinita</code></a> in <a
href="https://redirect.github.com/pjknkda/flake8-datetimez/pull/14">pjknkda/flake8-datetimez#14</a>.</p>
<p>Special thanks to <a
href="https://github.com/sasanjac"><code>@sasanjac</code></a> for <a
href="https://redirect.github.com/pjknkda/flake8-datetimez/pull/10">pjknkda/flake8-datetimez#10</a>.
It could not be merged after the base moved on, which is on me, but the
idea and the patch are what shaped how <code>.astimezone()</code> landed
here.</p>
<h2>Upgrading</h2>
<p>On Python 3.6 or 3.7, stay on <code>20.10.0</code> — <code>pip</code>
will not offer this release. Otherwise, expect new <code>DTZ901</code>
warnings and fewer <code>.astimezone()</code> warnings; nothing else
changes.</p>
<p>For new projects, please prefer <a
href="https://docs.astral.sh/ruff/">Ruff</a>'s <code>DTZ</code> rule
set, which is faster and more actively maintained. This plugin remains
for codebases that are still on flake8, and is maintained on a
best-effort basis for backward compatibility.</p>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/Kristinita"><code>@Kristinita</code></a> made
their first contribution in <a
href="https://redirect.github.com/pjknkda/flake8-datetimez/pull/14">pjknkda/flake8-datetimez#14</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/pjknkda/flake8-datetimez/compare/20.10.0...26.8.0">https://github.com/pjknkda/flake8-datetimez/compare/20.10.0...26.8.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pjknkda/flake8-datetimez/commit/949ac73298a2d8f1be7c785bc0a24b1cddc674d4"><code>949ac73</code></a>
fix: render the README as markdown on PyPI (<a
href="https://redirect.github.com/pjknkda/flake8-datetimez/issues/16">#16</a>)</li>
<li><a
href="https://github.com/pjknkda/flake8-datetimez/commit/6fe64148424ea3e2b0f48342c68ef95714d8bfa4"><code>6fe6414</code></a>
Refactor datetime checks, enhance linting, and update documentation (<a
href="https://redirect.github.com/pjknkda/flake8-datetimez/issues/15">#15</a>)</li>
<li><a
href="https://github.com/pjknkda/flake8-datetimez/commit/19795d4dd6e11db09d2a7d55983cae8ba9634c85"><code>19795d4</code></a>
fix(python314): replace deprecated ast.NameConstant to ast.Constant (<a
href="https://redirect.github.com/pjknkda/flake8-datetimez/issues/14">#14</a>)</li>
<li>See full diff in <a
href="https://github.com/pjknkda/flake8-datetimez/compare/20.10.0...26.8.1">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
0 commit comments