[wip] use Python 3.11 & update all dependencies
This commit is contained in:
parent
7823708383
commit
13b65103fd
4 changed files with 439 additions and 410 deletions
11
Dockerfile
11
Dockerfile
|
|
@ -1,4 +1,4 @@
|
||||||
FROM docker.io/library/python:3.10-alpine
|
FROM docker.io/library/python:3.11-alpine
|
||||||
|
|
||||||
RUN apk update --no-cache \
|
RUN apk update --no-cache \
|
||||||
&& apk upgrade --no-cache \
|
&& apk upgrade --no-cache \
|
||||||
|
|
@ -11,13 +11,8 @@ WORKDIR /var/app
|
||||||
|
|
||||||
COPY requirements.txt ./
|
COPY requirements.txt ./
|
||||||
|
|
||||||
# Required to build greenlet on Alpine, dependency of SQLAlchemy 1.4.
|
RUN pip install --no-cache-dir --upgrade \
|
||||||
RUN apk add --no-cache \
|
--requirement requirements.txt
|
||||||
--virtual .build-deps \
|
|
||||||
g++ gcc musl-dev \
|
|
||||||
&& pip install --no-cache-dir --upgrade \
|
|
||||||
--requirement requirements.txt \
|
|
||||||
&& apk del .build-deps
|
|
||||||
|
|
||||||
USER 10000:10001
|
USER 10000:10001
|
||||||
|
|
||||||
|
|
|
||||||
811
poetry.lock
generated
811
poetry.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -6,21 +6,20 @@ authors = ["ducklet <ducklet@noreply.code.dumpr.org>"]
|
||||||
license = "LOL"
|
license = "LOL"
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = "^3.10"
|
python = "^3.11"
|
||||||
requests = "^2.25.1"
|
requests = "^2.25.1"
|
||||||
beautifulsoup4 = "^4.9.3"
|
beautifulsoup4 = "^4.9.3"
|
||||||
html5lib = "^1.1"
|
html5lib = "^1.1"
|
||||||
starlette = "^0.17.0"
|
starlette = "^0.23.1"
|
||||||
ulid-py = "^1.1.0"
|
ulid-py = "^1.1.0"
|
||||||
databases = {extras = ["sqlite"], version = "^0.6.1"}
|
databases = {extras = ["sqlite"], version = "^0.7.0"}
|
||||||
toml = "^0.10.2"
|
uvicorn = "^0.20.0"
|
||||||
uvicorn = "^0.19.0"
|
|
||||||
|
|
||||||
[tool.poetry.group.fixes.dependencies]
|
# [tool.poetry.group.fixes.dependencies]
|
||||||
# `databases` is having issues with new versions of SQLAlchemy 1.4,
|
# # `databases` is having issues with new versions of SQLAlchemy 1.4,
|
||||||
# and `greenlet` is also always a pain.
|
# # and `greenlet` is also always a pain.
|
||||||
SQLAlchemy = "1.4.25"
|
# SQLAlchemy = "1.4.25"
|
||||||
greenlet = "1.1.2"
|
# greenlet = "1.1.2"
|
||||||
|
|
||||||
[tool.poetry.group.dev]
|
[tool.poetry.group.dev]
|
||||||
optional = true
|
optional = true
|
||||||
|
|
@ -37,4 +36,4 @@ requires = ["poetry-core>=1.0.0"]
|
||||||
build-backend = "poetry.core.masonry.api"
|
build-backend = "poetry.core.masonry.api"
|
||||||
|
|
||||||
[tool.pyright]
|
[tool.pyright]
|
||||||
pythonVersion = "3.10"
|
pythonVersion = "3.11"
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
import os
|
import os
|
||||||
|
import tomllib
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import toml
|
|
||||||
|
|
||||||
datadir = Path(os.getenv("UNWIND_DATA") or "./data")
|
datadir = Path(os.getenv("UNWIND_DATA") or "./data")
|
||||||
cachedir = (
|
cachedir = (
|
||||||
Path(cachedir)
|
Path(cachedir)
|
||||||
|
|
@ -14,7 +13,8 @@ loglevel = os.getenv("UNWIND_LOGLEVEL") or ("DEBUG" if debug else "INFO")
|
||||||
storage_path = os.getenv("UNWIND_STORAGE", datadir / "db.sqlite")
|
storage_path = os.getenv("UNWIND_STORAGE", datadir / "db.sqlite")
|
||||||
config_path = os.getenv("UNWIND_CONFIG", datadir / "config.toml")
|
config_path = os.getenv("UNWIND_CONFIG", datadir / "config.toml")
|
||||||
|
|
||||||
_config = toml.load(config_path)
|
with open(config_path, "rb") as fd:
|
||||||
|
_config = tomllib.load(fd)
|
||||||
|
|
||||||
api_base = _config["api"].get("base", "/api/")
|
api_base = _config["api"].get("base", "/api/")
|
||||||
api_cors = _config["api"].get("cors", "*")
|
api_cors = _config["api"].get("cors", "*")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue