Skip to content
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

feat: helper to get dependency-groups #876

Merged
merged 5 commits into from
Oct 30, 2024

Conversation

henryiii
Copy link
Collaborator

@henryiii henryiii commented Oct 28, 2024

Starting work on #845.

I was going to use @sirosen's dependency-groups, but it only supports 3.9+ - even the first version was 3.9+. I don't think that was a great idea for a foundational utility, but it's what it is. So we can't use it yet. And this is pretty easy, I think we can just write our own support as long as it's tested.

I've improved on the example implementation several ways: setdefault is a safer than defaultdict. I've used generators to remove the appends and extends. And I've used *args to simplify the past_groups handling.

I think we can start with a function like this, and maybe eventually come up with a nicer interface for things in pyproject.toml. But this is simple and could be used by the fancier interface later.

@sirosen
Copy link

sirosen commented Oct 28, 2024

I was going to use @sirosen's dependency-groups, but it only supports 3.9+ - even the first version was 3.9+. I don't think that was a great idea for a foundational utility, but it's what it is.

Oh, I'm happy to add 3.8 support! In fact, rather than delaying, I just did in v1.1.0 .

I'm not sure why I wasn't more conservative about the supported versions when creating the library, but I agree that was a mistake.

@henryiii
Copy link
Collaborator Author

Great, thanks! FWIW, I don't care if the latest version is 3.9+ (or 3.13+), I just need a working 3.8 version that gets pulled by 3.8. :)

@henryiii
Copy link
Collaborator Author

henryiii commented Oct 29, 2024

FYI, the only thing left is rebasing after #877 and adding docs. Edit: I've added the docs changes from #877 here and added docs, so now it doesn't depend on that one, and either can go in first.

@henryiii henryiii marked this pull request as ready for review October 29, 2024 18:36
Signed-off-by: Henry Schreiner <[email protected]>
Signed-off-by: Henry Schreiner <[email protected]>
Signed-off-by: Henry Schreiner <[email protected]>
.pre-commit-config.yaml Outdated Show resolved Hide resolved
nox/project.py Outdated Show resolved Hide resolved
@henryiii henryiii merged commit f2325f1 into wntrblm:main Oct 30, 2024
24 checks passed
@henryiii henryiii deleted the henryiii/feat/groups branch October 30, 2024 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants