diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e5c1064..699fa8c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/psf/black - rev: 22.12.0 + rev: 23.3.0 hooks: - id: black diff --git a/Makefile b/Makefile index 7f45184..5ec9a70 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ migrate-db: alembic upgrade head requirements: - pip-compile -o requirements.txt pyproject.toml + pip-compile --resolver backtracking -o requirements.txt pyproject.toml update-deps: pre-commit autoupdate diff --git a/meshinfo/collector.py b/meshinfo/collector.py index 705aa0b..8a5c649 100644 --- a/meshinfo/collector.py +++ b/meshinfo/collector.py @@ -113,7 +113,6 @@ class ServiceError(Exception): async def service(collect, *, polling_period: int, max_retries: int = 5): - run_period_seconds = polling_period * 60 connection_failures = 0 while True: diff --git a/meshinfo/views/home.py b/meshinfo/views/home.py index 42c44a4..1d79d5b 100644 --- a/meshinfo/views/home.py +++ b/meshinfo/views/home.py @@ -14,7 +14,6 @@ @view_config(route_name="home", renderer="pages/home.jinja2") def overview(request: Request): - dbsession: Session = request.dbsession node_count = ( diff --git a/meshinfo/views/iperf.py b/meshinfo/views/iperf.py index 5bd17bf..7773ddd 100644 --- a/meshinfo/views/iperf.py +++ b/meshinfo/views/iperf.py @@ -10,7 +10,6 @@ @view_config(route_name="iperf-tool", renderer="pages/iperf.jinja2") def overview(request: Request): - dbsession: Session = request.dbsession nodes = dbsession.query(Node).filter(Node.status != NodeStatus.INACTIVE).all() diff --git a/pyproject.toml b/pyproject.toml index 59123ee..bedaeeb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,7 @@ dependencies = [ "structlog ~= 22.3", "sqlalchemy ~= 1.4", "transaction ~= 3.0", - "zope.sqlalchemy ~= 1.6", + "zope.sqlalchemy ~= 3.0", ] dynamic = ["version"] diff --git a/requirements.txt b/requirements.txt index 03ba55d..62ae6ab 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,22 +2,22 @@ # This file is autogenerated by pip-compile with Python 3.11 # by the following command: # -# pip-compile --output-file=requirements.txt pyproject.toml +# pip-compile --output-file=requirements.txt --resolver=backtracking pyproject.toml # -aiohttp==3.8.3 +aiohttp==3.8.4 # via mesh-info (pyproject.toml) aiosignal==1.3.1 # via aiohttp -alembic==1.8.1 +alembic==1.11.1 # via mesh-info (pyproject.toml) async-timeout==4.0.2 # via aiohttp -attrs==22.1.0 +attrs==22.2.0 # via # aiohttp # environ-config # mesh-info (pyproject.toml) -charset-normalizer==2.1.1 +charset-normalizer==3.1.0 # via aiohttp environ-config==22.1.0 # via mesh-info (pyproject.toml) @@ -25,48 +25,50 @@ frozenlist==1.3.3 # via # aiohttp # aiosignal -greenlet==2.0.1 +greenlet==2.0.2 # via sqlalchemy gunicorn==20.1.0 # via mesh-info (pyproject.toml) -hupper==1.10.3 +hupper==1.12 # via pyramid idna==3.4 # via yarl jinja2==3.1.2 # via pyramid-jinja2 -mako==1.2.3 +mako==1.2.4 # via alembic -markdown-it-py==2.2.0 +markdown-it-py==3.0.0 # via rich -markupsafe==2.1.1 +markupsafe==2.1.3 # via # jinja2 # mako # pyramid-jinja2 mdurl==0.1.2 # via markdown-it-py -multidict==6.0.2 +multidict==6.0.4 # via # aiohttp # yarl +packaging==23.1 + # via zope-sqlalchemy pastedeploy==3.0.1 # via plaster-pastedeploy pendulum==2.1.2 # via mesh-info (pyproject.toml) -plaster==1.1 +plaster==1.1.2 # via # plaster-pastedeploy # pyramid plaster-pastedeploy==1.0.1 # via pyramid -platformdirs==2.5.3 +platformdirs==2.6.2 # via mesh-info (pyproject.toml) -psycopg2==2.9.5 +psycopg2==2.9.6 # via mesh-info (pyproject.toml) -pygments==2.14.0 +pygments==2.15.1 # via rich -pyramid==2.0 +pyramid==2.0.1 # via # mesh-info (pyproject.toml) # pyramid-jinja2 @@ -83,43 +85,45 @@ pyramid-tm==2.5 # via mesh-info (pyproject.toml) python-dateutil==2.8.2 # via pendulum -python-dotenv==0.21.0 +python-dotenv==0.21.1 # via mesh-info (pyproject.toml) pytzdata==2020.1 # via pendulum -rich==13.3.2 +rich==13.4.2 # via mesh-info (pyproject.toml) rrdtool==0.1.16 # via mesh-info (pyproject.toml) six==1.16.0 # via python-dateutil -sqlalchemy==1.4.43 +sqlalchemy==1.4.48 # via # alembic # mesh-info (pyproject.toml) # zope-sqlalchemy structlog==22.3.0 # via mesh-info (pyproject.toml) -transaction==3.0.1 +transaction==3.1.0 # via # mesh-info (pyproject.toml) # pyramid-tm # zope-sqlalchemy translationstring==1.4 # via pyramid +typing-extensions==4.6.3 + # via alembic venusian==3.0.0 # via pyramid webob==1.8.7 # via pyramid wired==0.3 # via pyramid-services -yarl==1.8.1 +yarl==1.9.2 # via aiohttp -zope-deprecation==4.4.0 +zope-deprecation==5.0 # via # pyramid # pyramid-jinja2 -zope-interface==5.5.1 +zope-interface==6.0 # via # pyramid # pyramid-retry @@ -127,7 +131,7 @@ zope-interface==5.5.1 # transaction # wired # zope-sqlalchemy -zope-sqlalchemy==1.6 +zope-sqlalchemy==3.0 # via mesh-info (pyproject.toml) # The following packages are considered to be unsafe in a requirements file: diff --git a/tests/conftest.py b/tests/conftest.py index c98c82c..1bdbe85 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -43,7 +43,6 @@ def app_config(): @pytest.fixture(params=("sqlite", "postgres")) def dbengine(request, tmp_path): - if request.param == "sqlite": sqlite_file = tmp_path / "testing.sqlite" db_url = f"sqlite:///{sqlite_file!s}"