Skip to content

FIX:Replaced pytz with Zoneinfo because it is an efficient and modular wa… #444

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

NandanaRaol
Copy link
Contributor

@NandanaRaol NandanaRaol commented May 26, 2025

This pull request refactors the handling of time zones in the mssql package by replacing the pytz library with Python's standard library zoneinfo module. Additionally, it updates the test suite to reflect these changes and removes pytz from the package dependencies.

Time zone handling updates:

  • Replaced the pytz library with the zoneinfo module for time zone operations in mssql/operations.py, including updates to the _get_utcoffset method to use ZoneInfo for calculating UTC offsets. [1] [2]

Dependency updates:

  • Removed pytz from the install_requires list in setup.py, as it is no longer required.

Test suite updates:

  • Updated testapp/tests/test_timezones.py to import and use ZoneInfo. Added a new TestGetUTCOffset test class to validate the _get_utcoffset method with various time zones. [1] [2]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant