From 6a0554fe2592dab8896a2e8c7bb5c077aaba9e6e Mon Sep 17 00:00:00 2001 From: Scott Searcy Date: Mon, 30 Oct 2023 13:18:29 -0700 Subject: [PATCH] Package updates --- .pre-commit-config.yaml | 4 +-- meshinfo/collector.py | 1 - meshinfo/config.py | 4 ++- meshinfo/views/home.py | 1 - meshinfo/views/iperf.py | 1 - mypy.ini | 3 --- pyproject.toml | 10 +++---- requirements.txt | 58 ++++++++++++++++++++++------------------- tests/conftest.py | 1 - 9 files changed, 41 insertions(+), 42 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e5c1064..2c74908 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: check-toml - id: check-yaml @@ -8,7 +8,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/psf/black - rev: 22.12.0 + rev: 23.10.1 hooks: - id: black 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/config.py b/meshinfo/config.py index 4041af2..21ea30d 100644 --- a/meshinfo/config.py +++ b/meshinfo/config.py @@ -166,7 +166,9 @@ def configure( # configure logging configure_logging(app_config.log_level) - logger.debug("Application configuration", **attrs.asdict(app_config)) + logger.debug( + "Application configuration", **attrs.asdict(app_config) # type: ignore + ) # configure Pyramid application config = Configurator(settings=settings) 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/mypy.ini b/mypy.ini index e8a3ee3..639d41e 100644 --- a/mypy.ini +++ b/mypy.ini @@ -3,9 +3,6 @@ [mypy-appdirs.*] ignore_missing_imports = True -[mypy-environ.*] -ignore_missing_imports = True - [mypy-hupper.*] ignore_missing_imports = True diff --git a/pyproject.toml b/pyproject.toml index 59123ee..4e1d478 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,9 +20,9 @@ classifiers = [ dependencies = [ "aiohttp ~= 3.8", "alembic ~= 1.8", - "attrs ~= 22.1", - "environ-config ~= 22.1", - "gunicorn ~= 20.1", + "attrs ~= 23.1", + "environ-config ~= 23.2", + "gunicorn ~= 21.2", "pendulum ~= 2.1", "platformdirs ~= 2.0", "psycopg2 ~= 2.9", @@ -34,7 +34,7 @@ dependencies = [ "python-dotenv ~= 0.20", "rich ~= 13.3", "rrdtool", - "structlog ~= 22.3", + "structlog ~= 23.2", "sqlalchemy ~= 1.4", "transaction ~= 3.0", "zope.sqlalchemy ~= 1.6", @@ -55,7 +55,7 @@ tests = [ "WebTest", "flake8-bugbear", "flake8", - "mypy", + "mypy ~= 1.5.1", "pytest-asyncio", "pytest-cov", "pytest-mock", diff --git a/requirements.txt b/requirements.txt index 03ba55d..67be8d1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,69 +4,71 @@ # # pip-compile --output-file=requirements.txt pyproject.toml # -aiohttp==3.8.3 +aiohttp==3.8.6 # via mesh-info (pyproject.toml) aiosignal==1.3.1 # via aiohttp -alembic==1.8.1 +alembic==1.12.1 # via mesh-info (pyproject.toml) -async-timeout==4.0.2 +async-timeout==4.0.3 # via aiohttp -attrs==22.1.0 +attrs==23.1.0 # via # aiohttp # environ-config # mesh-info (pyproject.toml) -charset-normalizer==2.1.1 +charset-normalizer==3.3.1 # via aiohttp -environ-config==22.1.0 +environ-config==23.2.0 # via mesh-info (pyproject.toml) -frozenlist==1.3.3 +frozenlist==1.4.0 # via # aiohttp # aiosignal -greenlet==2.0.1 +greenlet==3.0.1 # via sqlalchemy -gunicorn==20.1.0 +gunicorn==21.2.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.2 + # via gunicorn 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.9 # via mesh-info (pyproject.toml) -pygments==2.14.0 +pygments==2.16.1 # via rich -pyramid==2.0 +pyramid==2.0.2 # 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.6.0 # 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.50 # via # alembic # mesh-info (pyproject.toml) # zope-sqlalchemy -structlog==22.3.0 +structlog==23.2.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.8.0 + # 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.1 # via # pyramid # pyramid-retry 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}"