Closed thibaudcolas closed 3 weeks ago
In the meantime, I’ve pinned our Vercel builds to use
urllib3==1.26.16
.
Out of curiosity, how did you do this? I've never used Python on Vercel before.
Also, the urllib documentation mentions that we should pin urllib<2
instead of a specific version so that we continue getting security updates.
Good point! Here is the now-updated installation command:
npm install && python3 -m pip install -r requirements.txt && pip install "urllib3<2" && python3 -m pip install -e .
It looks like Vercel recently introduced support for defining build commands in their configuration file (or I somehow never saw it until now) – if we did this, here is what our full configuration would look like:
{
"installCommand": "npm install && python3 -m pip install -r requirements.txt && pip install urllib3<2 && python3 -m pip install -e .",
"buildCommand": "npm run build && python3 -m sphinx -M html docs/ _build",
"outputDirectory": "_build/html",
"github": {
"silent": true
}
}
We no longer use Vercel for this theme, so I'm closing this. Preview deployments are now provided by RTD directly.
Our preview deployments in Vercel are broken because they run in Amazon Linux 2 images, which only have very dated versions of Python, which use old versions of OpenSSL no longer supported by urllib3. This is the following issue: https://github.com/urllib3/urllib3/issues/2168
Official guidance from urllib3: https://urllib3.readthedocs.io/en/latest/v2-migration-guide.html#common-upgrading-issues
I have contacted Vercel support to ask if they have plans to switch build images / make it configurable. Installing Python from source is also possible but didn’t feel like the right thing. It looked like this:
In the meantime, I’ve pinned our Vercel builds to use
urllib3<2
.