-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
MAINT do not check for warnings in doc_min_dependencies #27949
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
Since bumping scikit-image raise still another warning, I propose to not check for the warning based on an environment variable. |
.circleci/config.yml
Outdated
@@ -24,6 +24,7 @@ jobs: | |||
- OPENBLAS_NUM_THREADS: 2 | |||
- CONDA_ENV_NAME: testenv | |||
- LOCK_FILE: build_tools/circle/doc_min_dependencies_linux-64_conda.lock | |||
- WARNINGS_AS_ERRORS: 'false' |
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.
maybe worth following other environment variable with the SKLEARN_
prefix?
So something like this SKLEARN_DOC_BUILD_WARNINGS_AS_ERRORS
to be explicit?
Maybe worth adding to the documented variables here in a separate PR:
https://scikit-learn.org/dev/computing/parallelism.html#environment-variables
In particular this may be worth mentioning that this is different from sphinx-build -W
that also turns some warnings into errors.
doc/conf.py
Outdated
message="pkg_resources is deprecated as an API", | ||
category=DeprecationWarning, | ||
) | ||
if os.environ.get("WARNINGS_AS_ERRORS", "true") == "true": |
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.
Maybe use .lower()
to make sure that True
works as well as true
if os.environ.get("WARNINGS_AS_ERRORS", "true") == "true": | |
if os.environ.get("WARNINGS_AS_ERRORS", "true").lower() == "true": |
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.
Other than adding a comment for the env variable, LGTM if CI is happy.
message="pkg_resources is deprecated as an API", | ||
category=DeprecationWarning, | ||
) | ||
if os.environ.get("SKLEARN_DOC_BUILD_WARNINGS_AS_ERRORS", "true").lower() == "true": |
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.
For info, this is breaking the doc build when using python 3.12 (there is a DeprecationWarning: coming from datetime.datetime.utcfromtimestamp)
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.
Indeed I think I saw that and left it for later, PR more than welcome 😉! You would need to add them to the already accepted warnings see warnings.filterwarnings("ignore",
below
IIRC the deprecation warning is due to dateutil, it has been fixed in main
but not released yet, and it seems like it is a bit stuck at the moment dateutil/dateutil#1284 or dateutil/dateutil#1314
Solve the issue observed in
main
where the minimum version ofscikit-image
is not compatible with python 3.9+