Skip to content

Upgrade to Ubuntu 20.04 and Python 3.8 #7421

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

Merged
merged 10 commits into from
Oct 13, 2021
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2.1
jobs:
tests:
docker:
- image: 'cimg/python:3.6'
- image: 'cimg/python:3.8'
environment:
TOX_POSARGS: ''
- image: 'docker.elastic.co/elasticsearch/elasticsearch:7.14.0'
Expand All @@ -19,7 +19,7 @@ jobs:

tests-embedapi:
docker:
- image: 'cimg/python:3.6'
- image: 'cimg/python:3.8'
steps:
- checkout
- run: git submodule sync
Expand All @@ -29,7 +29,7 @@ jobs:

checks:
docker:
- image: 'cimg/python:3.6'
- image: 'cimg/python:3.8'
environment:
NODE_VERSION: 10.17.0
steps:
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:18.04
FROM ubuntu:20.04

ARG GITHUB_TOKEN

Expand Down
6 changes: 3 additions & 3 deletions docs/development/docs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ you may want to verify those changes locally before pushing upstream.

$ git clone --recurse-submodules https://github.com/readthedocs/readthedocs.org/

#. create a virtual environment with Python 3.6
(preferably the latest release, 3.6.15 at the time of writing),
#. create a virtual environment with Python 3.8
(preferably the latest release, 3.8.12 at the time of writing),
activate it, and upgrade both pip and setuptools:

.. code-block:: console

$ cd readthedocs.org
$ python3.6 -m venv .venv
$ python3.8 -m venv .venv
$ source .venv/bin/activate
(.venv) $ python -m pip install -U pip setuptools

Expand Down
2 changes: 1 addition & 1 deletion docs/development/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ save some work while typing docker compose commands. This section explains these
``inv docker.test``
Runs all the test suites inside the container.

* ``--arguments`` will pass arguments to Tox command (e.g. ``--arguments "-e py36 -- -k test_api"``)
* ``--arguments`` will pass arguments to Tox command (e.g. ``--arguments "-e py38 -- -k test_api"``)

``inv docker.pull``
Downloads and tags all the Docker images required for builders.
Expand Down
6 changes: 3 additions & 3 deletions docs/development/tests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ To target a specific environment:

.. prompt:: bash

tox -e py36
tox -e py38

The ``tox`` configuration has the following environments configured. You can
target a single environment to limit the test suite:

py36
Run our test suite using Python 3.6
py38
Run our test suite using Python 3.8

lint
Run code linting using `Prospector`_. This currently runs `pylint`_,
Expand Down
3 changes: 1 addition & 2 deletions requirements/pip.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ pyquery==1.4.3
# NOTE: this dep can be removed in python 3.7 in favor of ``date.fromisoformat``
python-dateutil==2.8.2

# Version 3.6.3 is not available for Python 3.6
orjson==3.6.1 # pyup: ignore
orjson==3.6.3

# Utils
django-gravatar2==1.4.4
Expand Down
8 changes: 1 addition & 7 deletions requirements/testing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,7 @@ pytest-cov==2.12.1
apipkg==2.0.0
execnet==1.9.0

# Mercurial 4.3 and newer require Python 2.7
# Mercurial is actively being ported to Python 3. As of Mercurial 4.3,
# some commands work on Python 3. However, Python 3 is not yet a
# supported platform.
# mercurial-scm.org/wiki/SupportedPythonVersions
# (Pinned to 4.4.2 since what we need for testing is still useful)
Mercurial==4.4.2 # pyup: ignore
Mercurial==5.5
Copy link
Member

Choose a reason for hiding this comment

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

Is this still being used in our code, or only on builders?

Copy link
Member Author

Choose a reason for hiding this comment

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

IIRC, this dependency was added because it was required on some tests. We may be able to remove them? I'll take a look at that later.


yamale==2.2.0 # pyup: <3.0
pytest-mock==3.6.1
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
minversion=2.9.0
envlist = py36,lint,docs
envlist = py38,lint,docs
skipsdist = True

[testenv]
Expand All @@ -15,7 +15,7 @@ passenv = CI TRAVIS TRAVIS_* HOME
deps = -r{toxinidir}/requirements/testing.txt
changedir = {toxinidir}/readthedocs
basepython =
python3.6
python3.8
commands =
/bin/sh -c '\
export DJANGO_SETTINGS_MODULE=readthedocs.settings.test; \
Expand Down