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

jsonschema extra resolution exception in pip #24

Closed
subbyte opened this issue Dec 8, 2022 · 3 comments
Closed

jsonschema extra resolution exception in pip #24

subbyte opened this issue Dec 8, 2022 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@subbyte
Copy link
Member

subbyte commented Dec 8, 2022

Starting from Dec 2022, the default install of the kestrel-jupyter package with the latest pip 22.3.1 is like to fail with error:

ERROR: Exception:
Traceback (most recent call last):
  File "/Users/subx/venv/test5/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 160, in exc_logging_wrapper
    status = run_func(*args)
  File "/Users/subx/venv/test5/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 247, in wrapper
    return func(self, options, args)
  File "/Users/subx/venv/test5/lib/python3.9/site-packages/pip/_internal/commands/install.py", line 400, in run
    requirement_set = resolver.resolve(
  File "/Users/subx/venv/test5/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 92, in resolve
    result = self._result = resolver.resolve(
  File "/Users/subx/venv/test5/lib/python3.9/site-packages/pip/_vendor/resolvelib/resolvers.py", line 481, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/Users/subx/venv/test5/lib/python3.9/site-packages/pip/_vendor/resolvelib/resolvers.py", line 373, in resolve
    failure_causes = self._attempt_to_pin_criterion(name)
  File "/Users/subx/venv/test5/lib/python3.9/site-packages/pip/_vendor/resolvelib/resolvers.py", line 222, in _attempt_to_pin_criterion
    satisfied = all(
  File "/Users/subx/venv/test5/lib/python3.9/site-packages/pip/_vendor/resolvelib/resolvers.py", line 223, in <genexpr>
    self._p.is_satisfied_by(requirement=r, candidate=candidate)
  File "/Users/subx/venv/test5/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/provider.py", line 233, in is_satisfied_by
    return requirement.is_satisfied_by(candidate)
  File "/Users/subx/venv/test5/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/requirements.py", line 84, in is_satisfied_by
    assert candidate.name == self.name, (
AssertionError: Internal issue: Candidate is not for this requirement jsonschema[format-nongpl,format-nongpl] vs jsonschema[format-nongpl]

Not sure why pip deducts something like jsonschema[format-nongpl,format-nongpl].

After checking where the jsonschema is used, I find three places/packages that use it as a dependency:

  • jupyterlab-server
  • nbformat
  • stix2-validator

When downgrade jupyterlab-server from the latest 2.16.4 to 2.15.2, the problem is solved and kestrel-jupyter installs successfully with the latest pip. Need to release a patch for kestrel-jupyter and check with jupyterlab-server to further debug.

@subbyte subbyte added the bug Something isn't working label Dec 8, 2022
@subbyte subbyte self-assigned this Dec 8, 2022
@subbyte
Copy link
Member Author

subbyte commented Dec 9, 2022

Create an issue at the pip project for this: pypa/pip#11649

@subbyte
Copy link
Member Author

subbyte commented Oct 9, 2023

Already fixed in pip, to be released in the next pip release (current: 23.2.1)

@subbyte
Copy link
Member Author

subbyte commented Oct 20, 2023

Good with pip 23.3

@subbyte subbyte closed this as completed Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant