aiobotocore
aiobotocore copied to clipboard
Replace setuptools with Poetry
Description of Change
Intended to obsolete #835. This PR fixes tests and CI that are (as best as I can tell as of this writing) broken in #835.
Assumptions
Compared to the existing build system using setuptools and Pipfile, Poetry makes it easier to
- Make builds fully reproducible (especially in e.g. CI) by automating the update of the lock file.
- Ensure that pinned versions of botocore, boto3, and awscli are compatible.
Checklist for All Submissions
- [X] (NA) I have added change info to CHANGES.rst
- [X] (NA) If this is resolving an issue (needed so future developers can determine if change is still necessary and under what conditions) (can be provided via link to issue with these details):
- [ ] Detailed description of issue
- [ ] Alternative methods considered (if any)
- [ ] How issue is being resolved
- [ ] How issue can be reproduced
- [X] (NA) If this is providing a new feature (can be provided via link to issue with these details):
- [ ] Detailed description of new feature
- [ ] Why needed
- [ ] Alternatives methods considered (if any)
Checklist when updating botocore and/or aiohttp versions
- [X] I have read and followed CONTRIBUTING.rst
- [X] I have updated test_patches.py where/if appropriate (also check if no changes necessary)
- [X] (NA) I have ensured that the awscli/boto3 versions match the updated botocore version
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 84.81%. Comparing base (
551343c
) to head (caf724d
). Report is 55 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #975 +/- ##
==========================================
- Coverage 84.98% 84.81% -0.18%
==========================================
Files 50 50
Lines 4529 4464 -65
==========================================
- Hits 3849 3786 -63
+ Misses 680 678 -2
Flag | Coverage Δ | |
---|---|---|
unittests | 84.81% <ø> (-0.18%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This pull request fixes 8 alerts when merging ebc5ce5d1caf59577799462e65214f793a91d386 into 551343c403a1e66cac038d5b15080fac103d0694 - view on LGTM.com
fixed alerts:
- 5 for Missing call to `__init__` during object initialization
- 2 for Module is imported with 'import' and 'import from'
- 1 for `__eq__` not overridden when adding attributes
@thehesiod Any opinions on these changes?
@lafrenierejm cool! we finally bumped, could you merge/re-base. Also how does this solution guarantee that each PR has a correct boto3/awscli match to the botocore version? Wouldn't you need to re-lock each time? I would think we shouldn't have a lockfile checked in in that case.
If we are to change tools, maybe we should look at tools that support PEP 621. There are notable examples in the "PEP 517 ecosystem", like:
- PDM, which supports lock file and reproducible builds, and seem to have better dependency resolution than poetry
-
Hatch, which have a great support for plugins. One good example is hatch-vcs, a plugin able to use the current git tag as the
version
package metadata, and automatically update the__version__
variable in__init__.py
.
cool thanks for the tips, worthy conversation
@lafrenierejm cool! we finally bumped, could you merge/re-base. Also how does this solution guarantee that each PR has a correct boto3/awscli match to the botocore version? Wouldn't you need to re-lock each time? I would think we shouldn't have a lockfile checked in in that case.
So the match is enforced via the versions provided in pyproject.toml
if you specify exact version then aiobotocore
will require it. Since your code is a package not an application. The lock file is not relevant when uploading the package to PyPI.
The poetry.lock
is still useful for development, as it pins all of the lose versions specified in pyproject.toml
to specific ones. It is essentially doing the same thing as when you run pip-compile requirements-dev.in
After trying to contribute a PR I think switching from setuptools
to poetry
would simplify development.
@thehesiod: Would you agree that this PR is stale and may be closed at this point?
Would you agree that this PR is stale and may be closed at this point?
I'm not @thehesiod, but this is definitely stale and should be closed. I'll go ahead and do so.