Skip to content

Conversation

@PPsyrius
Copy link
Collaborator

@PPsyrius PPsyrius commented Oct 9, 2025

Proposed change

  • Drops Python 3.9 support due to its impending EOL status as of October 2025 - I'm waiting for the final deprecation notice before marking this as ready.
  • Upgrades syntax to Python 3.10 standard (mainly PEP 604 and dropping importlib-metadata which is now built-in as importlib.metadata).
  • Remove zipp>=3.19.1 pinning in dev and test requirements (from what I understand, this was previously only used by importlib-metadata).

Type of change

  • New country/market holidays support (thank you!)
  • Supported country/market holidays update (calendar discrepancy fix, localization)
  • Existing code/documentation/test/process quality improvement (best practice, cleanup, refactoring, optimization)
  • Dependency update (version deprecation/pin/upgrade)
  • Bugfix (non-breaking change which fixes an issue)
  • Breaking change (a code change causing existing functionality to break)
  • New feature (new holidays functionality in general)

Checklist

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 9, 2025

Summary by CodeRabbit

Release Notes

  • Breaking Changes

    • Dropped support for Python 3.9. Minimum required version is now Python 3.10.
  • Chores

    • Updated type hints across the library to use modern Python syntax.
    • Updated CI/CD pipeline and development tooling to target Python 3.10+.
    • Updated dependencies and development requirements.

Walkthrough

Removed Python 3.9 support and raised project/tooling targets to >=3.10; migrated many typing annotations from typing.Optional/Union to PEP 604 union syntax (X | None, A | B). Mostly signature and import cleanups; no runtime logic changes.

Changes

Cohort / File(s) Summary of changes
CI & tooling
.github/workflows/ci-cd.yml, tox.ini, pyproject.toml, .pre-commit-config.yaml, requirements/dev.txt, requirements/tests.txt
Dropped Python 3.9 from test matrices; updated requires-python to >=3.10; switched pyupgrade/ruff targets to 3.10+; adjusted test dependency pinning and removed zipp pin.
Core framework & utilities
holidays/holiday_base.py, holidays/observed_holiday_base.py, holidays/utils.py, holidays/registry.py, holidays/ical.py, holidays/mixins/child_entity.py
Replaced Optional/Union typings with PEP 604 unions (`X
Calendars
holidays/calendars/* (e.g., .../balinese_saka.py, .../buddhist.py, .../burmese.py, .../chinese.py, .../hebrew.py, .../hindu.py, .../mandaean.py, .../mongolian.py, .../persian.py, .../sinhala.py, .../thai.py, .../tibetan.py)
Converted return and tuple annotations from Optional[...]/Union[...] to `date
Groups
holidays/groups/* (e.g., .../balinese_saka.py, .../buddhist.py, .../burmese.py, .../chinese.py, .../eastern.py, .../hebrew.py, .../hindu.py, .../mandaean.py, .../mongolian.py, .../persian.py, .../sinhala.py, .../thai.py, .../tibetan.py)
Migrated many add* helpers and internal APIs to PEP 604 unions for optional dates and union params (e.g., `int
Countries
holidays/countries/* (e.g., .../angola.py, .../guernsey.py, .../jersey.py, .../taiwan.py, .../united_kingdom.py, .../united_states.py)
Updated method/field annotations to use `
Scripts & tests
scripts/archive_links.py, tests/test_package.py
Updated script type hints from Optional[...] to `X

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • arkid15r
  • KJhellico

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title "Drop Python 3.9 support" directly and clearly summarizes the primary change in this changeset. The raw_summary confirms that Python 3.9 has been removed from the CI workflow test matrix and throughout the codebase (pyproject.toml, tox.ini), and the PR objectives align perfectly with dropping support for this Python version. The title is concise, specific, and immediately communicates the main change without ambiguity.
Description Check ✅ Passed The description is clearly related to the changeset, providing meaningful context for the changes. It explains the rationale (Python 3.9 EOL in October 2025), outlines the three main categories of changes (dropping Python 3.9 support, upgrading to Python 3.10 syntax with PEP 604, and removing zipp dependencies), and references supporting documentation. All points in the description correspond to actual changes reflected in the raw_summary—from CI/configuration updates to widespread type hint migrations across the codebase.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8ad5957 and 0dad4d4.

📒 Files selected for processing (3)
  • .github/workflows/ci-cd.yml (0 hunks)
  • .pre-commit-config.yaml (1 hunks)
  • requirements/dev.txt (0 hunks)
💤 Files with no reviewable changes (2)
  • .github/workflows/ci-cd.yml
  • requirements/dev.txt
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Test Python 3.13 on ubuntu-latest
  • GitHub Check: Test Python 3.10 on windows-latest
  • GitHub Check: Test Python 3.14 on windows-latest
  • GitHub Check: Test Python 3.12 on windows-latest
🔇 Additional comments (1)
.pre-commit-config.yaml (1)

26-26: Correct target-version bump for pyupgrade.

The update from --py39-plus to --py310-plus properly aligns pyupgrade with the project's new minimum Python version (3.10+), enabling transformation to PEP 604 union syntax and other 3.10+ idioms across the codebase.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Oct 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (53853df) to head (0dad4d4).

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #2998   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          306       306           
  Lines        18062     18028   -34     
  Branches      2333      2333           
=========================================
- Hits         18062     18028   -34     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant