From 01c978cdcf5d26fd7f766c2313896e1b3313ead3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= <sporiff@funkwhale.audio>
Date: Wed, 27 Jul 2022 18:18:29 +0000
Subject: [PATCH] Resolve "Provide docs to help with migration Debian 10 -> 11"

---
 api/config/settings/common.py                 |  2 +-
 changes/changelog.d/1562.doc                  |  1 +
 .../installation_docs/debian.md               |  4 ++--
 .../upgrade_docs/debian.md                    | 22 +++++++++++++++++++
 4 files changed, 26 insertions(+), 3 deletions(-)
 create mode 100644 changes/changelog.d/1562.doc

diff --git a/api/config/settings/common.py b/api/config/settings/common.py
index f75443e77..d7beb00bc 100644
--- a/api/config/settings/common.py
+++ b/api/config/settings/common.py
@@ -20,7 +20,7 @@ LOGLEVEL = env("LOGLEVEL", default="info").upper()
 """
 Default logging level for the Funkwhale processes
 
-Available levels: 
+Available levels:
 
 - ``debug``
 - ``info``
diff --git a/changes/changelog.d/1562.doc b/changes/changelog.d/1562.doc
new file mode 100644
index 000000000..09ae5f8c9
--- /dev/null
+++ b/changes/changelog.d/1562.doc
@@ -0,0 +1 @@
+Added virtualenv upgrade instructions for Debian (#1562).
diff --git a/docs/administrator_documentation/installation_docs/debian.md b/docs/administrator_documentation/installation_docs/debian.md
index 47cbb1579..ba9873acc 100644
--- a/docs/administrator_documentation/installation_docs/debian.md
+++ b/docs/administrator_documentation/installation_docs/debian.md
@@ -15,11 +15,11 @@ We support [Debian](https://debian.org) and Debian-based Linux distributions. Fo
    export FUNKWHALE_VERSION={sub-ref}`version`
    ```
 
-- Install `curl` and `unzip` - utilities used later.
+- Install `curl`
 
    ```{code} bash
    sudo apt update # update apt cache
-   sudo apt install curl unzip
+   sudo apt install curl
    ```
 
 ## 1. Install Funkwhale dependencies
diff --git a/docs/administrator_documentation/upgrade_docs/debian.md b/docs/administrator_documentation/upgrade_docs/debian.md
index 031bf12d6..79cb0cc77 100644
--- a/docs/administrator_documentation/upgrade_docs/debian.md
+++ b/docs/administrator_documentation/upgrade_docs/debian.md
@@ -2,6 +2,28 @@
 
 If you installed Funkwhale following the [Debian guide](../installation_docs/debian), follow these steps to upgrade.
 
+:::{dropdown} Upgrading to a new version of Python
+:icon: alert
+:color: warning
+
+If you upgrade your Python version, you need to update your virtualenv. Python is updated with each new version of Debian.
+
+To upgrade your virtualenv:
+
+1. Change to your api directory.
+
+   ```{code-block} bash
+   cd /srv/funkwhale/api
+   ```
+
+2. Rerun `poetry install` to reinstall your dependencies in a new virtualenv.
+
+   ```{code-block} bash
+   poetry install
+   ```
+
+:::
+
 ## Download the updated files
 
 1. SSH into your server.
-- 
GitLab