Skip to content

Rather using Monday const from built-in calendar.py#791

Merged
bletham merged 1 commit intofacebook:masterfrom
Gordonei:wip/use-right-holiday-const
Jan 8, 2019
Merged

Rather using Monday const from built-in calendar.py#791
bletham merged 1 commit intofacebook:masterfrom
Gordonei:wip/use-right-holiday-const

Conversation

@Gordonei
Copy link
Copy Markdown
Contributor

@Gordonei Gordonei commented Jan 3, 2019

Latest version of python-holidays (0.9.9) changed the name of its MONDAY const to MON. Rather using the MONDAY const from the same library as the object that it is being used with (calendar module).

Also, given this constant is 19 years old (!), I suspect it might not change in the near future.

Latest version of holidays (0.9.9) changed the name of its MONDAY const
to MON. Rather using the MONDAY const from the same library as the
object that it is being used with.
@facebook-github-bot
Copy link
Copy Markdown
Contributor

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@facebook-github-bot
Copy link
Copy Markdown
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@ivonnics
Copy link
Copy Markdown

ivonnics commented Jan 3, 2019

Hi!
I just installed Prophet, however, when I type:
from fbprophet import Prophet
I got this error:
ImportError: cannot import name 'MONDAY'
I ran: pip install fbprophet --upgrade before asking the question, and even with that I got the same error.
I can not even execute:
import fbprophet
fbprophet.__version__
As I get the same ImportError: cannot import name 'MONDAY'...
I believe this error is related to Gordonei`s comment, so any suggestion on how to overcome this error, would be extremelly welcome...

@Gordonei
Copy link
Copy Markdown
Contributor Author

Gordonei commented Jan 4, 2019

Hey @ivonnics , @louisguitton suggested a work around in the issue that he opened.

@bletham bletham merged commit aebe8da into facebook:master Jan 8, 2019
@bletham
Copy link
Copy Markdown
Contributor

bletham commented Jan 8, 2019

This is great, thanks so much for the fix.

@bletham
Copy link
Copy Markdown
Contributor

bletham commented Jan 8, 2019

An especially good fix because it works with both old and new versions of holidays.

@Gordonei
Copy link
Copy Markdown
Contributor Author

Gordonei commented Jan 8, 2019 via email

@Gordonei Gordonei deleted the wip/use-right-holiday-const branch January 8, 2019 09:05
@bletham
Copy link
Copy Markdown
Contributor

bletham commented Jan 9, 2019

heh, well all is well that ends well :-)

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.

4 participants