From bdabd4b7b768fc4906b191b1dc10d55d6ce3ac70 Mon Sep 17 00:00:00 2001 From: Joe Black Date: Wed, 29 Mar 2023 16:44:15 -0400 Subject: [PATCH] 3.0.2 --- pyproject.toml | 16 ++--- src/quart_sqlalchemy/__init__.py | 2 +- .../framework/expectations_test.py | 60 ------------------- 3 files changed, 9 insertions(+), 69 deletions(-) delete mode 100644 tests/integration/framework/expectations_test.py diff --git a/pyproject.toml b/pyproject.toml index 89feb7a..8e2348c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,20 +1,20 @@ [project] name = "quart-sqlalchemy" -version = "3.0.1" +version = "3.0.2" description = "SQLAlchemy for humans, with framework adapter for Quart." authors = [ {name = "Joe Black", email = "me@joeblack.nyc"}, ] dependencies = [ - "quart~=0.18.3", + "quart>=0.18.3", "SQLAlchemy[asyncio]>=1.4.35, <2.1.0", "SQLAlchemy-Utils", - "anyio~=3.3.4", + "anyio", "aiosqlite", "pydantic", - "tenacity>=8.2.2", - "sqlapagination<=0.0.1", - "exceptiongroup<=1.1.1" + "tenacity", + "sqlapagination", + "exceptiongroup" ] requires-python = ">=3.7" readme = "README.rst" @@ -31,11 +31,11 @@ build-backend = "setuptools.build_meta" [project.optional-dependencies] tests = [ - "pytest~=7.2.1", + "pytest", # "pytest-asyncio~=0.20.3", # "pytest-asyncio @ https://github.com/joeblackwaslike/pytest-asyncio/releases/download/v0.20.4.dev42/pytest_asyncio-0.20.4.dev42-py3-none-any.whl", "pytest-asyncio @ https://github.com/joeblackwaslike/pytest-asyncio/releases/download/v0.20.4.dev43/pytest_asyncio-0.20.4.dev43-py3-none-any.whl", - "pytest-mock~=3.10.0", + "pytest-mock", "pytest-cov", "coverage[toml]", ] diff --git a/src/quart_sqlalchemy/__init__.py b/src/quart_sqlalchemy/__init__.py index 81ad988..b85cd50 100644 --- a/src/quart_sqlalchemy/__init__.py +++ b/src/quart_sqlalchemy/__init__.py @@ -1,4 +1,4 @@ -__version__ = "3.0.1" +__version__ = "3.0.2" from .bind import AsyncBind from .bind import Bind diff --git a/tests/integration/framework/expectations_test.py b/tests/integration/framework/expectations_test.py deleted file mode 100644 index a0cea7a..0000000 --- a/tests/integration/framework/expectations_test.py +++ /dev/null @@ -1,60 +0,0 @@ -import logging - -import pytest -import quart.flask_patch -from quart import Quart -from quart import signals -from starlette.testclient import TestClient - - -logger = logging.getLogger(__name__) - -app = Quart(__name__) -app.config.from_mapping({"TESTING": True}) - -custom_signal = signals._signals.signal("custom-signal") - - -@app.before_request -async def on_before_request(): - print("hi from before request handler") - events.append("on_before_request") - - -@app.route("/", methods=["GET"]) -async def index(): - await custom_signal.send(1) - return dict() - - -@custom_signal.connect -async def signal_handler(sender): - print("hi from signal handler") - events.append("signal_handler") - - -events = [] - - -class TestTestClientExpectations: - @pytest.fixture - def events_manager(self): - events.clear() - yield events - events.clear() - - @pytest.fixture - def test_client(self): - with TestClient( - app, - base_url="http://localhost", - headers={"Content-Type": "application/json"}, - ) as client: - yield client - - def test_starlette_test_client_fires_handlers(self, events_manager, test_client): - response = test_client.get("/") - assert response.status_code == 200 - - assert "on_before_request" in events_manager - assert "signal_handler" in events_manager