File tree Expand file tree Collapse file tree 5 files changed +1010
-774
lines changed
Expand file tree Collapse file tree 5 files changed +1010
-774
lines changed Original file line number Diff line number Diff line change @@ -6,12 +6,11 @@ authors = [
66]
77dependencies = [
88 " PyYaml" ,
9- " pydantic" ,
9+ " pydantic == 2.11.9 " ,
1010 " email-validator" ,
1111 " yarl" ,
1212 " httpx" ,
1313 " more-itertools" ,
14- ' typing_extensions; python_version<"3.10"' ,
1514 " jmespath" ,
1615]
1716requires-python = " >=3.10"
@@ -50,9 +49,6 @@ Repository = "https://github.com/commonism/aiopenapi3"
5049auth = [
5150 " httpx-auth>=0.21.0" ,
5251]
53- socks = [
54- " httpx-socks" ,
55- ]
5652types =[
5753 " pydantic-extra-types>=2.10.1" ,
5854]
@@ -89,7 +85,8 @@ filterwarnings = [
8985 " ignore:unclosed <socket.socket fd=:ResourceWarning" ,
9086 " ignore:Ignoring Schema with additionalProperties and named properties:UserWarning" ,
9187 " ignore:'flask.Markup' is deprecated and will be removed in Flask 2.4. Import 'markupsafe.Markup' instead.:DeprecationWarning" ,
92- " ignore:unclosed resource <TCPTransport:ResourceWarning"
88+ " ignore:unclosed resource <TCPTransport:ResourceWarning" ,
89+ " ignore:co_lnotab is deprecated, use co_lines instead:DeprecationWarning" ,
9390]
9491asyncio_mode = " strict"
9592asyncio_default_fixture_loop_scope = " session"
@@ -101,8 +98,9 @@ log_cli_date_format = "%Y-%m-%d %H:%M:%S"
10198
10299addopts = " --ignore-glob 'tests/my_*.py'"
103100
104- [tool .uv ]
105- dev-dependencies = [
101+
102+ [dependency-groups ]
103+ dev = [
106104 " pytest" ,
107105 " pytest-asyncio>=0.24.0" ,
108106 " pytest-httpx" ,
Original file line number Diff line number Diff line change 33.
44annotated-types == 0.7.0
55 # via pydantic
6- anyio == 4.9 .0
6+ anyio == 4.11 .0
77 # via httpx
8- certifi == 2025.7.14
8+ certifi == 2025.11.12
99 # via
1010 # httpcore
1111 # httpx
12- dnspython == 2.7 .0
12+ dnspython == 2.8 .0
1313 # via email-validator
14- email-validator == 2.2 .0
14+ email-validator == 2.3 .0
1515 # via aiopenapi3
16- exceptiongroup == 1.3.0 ; python_full_version < '3.11'
16+ exceptiongroup == 1.3.1 ; python_full_version < '3.11'
1717 # via anyio
1818h11 == 0.16.0
1919 # via httpcore
2020httpcore == 1.0.9
2121 # via httpx
2222httpx == 0.28.1
2323 # via aiopenapi3
24- idna == 3.10
24+ idna == 3.11
2525 # via
2626 # anyio
2727 # email-validator
2828 # httpx
2929 # yarl
3030jmespath == 1.0.1
3131 # via aiopenapi3
32- more-itertools == 10.7 .0
32+ more-itertools == 10.8 .0
3333 # via aiopenapi3
34- multidict == 6.6.3
34+ multidict == 6.7.0
3535 # via yarl
36- propcache == 0.3.2
36+ propcache == 0.4.1
3737 # via yarl
38- pydantic == 2.11.7
38+ pydantic == 2.11.9
3939 # via aiopenapi3
4040pydantic-core == 2.33.2
4141 # via pydantic
42- pyyaml == 6.0.2
42+ pyyaml == 6.0.3
4343 # via aiopenapi3
4444sniffio == 1.3.1
4545 # via anyio
46- typing-extensions == 4.14.1
46+ typing-extensions == 4.15.0
4747 # via
4848 # anyio
4949 # exceptiongroup
5050 # multidict
5151 # pydantic
5252 # pydantic-core
5353 # typing-inspection
54- typing-inspection == 0.4.1
54+ typing-inspection == 0.4.2
5555 # via pydantic
56- yarl == 1.20.1
56+ yarl == 1.22.0
5757 # via aiopenapi3
Original file line number Diff line number Diff line change @@ -32,8 +32,12 @@ def log_response(response):
3232 request = response .request
3333 print (f"Response event hook: { request .method } { request .url } - Status { response .status_code } " )
3434 data = request .read ()
35- if data :
36- print (json .dumps (json .loads (data .decode ()), indent = 4 ))
35+ if request .headers .get ("content-type" , "" ) == "application/json" :
36+ try :
37+ if data := request .read ():
38+ print (json .dumps (json .loads (data .decode ()), indent = 4 ))
39+ except Exception as e :
40+ print (e )
3741
3842
3943async def log_response_async (response ):
Original file line number Diff line number Diff line change 1- __version__ = "0.8.1 "
1+ __version__ = "0.9.0a1 "
You can’t perform that action at this time.
0 commit comments