-
Notifications
You must be signed in to change notification settings - Fork 34
fix _Opt deprecation warning #236
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
Conversation
f8fb51d
to
a89cda3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this work!
Can you take a look at the documentation build error?
File "/home/docs/checkouts/readthedocs.org/user_builds/sphinx-notfound-page/envs/236/lib/python3.10/site-packages/notfound/extension.py", line 274, in validate_configs
app.config.values.get("notfound_urls_prefix").default
AttributeError: 'tuple' object has no attribute 'default'
https://beta.readthedocs.org/projects/sphinx-notfound-page/builds/24464999/#231390753--9
It seems that in some versions of Sphinx doesn't have .default
attribute.
a89cda3
to
dcb05f4
Compare
Yes. the attribute |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
notfound_urls_prefix != default | ||
and notfound_urls_prefix | ||
and not ( | ||
notfound_urls_prefix.startswith("/") or notfound_urls_prefix.endswith("/") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hrm, I just realized that this should be a and
, right? We were using all()
before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh dang. you're right. idk what i was thinking.
Please could you make a release with this fix? Thank you! |
@hugovk done at https://pypi.org/project/sphinx-notfound-page/1.0.3/ -- please confirm it does work as expected 👍🏼 |
No more warning with 1.0.3, thank you! |
closes #234