Skip to content

Commit

Permalink
Use Python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
jmsmkn committed Jun 17, 2024
1 parent 65b65ed commit 435563c
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- published

env:
PYTHON_VERSION: '3.11'
PYTHON_VERSION: '3.12'

concurrency:
group: ${{ github.head_ref || github.run_id }}
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repos:
hooks:
- id: pyupgrade
language: python
args: [--py311-plus]
args: [--py312-plus]
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11
FROM python:3.12

RUN mkdir -p /opt/src/dist

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The application contains:
- A `fastapi` web server that implements the SageMaker endpoints
- and `pydantic` models that interface between S3, and run the original inference jobs.

The application is compiled on Python 3.11 using `pyinstaller`, and then distributed as a statically linked binary using `staticx`.
The application is compiled on Python 3.12 using `pyinstaller`, and then distributed as a statically linked binary using `staticx`.
It is able to adapt any container, including ones based on `scratch` or `alpine` images.

## Usage
Expand Down
8 changes: 2 additions & 6 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ sagemaker-shim = "sagemaker_shim.cli:cli"

[tool.poetry.dependencies]
# Only support one version of python at a time
python = "^3.11,<3.12"
python = "^3.12,<3.13"
fastapi = "!=0.89.0,<0.111.0"
uvicorn = "*"
click = "*"
Expand Down Expand Up @@ -48,7 +48,7 @@ line_length = 79

[tool.black]
line-length = 79
target-version = ['py311']
target-version = ['py312']

[tool.pytest.ini_options]
markers = [
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[mypy]
python_version = 3.11
python_version = 3.12
plugins = pydantic.mypy
strict = True

Expand Down
2 changes: 1 addition & 1 deletion tests/test_container_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def test_alpine_image(minio):
# https://github.com/JonathonReinhart/staticx/issues/143
host_port = 8081
with _container(
base_image="python:3.11-alpine",
base_image="python:3.12-alpine",
host_port=host_port,
cmd=["python", "-c", "print('hello_world')"],
):
Expand Down

0 comments on commit 435563c

Please sign in to comment.