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

[minor] Improve exception chaining #133

Merged
merged 1 commit into from
Aug 4, 2023

Conversation

hauntsaninja
Copy link
Contributor

This will clean up the following stacktrace a little

Traceback (most recent call last):
  File "/Users/shantanu/.local/pipx/shared/lib/python3.9/site-packages/pip/_vendor/resolvelib/resolvers.py", line 316, in _backjump
    name, candidate = broken_state.mapping.popitem()
KeyError: 'dictionary is empty'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/shantanu/.local/pipx/shared/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 92, in resolve
    result = self._result = resolver.resolve(
  File "/Users/shantanu/.local/pipx/shared/lib/python3.9/site-packages/pip/_vendor/resolvelib/resolvers.py", line 546, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/Users/shantanu/.local/pipx/shared/lib/python3.9/site-packages/pip/_vendor/resolvelib/resolvers.py", line 434, in resolve
    success = self._backjump(causes)
  File "/Users/shantanu/.local/pipx/shared/lib/python3.9/site-packages/pip/_vendor/resolvelib/resolvers.py", line 318, in _backjump
    raise ResolutionImpossible(causes)
pip._vendor.resolvelib.resolvers.ResolutionImpossible: [ ... ]

This will clean up the following stacktrace a little
```
Traceback (most recent call last):
  File "/Users/shantanu/.local/pipx/shared/lib/python3.9/site-packages/pip/_vendor/resolvelib/resolvers.py", line 316, in _backjump
    name, candidate = broken_state.mapping.popitem()
KeyError: 'dictionary is empty'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/shantanu/.local/pipx/shared/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 92, in resolve
    result = self._result = resolver.resolve(
  File "/Users/shantanu/.local/pipx/shared/lib/python3.9/site-packages/pip/_vendor/resolvelib/resolvers.py", line 546, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/Users/shantanu/.local/pipx/shared/lib/python3.9/site-packages/pip/_vendor/resolvelib/resolvers.py", line 434, in resolve
    success = self._backjump(causes)
  File "/Users/shantanu/.local/pipx/shared/lib/python3.9/site-packages/pip/_vendor/resolvelib/resolvers.py", line 318, in _backjump
    raise ResolutionImpossible(causes)
pip._vendor.resolvelib.resolvers.ResolutionImpossible: [ ... ]
```
@frostming frostming merged commit 77b256c into sarugaku:main Aug 4, 2023
7 checks passed
@hauntsaninja hauntsaninja deleted the hauntsaninja-patch-1 branch August 4, 2023 01:58
@notatallshaw notatallshaw mentioned this pull request Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants