Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #102

Merged
merged 3 commits into from
Dec 15, 2023
Merged

Dev #102

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Changelog
=========

1.8.3 (2023-12-15)
------------------

- aiohttp client uses request context manager.


1.8.2 (2023-12-07)
------------------

Expand Down
2 changes: 1 addition & 1 deletion pjrpc/__about__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
__description__ = 'Extensible JSON-RPC library'
__url__ = 'https://github.com/dapper91/pjrpc'

__version__ = '1.8.2'
__version__ = '1.8.3'

__author__ = 'Dmitry Pershin'
__email__ = 'dapper1291@gmail.com'
Expand Down
6 changes: 3 additions & 3 deletions pjrpc/client/backend/aiohttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ async def _request(self, request_text: str, is_notification: bool = False, **kwa
headers = kwargs.setdefault('headers', {})
headers['Content-Type'] = pjrpc.common.DEFAULT_CONTENT_TYPE

resp = await self._session.post(self._endpoint, data=request_text, **kwargs)
resp.raise_for_status()
async with self._session.post(self._endpoint, data=request_text, **kwargs) as resp:
resp.raise_for_status()
response_text = await resp.text()

response_text = await resp.text()
if is_notification:
return None

Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pjrpc"
version = "1.8.2"
version = "1.8.3"
description = "Extensible JSON-RPC library"
authors = ["Dmitry Pershin <dapper1291@gmail.com>"]
license = "Unlicense"
Expand Down Expand Up @@ -31,6 +31,7 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]


Expand Down