|
| 1 | +diff --git a/pyproject.toml b/pyproject.toml |
| 2 | +index f7f067e..2025d66 100644 |
| 3 | +--- a/pyproject.toml |
| 4 | ++++ b/pyproject.toml |
| 5 | +@@ -3,7 +3,7 @@ |
| 6 | + requires = [ |
| 7 | + "setuptools", |
| 8 | + "wheel", |
| 9 | +- "Cython>=0.29.24", |
| 10 | ++ "Cython>=0.29.24,<3", |
| 11 | + |
| 12 | + # use oldest-supported-numpy which provides the oldest numpy version with |
| 13 | + # wheels on PyPI |
| 14 | +diff --git a/sklearn/_build_utils/__init__.py b/sklearn/_build_utils/__init__.py |
| 15 | +index 755171e..1c14884 100644 |
| 16 | +--- a/sklearn/_build_utils/__init__.py |
| 17 | ++++ b/sklearn/_build_utils/__init__.py |
| 18 | +@@ -61,10 +61,10 @@ def cythonize_extensions(extension): |
| 19 | + sklearn._OPENMP_SUPPORTED = check_openmp_support() |
| 20 | + |
| 21 | + n_jobs = 1 |
| 22 | +- with contextlib.suppress(ImportError): |
| 23 | +- import joblib |
| 24 | ++ # with contextlib.suppress(ImportError): |
| 25 | ++ # import joblib |
| 26 | + |
| 27 | +- n_jobs = joblib.cpu_count() |
| 28 | ++ # n_jobs = joblib.cpu_count() |
| 29 | + |
| 30 | + # Additional checks for Cython |
| 31 | + cython_enable_debug_directives = ( |
| 32 | +diff --git a/sklearn/datasets/_svmlight_format_fast.pyx b/sklearn/datasets/_svmlight_format_fast.pyx |
| 33 | +index b578584..fc66532 100644 |
| 34 | +--- a/sklearn/datasets/_svmlight_format_fast.pyx |
| 35 | ++++ b/sklearn/datasets/_svmlight_format_fast.pyx |
| 36 | +@@ -80,7 +80,7 @@ def _load_svmlight_file(f, dtype, bint multilabel, bint zero_based, |
| 37 | + if n_features and features[0].startswith(qid_prefix): |
| 38 | + _, value = features[0].split(COLON, 1) |
| 39 | + if query_id: |
| 40 | +- query.resize(len(query) + 1) |
| 41 | ++ query.resize(len(query) + 1, refcheck=False) |
| 42 | + query[len(query) - 1] = np.int64(value) |
| 43 | + features.pop(0) |
| 44 | + n_features -= 1 |
0 commit comments