-
Notifications
You must be signed in to change notification settings - Fork 3
Conversation
Python 3.7 support has been dropped[1] so remove that and update the other supported python versions [1] Sceptre/sceptre#1382
Thanks for sharing. I'll have a closer look through the week. |
Dockerfile
Outdated
&& pyenv install 3.9.16 \ | ||
&& pyenv install 3.10.9 \ | ||
&& pyenv install 3.11.1 \ | ||
&& pyenv global system 3.8.16 3.9.16 3.10.9 3.11.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How did you choose the patch version?
Your commits said that CircleCI coudn't find some other patch versions.
Does it matter that none of these are the current latest patch version?
$ pyenv latest --known 3.8
3.8.18
$ pyenv latest --known 3.9
3.9.18
$ pyenv latest --known 3.10
3.10.13
$ pyenv latest --known 3.11
3.11.6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iainelder hmm, this is what I get..
➜ pyenv latest --known 3.10
3.10.10
I get the same result when i run ➜ pyenv install --list|grep 3.10
maybe we have different versions of pyenv? or maybe i'm on a MAC?
➜ pyenv --version
pyenv 2.3.25
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This time I don't think the operating system matters, but the pyenv version certainly does.
My pyenv version is 2.3.32. That's the latest version. I ran pyenv update
just before I checked this.
The pyenv version in the Docker image is what matters most.
Base image cimg/python:3.11-node
has pyenv version 2.3.8.
Base image cimg/python:3.12-node
has pyenv version 2.3.29.
This table shows, for each Python feature version that Sceptre supports, the latest bugfix version that each pyenv version can install.
Feature | Pyenv 2.3.8 latest | Pyenv 2.3.29 latest |
---|---|---|
3.7 | 16 | 17 |
3.8 | 16 | 18 |
3.9 | 16 | 18 |
3.10 | 9 | 13 |
3.11 | 1 | 6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we don't need the absolute latest bugfix version, then we can just use CircleCI's chosen pyenv version.
Unless we care about the exact bugfix version number, we don't have to write them in the Dockerfile. We can use compound pyenv commands to install whatever latest version it knows about.
So the Dockerfile would look like this:
RUN pyenv install $(pyenv latest --known 3.8)
RUN pyenv install $(pyenv latest --known 3.9)
RUN pyenv install $(pyenv latest --known 3.10)
RUN pyenv install $(pyenv latest --known 3.11)
RUN pyenv global system $(pyenv versions --bare)
I built it locally and reported the Python versions available to pyenv:
$ docker run -it --rm 1fb7c2f153d2 pyenv versions
* system (set by /home/circleci/.pyenv/version)
* 3.8.18 (set by /home/circleci/.pyenv/version)
* 3.9.18 (set by /home/circleci/.pyenv/version)
* 3.10.13 (set by /home/circleci/.pyenv/version)
* 3.11.6 (set by /home/circleci/.pyenv/version)
* 3.12.0 (set by /home/circleci/.pyenv/version)
I believe writing the Dockerfile this way would allow us to use the next bugfix version automatically whenever CircleCI updates their base image. Then we would never need to manage the bugfix versions again in this file. We would change this file only when Sceptre's supported feature versions change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good suggestion. thanks.
Co-authored-by: Iain Samuel McLean Elder <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Update circleci docker container with python 3.7 removed and python 3.12 added depends on Sceptre/sceptre-circleci#19
Update circleci docker container with python 3.7 removed and python 3.12 added depends on Sceptre/sceptre-circleci#19
Update circleci docker container with python 3.7 removed and python 3.12 added depends on Sceptre/sceptre-circleci#19
Python 3.7 support has been dropped[1] so remove that and update the other supported python versions
[1] Sceptre/sceptre#1382