Skip to content

Commit

Permalink
Upgrade anyio to 3.1 for all py versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariko Wakabayashi committed May 19, 2021
1 parent 83a49c8 commit a953e3b
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 32 deletions.
7 changes: 1 addition & 6 deletions jupyter_server/services/contents/filecheckpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,7 @@
)
from .fileio import AsyncFileManagerMixin, FileManagerMixin

try:
from anyio.to_thread import run_sync
except ImportError:
# fallback on anyio v2 for python version < 3.7
from anyio import run_sync_in_worker_thread as run_sync

from anyio.to_thread import run_sync
from jupyter_core.utils import ensure_dir_exists
from traitlets import Unicode

Expand Down
7 changes: 1 addition & 6 deletions jupyter_server/services/contents/fileio.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,7 @@
import os
import shutil

try:
from anyio.to_thread import run_sync
except ImportError:
# fallback on anyio v2 for python version < 3.7
from anyio import run_sync_in_worker_thread as run_sync

from anyio.to_thread import run_sync
from tornado.web import HTTPError

from jupyter_server.utils import (
Expand Down
7 changes: 1 addition & 6 deletions jupyter_server/services/contents/filemanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,7 @@
import mimetypes
import nbformat

try:
from anyio.to_thread import run_sync
except ImportError:
# fallback on anyio v2 for python version < 3.7
from anyio import run_sync_in_worker_thread as run_sync

from anyio.to_thread import run_sync
from send2trash import send2trash
from tornado import web

Expand Down
7 changes: 1 addition & 6 deletions jupyter_server/services/contents/largefilemanager.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
try:
from anyio.to_thread import run_sync
except ImportError:
# fallback on anyio v2 for python version < 3.7
from anyio import run_sync_in_worker_thread as run_sync

from anyio.to_thread import run_sync
from tornado import web
import base64
import os, io
Expand Down
7 changes: 1 addition & 6 deletions jupyter_server/services/nbconvert/handlers.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import json

try:
from anyio.to_thread import run_sync
except ImportError:
# fallback on anyio v2 for python version < 3.7
from anyio import run_sync_in_worker_thread as run_sync

from anyio.to_thread import run_sync
from tornado import web

from ...base.handlers import APIHandler
Expand Down
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ install_requires =
Send2Trash
terminado>=0.8.3
prometheus_client
anyio>=2.0.2,<3 ; python_version < '3.7'
anyio>=3.0.1,<4 ; python_version >= '3.7'
anyio>=3.1.0,<4
websocket-client

[options.extras_require]
Expand Down

0 comments on commit a953e3b

Please sign in to comment.