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

issue-3040: Hides traceback for SolverProblemError #3111

Closed
wants to merge 1 commit into from

Conversation

lowitea
Copy link

@lowitea lowitea commented Oct 6, 2020

Pull Request Check List

Resolves: #3040

  • Added tests for changed code.
  • Updated documentation for changed code.

@abn
Copy link
Member

abn commented Oct 7, 2020

@lowitea any chance we can add a test case for this somewhere?

@lowitea
Copy link
Author

lowitea commented Oct 7, 2020

@abn i couldn't think of how to do it :(

@lowitea
Copy link
Author

lowitea commented Oct 25, 2020

@abn Hi
Is it possible to take this without tests?

@abn
Copy link
Member

abn commented Oct 25, 2020

Looks like the solution is not being displayed (this bit).

  • Check your dependencies Python requirement: The Python requirement can be specified via the `python` or `markers` properties
    
    For black, a possible solution would be to set the `python` property to ">=3.6,<4.0"

    https://python-poetry.org/docs/dependency-specification/#python-restricted-dependencies,
    https://python-poetry.org/docs/dependency-specification/#using-environment-markers

Test Command

podman run --rm -i --entrypoint bash python:3.8 <<EOF
set -xe
python -m pip install -q git+https://github.com/python-poetry/poetry.git@refs/pull/3111/head
install -d foobar
cat > pyproject.toml <<TOML
[tool.poetry]
name = "foobar"
version = "0.1.0"
description = ""
authors = ["Your Name <[email protected]>"]

[tool.poetry.dependencies]
python = "^3.5"

[tool.poetry.dev-dependencies]

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
TOML
poetry add black
EOF

Output

+ python -m pip install -q git+https://github.com/python-poetry/poetry.git@refs/pull/3111/head
  WARNING: Did not find branch or tag 'refs/pull/3111/head', assuming revision or ref.
WARNING: You are using pip version 20.2.3; however, version 20.2.4 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
+ install -d foobar
+ cat
+ poetry add black
Creating virtualenv foobar-il7asoJj-py3.8 in /root/.cache/pypoetry/virtualenvs
Using version ^20.8b1 for black

Updating dependencies
Resolving dependencies...
The current project's Python requirement (>=3.5,<4.0) is not compatible with some of the required packages Python requirement:
  - black requires Python >=3.6, so it will not be satisfied for Python >=3.5,<3.6

Because no versions of black match >20.8b1,<21.0
 and black (20.8b1) requires Python >=3.6, black is forbidden.
So, because foobar depends on black (^20.8b1), version solving failed.

@lowitea
Copy link
Author

lowitea commented Oct 26, 2020

Let me check. I’ll contact you later.

@neersighted
Copy link
Member

Closing this as we've removed the default tracebacks with a Cleo change.

@neersighted neersighted closed this Jun 4, 2022
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ux: hide stack trace when solution exists (eg: SolverProblemError)
3 participants