backup: Remove tqdm dependency

This commit is contained in:
Christian Decker
2024-03-01 17:32:12 +01:00
parent 889671d2f6
commit cd23955824
4 changed files with 110 additions and 132 deletions

View File

@@ -4,7 +4,6 @@ import re
from typing import Iterator
import sqlite3
from tqdm import tqdm
# A 'transaction' that was proposed by Core-Lightning and that needs saving to the
# backup. `version` is the `data_version` of the database **after** `transaction`
@@ -117,7 +116,7 @@ class Backend(object):
os.unlink(dest)
self.db = self._db_open(dest)
for c in tqdm(self.stream_changes(), total=self.version_count):
for c in self.stream_changes():
if c.snapshot is not None:
self._restore_snapshot(c.snapshot, dest)
if c.transaction is not None:

24
backup/poetry.lock generated
View File

@@ -1,4 +1,4 @@
# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand.
# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand.
[[package]]
name = "asn1crypto"
@@ -1286,26 +1286,6 @@ files = [
{file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"},
]
[[package]]
name = "tqdm"
version = "4.66.2"
description = "Fast, Extensible Progress Meter"
optional = false
python-versions = ">=3.7"
files = [
{file = "tqdm-4.66.2-py3-none-any.whl", hash = "sha256:1ee4f8a893eb9bef51c6e35730cebf234d5d0b6bd112b0271e10ed7c24a02bd9"},
{file = "tqdm-4.66.2.tar.gz", hash = "sha256:6cd52cdf0fef0e0f543299cfc96fec90d7b8a7e88745f411ec33eb44d5ed3531"},
]
[package.dependencies]
colorama = {version = "*", markers = "platform_system == \"Windows\""}
[package.extras]
dev = ["pytest (>=6)", "pytest-cov", "pytest-timeout", "pytest-xdist"]
notebook = ["ipywidgets (>=6)"]
slack = ["slack-sdk"]
telegram = ["requests"]
[[package]]
name = "urllib3"
version = "2.2.1"
@@ -1358,4 +1338,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p
[metadata]
lock-version = "2.0"
python-versions = "^3.8"
content-hash = "5256b68c1062a14cd62b0ce54a94fd63377edea3254eccd8510723bce9be2147"
content-hash = "e59d05fada74579af539cb7c9733678f8bc916188596aefb609e4d8e05cde293"

View File

@@ -8,7 +8,6 @@ authors = ["Christian Decker <decker@blockstream.com>"]
python = "^3.8"
pyln-client = "^23.11"
click = "^8.0.4"
tqdm = "^4.62.3"
psutil = "^5.9.4"
flask = "^2.2"
werkzeug = "<3"