-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
CI Use Python 3.12 in scipy-dev #28383
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
Changes from all commits
a494222
600246d
ac4e4aa
1adc9e1
bd995fc
2fefea7
416678d
d80ab81
be8b69c
5db0b99
0e76426
213e686
35dac82
8d27ed7
20ebe68
fb7fd6f
226c619
0a702f4
1f47260
cefa1ce
b5dad1c
f08f380
8ac97a4
cea7144
520722e
737453d
1051f88
7de34fb
369bdb7
4bd6c4f
8d16d88
6ad8eec
0abff76
177df9f
56f27f3
ed20d55
4108ed9
df917ec
c319bdc
e805fb5
c2831d2
a9a78f0
c17ece2
45fac8f
089cb4d
0a03efa
2e01bc6
f19f527
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
channels: | ||
- defaults | ||
dependencies: | ||
- python=3.11 | ||
- python | ||
- ccache | ||
- pip | ||
- pip: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,7 @@ | |
from ..feature_extraction.text import CountVectorizer | ||
from ..utils import Bunch, check_random_state | ||
from ..utils._param_validation import StrOptions, validate_params | ||
from ..utils.fixes import tarfile_extractall | ||
from . import get_data_home, load_files | ||
from ._base import ( | ||
RemoteFileMetadata, | ||
|
@@ -76,7 +77,8 @@ def _download_20newsgroups(target_dir, cache_path): | |
archive_path = _fetch_remote(ARCHIVE, dirname=target_dir) | ||
|
||
logger.debug("Decompressing %s", archive_path) | ||
tarfile.open(archive_path, "r:gz").extractall(path=target_dir) | ||
with tarfile.open(archive_path, "r:gz") as fp: | ||
tarfile_extractall(fp, path=target_dir) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line was not covered before either in a PR (unless you triggered a scipy-dev build). Any issues will be caught in a scheduled CI run on |
||
|
||
with suppress(FileNotFoundError): | ||
os.remove(archive_path) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -389,3 +389,15 @@ def _smallest_admissible_index_dtype(arrays=(), maxval=None, check_contents=Fals | |
from ..externals._scipy.sparse.csgraph import laplacian # type: ignore # noqa | ||
else: | ||
from scipy.sparse.csgraph import laplacian # type: ignore # noqa # pragma: no cover | ||
|
||
|
||
# TODO: Remove when we drop support for Python 3.9. Note the filter argument has | ||
# been back-ported in 3.9.17 but we can not assume anything about the micro | ||
# version, see | ||
# https://docs.python.org/3.9/library/tarfile.html#tarfile.TarFile.extractall | ||
# for more details | ||
def tarfile_extractall(tarfile, path): | ||
try: | ||
tarfile.extractall(path, filter="data") | ||
except TypeError: | ||
tarfile.extractall(path) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line being not covered because it seems like in all our Python 3.9 builds we are using Python >= 3.9.17 |
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.
This line was not covered before either in a PR (unless you triggered a scipy-dev build).
Any issues will be caught in a scheduled CI run on
main