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

pep440: failed to calculate newValue #25501

Closed
rarkins opened this issue Oct 30, 2023 Discussed in #25495 · 1 comment · Fixed by #28950
Closed

pep440: failed to calculate newValue #25501

rarkins opened this issue Oct 30, 2023 Discussed in #25495 · 1 comment · Fixed by #28950
Labels
priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:bug Bug fix of existing functionality versioning:pep440 PEP440 versioning scheme

Comments

@rarkins
Copy link
Collaborator

rarkins commented Oct 30, 2023

Discussed in #25495

Originally posted by nijel October 30, 2023

How are you running Renovate?

Mend Renovate hosted app on github.com

If you're self-hosting Renovate, tell us what version of Renovate you run.

No response

If you're self-hosting Renovate, select which platform you are using.

None

Was this something which used to work for you, and then stopped?

It used to work, and then stopped

Describe the problem

When the current package version from PyPI is restricted in the dependencies, a warning appears: pep440: failed to calculate newValue.

It is also shown as an error in the Rennovate app:

obrazek

Presently, this can be reproduced with the following requirements.txt:

sentry-sdk>=1.25.0,<2,!=1.32.0

I understand that there is no update possible, but the warning makes it quite hard to see what is going on.

EDIT: Reproducer repo is at https://github.com/nijel/renovate-25495

Relevant debug logs

Logs
WARN: pep440: failed to calculate newValue
{
  "result": ">=1.25.0,<2,!=1.32.0"
  "newVersion": "1.32.0"
  "currentValue": ">=1.25.0,<2,!=1.32.0"
}

Have you created a minimal reproduction repository?

I have linked to a minimal reproduction in the description above

@rarkins rarkins added type:bug Bug fix of existing functionality priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others versioning:pep440 PEP440 versioning scheme labels Oct 30, 2023
@RahulGautamSingh
Copy link
Collaborator

I think the fix here is to add an if-statement to check whether the newVersion is excluded from range. And, if so log a DEBUG message informing of the same instead of the current warning.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:bug Bug fix of existing functionality versioning:pep440 PEP440 versioning scheme
Projects
None yet
2 participants