Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update jupyter-client requirement from <8 to <9 #1728

Closed
wants to merge 1 commit into from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jan 27, 2023

Updates the requirements on jupyter-client to permit the latest version.

Release notes

Sourced from jupyter-client's releases.

v8.0.1

8.0.1

(Full Changelog)

Bugs fixed

Contributors to this release

(GitHub contributors page for this release)

@​blink1073

Changelog

Sourced from jupyter-client's changelog.

8.0.1

(Full Changelog)

Bugs fixed

Contributors to this release

(GitHub contributors page for this release)

@​blink1073

8.0.0

(Full Changelog)

This release is primarily focused on improving asyncio support, while aiming to have minimal API changes.

Enhancements made

Bugs fixed

Maintenance and upkeep improvements

... (truncated)

Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added dependencies Python dependencies maintenance labels Jan 27, 2023
@github-actions
Copy link
Contributor

Binder 👈 Launch a Binder on branch jupyter/nbgrader/dependabot/pip/jupyter-client-lt-9

@brichet
Copy link
Contributor

brichet commented Mar 23, 2023

@dependabot rebase

@brichet brichet force-pushed the dependabot/pip/jupyter-client-lt-9 branch from ab1b7b5 to f21b6a3 Compare March 24, 2023 07:25
@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Mar 24, 2023

A newer version of jupyter-client exists, but since this PR has been edited by someone other than Dependabot I haven't updated it. You'll get a PR for the updated version as normal once this PR is merged.

Updates the requirements on [jupyter-client](https://github.com/jupyter/jupyter_client) to permit the latest version.
- [Release notes](https://github.com/jupyter/jupyter_client/releases)
- [Changelog](https://github.com/jupyter/jupyter_client/blob/main/CHANGELOG.md)
- [Commits](jupyter/jupyter_client@4.0.0...v8.0.1)

---
updated-dependencies:
- dependency-name: jupyter-client
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@shreve
Copy link
Contributor

shreve commented Apr 12, 2023

I looked into why this is failing and hit a couple dead ends. I'll come back to it later, but I don't really know where to proceed other than filing various bug reports.

The problem lives in nbclient.NotebookClient. When you combine an infinite loop with a sync jupyter_client.KernelManager you get blocked waiting on a socket with no output and no timeout.

nbclient doesn't notice this because in NotebookClient they define the default kernel_manager_class to be AsyncKernelManager. They even have a test for infinite loops that passes because the async km works.

For a reason I have yet to understand, that default doesn't propagate down to nbconvert or nbgrader. I've even tried applying that trait default value directly into nbgrader.Execute and it doesn't work. It seems the problem is ultimately because of traitlets, but I can't really pinpoint why this config doesn't work.

If I hardcode the value of Execute.kernel_manager_class = AsyncKernelManager the tests pass again. Does that mean we should set that value and remove the ability of users to configure that trait? Maybe, but I don't know.

shreve added a commit to shreve/nbgrader that referenced this pull request Apr 13, 2023
When upgrading the dependency spec to include v8, some python tests
broke (see jupyter#1728). The tests
were failing with a timeout due to indefinitely blocked IO.

This originates in an infinitely-looping notebook and is caused by a
misconfiguration of the client connection. Currently using
`nbclient.NotebookClient` with a `jupyter_client.manager.KernelManager`
results in a deadlock. nbclient doesn't seem aware of this issue because
there is no test covering it. `NotebookClient` uses `AsyncKernelManager`
by default.

So why isn't nbgrader using it? nbgrader uses the NotebookClient via
nbconvert which just realized the same issue. Up until v7.3.1, nbconvert
has been hard-coding the default kernel manager to the sync version.
(see jupyter/nbconvert#1964)

Rather than require nbconvert>=7.3.1, this commit sets our own default
value to the async kernel manager.
@brichet
Copy link
Contributor

brichet commented Jun 15, 2023

Closed in favor of #1778

@brichet brichet closed this Jun 15, 2023
@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Jun 15, 2023

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@dependabot dependabot bot deleted the dependabot/pip/jupyter-client-lt-9 branch June 15, 2023 06:32
shreve added a commit to shreve/nbgrader that referenced this pull request Jun 15, 2023
When upgrading the dependency spec to include v8, some python tests
broke (see jupyter#1728). The tests
were failing with a timeout due to indefinitely blocked IO.

This originates in an infinitely-looping notebook and is caused by a
misconfiguration of the client connection. Currently using
`nbclient.NotebookClient` with a `jupyter_client.manager.KernelManager`
results in a deadlock. nbclient doesn't seem aware of this issue because
there is no test covering it. `NotebookClient` uses `AsyncKernelManager`
by default.

So why isn't nbgrader using it? nbgrader uses the NotebookClient via
nbconvert which just realized the same issue. Up until v7.3.1, nbconvert
has been hard-coding the default kernel manager to the sync version.
(see jupyter/nbconvert#1964)

Rather than require nbconvert>=7.3.1, this commit sets our own default
value to the async kernel manager.
brichet pushed a commit that referenced this pull request Jun 15, 2023
When upgrading the dependency spec to include v8, some python tests
broke (see #1728). The tests
were failing with a timeout due to indefinitely blocked IO.

This originates in an infinitely-looping notebook and is caused by a
misconfiguration of the client connection. Currently using
`nbclient.NotebookClient` with a `jupyter_client.manager.KernelManager`
results in a deadlock. nbclient doesn't seem aware of this issue because
there is no test covering it. `NotebookClient` uses `AsyncKernelManager`
by default.

So why isn't nbgrader using it? nbgrader uses the NotebookClient via
nbconvert which just realized the same issue. Up until v7.3.1, nbconvert
has been hard-coding the default kernel manager to the sync version.
(see jupyter/nbconvert#1964)

Rather than require nbconvert>=7.3.1, this commit sets our own default
value to the async kernel manager.
AlirezaT99 pushed a commit to AaltoSciComp/nbgrader that referenced this pull request Aug 6, 2024
When upgrading the dependency spec to include v8, some python tests
broke (see jupyter#1728). The tests
were failing with a timeout due to indefinitely blocked IO.

This originates in an infinitely-looping notebook and is caused by a
misconfiguration of the client connection. Currently using
`nbclient.NotebookClient` with a `jupyter_client.manager.KernelManager`
results in a deadlock. nbclient doesn't seem aware of this issue because
there is no test covering it. `NotebookClient` uses `AsyncKernelManager`
by default.

So why isn't nbgrader using it? nbgrader uses the NotebookClient via
nbconvert which just realized the same issue. Up until v7.3.1, nbconvert
has been hard-coding the default kernel manager to the sync version.
(see jupyter/nbconvert#1964)

Rather than require nbconvert>=7.3.1, this commit sets our own default
value to the async kernel manager.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Python dependencies maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants