feat: Allow uploading packages from files and bytes#2633
Merged
nejch merged 2 commits intopython-gitlab:mainfrom Oct 12, 2023
ernestask:wip/ernestask/package-upload-bytes
Merged
feat: Allow uploading packages from files and bytes#2633nejch merged 2 commits intopython-gitlab:mainfrom ernestask:wip/ernestask/package-upload-bytes
nejch merged 2 commits intopython-gitlab:mainfrom
ernestask:wip/ernestask/package-upload-bytes
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2633 +/- ##
==========================================
+ Coverage 96.35% 96.39% +0.03%
==========================================
Files 87 87
Lines 5656 5662 +6
==========================================
+ Hits 5450 5458 +8
+ Misses 206 204 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
nejch
requested changes
Oct 12, 2023
This commit adds a keyword argument to GenericPackageManager.upload() to allow uploading bytes and file-like objects to the generic package registry. That necessitates changing file path to be a keyword argument as well, which then cascades into a whole slew of checks to not allow passing both and to not allow uploading file-like objects as JSON data. Closes #1815
Member
|
Thanks @ernestask and sorry to keep you waiting, I pushed a small commit to fix test names so it's not blocking you any longer. We could probably document this a bit as well, but not urgent. |
Contributor
Author
|
Memory fails me now, but I did want to write some docs. Something stopped me, though… Probably just wasn’t sure where and what to put. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Changes
This commit adds a keyword argument to GenericPackageManager.upload() to allow uploading bytes and file-like objects to the generic package registry. That necessitates changing file path to be a keyword argument as well, which then cascades into a whole slew of checks to not allow passing both and to not allow uploading file-like objects as JSON data.
Closes #1815
Documentation and testing
Please consider whether this PR needs documentation and tests. This is not required, but highly appreciated: