Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
fail-fast: false
matrix:
os: ['ubuntu-latest']
python-version: ['3.8', '3.9']
python-version: ['3', '3.8', '3.9']
include:
- os: 'macos-latest'
python-version: '3.8' # oldest supported
Expand Down
1 change: 1 addition & 0 deletions changes.d/672.feat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Major version upgrade for graphene/graphql-core dependencies. Removed the graphene-tornado and graphql-ws dependencies which had blocked Python 3.10 adoption.
17 changes: 8 additions & 9 deletions cylc/uiserver/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,6 @@
Union,
)

from cylc.flow.network.graphql import (
CylcGraphQLBackend,
IgnoreFieldMiddleware,
)
from cylc.flow.profiler import Profiler
from jupyter_server.extension.application import ExtensionApp
from packaging.version import Version
from tornado import ioloop
Expand All @@ -92,6 +87,10 @@
)
from traitlets.config.loader import LazyConfigValue

from cylc.flow.network.graphql import (
CylcExecutionContext, IgnoreFieldMiddleware
)
from cylc.flow.profiler import Profiler
from cylc.uiserver import __file__ as uis_pkg
from cylc.uiserver.authorise import (
Authorization,
Expand All @@ -112,7 +111,7 @@
)
from cylc.uiserver.resolvers import Resolvers
from cylc.uiserver.schema import schema
from cylc.uiserver.websockets.tornado import TornadoSubscriptionServer
from cylc.uiserver.graphql.tornado_ws import TornadoSubscriptionServer
from cylc.uiserver.workflows_mgr import WorkflowsManager


Expand Down Expand Up @@ -513,11 +512,11 @@ def initialize_handlers(self):
{
'schema': schema,
'resolvers': self.resolvers,
'backend': CylcGraphQLBackend(),
'middleware': [
AuthorizationMiddleware,
IgnoreFieldMiddleware
],
'execution_context_class': CylcExecutionContext,
'auth': self.authobj,
}
),
Expand All @@ -527,11 +526,11 @@ def initialize_handlers(self):
{
'schema': schema,
'resolvers': self.resolvers,
'backend': CylcGraphQLBackend(),
'middleware': [
AuthorizationMiddleware,
IgnoreFieldMiddleware
],
'execution_context_class': CylcExecutionContext,
'batch': True,
'auth': self.authobj,
}
Expand Down Expand Up @@ -571,11 +570,11 @@ def initialize_handlers(self):
def set_sub_server(self):
self.subscription_server = TornadoSubscriptionServer(
schema,
backend=CylcGraphQLBackend(),
middleware=[
IgnoreFieldMiddleware,
AuthorizationMiddleware,
],
execution_context_class=CylcExecutionContext,
auth=self.authobj,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

"""Websockets and subscriptions related code."""
"""GraphQL, Websockets and subscriptions related code."""

from typing import (
Awaitable,
Expand Down
Loading
Loading