Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-quart-trio for
openSUSE:Factory checked in at 2025-02-14 19:19:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-quart-trio (Old)
and /work/SRC/openSUSE:Factory/.python-quart-trio.new.8181 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-quart-trio"
Fri Feb 14 19:19:43 2025 rev:3 rq:1245673 version:0.12.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-quart-trio/python-quart-trio.changes
2024-09-20 17:13:01.122248230 +0200
+++
/work/SRC/openSUSE:Factory/.python-quart-trio.new.8181/python-quart-trio.changes
2025-02-14 19:19:43.783794898 +0100
@@ -1,0 +2,11 @@
+Thu Feb 13 12:04:02 UTC 2025 - John Paul Adrian Glaubitz
<[email protected]>
+
+- Update to 0.12.0
+ * Forward task_status to hypercorn.
+ * Support Python 3.13, and 3.12 drop Python 3.8 and 3.7.
+- Switch package to modern Python Stack on SLE-15
+ * Use Python 3.11 on SLE-15 by default
+ * Drop support for older Python versions
+- Update BuildRequires from pyproject.toml
+
+-------------------------------------------------------------------
Old:
----
quart_trio-0.11.1.tar.gz
New:
----
quart_trio-0.12.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-quart-trio.spec ++++++
--- /var/tmp/diff_new_pack.YigH3k/_old 2025-02-14 19:19:45.227854678 +0100
+++ /var/tmp/diff_new_pack.YigH3k/_new 2025-02-14 19:19:45.231854844 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-quart-trio
#
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,9 +16,9 @@
#
-%define skip_python310 1
+%{?sle15_python_module_pythons}
Name: python-quart-trio
-Version: 0.11.1
+Version: 0.12.0
Release: 0
Summary: A Quart extension to provide trio support
License: MIT
@@ -26,8 +26,8 @@
Source:
https://github.com/pgjones/quart-trio/archive/refs/tags/%{version}.tar.gz#/quart_trio-%{version}.tar.gz
BuildRequires: %{python_module Quart >= 0.19}
BuildRequires: %{python_module exceptiongroup}
+BuildRequires: %{python_module pdm-backend}
BuildRequires: %{python_module pip}
-BuildRequires: %{python_module poetry-core >= 1.0.0}
BuildRequires: %{python_module pytest-cov}
BuildRequires: %{python_module pytest-trio}
BuildRequires: %{python_module pytest}
++++++ quart_trio-0.11.1.tar.gz -> quart_trio-0.12.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/quart-trio-0.11.1/.github/workflows/ci.yml
new/quart-trio-0.12.0/.github/workflows/ci.yml
--- old/quart-trio-0.11.1/.github/workflows/ci.yml 2023-11-19
23:22:42.000000000 +0100
+++ new/quart-trio-0.12.0/.github/workflows/ci.yml 2025-01-09
22:04:35.000000000 +0100
@@ -10,33 +10,31 @@
tox:
name: ${{ matrix.name }}
runs-on: ubuntu-latest
+
+ container: python:${{ matrix.python }}
+
strategy:
fail-fast: false
matrix:
include:
+ - {name: '3.13', python: '3.13', tox: py313}
- {name: '3.12', python: '3.12', tox: py312}
- {name: '3.11', python: '3.11', tox: py311}
- {name: '3.10', python: '3.10', tox: py310}
- {name: '3.9', python: '3.9', tox: py39}
- - {name: '3.8', python: '3.8', tox: py38}
- - {name: 'format', python: '3.12', tox: format}
- - {name: 'mypy', python: '3.12', tox: mypy}
- - {name: 'pep8', python: '3.12', tox: pep8}
- - {name: 'package', python: '3.12', tox: package}
+ - {name: 'format', python: '3.13', tox: format}
+ - {name: 'mypy', python: '3.13', tox: mypy}
+ - {name: 'pep8', python: '3.13', tox: pep8}
+ - {name: 'package', python: '3.13', tox: package}
steps:
- - uses: actions/checkout@v3
-
- - uses: actions/setup-python@v3
+ - uses: pgjones/actions/tox@v1
with:
- python-version: ${{ matrix.python }}
+ environment: ${{ matrix.tox }}
- - name: update pip
- run: |
- pip install -U wheel
- pip install -U setuptools
- python -m pip install -U pip
-
- - run: pip install tox
+ zizmor:
+ name: Zizmor
+ runs-on: ubuntu-latest
- - run: tox -e ${{ matrix.tox }}
+ steps:
+ - uses: pgjones/actions/zizmor@v1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/quart-trio-0.11.1/.github/workflows/publish.yml
new/quart-trio-0.12.0/.github/workflows/publish.yml
--- old/quart-trio-0.11.1/.github/workflows/publish.yml 2023-11-19
23:22:42.000000000 +0100
+++ new/quart-trio-0.12.0/.github/workflows/publish.yml 2025-01-09
22:04:35.000000000 +0100
@@ -7,18 +7,7 @@
build:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
-
- - uses: actions/setup-python@v3
- with:
- python-version: 3.12
-
- - run: |
- pip install poetry
- poetry build
- - uses: actions/upload-artifact@v3
- with:
- path: ./dist
+ - uses: pgjones/actions/build@v1
pypi-publish:
needs: ['build']
@@ -30,9 +19,9 @@
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- - uses: actions/download-artifact@v3
+ - uses: actions/download-artifact@v4
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
- packages_dir: artifact/
+ packages-dir: artifact/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/quart-trio-0.11.1/.gitignore
new/quart-trio-0.12.0/.gitignore
--- old/quart-trio-0.11.1/.gitignore 2023-11-19 23:22:42.000000000 +0100
+++ new/quart-trio-0.12.0/.gitignore 2025-01-09 22:04:35.000000000 +0100
@@ -12,4 +12,4 @@
.coverage
.pytest_cache/
dist/
-poetry.lock
+pdm.lock
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/quart-trio-0.11.1/.readthedocs.yaml
new/quart-trio-0.12.0/.readthedocs.yaml
--- old/quart-trio-0.11.1/.readthedocs.yaml 2023-11-19 23:22:42.000000000
+0100
+++ new/quart-trio-0.12.0/.readthedocs.yaml 2025-01-09 22:04:35.000000000
+0100
@@ -1,9 +1,9 @@
version: 2
build:
- os: ubuntu-22.04
+ os: ubuntu-24.04
tools:
- python: "3.12"
+ python: "3.13"
python:
install:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/quart-trio-0.11.1/CHANGELOG.rst
new/quart-trio-0.12.0/CHANGELOG.rst
--- old/quart-trio-0.11.1/CHANGELOG.rst 2023-11-19 23:22:42.000000000 +0100
+++ new/quart-trio-0.12.0/CHANGELOG.rst 2025-01-09 22:04:35.000000000 +0100
@@ -1,3 +1,9 @@
+0.12.0 2025-01-09
+-----------------
+
+* Forward task_status to hypercorn.
+* Support Python 3.13, and 3.12 drop Python 3.8 and 3.7.
+
0.11.1 2023-11-19
-----------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/quart-trio-0.11.1/docs/tutorials/installation.rst
new/quart-trio-0.12.0/docs/tutorials/installation.rst
--- old/quart-trio-0.11.1/docs/tutorials/installation.rst 2023-11-19
23:22:42.000000000 +0100
+++ new/quart-trio-0.12.0/docs/tutorials/installation.rst 2025-01-09
22:04:35.000000000 +0100
@@ -3,7 +3,7 @@
Installation
============
-Quart-Trio is only compatible with Python 3.8 or higher and can be
+Quart-Trio is only compatible with Python 3.9 or higher and can be
installed using pip or your favorite python package manager.
.. code-block:: sh
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/quart-trio-0.11.1/pyproject.toml
new/quart-trio-0.12.0/pyproject.toml
--- old/quart-trio-0.11.1/pyproject.toml 2023-11-19 23:22:42.000000000
+0100
+++ new/quart-trio-0.12.0/pyproject.toml 2025-01-09 22:04:35.000000000
+0100
@@ -1,8 +1,10 @@
-[tool.poetry]
+[project]
name = "quart-trio"
-version = "0.11.1"
+version = "0.12.0"
description = "A Quart extension to provide trio support"
-authors = ["pgjones <[email protected]>"]
+authors = [
+ {name = "pgjones", email = "[email protected]"},
+]
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Web Environment",
@@ -11,22 +13,32 @@
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
- "Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
+ "Programming Language :: Python :: 3.13",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Software Development :: Libraries :: Python Modules",
]
include = ["src/quart_trio/py.typed"]
-license = "MIT"
+license = {text = "MIT"}
readme = "README.rst"
repository = "https://github.com/pgjones/quart-trio/"
+dependencies = [
+ "exceptiongroup >= 1.1.0; python_version < '3.11'",
+ "hypercorn[trio] >= 0.12.0",
+ "quart >= 0.19",
+ "trio >= 0.19.0",
+]
+requires-python = ">=3.9"
+
+[project.optional-dependencies]
+docs = ["pydata_sphinx_theme"]
[tool.black]
line-length = 100
-target-version = ["py38"]
+target-version = ["py39"]
[tool.isort]
combine_as_imports = true
@@ -47,7 +59,6 @@
disallow_untyped_defs = true
implicit_reexport = true
no_implicit_optional = true
-plugins = "trio_typing.plugin"
show_error_codes = true
strict = true
strict_equality = true
@@ -61,24 +72,12 @@
module =["trio.*"]
ignore_missing_imports = true
-[tool.poetry.dependencies]
-pydata_sphinx_theme = { version = "*", optional = true }
-python = ">=3.8"
-hypercorn = { version = ">=0.12.0", extras = ["trio"] }
-quart = ">=0.19"
-trio = ">=0.19.0"
-exceptiongroup = ">=1.0.0"
-
-[tool.poetry.dev-dependencies]
-tox = "*"
-
-[tool.poetry.extras]
-docs = ["pydata_sphinx_theme"]
-
[tool.pytest.ini_options]
addopts = "--no-cov-on-fail --showlocals --strict-markers"
+asyncio_default_fixture_loop_scope = "session"
+asyncio_mode = "auto"
testpaths = ["tests"]
[build-system]
-requires = ["poetry_core>=1.0.0"]
-build-backend = "poetry.core.masonry.api"
+requires = ["pdm-backend"]
+build-backend = "pdm.backend"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/quart-trio-0.11.1/setup.cfg
new/quart-trio-0.12.0/setup.cfg
--- old/quart-trio-0.11.1/setup.cfg 2023-11-19 23:22:42.000000000 +0100
+++ new/quart-trio-0.12.0/setup.cfg 2025-01-09 22:04:35.000000000 +0100
@@ -1,3 +1,3 @@
[flake8]
-ignore = E203, E252, W503, W504
+ignore = E203, E252, E704, W503, W504
max_line_length = 100
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/quart-trio-0.11.1/src/quart_trio/app.py
new/quart-trio-0.12.0/src/quart_trio/app.py
--- old/quart-trio-0.11.1/src/quart_trio/app.py 2023-11-19 23:22:42.000000000
+0100
+++ new/quart-trio-0.12.0/src/quart_trio/app.py 2025-01-09 22:04:35.000000000
+0100
@@ -3,7 +3,6 @@
from typing import Any, Awaitable, Callable, Coroutine, Optional, TypeVar,
Union
import trio
-from exceptiongroup import BaseExceptionGroup
from hypercorn.config import Config as HyperConfig
from hypercorn.trio import serve
from quart import Quart, request_started, websocket_started
@@ -23,7 +22,10 @@
try:
from typing import ParamSpec
except ImportError:
- from typing_extensions import ParamSpec # type: ignore
+ from typing_extensions import ParamSpec
+
+if sys.version_info < (3, 11):
+ from exceptiongroup import BaseExceptionGroup
T = TypeVar("T")
P = ParamSpec("P")
@@ -79,7 +81,7 @@
scheme = "https" if certfile is not None and keyfile is not None else
"http"
print(f"Running on {scheme}://{host}:{port} (CTRL + C to quit)") #
noqa: T201
- trio.run(self.run_task, host, port, debug, ca_certs, certfile,
keyfile) # type: ignore
+ trio.run(self.run_task, host, port, debug, ca_certs, certfile, keyfile)
def run_task(
self,
@@ -90,6 +92,7 @@
certfile: Optional[str] = None,
keyfile: Optional[str] = None,
shutdown_trigger: Optional[Callable[..., Awaitable[None]]] = None,
+ task_status: trio.TaskStatus = trio.TASK_STATUS_IGNORED,
) -> Coroutine[None, None, None]:
"""Return a task that when awaited runs this application.
@@ -121,7 +124,9 @@
config.errorlog = config.accesslog
config.keyfile = keyfile
- return serve(self, config, shutdown_trigger=shutdown_trigger)
+ return serve(
+ self, config, shutdown_trigger=shutdown_trigger,
task_status=task_status # type: ignore
+ )
def sync_to_async(self, func: Callable[P, T]) -> Callable[P, Awaitable[T]]:
"""Return a async function that will run the synchronous function
*func*.
@@ -163,7 +168,7 @@
omits this argument.
"""
try:
- await request_started.send_async(self,
_sync_wrapper=self.ensure_async)
+ await request_started.send_async(self,
_sync_wrapper=self.ensure_async) # type: ignore
result: ResponseReturnValue | HTTPException | None
result = await self.preprocess_request(request_context)
@@ -179,7 +184,7 @@
if isinstance(error, BaseExceptionGroup):
for exception in error.exceptions:
try:
- return await self.handle_user_exception(exception)
+ return await self.handle_user_exception(exception) #
type: ignore
except Exception:
pass # No handler for this error
# Not found a single handler, re-raise the error
@@ -217,7 +222,9 @@
the Flask convention.
"""
try:
- await websocket_started.send_async(self,
_sync_wrapper=self.ensure_async)
+ await websocket_started.send_async(
+ self, _sync_wrapper=self.ensure_async # type: ignore
+ )
result: ResponseReturnValue | HTTPException | None
result = await self.preprocess_websocket(websocket_context)
@@ -229,7 +236,7 @@
async def open_instance_resource(
self, path: FilePath, mode: str = "rb"
- ) -> trio._file_io.AsyncIOWrapper: # type: ignore
+ ) -> trio._file_io.AsyncIOWrapper:
"""Open a file for reading.
Use as
@@ -241,9 +248,7 @@
"""
return await trio.open_file(self.instance_path /
file_path_to_path(path), mode)
- async def open_resource(
- self, path: FilePath, mode: str = "rb"
- ) -> trio._file_io.AsyncIOWrapper: # type: ignore
+ async def open_resource(self, path: FilePath, mode: str = "rb") ->
trio._file_io.AsyncIOWrapper:
"""Open a file for reading.
Use as
@@ -289,7 +294,7 @@
raise RuntimeError("While serving generator didn't
terminate")
except Exception as error:
await got_serving_exception.send_async(
- self, _sync_wrapper=self.ensure_async, exception=error
+ self, _sync_wrapper=self.ensure_async, exception=error #
type: ignore
)
self.log_exception(sys.exc_info())
raise
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/quart-trio-0.11.1/src/quart_trio/asgi.py
new/quart-trio-0.12.0/src/quart_trio/asgi.py
--- old/quart-trio-0.11.1/src/quart_trio/asgi.py 2023-11-19
23:22:42.000000000 +0100
+++ new/quart-trio-0.12.0/src/quart_trio/asgi.py 2025-01-09
22:04:35.000000000 +0100
@@ -1,9 +1,9 @@
+import sys
from functools import partial
from typing import cast, Optional, TYPE_CHECKING, Union
from urllib.parse import urlparse
import trio
-from exceptiongroup import BaseExceptionGroup
from hypercorn.typing import (
ASGIReceiveCallable,
ASGISendCallable,
@@ -22,6 +22,9 @@
if TYPE_CHECKING:
from quart_trio import QuartTrio # noqa: F401
+if sys.version_info < (3, 11):
+ from exceptiongroup import BaseExceptionGroup
+
class TrioASGIHTTPConnection(ASGIHTTPConnection):
async def __call__(self, receive: ASGIReceiveCallable, send:
ASGISendCallable) -> None:
@@ -74,7 +77,9 @@
event = await receive()
if event["type"] == "websocket.receive":
message = event.get("bytes") or event["text"]
- await websocket_received.send_async(message,
_sync_wrapper=self.app.ensure_async)
+ await websocket_received.send_async(
+ message, _sync_wrapper=self.app.ensure_async # type:
ignore
+ )
await self.send_channel.send(message)
elif event["type"] == "websocket.disconnect":
break
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/quart-trio-0.11.1/src/quart_trio/testing/app.py
new/quart-trio-0.12.0/src/quart_trio/testing/app.py
--- old/quart-trio-0.11.1/src/quart_trio/testing/app.py 2023-11-19
23:22:42.000000000 +0100
+++ new/quart-trio-0.12.0/src/quart_trio/testing/app.py 2025-01-09
22:04:35.000000000 +0100
@@ -1,5 +1,6 @@
from __future__ import annotations
+from contextlib import AbstractAsyncContextManager
from types import TracebackType
import trio
@@ -21,7 +22,7 @@
self._startup = trio.Event()
self._shutdown = trio.Event()
self._app_send_channel, self._app_receive_channel =
trio.open_memory_channel[dict](10)
- self._nursery_manager: trio._core._run.NurseryManager # type: ignore
+ self._nursery_manager: AbstractAsyncContextManager[trio.Nursery]
self._nursery: trio.Nursery
def test_client(self) -> TestClientProtocol:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/quart-trio-0.11.1/src/quart_trio/wrappers/request.py
new/quart-trio-0.12.0/src/quart_trio/wrappers/request.py
--- old/quart-trio-0.11.1/src/quart_trio/wrappers/request.py 2023-11-19
23:22:42.000000000 +0100
+++ new/quart-trio-0.12.0/src/quart_trio/wrappers/request.py 2025-01-09
22:04:35.000000000 +0100
@@ -1,4 +1,4 @@
-from typing import AnyStr, Optional
+from typing import Literal, Optional, overload, Union
import trio
from quart.wrappers.request import Body, Request
@@ -49,9 +49,22 @@
form_data_parser_class = TrioFormDataParser
lock_class = trio.Lock # type: ignore
+ @overload
+ async def get_data(
+ self, cache: bool, as_text: Literal[False], parse_form_data: bool
+ ) -> bytes: ...
+
+ @overload
+ async def get_data(self, cache: bool, as_text: Literal[True],
parse_form_data: bool) -> str: ...
+
+ @overload
+ async def get_data(
+ self, cache: bool = True, as_text: bool = False, parse_form_data: bool
= False
+ ) -> Union[str, bytes]: ...
+
async def get_data(
self, cache: bool = True, as_text: bool = False, parse_form_data: bool
= False
- ) -> AnyStr:
+ ) -> Union[str, bytes]:
if parse_form_data:
await self._load_form_data()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/quart-trio-0.11.1/src/quart_trio/wrappers/response.py
new/quart-trio-0.12.0/src/quart_trio/wrappers/response.py
--- old/quart-trio-0.11.1/src/quart_trio/wrappers/response.py 2023-11-19
23:22:42.000000000 +0100
+++ new/quart-trio-0.12.0/src/quart_trio/wrappers/response.py 2025-01-09
22:04:35.000000000 +0100
@@ -29,7 +29,7 @@
self.end = self.size
if buffer_size is not None:
self.buffer_size = buffer_size
- self.file: Optional[trio._file_io.AsyncIOWrapper] = None # type:
ignore
+ self.file: Optional[trio._file_io.AsyncIOWrapper] = None
async def __aenter__(self) -> "TrioFileBody":
self.file = await trio.open_file(self.file_path, mode="rb")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/quart-trio-0.11.1/tests/test_app.py
new/quart-trio-0.12.0/tests/test_app.py
--- old/quart-trio-0.11.1/tests/test_app.py 2023-11-19 23:22:42.000000000
+0100
+++ new/quart-trio-0.12.0/tests/test_app.py 2025-01-09 22:04:35.000000000
+0100
@@ -1,12 +1,15 @@
+import sys
from typing import NoReturn
import pytest
-from exceptiongroup import BaseExceptionGroup
from quart import ResponseReturnValue
from quart.testing import WebsocketResponseError
from quart_trio import QuartTrio
+if sys.version_info < (3, 11):
+ from exceptiongroup import BaseExceptionGroup
+
@pytest.fixture(name="error_app", scope="function")
def _error_app() -> QuartTrio:
@@ -48,8 +51,10 @@
try:
async with test_client.websocket("/ws/") as test_websocket:
await test_websocket.receive()
- except WebsocketResponseError as error:
- assert error.response.status_code == 201
+ except BaseExceptionGroup as error:
+ for exception in error.exceptions:
+ if isinstance(exception, WebsocketResponseError):
+ assert exception.response.status_code == 201
@pytest.mark.trio
@@ -65,8 +70,10 @@
try:
async with test_client.websocket("/ws/") as test_websocket:
await test_websocket.receive()
- except WebsocketResponseError as error:
- assert error.response.status_code == 500
+ except BaseExceptionGroup as error:
+ for exception in error.exceptions:
+ if isinstance(exception, WebsocketResponseError):
+ assert exception.response.status_code == 500
@pytest.mark.trio
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/quart-trio-0.11.1/tests/test_asgi.py
new/quart-trio-0.12.0/tests/test_asgi.py
--- old/quart-trio-0.11.1/tests/test_asgi.py 2023-11-19 23:22:42.000000000
+0100
+++ new/quart-trio-0.12.0/tests/test_asgi.py 2025-01-09 22:04:35.000000000
+0100
@@ -22,6 +22,7 @@
"server": None,
"subprotocols": [],
"extensions": {"websocket.http.response": {}},
+ "state": {}, # type: ignore[typeddict-item]
}
connection = TrioASGIWebsocketConnection(QuartTrio(__name__), scope)
send_channel, receive_channel = trio.open_memory_channel[dict](0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/quart-trio-0.11.1/tests/test_basic.py
new/quart-trio-0.12.0/tests/test_basic.py
--- old/quart-trio-0.11.1/tests/test_basic.py 2023-11-19 23:22:42.000000000
+0100
+++ new/quart-trio-0.12.0/tests/test_basic.py 2025-01-09 22:04:35.000000000
+0100
@@ -1,3 +1,4 @@
+import sys
from pathlib import Path
import pytest
@@ -6,6 +7,9 @@
from quart_trio import QuartTrio
+if sys.version_info < (3, 11):
+ from exceptiongroup import BaseExceptionGroup
+
@pytest.fixture
def app() -> Quart:
@@ -34,7 +38,7 @@
test_client = app.test_client()
response = await test_client.get("/")
assert response.status_code == 200
- assert b"index" in (await response.get_data()) # type: ignore
+ assert b"index" in (await response.get_data())
@pytest.mark.trio
@@ -53,8 +57,10 @@
try:
async with test_client.websocket("/ws/abort/") as test_websocket:
await test_websocket.receive()
- except WebsocketResponseError as error:
- assert error.response.status_code == 401
+ except BaseExceptionGroup as error:
+ for exception in error.exceptions:
+ if isinstance(exception, WebsocketResponseError):
+ assert exception.response.status_code == 401
@pytest.mark.trio
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/quart-trio-0.11.1/tests/test_sync.py
new/quart-trio-0.12.0/tests/test_sync.py
--- old/quart-trio-0.11.1/tests/test_sync.py 2023-11-19 23:22:42.000000000
+0100
+++ new/quart-trio-0.12.0/tests/test_sync.py 2025-01-09 22:04:35.000000000
+0100
@@ -31,9 +31,9 @@
async def test_sync_request_context(app: QuartTrio) -> None:
test_client = app.test_client()
response = await test_client.get("/")
- assert b"GET" in (await response.get_data()) # type: ignore
+ assert b"GET" in (await response.get_data())
response = await test_client.post("/")
- assert b"POST" in (await response.get_data()) # type: ignore
+ assert b"POST" in (await response.get_data())
@pytest.mark.trio
@@ -41,5 +41,5 @@
test_client = app.test_client()
response = await test_client.get("/gen")
result = await response.get_data()
- assert result[-2:] == b"bb" # type: ignore
+ assert result[-2:] == b"bb"
assert int(result[:-2]) != threading.current_thread().ident
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/quart-trio-0.11.1/tox.ini
new/quart-trio-0.12.0/tox.ini
--- old/quart-trio-0.11.1/tox.ini 2023-11-19 23:22:42.000000000 +0100
+++ new/quart-trio-0.12.0/tox.ini 2025-01-09 22:04:35.000000000 +0100
@@ -1,5 +1,5 @@
[tox]
-envlist = docs,format,mypy,py38,py39,py310,py311,py312,pep8,package
+envlist = docs,format,mypy,py39,py310,py311,py312,py313,pep8,package
isolated_build = True
[testenv]
@@ -11,7 +11,7 @@
commands = pytest --cov=quart_trio {posargs}
[testenv:docs]
-basepython = python3.12
+basepython = python3.13
deps =
pydata-sphinx-theme
sphinx
@@ -20,7 +20,7 @@
sphinx-build -b html -d {envtmpdir}/doctrees docs/ docs/_build/html/
[testenv:format]
-basepython = python3.12
+basepython = python3.13
deps =
black
isort
@@ -29,7 +29,7 @@
isort --check --diff src/quart_trio/ tests
[testenv:pep8]
-basepython = python3.12
+basepython = python3.13
deps =
flake8
pep8-naming
@@ -37,19 +37,18 @@
commands = flake8 src/quart_trio/ tests/
[testenv:mypy]
-basepython = python3.12
+basepython = python3.13
deps =
mypy
pytest
- trio-typing
commands =
mypy src/quart_trio/ tests/
[testenv:package]
-basepython = python3.12
+basepython = python3.13
deps =
- poetry
+ pdm
twine
commands =
- poetry build
+ pdm build
twine check dist/*