Repository navigation
Use of local versions in pep440 ranges (was: Renovate does not update pip dependencies when there is no semver change) #34101
Replies: 2 comments 7 replies
|
Hi there, Get your discussion fixed faster by creating a minimal reproduction. This means a repository dedicated to reproducing this issue with the minimal dependencies and config possible. Before we start working on your issue we need to know exactly what's causing the current behavior. A minimal reproduction helps us with this. Discussions without reproductions are less likely to be converted to Issues. Please follow these steps:
If you need help with running renovate on your minimal reproduction repository, please refer to our Running Renovate guide. The Renovate team |
|
I've added some unit tests to our pep440 There seems to be some intentional matching like this in Renovate's pep440 implementation: Pep440's docs on local identifiers (
And I think that here is the conclusion:
As as I read it, it says that |

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
How are you running Renovate?
Self-hosted Renovate
If you're self-hosting Renovate, tell us which platform (GitHub, GitLab, etc) and which version of Renovate.
GitHub, Renovate version v9.37.3
Please tell us more about your question or problem
I am trying to update Python packages that follow the pattern
<major>.<minor>.<patch>+<timestamp>.pep440versioning Renovate is using already sorts the versions correctly for this use case, giving preference to versions with a larger timestamp, but there seems to be a bug stopping updates from happening correctly.Say my
requirements.txtlooks like this:and there's a new version
1.0.0+2available.What I observe is:
currentValue="==1.0.0+1"andcurrentVersion="1.0.0+1"currentVersiongets set to1.0.0+2in the first call togetCurrentVersion. There is this check at the start:currentValueis prefixed with==, whereas the versions inallVersionsare not, so this doesn't get entered. Later in the function the getSatisfyingVersion function gets called where the latest version gets selected, because I assume there's no concept of a range for the local part of the pep440 versioning.It's also not clear to me why
currentVersionneeds to be retrieved like this in the first place. Say a version has been revoked and is no longer in the list of versions returned by a datasource, why would we set the current version to the latest one matching instead of using the old version?currentVersionis the same as the newest version, resulting in no updates. This does not seem correct.I'm not sure what's the appropriate fix for this. It seems that
currentValuereceived bygetCurrentVersionshouldn't have the==prefix but I don't know whether that means passing something else to the function or dropping the prefix somewhere earlier in the execution. Alternatively it would also work ifgetSatisfyingVersiondidn't return1.0.0+2.EDIT: here is a small self-contained reproducer: https://github.com/samgiz/renovate-34101-reproducer/
Logs (if relevant)
No response
All reactions