Skip to content

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
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.

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
@maciejp-ro maciejp-ro force-pushed the remove-more_itertools.more branch from c8464bf to 44b39e0 Compare February 8, 2022 22:31
@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