Skip to content
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

Use Python 3.9 for the readthedocs builds #1269

Merged
merged 3 commits into from
May 6, 2023

Conversation

ojarjur
Copy link
Contributor

@ojarjur ojarjur commented May 5, 2023

Version 2.0 of urllib3 was just released which fails if used against any version of python built against a version of the OpenSSL library older than 1.1.1 (see discussion here)

That seems to include all versions of Python older than 3.9.

That change triggers the read the docs builds to fail when running sphinx with a message of the form:

Running Sphinx v6.2.1

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/jupyter-server/envs/1267/lib/python3.8/site-packages/sphinx/registry.py", line 442, in load_extension
    mod = import_module(extname)
  File "/home/docs/checkouts/readthedocs.org/user_builds/jupyter-server/envs/1267/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/docs/checkouts/readthedocs.org/user_builds/jupyter-server/envs/1267/lib/python3.8/site-packages/sphinx/builders/linkcheck.py", line 20, in <module>
    from requests import Response
  File "/home/docs/checkouts/readthedocs.org/user_builds/jupyter-server/envs/1267/lib/python3.8/site-packages/requests/__init__.py", line 43, in <module>
    import urllib3
  File "/home/docs/checkouts/readthedocs.org/user_builds/jupyter-server/envs/1267/lib/python3.8/site-packages/urllib3/__init__.py", line 38, in <module>
    raise ImportError(
ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with OpenSSL 1.0.2n  7 Dec 2017. See: https://github.com/urllib3/urllib3/issues/2168

This change attempts to fix that by upgrading the Python version used for the read the docs build from 3.8 to 3.9

ojarjur added 3 commits May 5, 2023 14:48
Version 2.0 of urllib3 was just released which fails if used against any version of python built against a version of the OpenSSL library older than 1.1.1 (see discussion [here](urllib3/urllib3#2168))

That seems to include all versions of Python older than 3.9.

This change triggers the read the docs builds to fail when running sphinx with a message of the form:

```
Running Sphinx v6.2.1

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/jupyter-server/envs/1267/lib/python3.8/site-packages/sphinx/registry.py", line 442, in load_extension
    mod = import_module(extname)
  File "/home/docs/checkouts/readthedocs.org/user_builds/jupyter-server/envs/1267/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/docs/checkouts/readthedocs.org/user_builds/jupyter-server/envs/1267/lib/python3.8/site-packages/sphinx/builders/linkcheck.py", line 20, in <module>
    from requests import Response
  File "/home/docs/checkouts/readthedocs.org/user_builds/jupyter-server/envs/1267/lib/python3.8/site-packages/requests/__init__.py", line 43, in <module>
    import urllib3
  File "/home/docs/checkouts/readthedocs.org/user_builds/jupyter-server/envs/1267/lib/python3.8/site-packages/urllib3/__init__.py", line 38, in <module>
    raise ImportError(
ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with OpenSSL 1.0.2n  7 Dec 2017. See: urllib3/urllib3#2168
```

This change attempts to fix that by upgrading the Python version used for the read the docs build from 3.8 to 3.9
In order to specify a Python version >3.8 for readthedocs, we
have to use the ["build"](https://docs.readthedocs.io/en/stable/config-file/v2.html#build)
stanza rather than the "python" one.
@ojarjur ojarjur marked this pull request as ready for review May 5, 2023 22:02
@ojarjur
Copy link
Contributor Author

ojarjur commented May 5, 2023

@Zsailer FYI, I believe we need this (or an equivalent change) before any more PR's can pass the checks.

Copy link
Contributor

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@blink1073 blink1073 merged commit 15505bb into jupyter-server:main May 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants