Skip to content

Commit e215179

Browse files
committed
Use Python 3.12.3
... and other changes: - update dependencies version in pyproject.toml - recreate the poetry.lock file - update the Python version in: - the Vagrant files - the devcontainer file - the GH workflows - update the documentation with the new Python version and also pin the Poetry version - update the examples in the bug and issue templates
1 parent 8ca5707 commit e215179

9 files changed

Lines changed: 102 additions & 106 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "python-template-3-11",
3-
"image": "mcr.microsoft.com/devcontainers/python:3.11-bullseye",
2+
"name": "python-template-3-12",
3+
"image": "mcr.microsoft.com/devcontainers/python:3.12-bookworm",
44

55
"features": {
66
"ghcr.io/devcontainers/features/common-utils:2": {

.github/ISSUE_TEMPLATE/issue-bug.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,11 @@ body:
4747
label: Environment
4848
description: |
4949
examples:
50-
- **OS**: Ubuntu 20.04
51-
- **Python version**: 3.10.11
52-
- **slack-bolt**: 1.17.1
53-
- **slack-sdk**: 3.21.1
50+
- **OS**: Ubuntu 22.04
51+
- **Python version**: 3.12.3
5452
value: |
5553
- OS:
5654
- Python version:
57-
- slack-bolt:
58-
- slack-sdk:
5955
render: markdown
6056
validations:
6157
required: false

.github/ISSUE_TEMPLATE/issue-feature.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ body:
3030
label: Environment
3131
description: |
3232
examples:
33-
- **OS**: Ubuntu 20.04
34-
- **Python version**: 3.10.11
33+
- **OS**: Ubuntu 22.04
34+
- **Python version**: 3.12.3
3535
value: |
3636
- OS:
3737
- Python version:

.github/workflows/python-run-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will install Python dependencies, run tests and lint with a single version of Python
22
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
33

4-
name: "Run tests and lint (Python 3.11)"
4+
name: "Run tests and lint (Python 3.12)"
55

66
on:
77
push:
@@ -14,7 +14,7 @@ permissions:
1414
contents: read
1515

1616
env:
17-
POETRY_VERSION: 1.7.0
17+
POETRY_VERSION: 1.8.3
1818
POETRY_HOME: /opt/poetry
1919

2020
jobs:
@@ -24,10 +24,10 @@ jobs:
2424

2525
steps:
2626
- uses: actions/checkout@v4
27-
- name: Set up Python 3.11
27+
- name: Set up Python 3.12
2828
uses: actions/setup-python@v4
2929
with:
30-
python-version: "3.11"
30+
python-version: "3.12"
3131
- name: Cache pip dependencies
3232
id: cache-pip
3333
uses: actions/cache@v3

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# markgreene74/python-template [![Run tests and lint (Python 3.11)](https://github.com/markgreene74/python-template/actions/workflows/python-run-tests.yml/badge.svg?branch=main)](https://github.com/markgreene74/python-template/actions/workflows/python-run-tests.yml)
1+
# markgreene74/python-template [![Run tests and lint (Python 3.12)](https://github.com/markgreene74/python-template/actions/workflows/python-run-tests.yml/badge.svg?branch=main)](https://github.com/markgreene74/python-template/actions/workflows/python-run-tests.yml)
22

3-
Simple template for Python `3.11` with `pyenv`/`pyenv-virtualenv` and `poetry`.
3+
Simple template for Python `3.12` with `pyenv`/`pyenv-virtualenv` and `poetry`.
44

55
- [quickstart](#quickstart)
66
- [pyenv/pyenv-virtualenv](#pyenvpyenv-virtualenv)
@@ -20,17 +20,17 @@ Simple template for Python `3.11` with `pyenv`/`pyenv-virtualenv` and `poetry`.
2020
TODO
2121
- make sure `pyenv` is installed
2222
- make sure `pyenv-virtualenv` is installed
23-
- install python `3.11`, for example `3.11.6`
23+
- install python `3.12`, for example `3.12.3`
2424
```bash
25-
pyenv install 3.11.6
25+
pyenv install 3.12.3
2626
```
2727
- create a virtual environment
2828
```bash
29-
pyenv virtualenv 3.11.6 python-template-3-11
29+
pyenv virtualenv 3.12.3 python-template-3-12
3030
```
3131
- activate the virtual environment
3232
```bash
33-
pyenv activate python-template-3-11
33+
pyenv activate python-template-3-12
3434
```
3535
- make sure `pip` and `setuptools` are up-to-date
3636
```bash
@@ -41,7 +41,7 @@ TODO
4141

4242
- install poetry
4343
```bash
44-
pip install --upgrade poetry
44+
pip install --upgrade poetry==1.8.3
4545
```
4646
- install the application runtime dependencies
4747
```bash

poetry.lock

Lines changed: 76 additions & 76 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
[tool.poetry]
22
name = "python-template"
3-
version = "0.1.0"
4-
description = "A simple template for Python >=3.11"
3+
version = "0.2.0"
4+
description = "A simple template for Python >=3.12"
55
authors = ["markgreene74 <markgreene74@users.noreply.github.com>"]
66
license = "MIT"
77
readme = "README.md"
88

99
[tool.poetry.dependencies]
10-
python = "^3.11"
10+
python = "^3.12"
1111

1212

1313
[tool.poetry.group.test.dependencies]
14-
pytest = "^7.4.3"
14+
pytest = "^8.2.0"
1515

1616

1717
[tool.poetry.group.dev.dependencies]
18-
black = "^24.3.0"
19-
pre-commit = "^3.5.0"
18+
black = "^24.4.2"
19+
pre-commit = "^3.7.1"
2020

2121
[build-system]
2222
requires = ["poetry-core"]

vagrant/Vagrant-bootstrap.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export VM_USER=vagrant
55
export VM_USER_HOME=/home/${VM_USER}
66
export PYENV_ROOT=${VM_USER_HOME}/.pyenv
77

8-
export PYTHON_VERSION="3.11.6"
8+
export PYTHON_VERSION="3.12.3"
99

1010
### helper functions
1111

vagrant/Vagrantfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
vm_name = "python-3-11-6"
1+
vm_name = "python-3-12-3"
22

33
Vagrant.configure("2") do |config|
44
config.vm.provider :virtualbox
@@ -16,7 +16,7 @@ Vagrant.configure("2") do |config|
1616
config.vm.hostname = vm_name
1717
config.vm.define vm_name
1818

19-
config.vm.post_up_message = "Debian 11 (bullseye), Python 3.11, pyenv+pyenv-virtualenv (optional), docker."
19+
config.vm.post_up_message = "Debian 11 (bullseye), Python 3.12, pyenv+pyenv-virtualenv (optional), docker."
2020

2121
config.vm.provision "base", type: "shell", path: "Vagrant-bootstrap.sh"
2222
config.vm.provision "custom", type: "shell", inline: "echo placeholder"

0 commit comments

Comments
 (0)