Skip to content

Commit

Permalink
Update python & dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Dittrich <[email protected]>
  • Loading branch information
jan-di committed May 28, 2024
1 parent 7549105 commit 2c207d0
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 50 deletions.
4 changes: 2 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.202.5/containers/python-3/.devcontainer/base.Dockerfile

# [Choice] Python version (use -bullseye variants on local arm64/Apple Silicon): 3, 3.10, 3.9, 3.8, 3.7, 3.6, 3-bullseye, 3.10-bullseye, 3.9-bullseye, 3.8-bullseye, 3.7-bullseye, 3.6-bullseye, 3-buster, 3.10-buster, 3.9-buster, 3.8-buster, 3.7-buster, 3.6-buster
ARG VARIANT="3.10-bullseye"
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}
ARG VARIANT=""
FROM mcr.microsoft.com/vscode/devcontainers/python:1-${VARIANT}

RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends mariadb-client postgresql-client
Expand Down
59 changes: 31 additions & 28 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,44 +6,47 @@
"build": {
"dockerfile": "Dockerfile",
"context": "..",
"args": {
"args": {
// Update 'VARIANT' to pick a Python version: 3, 3.10, 3.9, 3.8, 3.7, 3.6
// Append -bullseye or -buster to pin to an OS version.
// Use -bullseye variants on local on arm64/Apple Silicon.
"VARIANT": "3.9-bullseye",
"VARIANT": "3.12-bookworm",
// Options
"NODE_VERSION": "none"
}
},

// Set *default* container specific settings.json values on container create.
"settings": {
"editor.formatOnSave":true,
"python.pythonPath": "/usr/local/bin/python",
"python.languageServer": "Pylance",
"python.linting.enabled": true,
"python.linting.pylintEnabled": false,
"python.linting.flake8Enabled": true,
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
"python.formatting.provider": "autopep8",
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint",
"python.linting.flake8Args": [
"--max-line-length=120",
],
"customizations": {
"vscode": {
"settings": {
"editor.formatOnSave":true,
"python.pythonPath": "/usr/local/bin/python",
"python.languageServer": "Pylance",
"python.linting.enabled": true,
"python.linting.pylintEnabled": false,
"python.linting.flake8Enabled": true,
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
"python.formatting.provider": "autopep8",
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint",
"python.linting.flake8Args": [
"--max-line-length=120"
]
},
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance"
],
}
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance"
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
Expand All @@ -53,6 +56,6 @@

// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"features": {
"docker-from-docker": "20.10"
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}
}
}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/library/python:3.9.19-bookworm
FROM docker.io/library/python:3.12.3-bookworm

LABEL jan-di.database-backup.instance_id="default"

Expand Down
2 changes: 0 additions & 2 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
--extra-index-url https://www.piwheels.org/simple

docker~=6.1
humanize~=4.9
requests~=2.31
Expand Down
32 changes: 15 additions & 17 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,54 +1,52 @@
#
# This file is autogenerated by pip-compile with Python 3.9
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile
#
--extra-index-url https://www.piwheels.org/simple

certifi==2022.12.7
certifi==2024.2.2
# via requests
cffi==1.15.1
cffi==1.16.0
# via cryptography
charset-normalizer==3.0.1
charset-normalizer==3.3.2
# via requests
croniter==2.0.5
# via -r requirements.in
cryptography==38.0.2
cryptography==42.0.7
# via pyaescrypt
docker==6.1.3
# via -r requirements.in
humanize==4.9.0
# via -r requirements.in
idna==3.4
idna==3.7
# via requests
jaraco-functools==3.5.2
jaraco-functools==4.0.1
# via tempora
more-itertools==9.0.0
more-itertools==10.2.0
# via jaraco-functools
packaging==23.0
packaging==24.0
# via docker
pyaescrypt==6.1.1
# via -r requirements.in
pycparser==2.21
pycparser==2.22
# via cffi
python-dateutil==2.8.2
python-dateutil==2.9.0.post0
# via croniter
pytz==2022.7.1
pytz==2024.1
# via
# croniter
# tempora
requests==2.31.0
requests==2.32.2
# via
# -r requirements.in
# docker
six==1.16.0
# via python-dateutil
tempora==5.5.1
# via -r requirements.in
urllib3==1.26.14
urllib3==2.2.1
# via
# docker
# requests
websocket-client==1.5.1
websocket-client==1.8.0
# via docker

0 comments on commit 2c207d0

Please sign in to comment.