spyder-kernels 3.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. spyder_kernels/__init__.py +33 -0
  2. spyder_kernels/_version.py +12 -0
  3. spyder_kernels/comms/__init__.py +56 -0
  4. spyder_kernels/comms/commbase.py +612 -0
  5. spyder_kernels/comms/decorators.py +27 -0
  6. spyder_kernels/comms/frontendcomm.py +215 -0
  7. spyder_kernels/comms/utils.py +85 -0
  8. spyder_kernels/console/__init__.py +11 -0
  9. spyder_kernels/console/__main__.py +31 -0
  10. spyder_kernels/console/kernel.py +1123 -0
  11. spyder_kernels/console/outstream.py +72 -0
  12. spyder_kernels/console/shell.py +386 -0
  13. spyder_kernels/console/start.py +211 -0
  14. spyder_kernels/console/tests/__init__.py +0 -0
  15. spyder_kernels/console/tests/load_data.npz +0 -0
  16. spyder_kernels/console/tests/load_data.spydata +0 -0
  17. spyder_kernels/console/tests/test_console_kernel.py +1437 -0
  18. spyder_kernels/customize/__init__.py +15 -0
  19. spyder_kernels/customize/code_runner.py +614 -0
  20. spyder_kernels/customize/namespace_manager.py +124 -0
  21. spyder_kernels/customize/spydercustomize.py +291 -0
  22. spyder_kernels/customize/spyderpdb.py +878 -0
  23. spyder_kernels/customize/tests/__init__.py +9 -0
  24. spyder_kernels/customize/tests/test_umr.py +98 -0
  25. spyder_kernels/customize/tests/test_utils.py +24 -0
  26. spyder_kernels/customize/umr.py +98 -0
  27. spyder_kernels/customize/utils.py +231 -0
  28. spyder_kernels/utils/__init__.py +11 -0
  29. spyder_kernels/utils/dochelpers.py +354 -0
  30. spyder_kernels/utils/iofuncs.py +625 -0
  31. spyder_kernels/utils/lazymodules.py +69 -0
  32. spyder_kernels/utils/misc.py +50 -0
  33. spyder_kernels/utils/mpl.py +40 -0
  34. spyder_kernels/utils/nsview.py +699 -0
  35. spyder_kernels/utils/pythonenv.py +98 -0
  36. spyder_kernels/utils/test_utils.py +47 -0
  37. spyder_kernels/utils/tests/__init__.py +9 -0
  38. spyder_kernels/utils/tests/data.dcm +0 -0
  39. spyder_kernels/utils/tests/data.mat +0 -0
  40. spyder_kernels/utils/tests/export_data.spydata +0 -0
  41. spyder_kernels/utils/tests/export_data_renamed.spydata +0 -0
  42. spyder_kernels/utils/tests/export_data_withfunction.spydata +0 -0
  43. spyder_kernels/utils/tests/import_data.npz +0 -0
  44. spyder_kernels/utils/tests/numpy_data.npz +0 -0
  45. spyder_kernels/utils/tests/test_dochelpers.py +145 -0
  46. spyder_kernels/utils/tests/test_iofuncs.py +365 -0
  47. spyder_kernels/utils/tests/test_lazymodules.py +40 -0
  48. spyder_kernels/utils/tests/test_nsview.py +448 -0
  49. spyder_kernels/utils/tests/test_pythonenv.py +66 -0
  50. spyder_kernels-3.0.0.dist-info/AUTHORS.txt +12 -0
  51. spyder_kernels-3.0.0.dist-info/LICENSE.txt +21 -0
  52. spyder_kernels-3.0.0.dist-info/METADATA +123 -0
  53. spyder_kernels-3.0.0.dist-info/RECORD +55 -0
  54. spyder_kernels-3.0.0.dist-info/WHEEL +5 -0
  55. spyder_kernels-3.0.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,33 @@
1
+ # -*- coding: utf-8 -*-
2
+ # -----------------------------------------------------------------------------
3
+ # Copyright (c) 2009- Spyder Kernels Contributors
4
+ #
5
+ # Licensed under the terms of the MIT License
6
+ # (see spyder_kernels/__init__.py for details)
7
+ # -----------------------------------------------------------------------------
8
+
9
+ """
10
+ MIT License
11
+
12
+ Copyright (c) 2009- Spyder Kernels Contributors (see AUTHORS.txt)
13
+
14
+ Permission is hereby granted, free of charge, to any person obtaining a copy
15
+ of this software and associated documentation files (the "Software"), to deal
16
+ in the Software without restriction, including without limitation the rights
17
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
18
+ copies of the Software, and to permit persons to whom the Software is
19
+ furnished to do so, subject to the following conditions:
20
+
21
+ The above copyright notice and this permission notice shall be included in all
22
+ copies or substantial portions of the Software.
23
+
24
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30
+ SOFTWARE.
31
+ """
32
+
33
+ from ._version import __version__
@@ -0,0 +1,12 @@
1
+ #
2
+ # -----------------------------------------------------------------------------
3
+ # Copyright (c) 2009- Spyder Kernels Contributors
4
+ #
5
+ # Licensed under the terms of the MIT License
6
+ # (see spyder_kernels/__init__.py for details)
7
+ # -----------------------------------------------------------------------------
8
+
9
+ """Version File."""
10
+
11
+ VERSION_INFO = (3, 0, 0)
12
+ __version__ = '.'.join(map(str, VERSION_INFO))
@@ -0,0 +1,56 @@
1
+ # -*- coding: utf-8 -*-
2
+ # -----------------------------------------------------------------------------
3
+ # Copyright (c) 2009- Spyder Kernels Contributors
4
+ #
5
+ # Licensed under the terms of the MIT License
6
+ # (see spyder_kernels/__init__.py for details)
7
+ # -----------------------------------------------------------------------------
8
+
9
+ """
10
+ API to communicate between the Spyder IDE and the Spyder kernel.
11
+ It uses Jupyter Comms for messaging. The messages are sent by calling an
12
+ arbitrary function, with the limitation that the arguments have to be
13
+ picklable. If the function must return, the call must be blocking.
14
+
15
+ In addition, the frontend can interrupt the kernel to process the message sent.
16
+ This allows, for example, to set a breakpoint in pdb while the debugger is
17
+ running. The message will only be delivered when the kernel is checking the
18
+ event loop, or if pdb is waiting for an input.
19
+
20
+ Example:
21
+
22
+ On one side:
23
+
24
+ ```
25
+ def hello_str(msg):
26
+ print('Hello ' + msg + '!')
27
+
28
+ def add(a, d):
29
+ return a + b
30
+
31
+ left_comm.register_call_handler('add_numbers', add)
32
+ left_comm.register_call_handler('print_hello', hello_str)
33
+ ```
34
+
35
+ On the other:
36
+
37
+ ```
38
+ right_comm.remote_call().print_hello('world')
39
+ res = right_comm.remote_call(blocking=True).add_numbers(1, 2)
40
+ print('1 + 2 = ' + str(res))
41
+ ```
42
+
43
+ Which prints on the right side (The one with the `left_comm`):
44
+
45
+ ```
46
+ Hello world!
47
+ ```
48
+
49
+ And on the left side:
50
+
51
+ ```
52
+ 1 + 2 = 3
53
+ ```
54
+ """
55
+
56
+ from spyder_kernels.comms.commbase import CommError