Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jupyter/jupyter_client
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v7.4.9
Choose a base ref
...
head repository: jupyter/jupyter_client
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v8.0.0
Choose a head ref
Loading
Showing with 2,952 additions and 1,856 deletions.
  1. +0 −18 .flake8
  2. +10 −0 .github/dependabot.yml
  3. +0 −36 .github/workflows/check-release.yml
  4. +11 −11 .github/workflows/downstream.yml
  5. +92 −82 .github/workflows/main.yml
  6. +42 −0 .github/workflows/prep-release.yml
  7. +54 −0 .github/workflows/publish-release.yml
  8. +22 −53 .pre-commit-config.yaml
  9. +2 −2 readthedocs.yml → .readthedocs.yaml
  10. +266 −25 CHANGELOG.md
  11. +4 −2 COPYING.md
  12. +5 −4 README.md
  13. +8 −6 RELEASING.md
  14. +9 −0 codecov.yml
  15. +0 −53 docs/api/client.rst
  16. +0 −13 docs/api/index.rst
  17. +19 −0 docs/api/jupyter_client.asynchronous.rst
  18. +19 −0 docs/api/jupyter_client.blocking.rst
  19. +25 −0 docs/api/jupyter_client.ioloop.rst
  20. +31 −0 docs/api/jupyter_client.provisioning.rst
  21. +157 −0 docs/api/jupyter_client.rst
  22. +25 −0 docs/api/jupyter_client.ssh.rst
  23. +0 −66 docs/api/kernelspec.rst
  24. +0 −56 docs/api/manager.rst
  25. +7 −0 docs/api/modules.rst
  26. +0 −71 docs/api/provisioners.rst
  27. +10 −13 docs/conf.py
  28. +1 −1 docs/index.rst
  29. +1 −1 docs/messaging.rst
  30. +4 −0 docs/migration.md
  31. +3 −3 jupyter_client/_version.py
  32. +26 −6 jupyter_client/adapter.py
  33. +23 −11 jupyter_client/asynchronous/client.py
  34. +5 −5 jupyter_client/blocking/client.py
  35. +93 −30 jupyter_client/channels.py
  36. +7 −1 jupyter_client/channelsabc.py
  37. +57 −50 jupyter_client/client.py
  38. +4 −1 jupyter_client/clientabc.py
  39. +104 −66 jupyter_client/connect.py
  40. +60 −58 jupyter_client/consoleapp.py
  41. +29 −9 jupyter_client/ioloop/manager.py
  42. +5 −2 jupyter_client/ioloop/restarter.py
  43. +3 −4 jupyter_client/jsonutil.py
  44. +8 −5 jupyter_client/kernelapp.py
  45. +32 −39 jupyter_client/kernelspec.py
  46. +53 −36 jupyter_client/kernelspecapp.py
  47. +13 −16 jupyter_client/launcher.py
  48. +10 −12 jupyter_client/localinterfaces.py
  49. +140 −80 jupyter_client/manager.py
  50. +7 −1 jupyter_client/managerabc.py
  51. +50 −33 jupyter_client/multikernelmanager.py
  52. +49 −49 jupyter_client/provisioning/factory.py
  53. +10 −10 jupyter_client/provisioning/local_provisioner.py
  54. +8 −13 jupyter_client/provisioning/provisioner_base.py
  55. +2 −7 jupyter_client/restarter.py
  56. +13 −12 jupyter_client/runapp.py
  57. +61 −49 jupyter_client/session.py
  58. +1 −1 jupyter_client/ssh/__init__.py
  59. +12 −7 jupyter_client/ssh/forward.py
  60. +11 −14 jupyter_client/ssh/tunnel.py
  61. +0 −62 jupyter_client/tests/conftest.py
  62. +0 −94 jupyter_client/tests/test_client.py
  63. +0 −9 jupyter_client/tests/test_ssh.py
  64. +25 −41 jupyter_client/threaded.py
  65. +2 −35 jupyter_client/utils.py
  66. +1 −1 jupyter_client/win_interrupt.py
  67. +149 −70 pyproject.toml
  68. 0 {jupyter_client → }/tests/__init__.py
  69. +18 −0 tests/conftest.py
  70. 0 {jupyter_client → }/tests/problemkernel.py
  71. +2 −3 {jupyter_client → }/tests/signalkernel.py
  72. +2 −4 {jupyter_client → }/tests/test_adapter.py
  73. +301 −0 tests/test_client.py
  74. +67 −10 {jupyter_client → }/tests/test_connect.py
  75. +41 −0 tests/test_consoleapp.py
  76. +5 −6 {jupyter_client → }/tests/test_jsonutil.py
  77. +3 −4 {jupyter_client → }/tests/test_kernelapp.py
  78. +70 −109 {jupyter_client → }/tests/test_kernelmanager.py
  79. +3 −11 {jupyter_client → }/tests/test_kernelspec.py
  80. +51 −0 tests/test_kernelspecapp.py
  81. +15 −1 {jupyter_client → }/tests/test_localinterfaces.py
  82. 0 {jupyter_client → }/tests/test_manager.py
  83. +97 −52 {jupyter_client → }/tests/test_multikernelmanager.py
  84. +41 −48 {jupyter_client → }/tests/test_provisioning.py
  85. +1 −2 {jupyter_client → }/tests/test_public_api.py
  86. +22 −16 {jupyter_client → }/tests/test_restarter.py
  87. +249 −64 {jupyter_client → }/tests/test_session.py
  88. +18 −0 tests/test_ssh.py
  89. +46 −71 {jupyter_client → }/tests/utils.py
18 changes: 0 additions & 18 deletions .flake8

This file was deleted.

10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
36 changes: 0 additions & 36 deletions .github/workflows/check-release.yml

This file was deleted.

22 changes: 11 additions & 11 deletions .github/workflows/downstream.yml
Original file line number Diff line number Diff line change
@@ -12,20 +12,19 @@ concurrency:
jobs:
ipykernel:
runs-on: ubuntu-latest
timeout-minutes: 10
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- uses: jupyterlab/maintainer-tools/.github/actions/downstream-test@v1
with:
package_name: ipykernel
package_spec: "pyqt5 ipykernel[test]"

nbclient:
runs-on: ubuntu-latest
timeout-minutes: 10
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- uses: jupyterlab/maintainer-tools/.github/actions/downstream-test@v1
with:
@@ -34,19 +33,20 @@ jobs:

nbconvert:
runs-on: ubuntu-latest
timeout-minutes: 10
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- uses: jupyterlab/maintainer-tools/.github/actions/downstream-test@v1
with:
package_name: nbconvert
package_spec: pip install -e ".[test]"

jupyter_server:
runs-on: ubuntu-latest
timeout-minutes: 10
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- uses: jupyterlab/maintainer-tools/.github/actions/downstream-test@v1
with:
@@ -57,7 +57,7 @@ jobs:
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
@@ -87,7 +87,7 @@ jobs:
uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.9"
architecture: "x64"
174 changes: 92 additions & 82 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -9,135 +9,128 @@ concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell:
bash -eux {0}


jobs:
# Run "pre-commit run --all-files --hook-stage=manual"
pre-commit:
name: Run pre-commit hook
check_release:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v3
- name: Run pre-commit
uses: pre-commit/action@v2.0.0
- uses: actions/checkout@v3
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2
with:
extra_args: --all-files --hook-stage=manual
- name: Help message if pre-commit fail
if: ${{ failure() }}
run: |
echo "You can install pre-commit hooks to automatically run formatting"
echo "on each commit with:"
echo " pre-commit install"
echo "or you can run by hand on staged files with"
echo " pre-commit run"
echo "or after-the-fact on already committed files with"
echo " pre-commit run --all-files --hook-stage=manual"
token: ${{ secrets.GITHUB_TOKEN }}

check_links:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1

build-n-test-n-coverage:
name: Build, test and code coverage
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 15
timeout-minutes: 20

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.7", "3.10"]
python-version: ["3.8", "3.11"]
include:
- os: windows-latest
python-version: "3.9"
- os: ubuntu-latest
python-version: "pypy-3.8"
- os: ubuntu-latest
python-version: "3.10"
- os: macos-latest
python-version: "3.8"

env:
OS: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

- name: Install dependencies
run: |
pip install -e .[test]
pip freeze
- uses: actions/checkout@v3
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Run the tests
if: ${{ !startsWith(matrix.python-version, 'pypy') && !startsWith(matrix.os, 'windows') }}
run: |
args="-vv --cov jupyter_client --cov-branch --cov-report term-missing:skip-covered"
python -m pytest $args --cov-fail-under 70 || python -m pytest $args --lf
- name: Run the tests on pypy and windows
if: ${{ startsWith(matrix.python-version, 'pypy') || startsWith(matrix.os, 'windows') }}
hatch run cov:test --cov-fail-under 75 || hatch run test:test --lf
- name: Run the tests on pypy
if: ${{ startsWith(matrix.python-version, 'pypy') }}
run: |
python -m pytest -vv || python -m pytest -vv --lf
hatch run test:nowarn || hatch run test:nowarn --lf
- name: Run the tests on windows
if: ${{ startsWith(matrix.os, 'windows') }}
run: |
hatch run cov:nowarn || hatch run test:nowarn --lf
- name: Code coverage
run: codecov
run: |
pip install codecov coverage[toml]
codecov
docs:
runs-on: ubuntu-latest
timeout-minutes: 10
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

- name: Build the docs
- uses: actions/checkout@v3
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Build API docs
run: |
pip install ".[doc]"
cd docs
make html SPHINXOPTS="-W"
test_miniumum_verisons:
hatch run docs:api
# If this fails run `hatch run docs:api` locally
# and commit.
git status --porcelain
git status -s | grep "A" && exit 1
git status -s | grep "M" && exit 1
echo "API docs done"
- run: hatch run docs:build

lint:
name: Test Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Run Linters
run: |
hatch run typing:test
hatch run lint:style
pipx run interrogate -v .
pipx run doc8 --max-line-length=200 --ignore-path=docs/source/other/full-config.rst
test_minimum_verisons:
name: Test Minimum Versions
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- uses: actions/checkout@v3
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
with:
python_version: "3.7"
- name: Install miniumum versions
uses: jupyterlab/maintainer-tools/.github/actions/install-minimums@v1
dependency_type: minimum
- name: Run the unit tests
run: pytest -vv -W default jupyter_client || pytest -vv -W default jupyter_client --lf
run: |
hatch -vv run test:nowarn || hatch run test:nowarn --lf
test_prereleases:
name: Test Prereleases
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Install the Python dependencies
run: |
pip install --upgrade --upgrade-strategy eager --pre -e ".[test]"
- name: List installed packages
run: |
pip freeze
pip check
- uses: actions/checkout@v3
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
with:
dependency_type: pre
- name: Run the tests
run: |
pytest -vv jupyter_client || pytest -vv jupyter_client --lf
hatch run test:nowarn || hatch run test:nowarn --lf
make_sdist:
name: Make SDist
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- uses: jupyterlab/maintainer-tools/.github/actions/make-sdist@v1

@@ -150,4 +143,21 @@ jobs:
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- uses: jupyterlab/maintainer-tools/.github/actions/test-sdist@v1
with:
test_command: pytest --vv || pytest -vv --lf
test_command: pytest -vv || pytest -vv --lf

tests_check: # This job does nothing and is only used for the branch protection
if: always()
needs:
- test
- docs
- lint
- check_links
- test_minimum_verisons
- test_prereleases
- test_sdist
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
Loading