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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 657 additions and 632 deletions

View File

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

View File

@ -2,7 +2,7 @@
description = "LNbits, free and open-source Lightning wallet and accounts system";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
poetry2nix = {
url = "github:nix-community/poetry2nix";
inputs.nixpkgs.follows = "nixpkgs";
@ -33,22 +33,6 @@
protobuf = prev.protobuf.override { preferWheel = true; };
ruff = prev.ruff.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)
async def extensions(request: Request, user: User = Depends(check_user_exists)):
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]
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]
python = "^3.10 | ^3.9"
python = "^3.12 | ^3.11 | ^3.10 | ^3.9"
bech32 = "1.2.0"
click = "8.1.7"
ecdsa = "0.18.0"
fastapi = "0.109.2"
httpx = "0.25.0"
ecdsa = "0.19.0"
fastapi = "0.112.0"
httpx = "0.27.0"
jinja2 = "3.1.4"
lnurl = "0.4.2"
psycopg2-binary = "2.9.7"
lnurl = "0.5.2"
psycopg2-binary = "2.9.9"
pydantic = "1.10.17"
pyqrcode = "1.2.1"
shortuuid = "1.0.11"
shortuuid = "1.0.13"
sqlalchemy = "1.3.24"
sqlalchemy-aio = "0.17.0"
sse-starlette = "1.6.5"
typing-extensions = "4.8.0"
uvicorn = "0.23.2"
sse-starlette = "1.8.2"
typing-extensions = "4.12.2"
uvicorn = "0.30.5"
uvloop = "0.19.0"
websockets = "11.0.3"
loguru = "0.7.2"
grpcio = "1.65.4"
protobuf = "5.26.1"
grpcio = "1.65.5"
protobuf = "5.27.3"
pyln-client = "24.5"
pywebpush = "1.14.0"
pywebpush = "1.14.1"
slowapi = "0.1.9"
websocket-client = "1.6.3"
pycryptodomex = "3.19.1"
packaging = "23.1"
bolt11 = "2.0.6"
websocket-client = "1.8.0"
pycryptodomex = "3.20.0"
packaging = "24.0"
bolt11 = "2.1.0"
# needed for new login methods: username-password, google-auth, github-auth
bcrypt = "^4.1.1"
pyjwt = "^2.8.0"
passlib = "^1.7.4"
itsdangerous = "^2.1.2"
fastapi-sso = "^0.9.1"
bcrypt = "4.2.0"
pyjwt = "2.9.0"
passlib = "1.7.4"
itsdangerous = "2.2.0"
fastapi-sso = "0.15.0"
# needed for boltz, lnurldevice, watchonly extensions
embit = "0.7.0"
embit = "0.8.0"
# needed for cashu, lnurlp, nostrclient, nostrmarket, nostrrelay extensions
secp256k1 = "0.14.0"
# keep for backwards compatibility with lnurlp and cashu
environs = "9.5.0"
# needed for scheduler extension
python-crontab = "3.0.0"
python-crontab = "3.2.0"
# needed for liquid support boltz
wallycore = {version = "^1.0.0", optional = true}
wallycore = {version = "1.3.0", optional = true}
# needed for breez funding source
breez-sdk = {version = "0.5.2", optional = true}
@ -65,28 +65,26 @@ breez = ["breez-sdk"]
liquid = ["wallycore"]
[tool.poetry.group.dev.dependencies]
black = "^24.3.0"
pytest-asyncio = "^0.21.0"
pytest = "^7.3.2"
black = "^24.8.0"
# we are stuck with pytest-asyncio 0.21.x because of https://github.com/pytest-dev/pytest-asyncio/issues/706
pytest-asyncio = "^0.21.2"
pytest = "^8.3.2"
pytest-cov = "^4.1.0"
mypy = "^1.5.1"
types-protobuf = "^4.24.0.2"
pre-commit = "^3.2.2"
openapi-spec-validator = "^0.6.0"
ruff = "^0.3.2"
# not our dependency but needed indirectly by openapi-spec-validator
# we want to use 0.10.3 because newer versions are broken on nix
rpds-py = "0.10.3"
types-passlib = "^1.7.7.13"
openai = "^1.12.0"
json5 = "^0.9.17"
mypy = "^1.11.1"
types-protobuf = "^5.27.0.20240626"
pre-commit = "^3.8.0"
openapi-spec-validator = "^0.7.1"
ruff = "^0.5.7"
types-passlib = "^1.7.7.20240327"
openai = "^1.39.0"
json5 = "^0.9.25"
asgi-lifespan = "^2.1.0"
pytest-md = "^0.2.0"
pytest-httpserver = "^1.0.10"
pytest-httpserver = "^1.1.0"
pytest-mock = "^3.14.0"
types-mock = "^5.1.0.20240311"
types-mock = "^5.1.0.20240425"
mock = "^5.1.0"
grpcio-tools = "^1.65.4"
grpcio-tools = "^1.65.5"
[build-system]
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)
_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], []
)
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:
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)
s = s[len(prefix) - 2 :]
json = json5.loads(s)
@ -28,15 +28,15 @@ def load_language(lang: str) -> dict:
def save_language(lang: str, data) -> None:
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
for k, v in data.items():
row += 1
f.write(" %s:\n" % k)
f.write(f" {k}:\n")
if "'" in v:
f.write(' "%s"' % v)
f.write(f' "{v}"')
else:
f.write(" '%s'" % v)
f.write(f" '{v}'")
if row == len(data):
f.write("\n")
else: