Skip to content

Commit

Permalink
Merge branch 'master' into improve_namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
Quentin Peter committed Mar 12, 2024
2 parents a339df5 + f3778e6 commit 920e940
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 16 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/linux-pip-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ jobs:
shell: bash -l {0}
run: |
pip install -e .[test]
# Zict 2.1.0 is not compatible with Python 3
pip install zict==2.0.0
- name: Show environment information
shell: bash -l {0}
run: |
Expand Down
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# History of changes

## Version 3.0.0b4 (2024-02-08)

### Pull Requests Merged

* [PR 477](https://github.com/spyder-ide/spyder-kernels/pull/477) - PR: Handle new Inline backend options `fontsize` and `bottom`, by [@jitseniesen](https://github.com/jitseniesen)

In this release 1 pull request was closed.


----


## Version 3.0.0b3 (2023-12-18)

### Pull Requests Merged

* [PR 476](https://github.com/spyder-ide/spyder-kernels/pull/476) - PR: Send back pickling error correctly, by [@impact27](https://github.com/impact27)
* [PR 467](https://github.com/spyder-ide/spyder-kernels/pull/467) - PR: Fix index when skipping hidden frames (Debugger), by [@impact27](https://github.com/impact27)
* [PR 466](https://github.com/spyder-ide/spyder-kernels/pull/466) - PR: Simplify kernel configuration, by [@impact27](https://github.com/impact27)

In this release 3 pull requests were closed.


----


## Version 3.0.0b2 (2023-08-22)

### Pull Requests Merged
Expand Down Expand Up @@ -57,6 +83,15 @@ In this release 2 issues were closed.
In this release 25 pull requests were closed.


----

## Version 2.5.1 (2024-02-28)

### Pull Requests Merged

* [PR 479](https://github.com/spyder-ide/spyder-kernels/pull/479) - PR: Fix hangs with Maplotlib interactive backends, by [@ccordoba12](https://github.com/ccordoba12)


----


Expand Down
4 changes: 2 additions & 2 deletions requirements/posix.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cloudpickle
ipykernel>=6.23.2,<7
ipykernel>=6.29.3,<7
ipython>=8.12.2,<9
jupyter_client>=7.4.9,<9
pyzmq>=22.1.0
pyzmq>=24.0.0
wurlitzer>=1.0.3
pyxdg>=0.26
4 changes: 2 additions & 2 deletions requirements/windows.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cloudpickle
ipykernel>=6.23.2,<7
ipykernel>=6.29.3,<7
ipython>=8.12.2,<9
jupyter_client>=7.4.9,<9
pyzmq>=22.1.0
pyzmq>=24.0.0
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ def get_version(module='spyder_kernels'):

REQUIREMENTS = [
'cloudpickle',
'ipykernel>=6.23.2,<7',
'ipykernel>=6.29.3,<7',
'ipython>=8.12.2,<8.13; python_version=="3.8"',
'ipython>=8.13.0,<9,!=8.17.1; python_version>"3.8"',
'jupyter-client>=7.4.9,<9',
'pyzmq>=22.1.0',
'pyzmq>=24.0.0',
'wurlitzer>=1.0.3;platform_system!="Windows"',
'pyxdg>=0.26;platform_system=="Linux"',
]
Expand Down
4 changes: 4 additions & 0 deletions spyder_kernels/comms/commbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,10 @@ def _handle_remote_call(self, msg, buffer):
"""Handle a remote call."""
msg_dict = msg['content']
self.on_incoming_call(msg_dict)
if msg['content'].get('is_error', False):
# could not open the pickle
self._set_call_return_value(msg, buffer, is_error=True)
return
try:
return_value = self._remote_callback(
msg_dict['call_name'],
Expand Down
27 changes: 19 additions & 8 deletions spyder_kernels/console/kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,15 @@ def enable_faulthandler(self):
# Do not use /tmp for temporary files
try:
from xdg.BaseDirectory import xdg_data_home
fault_dir = xdg_data_home
fault_dir = os.path.join(xdg_data_home, "spyder")
os.makedirs(fault_dir, exist_ok=True)
except Exception:
fault_dir = None

self.faulthandler_handle = tempfile.NamedTemporaryFile(
'wt', suffix='.fault', dir=fault_dir)
'wt', suffix='.fault', dir=fault_dir
)

main_id = threading.main_thread().ident
system_ids = [
thread.ident for thread in threading.enumerate()
Expand Down Expand Up @@ -172,9 +174,7 @@ def get_fault_text(self, fault_filename, main_id, ignore_ids):
# Remove file
try:
os.remove(fault_filename)
except FileNotFoundError:
pass
except PermissionError:
except Exception:
pass

# Process file
Expand Down Expand Up @@ -557,6 +557,8 @@ def set_matplotlib_conf(self, conf):
resolution_n = 'pylab/inline/resolution'
width_n = 'pylab/inline/width'
height_n = 'pylab/inline/height'
fontsize_n = 'pylab/inline/fontsize'
bottom_n = 'pylab/inline/bottom'
bbox_inches_n = 'pylab/inline/bbox_inches'
inline_backend = 'inline'

Expand All @@ -581,6 +583,15 @@ def set_matplotlib_conf(self, conf):
(conf[width_n], conf[height_n])
)

if fontsize_n in conf:
self._set_mpl_inline_rc_config('font.size', conf[fontsize_n])

if bottom_n in conf:
self._set_mpl_inline_rc_config(
'figure.subplot.bottom',
conf[bottom_n]
)

if bbox_inches_n in conf:
self.set_mpl_inline_bbox_inches(conf[bbox_inches_n])

Expand Down Expand Up @@ -710,13 +721,13 @@ def set_special_kernel(self, special):
return

if special == "pylab":
import matplotlib
import matplotlib # noqa
exec("from pylab import *", self.shell.user_ns)
self.shell.special = special
return

if special == "sympy":
import sympy
import sympy # noqa
sympy_init = "\n".join([
"from sympy import *",
"x, y, z, t = symbols('x y z t')",
Expand All @@ -729,7 +740,7 @@ def set_special_kernel(self, special):
return

if special == "cython":
import cython
import cython # noqa

# Import pyximport to enable Cython files support for
# import statement
Expand Down

0 comments on commit 920e940

Please sign in to comment.