Skip to content

Commit

Permalink
Merge branch 'master' of github.com:tartiflette/tartiflette-aiohttp
Browse files Browse the repository at this point in the history
  • Loading branch information
abusi committed Nov 15, 2021
2 parents 6432b78 + 42455c0 commit c805ef3
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

- [1.x.x]
- [1.4.x]
- [1.4.1](./changelogs/1.4.1.md) - 2021-11-15
- [1.4.0](./changelogs/1.4.0.md) - 2020-12-14
- [1.3.x]
- [1.3.1](./changelogs/1.3.1.md) - 2020-09-24
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ Contributors
------------

* [@daveoconnor](https://github.com/daveoconnor)
* [David Baumgold](https://github.com/singingwolfboy)
* [@jugdizh](https://github.com/jugdizh)
* [@Ultrabug](https://github.com/ultrabug)
17 changes: 17 additions & 0 deletions changelogs/1.4.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# [1.4.1] 2021-11-15

## Changed

- Tests Dependencies updates
- pytest 6.2.5
- ytest-cov 3.0.0
- pytest-asyncio 0.16.0
- pylint==2.11.1
- xenon==0.8.0
- isort==5.10.1

- Support for aiohttp 3.8.0, thanks [David Baumgold](https://github.com/singingwolfboy)

## Fixed

- Typo in internal package naming, thanks [David Baumgold](https://github.com/singingwolfboy)
14 changes: 7 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
from setuptools import find_packages, setup

_TEST_REQUIRE = [
"pytest==6.2.0",
"pytest-cov==2.10.1",
"pytest-asyncio==0.14.0",
"pytest==6.2.5",
"pytest-cov==3.0.0",
"pytest-asyncio==0.16.0",
"pytest-aiohttp==0.3.0",
"asynctest==0.13.0",
"pytz",
"pylint==2.6.0",
"xenon==0.7.1",
"pylint==2.11.1",
"xenon==0.8.0",
"black==20.8b1",
"isort==5.6.4",
"isort==5.10.1",
"async_generator==1.10;python_version=='3.6.*'",
]

_VERSION = "1.4.0"
_VERSION = "1.4.1"

_PACKAGES = find_packages(exclude=["tests*"])

Expand Down
4 changes: 2 additions & 2 deletions tartiflette_aiohttp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,12 @@ def register_graphql_handlers(
method,
executor_http_endpoint,
partial(
getattr(Handlers, "handle_%s" % method.lower()),
getattr(Handlers, f"handle_{method.lower()}"),
context_factory=context_factory,
),
)
except AttributeError:
raise Exception("Unsupported < %s > http method" % method)
raise Exception(f"Unsupported < {method} > http method")

_set_subscription_ws_handler(
app,
Expand Down
4 changes: 3 additions & 1 deletion tartiflette_aiohttp/_graphiql.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
try:
_TTFTT_AIOHTTP_DIR = os.path.dirname(__file__)

with open(os.path.join(_TTFTT_AIOHTTP_DIR, "_graphiql.html")) as tpl_file:
with open(
os.path.join(_TTFTT_AIOHTTP_DIR, "_graphiql.html"), encoding="UTF-8"
) as tpl_file:
_GRAPHIQL_TEMPLATE = tpl_file.read()
except Exception as e: # pylint: disable=broad-except
_GRAPHIQL_TEMPLATE = ""
Expand Down
2 changes: 2 additions & 0 deletions tartiflette_aiohttp/_subscription_ws_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,13 @@ async def _on_connection_init(
async def _on_connection_terminate(
self, connection_context: "AIOHTTPConnectionContext"
) -> None:
# pylint: disable=no-self-use
await connection_context.close(1011)

async def _unsubscribe(
self, connection_context: "AIOHTTPConnectionContext", operation_id: str
) -> None:
# pylint: disable=no-self-use
operation = connection_context.get_operation(operation_id)
if operation is not None:
task = create_task(operation.__anext__())
Expand Down

0 comments on commit c805ef3

Please sign in to comment.