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 more_itertools.more from vendored libs (fixes pypa/setuptools#3090) #3091

Merged
merged 6 commits into from
Feb 8, 2022

Conversation

maciejp-ro
Copy link
Contributor

@maciejp-ro maciejp-ro commented Feb 8, 2022

Summary of changes

Remove more_itertools.more from vendored more_itertools, which is unused, large, and breaks gevent by importing concurrent.futures.threading (see gevent/gevent#1865).

Closes #3090

Files in vendored .dist-info directory still refer to removed files, I'm assuming it's not a problem because other modifications in tools/vendored.py don't update the checksums.

Pull Request Checklist

@webknjaz webknjaz requested a review from jaraco February 8, 2022 20:02
.coveragerc Outdated Show resolved Hide resolved
changelog.d/3091.misc.rst Outdated Show resolved Hide resolved
changelog.d/3091.misc.rst Outdated Show resolved Hide resolved
maciejp-ro and others added 2 commits February 8, 2022 21:10
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
Copy link
Member

@jaraco jaraco left a comment

Choose a reason for hiding this comment

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

I was inclined to simply accept this change before I realized that it's likely that I'll want to use some of the functionality in more.

I've proposed an alternate approach. WDYT?

"""
Rewrite more_itertools to remove unused more_itertools.more
"""
for more_file in pkg_files.glob("more.py*"):
Copy link
Member

Choose a reason for hiding this comment

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

Instead of glob, just use pkg_files.joinpath('more.py') and apply the changes to that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The intent was to remove also associated *.pyi files to prevent typechecker (and possibly also smart editors) from believing the removed content is still there

'UnequalIterablesError',
'adjacent',
'all_unique',
'always_iterable',
Copy link
Member

Choose a reason for hiding this comment

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

I'm expecting to use this function sooner than later as it satisfies a common pattern.

tools/vendored.py Outdated Show resolved Hide resolved
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
@maciejp-ro
Copy link
Contributor Author

I have confirmed that lazy import also fixes gevent freeze, PR updated

@jaraco jaraco merged commit 43d9e48 into pypa:main Feb 8, 2022
@jaraco
Copy link
Member

jaraco commented Feb 8, 2022

Thanks for the fix. Releasing as v60.8.2.

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.

[BUG] 60.7.0 breaks gevent monkeypatching
3 participants