Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-jupyter-client for
openSUSE:Factory checked in at 2023-04-14 13:13:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-jupyter-client (Old)
and /work/SRC/openSUSE:Factory/.python-jupyter-client.new.19717 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-jupyter-client"
Fri Apr 14 13:13:44 2023 rev:16 rq:1079328 version:8.2.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-jupyter-client/python-jupyter-client.changes
2023-04-01 19:32:51.925543804 +0200
+++
/work/SRC/openSUSE:Factory/.python-jupyter-client.new.19717/python-jupyter-client.changes
2023-04-14 13:13:51.959834198 +0200
@@ -1,0 +2,7 @@
+Fri Apr 14 02:19:50 UTC 2023 - Ben Greiner <[email protected]>
+
+- update to v8.2.0
+ * use c.f.Future to wait across threads #940 (@minrk)
+- Remove jupyter package, provide alternatives instead
+
+-------------------------------------------------------------------
Old:
----
jupyter_client-8.1.0.tar.gz
New:
----
jupyter_client-8.2.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-jupyter-client.spec ++++++
--- /var/tmp/diff_new_pack.QtqNCk/_old 2023-04-14 13:13:52.523837424 +0200
+++ /var/tmp/diff_new_pack.QtqNCk/_new 2023-04-14 13:13:52.527837447 +0200
@@ -26,7 +26,7 @@
%endif
Name: python-jupyter-client%{psuffix}
-Version: 8.1.0
+Version: 8.2.0
Release: 0
Summary: Jupyter protocol implementation and client libraries
License: BSD-3-Clause
@@ -40,7 +40,6 @@
BuildRequires: %{python_module pip}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
-Requires: jupyter-jupyter_client = %{version}
Requires: python-entrypoints
Requires: python-python-dateutil >= 2.8.2
Requires: python-pyzmq >= 23.0
@@ -48,8 +47,16 @@
Requires: python-traitlets >= 5.3
Requires: (python-importlib-metadata >= 4.8.3 if python-base < 3.10)
Requires: (python-jupyter-core >= 5.1 or (python-jupyter-core >= 4.12
with python-jupyter-core < 5.0))
-Provides: python-jupyter_client = %{version}
-Obsoletes: python-jupyter_client < %{version}
+Requires(post): update-alternatives
+Requires(postun):update-alternatives
+Provides: python-jupyter_client = %{version}-%{release}
+Obsoletes: python-jupyter_client < %{version}-%{release}
+Provides: jupyter-jupyter-client = %{version}-%{release}
+Obsoletes: jupyter-jupyter-client < %{version}-%{release}
+Provides: jupyter-jupyter_client = %{version}-%{release}
+Obsoletes: jupyter-jupyter_client < %{version}-%{release}
+Provides: jupyter-jupyter-client-doc = %{version}-%{release}
+Obsoletes: jupyter-jupyter-client-doc < %{version}-%{release}
BuildArch: noarch
%if %{with test}
# gh#jupyter/jupyter_client#787
@@ -73,26 +80,6 @@
It also provides the jupyter kernelspec entrypoint for installing kernelspecs
for use with Jupyter frontends.
-This package provides the python interface.
-
-%package -n jupyter-jupyter-client
-Summary: Jupyter protocol implementation and client libraries
-Group: Development/Languages/Python
-Requires: python3-jupyter-client = %{version}
-Provides: jupyter-jupyter_client = %{version}
-Obsoletes: jupyter-jupyter_client < %{version}
-Provides: jupyter-jupyter-client-doc = %{version}
-Obsoletes: jupyter-jupyter-client-doc < %{version}
-
-%description -n jupyter-jupyter-client
-This package contains the reference implementation of the Jupyter protocol.
-It also provides client and kernel management APIs for working with kernels.
-
-It also provides the jupyter kernelspec entrypoint for installing kernelspecs
-for use with Jupyter frontends.
-
-This package provides the jupyter components.
-
%prep
%autosetup -p1 -n jupyter_client-%{version}
sed -i 's/--color=yes//' pyproject.toml
@@ -103,6 +90,9 @@
%install
%if !%{with test}
%pyproject_install
+%python_clone -a %{buildroot}%{_bindir}/jupyter-kernel
+%python_clone -a %{buildroot}%{_bindir}/jupyter-kernelspec
+%python_clone -a %{buildroot}%{_bindir}/jupyter-run
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
@@ -113,18 +103,20 @@
%pytest --force-flaky --max-runs=3 --no-success-flaky-report -k "not
($donttest)"
%endif
+%post
+%python_install_alternative jupyter-kernel jupyter-kernelspec jupyter-run
+
+%postun
+%python_uninstall_alternative jupyter-kernel
+
%if !%{with test}
%files %{python_files}
%license LICENSE
%{python_sitelib}/jupyter_client-%{version}*-info
%{python_sitelib}/jupyter_client/
-
-%files -n jupyter-jupyter-client
-%license LICENSE
-%doc CONTRIBUTING.md README.md
-%{_bindir}/jupyter-kernel
-%{_bindir}/jupyter-kernelspec
-%{_bindir}/jupyter-run
+%python_alternative %{_bindir}/jupyter-kernel
+%python_alternative %{_bindir}/jupyter-kernelspec
+%python_alternative %{_bindir}/jupyter-run
%endif
%changelog
++++++ jupyter_client-8.1.0.tar.gz -> jupyter_client-8.2.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_client-8.1.0/.github/workflows/main.yml
new/jupyter_client-8.2.0/.github/workflows/main.yml
--- old/jupyter_client-8.1.0/.github/workflows/main.yml 2020-02-02
01:00:00.000000000 +0100
+++ new/jupyter_client-8.2.0/.github/workflows/main.yml 2020-02-02
01:00:00.000000000 +0100
@@ -65,10 +65,17 @@
if: ${{ startsWith(matrix.os, 'windows') }}
run: |
hatch run cov:nowarn || hatch run test:nowarn --lf
- - name: Code coverage
- run: |
- pip install codecov coverage[toml]
- codecov
+ - uses: jupyterlab/maintainer-tools/.github/actions/upload-coverage@v1
+
+ coverage:
+ runs-on: ubuntu-latest
+ needs:
+ - test
+ steps:
+ - uses: actions/checkout@v3
+ - uses: jupyterlab/maintainer-tools/.github/actions/report-coverage@v1
+ with:
+ fail_under: 78
docs:
runs-on: windows-latest
@@ -148,7 +155,7 @@
tests_check: # This job does nothing and is only used for the branch
protection
if: always()
needs:
- - test
+ - coverage
- docs
- lint
- check_links
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_client-8.1.0/.pre-commit-config.yaml
new/jupyter_client-8.2.0/.pre-commit-config.yaml
--- old/jupyter_client-8.1.0/.pre-commit-config.yaml 2020-02-02
01:00:00.000000000 +0100
+++ new/jupyter_client-8.2.0/.pre-commit-config.yaml 2020-02-02
01:00:00.000000000 +0100
@@ -20,7 +20,7 @@
- id: trailing-whitespace
- repo: https://github.com/python-jsonschema/check-jsonschema
- rev: 0.21.0
+ rev: 0.22.0
hooks:
- id: check-github-workflows
@@ -30,12 +30,12 @@
- id: mdformat
- repo: https://github.com/psf/black
- rev: 23.1.0
+ rev: 23.3.0
hooks:
- id: black
- repo: https://github.com/charliermarsh/ruff-pre-commit
- rev: v0.0.254
+ rev: v0.0.260
hooks:
- id: ruff
args: ["--fix"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_client-8.1.0/CHANGELOG.md
new/jupyter_client-8.2.0/CHANGELOG.md
--- old/jupyter_client-8.1.0/CHANGELOG.md 2020-02-02 01:00:00.000000000
+0100
+++ new/jupyter_client-8.2.0/CHANGELOG.md 2020-02-02 01:00:00.000000000
+0100
@@ -2,6 +2,27 @@
<!-- <START NEW CHANGELOG ENTRY> -->
+## 8.2.0
+
+([Full
Changelog](https://github.com/jupyter/jupyter_client/compare/v8.1.0...dbf6b81fa5ab606eaedc5e8d0843debce18e8746))
+
+### Enhancements made
+
+- use c.f.Future to wait across threads
[#940](https://github.com/jupyter/jupyter_client/pull/940)
([@minrk](https://github.com/minrk))
+
+### Maintenance and upkeep improvements
+
+- Use local coverage
[#945](https://github.com/jupyter/jupyter_client/pull/945)
([@blink1073](https://github.com/blink1073))
+- Add more project URLs
[#944](https://github.com/jupyter/jupyter_client/pull/944)
([@fcollonval](https://github.com/fcollonval))
+
+### Contributors to this release
+
+([GitHub contributors page for this
release](https://github.com/jupyter/jupyter_client/graphs/contributors?from=2023-03-20&to=2023-04-13&type=c))
+
+[@blink1073](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_client+involves%3Ablink1073+updated%3A2023-03-20..2023-04-13&type=Issues)
|
[@fcollonval](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_client+involves%3Afcollonval+updated%3A2023-03-20..2023-04-13&type=Issues)
|
[@minrk](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_client+involves%3Aminrk+updated%3A2023-03-20..2023-04-13&type=Issues)
|
[@pre-commit-ci](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_client+involves%3Apre-commit-ci+updated%3A2023-03-20..2023-04-13&type=Issues)
+
+<!-- <END NEW CHANGELOG ENTRY> -->
+
## 8.1.0
([Full
Changelog](https://github.com/jupyter/jupyter_client/compare/v8.0.3...e3ac7a69355dd1af66038eda767e51e92ef034fb))
@@ -22,8 +43,6 @@
[@blink1073](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_client+involves%3Ablink1073+updated%3A2023-02-16..2023-03-20&type=Issues)
|
[@brichet](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_client+involves%3Abrichet+updated%3A2023-02-16..2023-03-20&type=Issues)
|
[@minrk](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_client+involves%3Aminrk+updated%3A2023-02-16..2023-03-20&type=Issues)
|
[@pre-commit-ci](https://github.com/search?q=repo%3Ajupyter%2Fjupyter_client+involves%3Apre-commit-ci+updated%3A2023-02-16..2023-03-20&type=Issues)
-<!-- <END NEW CHANGELOG ENTRY> -->
-
## 8.0.3
([Full
Changelog](https://github.com/jupyter/jupyter_client/compare/v8.0.2...dc0eaba1f609079672ec739fcd977dc44431da92))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_client-8.1.0/PKG-INFO
new/jupyter_client-8.2.0/PKG-INFO
--- old/jupyter_client-8.1.0/PKG-INFO 2020-02-02 01:00:00.000000000 +0100
+++ new/jupyter_client-8.2.0/PKG-INFO 2020-02-02 01:00:00.000000000 +0100
@@ -1,8 +1,10 @@
Metadata-Version: 2.1
Name: jupyter_client
-Version: 8.1.0
+Version: 8.2.0
Summary: Jupyter protocol implementation and client libraries
Project-URL: Homepage, https://jupyter.org
+Project-URL: Documentation, https://jupyter-client.readthedocs.io/
+Project-URL: Source, https://github.com/jupyter/jupyter_client
Author-email: Jupyter Development Team <[email protected]>
License: BSD 3-Clause License
@@ -66,7 +68,6 @@
Requires-Dist: sphinxcontrib-github-alt; extra == 'docs'
Requires-Dist: sphinxcontrib-spelling; extra == 'docs'
Provides-Extra: test
-Requires-Dist: codecov; extra == 'test'
Requires-Dist: coverage; extra == 'test'
Requires-Dist: ipykernel>=6.14; extra == 'test'
Requires-Dist: mypy; extra == 'test'
@@ -81,7 +82,6 @@
# Jupyter Client
[](https://github.com/jupyter/jupyter_client/actions)
-[](https://codecov.io/gh/jupyter/jupyter_client)
[](http://jupyter-client.readthedocs.io/en/latest/?badge=latest)
`jupyter_client` contains the reference implementation of the [Jupyter
protocol].
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_client-8.1.0/README.md
new/jupyter_client-8.2.0/README.md
--- old/jupyter_client-8.1.0/README.md 2020-02-02 01:00:00.000000000 +0100
+++ new/jupyter_client-8.2.0/README.md 2020-02-02 01:00:00.000000000 +0100
@@ -1,7 +1,6 @@
# Jupyter Client
[](https://github.com/jupyter/jupyter_client/actions)
-[](https://codecov.io/gh/jupyter/jupyter_client)
[](http://jupyter-client.readthedocs.io/en/latest/?badge=latest)
`jupyter_client` contains the reference implementation of the [Jupyter
protocol].
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_client-8.1.0/codecov.yml
new/jupyter_client-8.2.0/codecov.yml
--- old/jupyter_client-8.1.0/codecov.yml 2020-02-02 01:00:00.000000000
+0100
+++ new/jupyter_client-8.2.0/codecov.yml 1970-01-01 01:00:00.000000000
+0100
@@ -1,9 +0,0 @@
-coverage:
- status:
- project:
- default:
- target: auto
- threshold: 1
- patch:
- default:
- target: 0%
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_client-8.1.0/jupyter_client/__init__.py
new/jupyter_client-8.2.0/jupyter_client/__init__.py
--- old/jupyter_client-8.1.0/jupyter_client/__init__.py 2020-02-02
01:00:00.000000000 +0100
+++ new/jupyter_client-8.2.0/jupyter_client/__init__.py 2020-02-02
01:00:00.000000000 +0100
@@ -1,23 +1,10 @@
"""Client-side implementations of the Jupyter protocol"""
-from ._version import __version__ # noqa
-from ._version import protocol_version # noqa
-from ._version import protocol_version_info # noqa
-from ._version import version_info # noqa
-
-try:
- from .asynchronous import AsyncKernelClient # noqa
- from .blocking import BlockingKernelClient
- from .client import KernelClient
- from .connect import * # noqa
- from .launcher import * # noqa
- from .manager import AsyncKernelManager
- from .manager import KernelManager
- from .manager import run_kernel
- from .multikernelmanager import AsyncMultiKernelManager
- from .multikernelmanager import MultiKernelManager
- from .provisioning import KernelProvisionerBase
- from .provisioning import LocalProvisioner
-except ModuleNotFoundError:
- import warnings
-
- warnings.warn("Could not import submodules")
+from ._version import __version__, protocol_version, protocol_version_info,
version_info
+from .asynchronous import AsyncKernelClient
+from .blocking import BlockingKernelClient
+from .client import KernelClient
+from .connect import * # noqa
+from .launcher import * # noqa
+from .manager import AsyncKernelManager, KernelManager, run_kernel
+from .multikernelmanager import AsyncMultiKernelManager, MultiKernelManager
+from .provisioning import KernelProvisionerBase, LocalProvisioner
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_client-8.1.0/jupyter_client/_version.py
new/jupyter_client-8.2.0/jupyter_client/_version.py
--- old/jupyter_client-8.1.0/jupyter_client/_version.py 2020-02-02
01:00:00.000000000 +0100
+++ new/jupyter_client-8.2.0/jupyter_client/_version.py 2020-02-02
01:00:00.000000000 +0100
@@ -2,7 +2,7 @@
import re
from typing import List, Union
-__version__ = "8.1.0"
+__version__ = "8.2.0"
# Build up version_info tuple for backwards compatibility
pattern = r'(?P<major>\d+).(?P<minor>\d+).(?P<patch>\d+)(?P<rest>.*)'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_client-8.1.0/jupyter_client/connect.py
new/jupyter_client-8.2.0/jupyter_client/connect.py
--- old/jupyter_client-8.1.0/jupyter_client/connect.py 2020-02-02
01:00:00.000000000 +0100
+++ new/jupyter_client-8.2.0/jupyter_client/connect.py 2020-02-02
01:00:00.000000000 +0100
@@ -191,7 +191,9 @@
str : The absolute path of the connection file.
"""
if profile is not None:
- warnings.warn("Jupyter has no profiles. profile=%s has been ignored."
% profile)
+ warnings.warn(
+ "Jupyter has no profiles. profile=%s has been ignored." % profile,
stacklevel=2
+ )
if path is None:
path = [".", jupyter_runtime_dir()]
if isinstance(path, str):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_client-8.1.0/jupyter_client/consoleapp.py
new/jupyter_client-8.2.0/jupyter_client/consoleapp.py
--- old/jupyter_client-8.1.0/jupyter_client/consoleapp.py 2020-02-02
01:00:00.000000000 +0100
+++ new/jupyter_client-8.2.0/jupyter_client/consoleapp.py 2020-02-02
01:00:00.000000000 +0100
@@ -371,5 +371,5 @@
def __init__(self, *args, **kwargs):
"""Initialize the app."""
- warnings.warn("IPythonConsoleApp is deprecated. Use JupyterConsoleApp")
+ warnings.warn("IPythonConsoleApp is deprecated. Use
JupyterConsoleApp", stacklevel=2)
super().__init__(*args, **kwargs)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_client-8.1.0/jupyter_client/launcher.py
new/jupyter_client-8.2.0/jupyter_client/launcher.py
--- old/jupyter_client-8.1.0/jupyter_client/launcher.py 2020-02-02
01:00:00.000000000 +0100
+++ new/jupyter_client-8.2.0/jupyter_client/launcher.py 2020-02-02
01:00:00.000000000 +0100
@@ -162,8 +162,11 @@
msg = msg.format(cmd, env.get("PATH", os.defpath), without_env)
get_logger().error(msg)
except Exception as ex2: # Don't let a formatting/logger issue lead
to the wrong exception
- warnings.warn(f"Failed to run command: '{cmd}' due to exception:
{ex}")
- warnings.warn(f"The following exception occurred handling the
previous failure: {ex2}")
+ warnings.warn(f"Failed to run command: '{cmd}' due to exception:
{ex}", stacklevel=2)
+ warnings.warn(
+ f"The following exception occurred handling the previous
failure: {ex2}",
+ stacklevel=2,
+ )
raise ex
if sys.platform == "win32":
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jupyter_client-8.1.0/jupyter_client/localinterfaces.py
new/jupyter_client-8.2.0/jupyter_client/localinterfaces.py
--- old/jupyter_client-8.1.0/jupyter_client/localinterfaces.py 2020-02-02
01:00:00.000000000 +0100
+++ new/jupyter_client-8.2.0/jupyter_client/localinterfaces.py 2020-02-02
01:00:00.000000000 +0100
@@ -261,7 +261,7 @@
if not suppress_exceptions:
raise
# unexpected error shouldn't crash, load dumb default values instead.
- warn("Unexpected error discovering local network interfaces: %s" % e)
+ warn("Unexpected error discovering local network interfaces: %s" % e,
stacklevel=2)
_load_ips_dumb()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_client-8.1.0/jupyter_client/manager.py
new/jupyter_client-8.2.0/jupyter_client/manager.py
--- old/jupyter_client-8.1.0/jupyter_client/manager.py 2020-02-02
01:00:00.000000000 +0100
+++ new/jupyter_client-8.2.0/jupyter_client/manager.py 2020-02-02
01:00:00.000000000 +0100
@@ -178,7 +178,7 @@
@property
def kernel_spec(self) -> t.Optional[kernelspec.KernelSpec]:
- if self._kernel_spec is None and self.kernel_name != "":
+ if self._kernel_spec is None and self.kernel_name != "": # noqa
self._kernel_spec =
self.kernel_spec_manager.get_kernel_spec(self.kernel_name)
return self._kernel_spec
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_client-8.1.0/jupyter_client/session.py
new/jupyter_client-8.2.0/jupyter_client/session.py
--- old/jupyter_client-8.1.0/jupyter_client/session.py 2020-02-02
01:00:00.000000000 +0100
+++ new/jupyter_client-8.2.0/jupyter_client/session.py 2020-02-02
01:00:00.000000000 +0100
@@ -188,7 +188,7 @@
If Session.key/keyfile have not been set, set Session.key to
a new random UUID.
"""
- warnings.warn("default_secure is deprecated", DeprecationWarning)
+ warnings.warn("default_secure is deprecated", DeprecationWarning,
stacklevel=2)
if "Session" in cfg and ("key" in cfg.Session or "keyfile" in cfg.Session):
return
# key/keyfile not specified, generate new UUID:
@@ -567,7 +567,7 @@
self._check_packers()
self.none = self.pack({})
# ensure self._session_default() if necessary, so bsession is defined:
- self.session
+ self.session # noqa
self.pid = os.getpid()
self._new_auth()
if not self.key:
@@ -861,9 +861,9 @@
stream.send_multipart(to_send, copy=copy)
if self.debug:
- pprint.pprint(msg)
- pprint.pprint(to_send)
- pprint.pprint(buffers)
+ pprint.pprint(msg) # noqa
+ pprint.pprint(to_send) # noqa
+ pprint.pprint(buffers) # noqa
msg["tracker"] = tracker
@@ -1088,7 +1088,7 @@
buffers = [memoryview(bytes(b.bytes)) for b in msg_list[5:]]
message["buffers"] = buffers
if self.debug:
- pprint.pprint(message)
+ pprint.pprint(message) # noqa
# adapt to the current version
return adapt(message)
@@ -1098,5 +1098,6 @@
warnings.warn(
"Session.unserialize is deprecated. Use Session.deserialize.",
DeprecationWarning,
+ stacklevel=2,
)
return self.deserialize(*args, **kwargs)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_client-8.1.0/jupyter_client/ssh/tunnel.py
new/jupyter_client-8.2.0/jupyter_client/ssh/tunnel.py
--- old/jupyter_client-8.1.0/jupyter_client/ssh/tunnel.py 2020-02-02
01:00:00.000000000 +0100
+++ new/jupyter_client-8.2.0/jupyter_client/ssh/tunnel.py 2020-02-02
01:00:00.000000000 +0100
@@ -269,7 +269,7 @@
return tunnel.pid
else:
if failed:
- warnings.warn("Password rejected, try again")
+ warnings.warn("Password rejected, try again", stacklevel=2)
password = None
if password is None:
password = getpass("%s's password: " % (server))
@@ -378,7 +378,7 @@
# else:
# raise
except Exception as e:
- warnings.warn("*** Failed to connect to %s:%d: %r" % (server, port, e))
+ warnings.warn("*** Failed to connect to %s:%d: %r" % (server, port,
e), stacklevel=2)
sys.exit(1)
# Don't let SIGINT kill the tunnel subprocess
@@ -387,10 +387,10 @@
try:
forward_tunnel(lport, remoteip, rport, client.get_transport())
except KeyboardInterrupt:
- warnings.warn("SIGINT: Port forwarding stopped cleanly")
+ warnings.warn("SIGINT: Port forwarding stopped cleanly", stacklevel=2)
sys.exit(0)
except Exception as e:
- warnings.warn("Port forwarding stopped uncleanly: %s" % e)
+ warnings.warn("Port forwarding stopped uncleanly: %s" % e,
stacklevel=2)
sys.exit(255)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_client-8.1.0/jupyter_client/threaded.py
new/jupyter_client-8.2.0/jupyter_client/threaded.py
--- old/jupyter_client-8.1.0/jupyter_client/threaded.py 2020-02-02
01:00:00.000000000 +0100
+++ new/jupyter_client-8.2.0/jupyter_client/threaded.py 2020-02-02
01:00:00.000000000 +0100
@@ -5,7 +5,8 @@
import atexit
import time
from concurrent.futures import Future
-from threading import Event, Thread
+from functools import partial
+from threading import Thread
from typing import Any, Dict, List, Optional
import zmq
@@ -54,17 +55,22 @@
self.socket = socket
self.session = session
self.ioloop = loop
- evt = Event()
+ f: Future = Future()
def setup_stream():
- assert self.socket is not None
- self.stream = zmqstream.ZMQStream(self.socket, self.ioloop)
- self.stream.on_recv(self._handle_recv)
- evt.set()
+ try:
+ assert self.socket is not None
+ self.stream = zmqstream.ZMQStream(self.socket, self.ioloop)
+ self.stream.on_recv(self._handle_recv)
+ except Exception as e:
+ f.set_exception(e)
+ else:
+ f.set_result(None)
assert self.ioloop is not None
self.ioloop.add_callback(setup_stream)
- evt.wait()
+ # don't wait forever, raise any errors
+ f.result(timeout=10)
_is_alive = False
@@ -179,13 +185,31 @@
"""
# We do the IOLoop callback process twice to ensure that the IOLoop
# gets to perform at least one full poll.
- stop_time = time.time() + timeout
+ stop_time = time.monotonic() + timeout
assert self.ioloop is not None
+ if self.stream is None or self.stream.closed():
+ # don't bother scheduling flush on a thread if we're closed
+ _msg = "Attempt to flush closed stream"
+ raise OSError(_msg)
+
+ def flush(f):
+ try:
+ self._flush()
+ except Exception as e:
+ f.set_exception(e)
+ else:
+ f.set_result(None)
+
for _ in range(2):
- self._flushed = False
- self.ioloop.add_callback(self._flush)
- while not self._flushed and time.time() < stop_time:
- time.sleep(0.01)
+ f: Future = Future()
+ self.ioloop.add_callback(partial(flush, f))
+ # wait for async flush, re-raise any errors
+ timeout = max(stop_time - time.monotonic(), 0)
+ try:
+ f.result(max(stop_time - time.monotonic(), 0))
+ except TimeoutError:
+ # flush with a timeout means stop waiting, not raise
+ return
def _flush(self) -> None:
"""Callback for :method:`self.flush`."""
@@ -219,24 +243,32 @@
Don't return until self.ioloop is defined,
which is created in the thread
"""
- self._start_event = Event()
+ self._start_future: Future = Future()
Thread.start(self)
- self._start_event.wait()
+ # wait for start, re-raise any errors
+ self._start_future.result(timeout=10)
def run(self) -> None:
"""Run my loop, ignoring EINTR events in the poller"""
- loop = asyncio.new_event_loop()
- asyncio.set_event_loop(loop)
+ try:
+ loop = asyncio.new_event_loop()
+ asyncio.set_event_loop(loop)
+
+ async def assign_ioloop():
+ self.ioloop = IOLoop.current()
+
+ loop.run_until_complete(assign_ioloop())
+ except Exception as e:
+ self._start_future.set_exception(e)
+ else:
+ self._start_future.set_result(None)
+
loop.run_until_complete(self._async_run())
async def _async_run(self):
- self.ioloop = IOLoop.current()
- # signal that self.ioloop is defined
- self._start_event.set()
- while True:
+ """Run forever (until self._exiting is set)"""
+ while not self._exiting:
await asyncio.sleep(1)
- if self._exiting:
- break
def stop(self) -> None:
"""Stop the channel's event loop and join its thread.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_client-8.1.0/pyproject.toml
new/jupyter_client-8.2.0/pyproject.toml
--- old/jupyter_client-8.1.0/pyproject.toml 2020-02-02 01:00:00.000000000
+0100
+++ new/jupyter_client-8.2.0/pyproject.toml 2020-02-02 01:00:00.000000000
+0100
@@ -45,10 +45,11 @@
[project.urls]
Homepage = "https://jupyter.org"
+Documentation = "https://jupyter-client.readthedocs.io/"
+Source = "https://github.com/jupyter/jupyter_client"
[project.optional-dependencies]
test = [
- "codecov",
"coverage",
"ipykernel>=6.14",
"mypy",
@@ -108,9 +109,9 @@
[tool.hatch.envs.lint]
dependencies = [
- "black[jupyter]==23.1.0",
+ "black[jupyter]==23.3.0",
"mdformat>0.7",
- "ruff==0.0.254",
+ "ruff==0.0.260",
]
[tool.hatch.envs.lint.scripts]
style = [
@@ -155,6 +156,10 @@
"jupyter_client/ssh/forward.py"
]
+[tool.coverage.run]
+relative_files = true
+source = ["jupyter_client"]
+
[tool.mypy]
check_untyped_defs = true
disallow_any_generics = false
@@ -250,6 +255,8 @@
"T201",
# Don't touch noqa lines
"RUF100",
+ # Imported but unused
+ "F401",
]
[tool.ruff.per-file-ignores]
@@ -265,6 +272,8 @@
"tests/*" = ["B011", "F841", "C408", "E402", "T201", "B007", "N802", "EM101",
"EM102", "PLR2004"]
# T201 `print` found
"*app.py" = ["T201"]
+# F401 `._version.__version__` imported but unused
+"jupyter_client/__init__.py" = ["F401"]
[tool.interrogate]
ignore-init-module=true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_client-8.1.0/tests/test_adapter.py
new/jupyter_client-8.2.0/tests/test_adapter.py
--- old/jupyter_client-8.1.0/tests/test_adapter.py 2020-02-02
01:00:00.000000000 +0100
+++ new/jupyter_client-8.2.0/tests/test_adapter.py 2020-02-02
01:00:00.000000000 +0100
@@ -20,7 +20,7 @@
def test_code_to_line_no_code():
line, pos = code_to_line("", 0)
- assert line == ""
+ assert line == "" # noqa
assert pos == 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jupyter_client-8.1.0/tests/test_jsonutil.py
new/jupyter_client-8.2.0/tests/test_jsonutil.py
--- old/jupyter_client-8.1.0/tests/test_jsonutil.py 2020-02-02
01:00:00.000000000 +0100
+++ new/jupyter_client-8.2.0/tests/test_jsonutil.py 2020-02-02
01:00:00.000000000 +0100
@@ -34,7 +34,7 @@
def test_parse_date_invalid():
assert jsonutil.parse_date(None) is None
- assert jsonutil.parse_date("") == ""
+ assert jsonutil.parse_date("") == "" # noqa
assert jsonutil.parse_date("invalid-date") == "invalid-date"