From d90f7c098090410e4458f59b10127dc4c857bb60 Mon Sep 17 00:00:00 2001 From: Brad Busenius Date: Mon, 22 Jul 2024 16:41:46 -0500 Subject: [PATCH] Upgraded to Python 3.11 in the dev environment and CI. --- .github/workflows/test.yml | 4 ++-- Vagrantfile | 15 +++++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0a52958c..f157528c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,10 +42,10 @@ jobs: with: redis-version: 6 - - name: Set up Python '3.10' + - name: Set up Python '3.11' uses: actions/setup-python@v3 with: - python-version: '3.10' + python-version: '3.11' - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/Vagrantfile b/Vagrantfile index df23912f..76cf78c0 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -13,7 +13,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # boxes at https://atlas.hashicorp.com/search. # https://app.vagrantup.com/ubuntu/boxes/jammy64 config.vm.box = "ubuntu/jammy64" - config.vm.box_version = "20230720.0.0" + config.vm.box_version = "20240720.0.1" es = "true" if ENV['ELASTICSEARCH'] @@ -191,13 +191,16 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| echo "============== Updating repos ==============" rm -rf /var/lib/apt/lists/partial apt-get update -y -o Acquire::CompressionTypes::Order::=gz - #apt-get update -y + # Jammy ships wih Python 10. We need Python 11. + # Remove this to go to Python 10 in the future. echo "" - echo "============== Install Python dev tools ==============" + echo "============== Upgrading to Python 3.11 ==============" apt-get install -y software-properties-common - apt-get -y install python3-distutils - apt-get install -y python3-pip python3-dev python3-venv + add-apt-repository ppa:deadsnakes/ppa + apt-get install -y python3.11 + apt-get -y install python3.11-distutils + apt-get install -y python3-pip python3.11-dev python3.11-venv # Install Wagtail dependencies and useful dev tools echo -e "" @@ -258,7 +261,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| echo "" echo "============== Creating a Python virtualenv ==============" echo "..." - cd /home/vagrant && python3 -m venv lw + cd /home/vagrant && python3.11 -m venv lw # Pip install project dependencies echo ""