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

Restore several removed targets and fields to help with upgrading #10970

Merged
merged 2 commits into from Oct 15, 2020

Conversation

Eric-Arellano
Copy link
Contributor

Closes #10963.

Even though these restored types no-op, a user pointed out that this will help with upgrading to 2.0. You can use pants_ignore_warnings to ignore these no-ops until you're ready to deal with them. We had no good reason to eagerly error, other than oversight.

# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
@@ -104,6 +108,14 @@ class BundlesField(SequenceField):
expected_element_type = Bundle
expected_type_description = "an iterable of `bundle` objects"

@classmethod
def compute_value(cls, raw_value: Optional[Iterable[Bundle]], *, address: Address) -> None:
try:
Copy link
Member

Choose a reason for hiding this comment

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

you can use contextlib.suppress

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, good point. This code is only being added to 2.0.0, though, in a hackily named deprecated_v1_target_types.py file, so I'm not gonna worry about it.

Good to know for the future, though.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 0.0% when pulling 67d808a on Eric-Arellano:restore-fields into 6a4ac8c on pantsbuild:2.0.x.

@Eric-Arellano Eric-Arellano merged commit d0a86f5 into pantsbuild:2.0.x Oct 15, 2020
@Eric-Arellano Eric-Arellano deleted the restore-fields branch October 15, 2020 23:12
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.

None yet

4 participants