-
-
Notifications
You must be signed in to change notification settings - Fork 183
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
Leverage uv
#1257
base: master
Are you sure you want to change the base?
Leverage uv
#1257
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1257 +/- ##
==========================================
- Coverage 88.05% 88.02% -0.04%
==========================================
Files 67 67
Lines 5904 5904
==========================================
- Hits 5199 5197 -2
- Misses 705 707 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
ab02d7e
to
762f9ba
Compare
"requests ~=2.32.3", # Used in test_version.py | ||
"time-machine ~=2.15.0", | ||
"tomli; python_version<'3.11'", # Used in test_version.py | ||
"werkzeug ~=3.0.6", # Used in moto_server.py |
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.
this is a side-effect of moto, if moto changes werkzeug we need to change our impl as well. IOW this is not our choice
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.
if it makes you feel better can import this from moto directly ;)
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.
Sorry, if I'm mistaken, but I thought we had resolved that as part of #1246. We use werkzeug
directly in unit tests and that specification guards us from regressions should moto drop that dependency. I agree that we might then subsequently also drop werkzeug, but that's a separate issue, IMO.
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.
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.
no, see my reply: #1246 (comment)
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.
if moto stops using that library, we NEED to update our code, and having the import fail is a feature letting us know something needs to be re-written to match moto
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.
if we include that library we're going to have some weird side-effect behavior of moto moves away from using the library
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.
It's a direct dependency right now: #1246 (comment). Pretending that it isn't wouldn't change the fact that it is, it'd only make it more confusing.
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.
how is it confusing? This is just for aiobotocore developers, if you think the two people that ever maintain deps would get confused add a comment on the only import line saying we're not including the dep because we want the code to break if moto ever moves away from werkzerg
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.
following rules for rules sake is fools errand, there will always be exceptions
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.
My biggest concern is forcing yet another tool on contributors.
@@ -13,31 +13,24 @@ First of all, clone the repository:: | |||
|
|||
$ git clone [email protected]:aio-libs/aiobotocore.git | |||
|
|||
Create virtualenv with at least python3.8 (older versions are not supported). |
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 don't think it's a good idea to dictate contributing workflows in general. Less vendor locking is better.
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 a valid point and I strongly convinced our documentation may be improved upon. Since I'm not a technical writer nor an English native, I hesitate to take the initiative.
What I like about uv
is that it works well out-of-the-box and makes many of the previously documented steps obsolete.
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.
If there was a standard lock file format and tooling that supported it, we would be in a different place, but as of now, I believe uv offers the best overall experience and is a major step forward for this project.
If there is no consensus, we may well close this PR. No hard feelings: it was not a lot of effort to put this together.
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 think that it's good for CI. I'm just concerned that telling people to install a tool that messes with their userspace by default is not to be taken lightly.
Personally, I tend to be cautious when it comes to such things. I'm comfortable with tox
because I know it won't affect my env beyond the project dir, for example.
I've been playing with pipx/uvx recently, but really carefully.
I think that there would be a portion of contributors that would feel like we're sending them off to learn an entirely new tool and its implications. So if there's a way to improve this, it should be taken into account.
This was one of my problems w/ Poetry, by the way. To this day, I avoid interacting with projects that don't let me do my thing w/o touching it.
OTOH, it's probably fine where there's CI to validate changes — in such cases, I just edit the files, push the thing and hope to see some feedback from the interface that isn't as eager to interfere with how I get to use my computer.
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.
What is your take on dev containers? Would that address your objections? I want to learn about those this year.
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.
Honestly, all active contributors have already commented on this PR. Not sure if there is anyone else that feels strongly about these issue - or at all.
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.
What is your take on dev containers? Would that address your objections? I want to learn about those this year.
I've been meaning to look deeper into these as well. I think, they might be a good interface to declare (and keep working through CI). They'd enable more contributors, especially those from the VS Code land or GitHub Codespaces.
I'm a NeoVim user (AstroNvim mostly) and I'd like to try them out too, I've heard there's integrations.
But I think the main benefit is that enabling more contributors to start seamlessly is not blocking anybody who wouldn't want to opt in.
Honestly, all active contributors have already commented on this PR. Not sure if there is anyone else that feels strongly about these issue - or at all.
Fair. Although, I'm mostly thinking of potential contributors, not the existing ones. The existing contributors are more likely to adapt and try out different things. But if for somebody the entry barrier is becoming higher, it might gate them and prevent them from trying.
My sales pitch would be that in our context
For me personally, having worked mostly on poetry based projects, it's a single, well-known tool, that is trivial to adopt and improves developer experience by a lot. And it may be used in conjuncture with existing tools, if one prefers to take that route. |
Well, let's try it out. I've outlined my concerns and I think that |
I really, really appreciate your thoughtful reviews. |
Description of Change
Leverage
uv
for local development environment and CI/CD pipeline.Assumptions
Replace this text with any assumptions made (if any)
Checklist for All Submissions
Checklist when updating botocore and/or aiohttp versions