question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DeprecationWarning upon "import holidays" in version 0.17

See original GitHub issue

The implementation of deprecating the Swaziland calendar contains a bug. Just importing the holidays package is enough to fire the DeprecationWarning.

Steps to reproduce (in bash):

# Setup
python -m venv demo
source demo/bin/activate
pip install --upgrade pip

# Bad version
pip install holidays==0.17

# Expose bug
python -W error::DeprecationWarning -c 'import holidays'

# Workoround
pip uninstall -y holidays
pip install holidays!=0.17
python -W error::DeprecationWarning -c 'import holidays'

# Cleanup
deactivate
rm -rf demo

Expected behavior:

The DeprecationWarning should only fire when the user constructs an instance of the Swaziland or a subclass.

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
dr-prodigycommented, Nov 23, 2022

Unfortunately I could not work on a new release for some days… now it’s online and should be okay. Thx!

1reaction
arkid15rcommented, Nov 16, 2022

The suggested fix was implemented in #794 PR yesterday.

Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

dr-prodigy/python-holidays - GitHub
Country Code Subdivisions Available Angola AO None Argentina AR None Aruba AW None
Read more >
holidays Changelog - pyup.io
Swaziland deprecation warning fix 794 (arkid15r) First release (0.17) November 13, 2022 ... Add holidays, extended holidays and tests for Portugal
Read more >
What's new in 1.4.0 (January 22, 2022) - Pandas
What's new in 1.4.0 (January 22, 2022)#. These are the changes in pandas 1.4.0. See Release notes for a full changelog including other...
Read more >
Add holidays to your calendar in Outlook for Windows
Add holidays for the country that you want to appear on the Outlook calendar. ... Outlook versions but aren't seeing holiday dates through...
Read more >
Use the Holidays calendar on iPhone - Apple Support
Select or deselect US Holidays (or the holiday calendar for your country or region). Add a holiday calendar from a different region. Tap...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found