Building with Python 3.9 (vs default 3.8)

I’m trying to deploy and application that requires Python 3.9.

Because the app is very very simple, I’d rather not get into the custom image/docker configuration.

The auto-generated fly.toml says:

  builtin = "python"

From: defaultbuiltins.go

I see this defaults to Python image: 3.8-slim-buster

But looks like there may be a way for me to pass a different tag:

Template: `FROM python:{{- .pythonbase }}

What is the syntax to use python:3.9-slim-buster in fly.toml?

I’d expect this to be documented in the build section of the configuration documentation, but builtin is not mentioned there at all.

Thank you,

After some stabbing in the dark, found this (undocumented) syntax to work:

  builtin = "python"

  pythonbase = "3.9-slim-buster"
1 Like

Oh good find. We have some Python work to do, for sure, this is not a great UX.

Other than having to guess that parameter, setting up my Python project was a breeze!

Init add Procfile, deploy. Done!

Great experience overall!