Skip to content

Commit

Permalink
Revert "Revert "Build: remove PyPy support" (#10522)"
Browse files Browse the repository at this point in the history
This reverts commit 6ccdcb0.
  • Loading branch information
humitos authored Jul 10, 2023
1 parent 6ccdcb0 commit aba91cf
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 34 deletions.
6 changes: 3 additions & 3 deletions docs/user/config-file/v1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ Certain Python versions require a certain build image,
as defined here:

* ``stable``:
``2``, ``2.7``, ``3``, ``3.5``, ``3.6``, ``3.7``, ``pypy3.5``
``2``, ``2.7``, ``3``, ``3.5``, ``3.6``, ``3.7``
* ``latest``:
``2``, ``2.7``, ``3``, ``3.5``, ``3.6``, ``3.7``, ``3.8``, ``pypy3.5``
``2``, ``2.7``, ``3``, ``3.5``, ``3.6``, ``3.7``, ``3.8``

.. code-block:: yaml
Expand All @@ -149,7 +149,7 @@ python.version
``````````````

* Default: ``3.7``
* Options: ``2``, ``2.7``, ``3``, ``3.5``, ``3.6``, ``3.7``, ``3.8``, ``pypy3.5``
* Options: ``2``, ``2.7``, ``3``, ``3.5``, ``3.6``, ``3.7``, ``3.8``

This is the version of Python to use when building your documentation.
If you specify only the major version of Python,
Expand Down
9 changes: 3 additions & 6 deletions docs/user/config-file/v2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ build.tools.python
``````````````````

Python version to use.
You can use several interpreters and versions, from CPython, PyPy, Miniconda, and Mamba.
You can use several interpreters and versions, from CPython, Miniconda, and Mamba.

.. note::

Expand All @@ -328,9 +328,6 @@ You can use several interpreters and versions, from CPython, PyPy, Miniconda, an
- ``3.9``
- ``3.10``
- ``3.11``
- ``pypy3.7``
- ``pypy3.8``
- ``pypy3.9``
- ``miniconda3-4.7``
- ``mambaforge-4.10``

Expand Down Expand Up @@ -827,9 +824,9 @@ Each image support different Python versions and has different packages installe
as defined here:

* `stable <https://github.com/readthedocs/readthedocs-docker-images/tree/releases/5.x>`_:
``2``, ``2.7``, ``3``, ``3.5``, ``3.6``, ``3.7``, ``pypy3.5``
``2``, ``2.7``, ``3``, ``3.5``, ``3.6``, ``3.7``
* `latest <https://github.com/readthedocs/readthedocs-docker-images/tree/releases/6.x>`_:
``2``, ``2.7``, ``3``, ``3.5``, ``3.6``, ``3.7``, ``3.8``, ``pypy3.5``
``2``, ``2.7``, ``3``, ``3.5``, ``3.6``, ``3.7``, ``3.8``

python.version (legacy)
```````````````````````
Expand Down
3 changes: 0 additions & 3 deletions readthedocs/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,6 @@ def python_interpreter(self):
return 'python'
return None
version = self.python_full_version
if version.startswith('pypy'):
# Allow to specify ``pypy3.5`` as Python interpreter
return version
return f'python{version}'

@property
Expand Down
13 changes: 2 additions & 11 deletions readthedocs/config/tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,15 +430,6 @@ def test_it_supports_other_versions(self):
assert build.python_interpreter == 'python3.7'
assert build.python_full_version == '3.7'

def test_it_supports_string_versions(self):
build = get_build_config(
{'python': {'version': 'pypy3.5'}},
)
build.validate()
assert build.python.version == 'pypy3.5'
assert build.python_interpreter == 'pypy3.5'
assert build.python_full_version == 'pypy3.5'

def test_it_validates_versions_out_of_range(self):
build = get_build_config(
{'python': {'version': 1.0}},
Expand Down Expand Up @@ -1310,8 +1301,8 @@ def test_python_check_invalid_types(self, value):
@pytest.mark.parametrize(
'image,versions',
[
('latest', ['2', '2.7', '3', '3.5', '3.6', '3.7', 'pypy3.5']),
('stable', ['2', '2.7', '3', '3.5', '3.6', '3.7']),
("latest", ["2", "2.7", "3", "3.5", "3.6", "3.7"]),
("stable", ["2", "2.7", "3", "3.5", "3.6", "3.7"]),
],
)
def test_python_version(self, image, versions):
Expand Down
4 changes: 0 additions & 4 deletions readthedocs/rtd_tests/fixtures/spec/v2/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,6 @@
"3.9",
"3.10",
"3.11",
"pypy3.7",
"pypy3.8",
"pypy3.9",
"miniconda3-4.7",
"mambaforge-4.10"
]
Expand Down Expand Up @@ -256,7 +253,6 @@
"3.3",
"3.4",
"3.5",
"pypy3.5",
"3.6",
"3.7",
"3.8"
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/rtd_tests/tests/test_config_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def test_python_supported_versions_image_latest(self, load_config):
config = load_yaml_config(self.version)
self.assertEqual(
config.get_valid_python_versions(),
['2', '2.7', '3', '3.5', '3.6', '3.7', '3.8', 'pypy3.5'],
["2", "2.7", "3", "3.5", "3.6", "3.7", "3.8"],
)

@mock.patch('readthedocs.doc_builder.config.load_config')
Expand Down
9 changes: 3 additions & 6 deletions readthedocs/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ def TEMPLATES(self):
},
'readthedocs/build:5.0': {
'python': {
'supported_versions': ['2', '2.7', '3', '3.5', '3.6', '3.7', 'pypy3.5'],
'supported_versions': ['2', '2.7', '3', '3.5', '3.6', '3.7'],
'default_version': {
'2': '2.7',
'3': '3.7',
Expand All @@ -594,7 +594,7 @@ def TEMPLATES(self):
},
'readthedocs/build:6.0': {
'python': {
'supported_versions': ['2', '2.7', '3', '3.5', '3.6', '3.7', '3.8', 'pypy3.5'],
'supported_versions': ['2', '2.7', '3', '3.5', '3.6', '3.7', '3.8'],
'default_version': {
'2': '2.7',
'3': '3.7',
Expand All @@ -603,7 +603,7 @@ def TEMPLATES(self):
},
'readthedocs/build:7.0': {
'python': {
'supported_versions': ['2', '2.7', '3', '3.5', '3.6', '3.7', '3.8', '3.9', '3.10', 'pypy3.5'],
'supported_versions': ['2', '2.7', '3', '3.5', '3.6', '3.7', '3.8', '3.9', '3.10'],
'default_version': {
'2': '2.7',
'3': '3.7',
Expand Down Expand Up @@ -648,9 +648,6 @@ def TEMPLATES(self):
'3.9': '3.9.17',
'3.10': '3.10.12',
'3.11': '3.11.4',
'pypy3.7': 'pypy3.7-7.3.9',
'pypy3.8': 'pypy3.8-7.3.11',
'pypy3.9': 'pypy3.9-7.3.12',
'miniconda3-4.7': 'miniconda3-4.7.12',
'mambaforge-4.10': 'mambaforge-4.10.3-10',
},
Expand Down

0 comments on commit aba91cf

Please sign in to comment.