Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ authors = [
]
dependencies = [
"PyYaml",
"pydantic",
"pydantic == 2.11.9",
"email-validator",
"yarl",
"httpx",
"more-itertools",
'typing_extensions; python_version<"3.10"',
"jmespath",
]
requires-python = ">=3.10"
Expand Down Expand Up @@ -50,9 +49,6 @@ Repository = "https://github.com/commonism/aiopenapi3"
auth = [
"httpx-auth>=0.21.0",
]
socks = [
"httpx-socks",
]
types =[
"pydantic-extra-types>=2.10.1",
]
Expand Down Expand Up @@ -89,7 +85,8 @@ filterwarnings = [
"ignore:unclosed <socket.socket fd=:ResourceWarning",
"ignore:Ignoring Schema with additionalProperties and named properties:UserWarning",
"ignore:'flask.Markup' is deprecated and will be removed in Flask 2.4. Import 'markupsafe.Markup' instead.:DeprecationWarning",
"ignore:unclosed resource <TCPTransport:ResourceWarning"
"ignore:unclosed resource <TCPTransport:ResourceWarning",
"ignore:co_lnotab is deprecated, use co_lines instead:DeprecationWarning",
]
asyncio_mode = "strict"
asyncio_default_fixture_loop_scope = "session"
Expand All @@ -101,8 +98,9 @@ log_cli_date_format = "%Y-%m-%d %H:%M:%S"

addopts = "--ignore-glob 'tests/my_*.py'"

[tool.uv]
dev-dependencies = [

[dependency-groups]
dev = [
"pytest",
"pytest-asyncio>=0.24.0",
"pytest-httpx",
Expand Down
28 changes: 14 additions & 14 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,55 +3,55 @@
.
annotated-types==0.7.0
# via pydantic
anyio==4.9.0
anyio==4.11.0
# via httpx
certifi==2025.7.14
certifi==2025.11.12
# via
# httpcore
# httpx
dnspython==2.7.0
dnspython==2.8.0
# via email-validator
email-validator==2.2.0
email-validator==2.3.0
# via aiopenapi3
exceptiongroup==1.3.0 ; python_full_version < '3.11'
exceptiongroup==1.3.1 ; python_full_version < '3.11'
# via anyio
h11==0.16.0
# via httpcore
httpcore==1.0.9
# via httpx
httpx==0.28.1
# via aiopenapi3
idna==3.10
idna==3.11
# via
# anyio
# email-validator
# httpx
# yarl
jmespath==1.0.1
# via aiopenapi3
more-itertools==10.7.0
more-itertools==10.8.0
# via aiopenapi3
multidict==6.6.3
multidict==6.7.0
# via yarl
propcache==0.3.2
propcache==0.4.1
# via yarl
pydantic==2.11.7
pydantic==2.11.9
# via aiopenapi3
pydantic-core==2.33.2
# via pydantic
pyyaml==6.0.2
pyyaml==6.0.3
# via aiopenapi3
sniffio==1.3.1
# via anyio
typing-extensions==4.14.1
typing-extensions==4.15.0
# via
# anyio
# exceptiongroup
# multidict
# pydantic
# pydantic-core
# typing-inspection
typing-inspection==0.4.1
typing-inspection==0.4.2
# via pydantic
yarl==1.20.1
yarl==1.22.0
# via aiopenapi3
8 changes: 6 additions & 2 deletions src/aiopenapi3/debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,12 @@ def log_response(response):
request = response.request
print(f"Response event hook: {request.method} {request.url} - Status {response.status_code}")
data = request.read()
if data:
print(json.dumps(json.loads(data.decode()), indent=4))
if request.headers.get("content-type", "") == "application/json":
try:
if data := request.read():
print(json.dumps(json.loads(data.decode()), indent=4))
except Exception as e:
print(e)


async def log_response_async(response):
Expand Down
2 changes: 1 addition & 1 deletion src/aiopenapi3/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.8.1"
__version__ = "0.9.0a1"
Loading
Loading