##// END OF EJS Templates
optional pickleshare (#14217)
Matthias Bussonnier -
r28483:1a05e909 merge
parent child Browse files
Show More
@@ -37,7 +37,28 b' from typing import List as ListType, Dict as DictType, Any as AnyType'
37 from typing import Optional, Sequence, Tuple
37 from typing import Optional, Sequence, Tuple
38 from warnings import warn
38 from warnings import warn
39
39
40 from pickleshare import PickleShareDB
40 try:
41 from pickleshare import PickleShareDB
42 except ModuleNotFoundError:
43
44 class PickleShareDB: # type: ignore [no-redef]
45 def __init__(self, path):
46 pass
47
48 def get(self, key, default):
49 warn(
50 f"using {key} requires you to install the `pickleshare` library.",
51 stacklevel=2,
52 )
53 return default
54
55 def __setitem__(self, key, value):
56 warn(
57 f"using {key} requires you to install the `pickleshare` library.",
58 stacklevel=2,
59 )
60
61
41 from tempfile import TemporaryDirectory
62 from tempfile import TemporaryDirectory
42 from traitlets import (
63 from traitlets import (
43 Any,
64 Any,
@@ -36,7 +36,6 b' install_requires ='
36 jedi>=0.16
36 jedi>=0.16
37 matplotlib-inline
37 matplotlib-inline
38 pexpect>4.3; sys_platform != "win32"
38 pexpect>4.3; sys_platform != "win32"
39 pickleshare
40 prompt_toolkit>=3.0.30,<3.1.0,!=3.0.37
39 prompt_toolkit>=3.0.30,<3.1.0,!=3.0.37
41 pygments>=2.4.0
40 pygments>=2.4.0
42 stack_data
41 stack_data
@@ -76,6 +75,7 b' test ='
76 pytest<7.1
75 pytest<7.1
77 pytest-asyncio
76 pytest-asyncio
78 testpath
77 testpath
78 pickleshare
79 test_extra =
79 test_extra =
80 %(test)s
80 %(test)s
81 curio
81 curio
General Comments 0
You need to be logged in to leave comments. Login now