Feature: upgrade from `dateutil.tz.UTC` to `datetime.UTC` or `datetime.timezone.utc`
Open
needs-design
rule
- Dominant language
- Rust
- Stars
- 49.7k
- Forks
- 2.4k
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 458
Description
there are some legacy code using `dateutil.tz.UTC` as UTC timezone, suggest a new rule to replace it with `datetime.UTC` for python >= 3.11
Contributor guide
Research direction
No implementation files or tests are named. Start by locating Ruff’s existing rule definitions and tests for comparable modernization rules, then verify how Python 3.11-only replacements are handled. Done means the new rule consistently identifies dateutil.tz.UTC usage, recommends the specified datetime replacement, and has coverage for supported cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100