-
-
Notifications
You must be signed in to change notification settings - Fork 26k
MNT Remove utils.fixes after Python 3.10 bump #31022
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
MNT Remove utils.fixes after Python 3.10 bump #31022
Conversation
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.
LGTM
@@ -19,9 +19,9 @@ | |||
|
|||
import numpy as np | |||
import scipy | |||
from scipy.optimize._linesearch import line_search_wolfe1, line_search_wolfe2 |
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.
It's unfortunate that we are using a private function in SciPy.
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.
There's this def that has not been cleaned up at the bottom of fixes:
# TODO: Remove when python>=3.10 is the minimum supported version
def _dataclass_args():
# Use filter="data" to prevent the most dangerous security issues. | ||
# For more details, see | ||
# https://docs.python.org/3.9/library/tarfile.html#tarfile.TarFile.extractall | ||
fp.extractall(path=lfw_home, filter="data") |
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.
if we don't intend to do it in the CI, let's put a pragma no cover
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.
LGTM, nice clean-up !
oh, looks like there's an issue with the dataclasses |
Looks like mypy but only in the CircleCI linting not the Azure one. Let me update my branch, this may help fixing this. |
CI is green now, except codecov because some datasets fetching code is not covered by our tests. I think that's fine, codecov has never been a blocker in the past. |
see #31022 (comment), I think it's worth adding pragmas where we know we don't want to test it in CI such that it slowly reduces the frequency of coverage failures coming from moving an uncovered line around. |
Yeah I saw your comment but I am a bit 🤷 about it. Personally, I am fine with codecov being red, having a quick look at the codecov report, deciding that it kind of makes sense that it is not covered by the CI and maybe run the function locally to make sure that it works if I feel the need to be 100% sure. The alternative is adding a Personally I am slightly leaning towards not bothering about adding a |
I think adding
But let's not delay the merge of this PR for this. |
Follow-up of #30895.