-
Notifications
You must be signed in to change notification settings - Fork 17
Include pinned versions in pyproject.toml when necessary #2598
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: I have concerns with such strict specification which were not resolved. Let's hope it would not immediately affect downstream testing anywhere etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uv.lockis the source of truth for dependency installs, anddandischemais already set to0.11.1in there. So this shouldn't break anything in downstream projects.I'm not super familiar with the release process/the way breaking changes and/or new features happen for
dandischema, but generally we are very intentional about which version we're using. As opposed to, takedjango-allauthfor example (just a random dependency - this applies to most of our other dependencies as well). That is a third-party dependency that we try to keep up to date for bugs, security fixes, etc, but we don't necessarily care about the changes in new releases that aren't applicable todandi-archive. Whereas,dandischemadevelopment is typically driven solely bydandi-archive'srequirements (and vice versa), so we usually upgrade that intentionally to pull in some new feature or schema change thatdandi-archiveneeds.And when doing dependency upgrades (like in #2588), my thinking is that
dandischemashould be treated differently and not get lumped in with third-party dependencies. I suppose another way to look at it is, whiledandischemais a separate python library, it is essentially "our code", as opposed to a third-party package likedjango-allauth.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @mvandenburgh about pinning
dandischema. This is not the general case of wanting to absorb new features/enhancements and security fixes from upstream as with a lot of third-party dependencies; here we really do want to declare that the software works with this exact version ofdandischema, and we're accepting the penalty of manual work to upgrade that dependency when that is necessary. (This is just another way of stating what Mike wrote above, thatdandischemais "our code", and it's only inlined directly in the dandi-archive codebase solely because other components in the ecosystem need to use it.)Put one more way: indeed, we want pyproject.toml to include acceptable ranges; for
dandischema, the acceptable range is precisely one version.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's exactly my point is that it actually works with many other versions of dandischema. As you both describe above -- it is just that our deployment ATM requires a specific one. But for instance development does not have that strict requirement (as e.g. we should be testing against another (development) version). Hence my comment that stating our strict deployment requirement (ok to be in
uv.lock) as compatibility (what "works") requirement (what we state inpyproject.tomlorsetup.*) might give side-effects, as e.g. resolvers complain or refuse to use any other version while developing/testing etc.