Skip to content

Remove toolz.itertoolz.concatv #12020

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

Merged
merged 7 commits into from
Oct 31, 2022
Merged

Conversation

kenodegard
Copy link
Contributor

@kenodegard kenodegard commented Oct 26, 2022

Description

Opting to use argument unpacking instead of toolz.itertoolz.concatv. All of the uses of concatv were immediately expanded into static types, so the generator concatv returned was unnecessary.

Alternative to #11769

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Oct 26, 2022
@kenodegard kenodegard force-pushed the remove-concatv branch 2 times, most recently from 1e4b802 to 1526698 Compare October 26, 2022 23:54
@kenodegard kenodegard marked this pull request as ready for review October 27, 2022 16:11
@kenodegard kenodegard requested a review from a team as a code owner October 27, 2022 16:11
dholth
dholth previously approved these changes Oct 27, 2022
@@ -905,13 +911,13 @@ def _make_link_actions(transaction_context, package_info, target_prefix, request
# register_private_env_actions = ()

# the ordering here is significant
Copy link
Contributor

Choose a reason for hiding this comment

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

oh yeah? YOU're significant

@kenodegard kenodegard force-pushed the remove-concatv branch 2 times, most recently from dae43a7 to f3e318d Compare October 27, 2022 19:42
@kenodegard kenodegard self-assigned this Oct 27, 2022
@kenodegard kenodegard added the in-progress issue is actively being worked on label Oct 28, 2022
jezdez
jezdez previously approved these changes Oct 28, 2022
*grouped_precs.get(PackageType.VIRTUAL_PYTHON_WHEEL, ()),
*grouped_precs.get(PackageType.VIRTUAL_PYTHON_EGG_MANAGEABLE, ()),
*grouped_precs.get(PackageType.VIRTUAL_PYTHON_EGG_UNMANAGEABLE, ()),
# *grouped_precs.get(PackageType.SHADOW_PYTHON_EGG_LINK, ()),
Copy link
Member

Choose a reason for hiding this comment

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

Should we remove this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have no idea what PackageType.SHADOW_PYTHON_EGG_LINK refers to, so I'm worried potentially important information will get lost.

@dholth
Copy link
Contributor

dholth commented Oct 28, 2022

I'm OK with transforms like this one not including any refactors (that happen to be nearby the transform). LGTM.

kenodegard and others added 7 commits October 31, 2022 13:04
Standard Python's argument unpacking is sufficient since all of these cases do not need to be lazily evaluated via generators.
Co-authored-by: Jannis Leidel <jannis@leidel.info>
@kenodegard kenodegard enabled auto-merge (squash) October 31, 2022 20:57
Copy link
Contributor

@dholth dholth left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -327,7 +327,7 @@ def push_record(record):
# add feature records for the solver
known_features = set()
for rec in reduced_index.values():
known_features.update(concatv(rec.track_features, rec.features))
known_features.update((*rec.track_features, *rec.features))
Copy link
Contributor

Choose a reason for hiding this comment

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

Good remembering it winds up with (( and )) on either side

@kenodegard kenodegard merged commit bf38806 into conda:main Oct 31, 2022
@kenodegard kenodegard deleted the remove-concatv branch October 31, 2022 22:26
jeskowagner pushed a commit to jeskowagner/conda that referenced this pull request Nov 9, 2022
* Stop using toolz.concatv

Standard Python's argument unpacking is sufficient since all of these cases do not need to be lazily evaluated via generators.

* Include vendor licenses and remove legacy vendoring

Co-authored-by: Jannis Leidel <jannis@leidel.info>
@github-actions github-actions bot added the locked [bot] locked due to inactivity label Nov 1, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed [bot] added once the contributor has signed the CLA in-progress issue is actively being worked on locked [bot] locked due to inactivity
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants