Skip to content

Commit abbaed3

Browse files
authored
MAINT Drop official PyPy support (scikit-learn#29128)
1 parent d301304 commit abbaed3

27 files changed

+31
-340
lines changed

.github/workflows/update-lock-files.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ jobs:
2525
- name: cirrus-arm
2626
update_script_args: "--select-tag arm"
2727
additional_commit_message: "[cirrus arm]"
28-
- name: pypy
29-
update_script_args: "--select-tag pypy"
30-
additional_commit_message: "[pypy]"
3128

3229
steps:
3330
- uses: actions/checkout@v4

azure-pipelines.yml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -98,27 +98,6 @@ jobs:
9898
LOCK_FILE: './build_tools/azure/python_nogil_lock.txt'
9999
COVERAGE: 'false'
100100

101-
- template: build_tools/azure/posix-docker.yml
102-
parameters:
103-
name: Linux_Nightly_PyPy
104-
vmImage: ubuntu-20.04
105-
dependsOn: [linting, git_commit]
106-
condition: |
107-
and(
108-
succeeded(),
109-
not(contains(dependencies['git_commit']['outputs']['commit.message'], '[ci skip]')),
110-
or(
111-
eq(variables['Build.Reason'], 'Schedule'),
112-
contains(dependencies['git_commit']['outputs']['commit.message'], '[pypy]')
113-
)
114-
)
115-
matrix:
116-
pypy3:
117-
DOCKER_CONTAINER: 'condaforge/miniforge3:4.10.3-5'
118-
DISTRIB: 'conda-pypy3'
119-
LOCK_FILE: './build_tools/azure/pypy3_linux-64_conda.lock'
120-
121-
122101
- job: Linux_Nightly_Pyodide
123102
pool:
124103
vmImage: ubuntu-22.04

build_tools/azure/install.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,7 @@ pre_python_environment_install() {
3838
apt-get install -y python3-dev python3-numpy python3-scipy \
3939
python3-matplotlib libatlas3-base libatlas-base-dev \
4040
python3-virtualenv python3-pandas ccache git
41-
42-
elif [[ "$DISTRIB" == "conda-pypy3" ]]; then
43-
# need compilers
44-
apt-get -yq update
45-
apt-get -yq install build-essential
4641
fi
47-
4842
}
4943

5044
check_packages_dev_version() {

build_tools/azure/pypy3_environment.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

build_tools/azure/pypy3_linux-64_conda.lock

Lines changed: 0 additions & 103 deletions
This file was deleted.

build_tools/azure/test_script.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,6 @@ if [[ -n "$SELECTED_TESTS" ]]; then
6161
fi
6262

6363
TEST_CMD="$TEST_CMD --pyargs sklearn"
64-
if [[ "$DISTRIB" == "conda-pypy3" ]]; then
65-
# Run only common tests for PyPy. Running the full test suite uses too
66-
# much memory and causes the test to time out sometimes. See
67-
# https://github.com/scikit-learn/scikit-learn/issues/27662 for more
68-
# details.
69-
TEST_CMD="$TEST_CMD.tests.test_common"
70-
fi
7164

7265
set -x
7366
eval "$TEST_CMD"

build_tools/update_environments_and_lock_files.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -245,25 +245,6 @@ def remove_from(alist, to_remove):
245245
+ ["python-dateutil"]
246246
),
247247
},
248-
{
249-
"name": "pypy3",
250-
"type": "conda",
251-
"tag": "pypy",
252-
"folder": "build_tools/azure",
253-
"platform": "linux-64",
254-
"channel": "conda-forge",
255-
"conda_dependencies": (
256-
["pypy", "python"]
257-
+ remove_from(
258-
common_dependencies_without_coverage, ["python", "pandas", "pillow"]
259-
)
260-
+ ["ccache"]
261-
),
262-
"package_constraints": {
263-
"blas": "[build=openblas]",
264-
"python": "3.9",
265-
},
266-
},
267248
{
268249
"name": "pymin_conda_forge_mkl",
269250
"type": "conda",

doc/conftest.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from sklearn.datasets._base import _pkl_filepath
1111
from sklearn.datasets._twenty_newsgroups import CACHE_NAME
1212
from sklearn.utils._testing import SkipTest, check_skip_network
13-
from sklearn.utils.fixes import _IS_PYPY, np_base_version, parse_version
13+
from sklearn.utils.fixes import np_base_version, parse_version
1414

1515

1616
def setup_labeled_faces():
@@ -34,8 +34,6 @@ def setup_twenty_newsgroups():
3434

3535

3636
def setup_working_with_text_data():
37-
if _IS_PYPY and os.environ.get("CI", None):
38-
raise SkipTest("Skipping too slow test with PyPy on CI")
3937
check_skip_network()
4038
cache_path = _pkl_filepath(get_data_home(), CACHE_NAME)
4139
if not exists(cache_path):

doc/developers/contributing.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,6 @@ Commit Message Marker Action Taken by CI
519519
[lint skip] Azure pipeline skips linting
520520
[scipy-dev] Build & test with our dependencies (numpy, scipy, etc.) development builds
521521
[nogil] Build & test with the nogil experimental branches of CPython, Cython, NumPy, SciPy, ...
522-
[pypy] Build & test with PyPy
523522
[pyodide] Build & test with Pyodide
524523
[azure parallel] Run Azure CI jobs in parallel
525524
[cirrus arm] Run Cirrus CI ARM test

doc/faq.rst

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,10 @@ Apart from scikit-learn, another popular one is `scikit-image <https://scikit-im
6262
Do you support PyPy?
6363
^^^^^^^^^^^^^^^^^^^^
6464

65-
scikit-learn is regularly tested and maintained to work with
66-
`PyPy <https://pypy.org/>`_ (an alternative Python implementation with
67-
a built-in just-in-time compiler).
68-
69-
Note however that this support is still considered experimental and specific
70-
components might behave slightly differently. Please refer to the test
71-
suite of the specific module of interest for more details.
65+
Due to limited maintainer resources and small number of users, using
66+
scikit-learn with `PyPy <https://pypy.org/>`_ (an alternative Python
67+
implementation with a built-in just-in-time compiler) is not officially
68+
supported.
7269

7370
How can I obtain permission to use the images in scikit-learn for my work?
7471
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)