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

Remove/replace runtime dependence on more-itertools, jaraco.functools, and jaraco.collections #341

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Sachaa-Thanasius
Copy link

@Sachaa-Thanasius Sachaa-Thanasius commented Mar 11, 2025

A very small diff that would remove 3/4 of distutil's current dependencies.

Imo, this makes distutils easier to understand by replacing opaque helpers with a) well-known stdlib alternatives, or b) obvious and short idiomatic Python. It also should make vendoring distutils easier (e.g. what setuptools does).

(Re. tests: I ran them locally on Windows via tox, and the results before and after were the same — everything passed besides 1 unrelated cygwin thing.)

(I can make an issue about this first if need be — the diff is so small that I figured this wouldn't hurt, though.)

@Sachaa-Thanasius Sachaa-Thanasius marked this pull request as ready for review March 11, 2025 18:17
@Sachaa-Thanasius Sachaa-Thanasius changed the title Remove/replace runtime dependence on more-itertools, jaraco.functools, and jericho.collections Remove/replace runtime dependence on more-itertools, jaraco.functools, and jaraco.collections Mar 11, 2025
Copy link

@effigies effigies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hope drive-by reviews are welcome. This makes sense to me, and I have one small suggestion.

Co-authored-by: Chris Markiewicz <[email protected]>
@Avasam
Copy link
Contributor

Avasam commented Mar 12, 2025

I know Jason is a strong proponent of DRY, even if it means extra simple dependencies (there's a reason there's so many jaraco packages 😝 ). So I'd expect some push back.
Aside from whether the changes will be accepted in the first place, the new code looks good to me, as a non-maintainer.

@Sachaa-Thanasius
Copy link
Author

Sachaa-Thanasius commented Mar 12, 2025

I know Jason is a strong proponent of DRY . . . . So I'd expect some push back.

Yeah, I was hesitant to open this PR because of that, but figured it was worth a shot. Drastically reducing the dependency "surface area" at the cost of a tiny bit of repetition (and really, it's quite tiny in this case) felt like a reasonable tradeoff.

(And that repetition, if it even qualifies as repetition, is just for the code replacing jaraco.functools and more-itertools - the replacement for jaraco.collections.DictStack doesn't repeat at all)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants