From 5df446cd3558b1b7ee11d9b60d75287d6395a693 Mon Sep 17 00:00:00 2001 From: Marnik Bercx Date: Fri, 5 May 2023 21:49:37 +0200 Subject: [PATCH] Docs: Bump Python version for RTD build (#5999) The readthedocs (RTD) build was failing with the following error: read the docs ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1 This was due to a change in the support for `urllib`, see: https://github.com/urllib3/urllib3/issues/2168 Which requires Python > 3.8. Hence here we update the Python version. --- .readthedocs.yml | 6 +++++- aiida/manage/tests/pytest_fixtures.py | 4 ++-- docs/source/nitpick-exceptions | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index c31727ba10..b80a9b4f10 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -6,9 +6,13 @@ version: 2 # https://github.com/aiidateam/aiida-core/issues/1472 formats: [] +build: + os: ubuntu-22.04 + tools: + python: "3.10" + # Need to install the package itself such that the entry points are installed and the API doc can build properly python: - version: 3.8 install: - method: pip path: . diff --git a/aiida/manage/tests/pytest_fixtures.py b/aiida/manage/tests/pytest_fixtures.py index f1d94a630a..bd88546fd5 100644 --- a/aiida/manage/tests/pytest_fixtures.py +++ b/aiida/manage/tests/pytest_fixtures.py @@ -132,7 +132,7 @@ def aiida_manager() -> Manager: @pytest.fixture(scope='session') def aiida_instance( - tmp_path_factory: pytest.TempPathFactory, + tmp_path_factory: pytest.tmpdir.TempPathFactory, aiida_manager: Manager, aiida_test_profile: str | None, ) -> t.Generator[Config, None, None]: @@ -185,7 +185,7 @@ def aiida_instance( @pytest.fixture(scope='session') def config_psql_dos( - tmp_path_factory: pytest.TempPathFactory, + tmp_path_factory: pytest.tmpdir.TempPathFactory, postgres_cluster: dict[str, str], ) -> t.Callable[[dict[str, t.Any] | None], dict[str, t.Any]]: """Return a profile configuration for the :class:`~aiida.storage.psql_dos.backend.PsqlDosBackend`.""" diff --git a/docs/source/nitpick-exceptions b/docs/source/nitpick-exceptions index ad378865df..43690f342c 100644 --- a/docs/source/nitpick-exceptions +++ b/docs/source/nitpick-exceptions @@ -162,7 +162,7 @@ py:class disk_objectstore.container.Container py:class flask.app.Flask py:class flask.json.JSONEncoder -py:class pytest.TempPathFactory +py:class pytest.tmpdir.TempPathFactory py:class sqlalchemy.orm.decl_api.SqliteModel py:class sqlalchemy.orm.decl_api.Base