chore: update pyproject dependencies (#2619)

This commit is contained in:
Pavol Rusnak
2024-09-03 11:09:36 +02:00
committed by GitHub
parent 6341e1edaf
commit ab3eb967b4
7 changed files with 657 additions and 632 deletions

32
flake.lock generated
View File

@ -5,11 +5,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1694529238, "lastModified": 1710146030,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384", "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -26,11 +26,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1698974481, "lastModified": 1703863825,
"narHash": "sha256-yPncV9Ohdz1zPZxYHQf47S8S0VrnhV7nNhCawY46hDA=", "narHash": "sha256-rXwqjtwiGKJheXB43ybM8NwWB8rO2dSRrEqes0S7F5Y=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-github-actions", "repo": "nix-github-actions",
"rev": "4bb5e752616262457bc7ca5882192a564c0472d2", "rev": "5163432afc817cf8bd1f031418d1869e4c9d5547",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -41,16 +41,16 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1702233072, "lastModified": 1723938990,
"narHash": "sha256-H5G2wgbim2Ku6G6w+NSaQaauv6B6DlPhY9fMvArKqRo=", "narHash": "sha256-9tUadhnZQbWIiYVXH8ncfGXGvkNq3Hag4RCBEMUk7MI=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "781e2a9797ecf0f146e81425c822dca69fe4a348", "rev": "c42fcfbdfeae23e68fc520f9182dde9f38ad1890",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "nixos-23.11", "ref": "nixos-24.05",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -66,11 +66,11 @@
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1702334837, "lastModified": 1724134185,
"narHash": "sha256-QZG6+zFshyY+L8m2tlOTm75U5m9y7z01g0josVK+8Os=", "narHash": "sha256-nDqpGjz7cq3ThdC98BPe1ANCNlsJds/LLZ3/MdIXjA0=",
"owner": "nix-community", "owner": "nix-community",
"repo": "poetry2nix", "repo": "poetry2nix",
"rev": "1f4bcbf1be73abc232a972a77102a3e820485a99", "rev": "5ee730a8752264e463c0eaf06cc060fd07f6dae9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -122,11 +122,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1699786194, "lastModified": 1719749022,
"narHash": "sha256-3h3EH1FXQkIeAuzaWB+nK0XK54uSD46pp+dMD3gAcB4=", "narHash": "sha256-ddPKHcqaKCIFSFc/cvxS14goUhCOAwsM1PbMr0ZtHMg=",
"owner": "numtide", "owner": "numtide",
"repo": "treefmt-nix", "repo": "treefmt-nix",
"rev": "e82f32aa7f06bbbd56d7b12186d555223dc399d1", "rev": "8df5ff62195d4e67e2264df0b7f5e8c9995fd0bd",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -2,7 +2,7 @@
description = "LNbits, free and open-source Lightning wallet and accounts system"; description = "LNbits, free and open-source Lightning wallet and accounts system";
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
poetry2nix = { poetry2nix = {
url = "github:nix-community/poetry2nix"; url = "github:nix-community/poetry2nix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -33,22 +33,6 @@
protobuf = prev.protobuf.override { preferWheel = true; }; protobuf = prev.protobuf.override { preferWheel = true; };
ruff = prev.ruff.override { preferWheel = true; }; ruff = prev.ruff.override { preferWheel = true; };
wallycore = prev.wallycore.override { preferWheel = true; }; wallycore = prev.wallycore.override { preferWheel = true; };
# remove the following override when https://github.com/nix-community/poetry2nix/pull/1563 is merged
asgi-lifespan = prev.asgi-lifespan.overridePythonAttrs (
old: { buildInputs = (old.buildInputs or []) ++ [ prev.setuptools ]; }
);
dnspython = prev.dnspython.overridePythonAttrs (
old: { buildInputs = (old.buildInputs or []) ++ [ prev.hatchling ]; }
);
jinja2 = prev.jinja2.overridePythonAttrs (
old: { buildInputs = (old.buildInputs or []) ++ [ prev.flit-core ]; }
);
pytest-md = prev.pytest-md.overridePythonAttrs (
old: { buildInputs = (old.buildInputs or []) ++ [ prev.setuptools ]; }
);
types-mock = prev.pytest-md.overridePythonAttrs (
old: { buildInputs = (old.buildInputs or []) ++ [ prev.setuptools ]; }
);
}); });
}; };
}); });

View File

@ -75,7 +75,7 @@ async def robots():
@generic_router.get("/extensions", name="extensions", response_class=HTMLResponse) @generic_router.get("/extensions", name="extensions", response_class=HTMLResponse)
async def extensions(request: Request, user: User = Depends(check_user_exists)): async def extensions(request: Request, user: User = Depends(check_user_exists)):
try: try:
installed_exts: List["InstallableExtension"] = await get_installed_extensions() installed_exts: List[InstallableExtension] = await get_installed_extensions()
installed_exts_ids = [e.id for e in installed_exts] installed_exts_ids = [e.id for e in installed_exts]
installable_exts = await InstallableExtension.get_installable_extensions() installable_exts = await InstallableExtension.get_installable_extensions()

1143
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -12,51 +12,51 @@ packages = [
] ]
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = "^3.10 | ^3.9" python = "^3.12 | ^3.11 | ^3.10 | ^3.9"
bech32 = "1.2.0" bech32 = "1.2.0"
click = "8.1.7" click = "8.1.7"
ecdsa = "0.18.0" ecdsa = "0.19.0"
fastapi = "0.109.2" fastapi = "0.112.0"
httpx = "0.25.0" httpx = "0.27.0"
jinja2 = "3.1.4" jinja2 = "3.1.4"
lnurl = "0.4.2" lnurl = "0.5.2"
psycopg2-binary = "2.9.7" psycopg2-binary = "2.9.9"
pydantic = "1.10.17" pydantic = "1.10.17"
pyqrcode = "1.2.1" pyqrcode = "1.2.1"
shortuuid = "1.0.11" shortuuid = "1.0.13"
sqlalchemy = "1.3.24" sqlalchemy = "1.3.24"
sqlalchemy-aio = "0.17.0" sqlalchemy-aio = "0.17.0"
sse-starlette = "1.6.5" sse-starlette = "1.8.2"
typing-extensions = "4.8.0" typing-extensions = "4.12.2"
uvicorn = "0.23.2" uvicorn = "0.30.5"
uvloop = "0.19.0" uvloop = "0.19.0"
websockets = "11.0.3" websockets = "11.0.3"
loguru = "0.7.2" loguru = "0.7.2"
grpcio = "1.65.4" grpcio = "1.65.5"
protobuf = "5.26.1" protobuf = "5.27.3"
pyln-client = "24.5" pyln-client = "24.5"
pywebpush = "1.14.0" pywebpush = "1.14.1"
slowapi = "0.1.9" slowapi = "0.1.9"
websocket-client = "1.6.3" websocket-client = "1.8.0"
pycryptodomex = "3.19.1" pycryptodomex = "3.20.0"
packaging = "23.1" packaging = "24.0"
bolt11 = "2.0.6" bolt11 = "2.1.0"
# needed for new login methods: username-password, google-auth, github-auth # needed for new login methods: username-password, google-auth, github-auth
bcrypt = "^4.1.1" bcrypt = "4.2.0"
pyjwt = "^2.8.0" pyjwt = "2.9.0"
passlib = "^1.7.4" passlib = "1.7.4"
itsdangerous = "^2.1.2" itsdangerous = "2.2.0"
fastapi-sso = "^0.9.1" fastapi-sso = "0.15.0"
# needed for boltz, lnurldevice, watchonly extensions # needed for boltz, lnurldevice, watchonly extensions
embit = "0.7.0" embit = "0.8.0"
# needed for cashu, lnurlp, nostrclient, nostrmarket, nostrrelay extensions # needed for cashu, lnurlp, nostrclient, nostrmarket, nostrrelay extensions
secp256k1 = "0.14.0" secp256k1 = "0.14.0"
# keep for backwards compatibility with lnurlp and cashu # keep for backwards compatibility with lnurlp and cashu
environs = "9.5.0" environs = "9.5.0"
# needed for scheduler extension # needed for scheduler extension
python-crontab = "3.0.0" python-crontab = "3.2.0"
# needed for liquid support boltz # needed for liquid support boltz
wallycore = {version = "^1.0.0", optional = true} wallycore = {version = "1.3.0", optional = true}
# needed for breez funding source # needed for breez funding source
breez-sdk = {version = "0.5.2", optional = true} breez-sdk = {version = "0.5.2", optional = true}
@ -65,28 +65,26 @@ breez = ["breez-sdk"]
liquid = ["wallycore"] liquid = ["wallycore"]
[tool.poetry.group.dev.dependencies] [tool.poetry.group.dev.dependencies]
black = "^24.3.0" black = "^24.8.0"
pytest-asyncio = "^0.21.0" # we are stuck with pytest-asyncio 0.21.x because of https://github.com/pytest-dev/pytest-asyncio/issues/706
pytest = "^7.3.2" pytest-asyncio = "^0.21.2"
pytest = "^8.3.2"
pytest-cov = "^4.1.0" pytest-cov = "^4.1.0"
mypy = "^1.5.1" mypy = "^1.11.1"
types-protobuf = "^4.24.0.2" types-protobuf = "^5.27.0.20240626"
pre-commit = "^3.2.2" pre-commit = "^3.8.0"
openapi-spec-validator = "^0.6.0" openapi-spec-validator = "^0.7.1"
ruff = "^0.3.2" ruff = "^0.5.7"
# not our dependency but needed indirectly by openapi-spec-validator types-passlib = "^1.7.7.20240327"
# we want to use 0.10.3 because newer versions are broken on nix openai = "^1.39.0"
rpds-py = "0.10.3" json5 = "^0.9.25"
types-passlib = "^1.7.7.13"
openai = "^1.12.0"
json5 = "^0.9.17"
asgi-lifespan = "^2.1.0" asgi-lifespan = "^2.1.0"
pytest-md = "^0.2.0" pytest-md = "^0.2.0"
pytest-httpserver = "^1.0.10" pytest-httpserver = "^1.1.0"
pytest-mock = "^3.14.0" pytest-mock = "^3.14.0"
types-mock = "^5.1.0.20240311" types-mock = "^5.1.0.20240425"
mock = "^5.1.0" mock = "^5.1.0"
grpcio-tools = "^1.65.4" grpcio-tools = "^1.65.5"
[build-system] [build-system]
requires = ["poetry-core>=1.0.0"] requires = ["poetry-core>=1.0.0"]

View File

@ -26,7 +26,7 @@ def wallet_fixtures_from_json(path) -> List["WalletTest"]:
fn_tests = _tests_for_function(funding_sources, fn_name, fn) fn_tests = _tests_for_function(funding_sources, fn_name, fn)
_merge_dict_of_lists(tests, fn_tests) _merge_dict_of_lists(tests, fn_tests)
all_tests: list["WalletTest"] = functools.reduce( all_tests: list[WalletTest] = functools.reduce(
operator.iadd, [tests[fs_name] for fs_name in tests], [] operator.iadd, [tests[fs_name] for fs_name in tests], []
) )
return all_tests return all_tests

View File

@ -18,7 +18,7 @@ assert os.getenv("OPENAI_API_KEY"), "OPENAI_API_KEY env var not set"
def load_language(lang: str) -> dict: def load_language(lang: str) -> dict:
s = open(f"lnbits/static/i18n/{lang}.js").read() s = open(f"lnbits/static/i18n/{lang}.js").read()
prefix = "window.localisation.%s = {\n" % lang prefix = f"window.localisation.{lang} = {{\n"
assert s.startswith(prefix) assert s.startswith(prefix)
s = s[len(prefix) - 2 :] s = s[len(prefix) - 2 :]
json = json5.loads(s) json = json5.loads(s)
@ -28,15 +28,15 @@ def load_language(lang: str) -> dict:
def save_language(lang: str, data) -> None: def save_language(lang: str, data) -> None:
with open(f"lnbits/static/i18n/{lang}.js", "w") as f: with open(f"lnbits/static/i18n/{lang}.js", "w") as f:
f.write("window.localisation.%s = {\n" % lang) f.write(f"window.localisation.{lang} = {{\n")
row = 0 row = 0
for k, v in data.items(): for k, v in data.items():
row += 1 row += 1
f.write(" %s:\n" % k) f.write(f" {k}:\n")
if "'" in v: if "'" in v:
f.write(' "%s"' % v) f.write(f' "{v}"')
else: else:
f.write(" '%s'" % v) f.write(f" '{v}'")
if row == len(data): if row == len(data):
f.write("\n") f.write("\n")
else: else: