Skip to content

ENH: Add tzdata to hard dependencies #61308

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

Merged
merged 5 commits into from
Apr 22, 2025

Conversation

chilin0525
Copy link
Contributor

@chilin0525 chilin0525 commented Apr 19, 2025

@@ -77,6 +77,7 @@ Other enhancements
- :meth:`pandas.concat` will raise a ``ValueError`` when ``ignore_index=True`` and ``keys`` is not ``None`` (:issue:`59274`)
- :py:class:`frozenset` elements in pandas objects are now natively printed (:issue:`60690`)
- Add ``"delete_rows"`` option to ``if_exists`` argument in :meth:`DataFrame.to_sql` deleting all records of the table before inserting data (:issue:`37210`).
- Added ``tzdata`` to the ``_hard_dependencies`` (:issue:`61273`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_hard dependencies is the internal name of the variable. I think tzdata is already required according to our docs, I guess we may want to have a note for a bug where tzdata being installed wasn't checked? @rhshadrach @mroeschke

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. As only user facing-changes go in the whatsnew, I'd be fine with no note here at all. tzdata was being checked and would certainly raise an import error upon import of pandas, adding it to _hard_dependencies makes the message a bit more clear. If we do go with a note, I'd suggest it stay in other enhancements but be something like

Improved error message when importing pandas and ``tzdata`` is not installed (:issue:`61273`)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@datapythonista @rhshadrach Thanks for your suggestions. I have removed the description about the tzdata dependency from the whatsnew (1955b05).

@mroeschke mroeschke added the Error Reporting Incorrect or improved errors from pandas label Apr 21, 2025
@mroeschke mroeschke added this to the 3.0 milestone Apr 22, 2025
@mroeschke mroeschke merged commit 09de147 into pandas-dev:main Apr 22, 2025
41 of 42 checks passed
@mroeschke
Copy link
Member

Thanks @chilin0525

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Error Reporting Incorrect or improved errors from pandas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ENH: Add tzdata to the _hard_dependencies
4 participants