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 text_type and binary_type wrappers #7970

Merged
merged 2 commits into from Jun 28, 2019

Conversation

Eric-Arellano
Copy link
Contributor

We can now safely use str and bytes everywhere.

Copy link
Sponsor Member

@stuhood stuhood left a comment

Choose a reason for hiding this comment

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

Yay =)

@@ -537,7 +536,9 @@ def satisfied_by_type(self, obj_type):
return issubclass(obj_type, self._types)


_string_type_constraint = SubclassesOf(binary_type, text_type)
# TODO(#6071): We should in general not allow bytes _and_ str. The whole point of Py3 was to decide
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

It would be good to open a more specific ticket for this probably.

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'm planning on addressing this pretty soon, which is why I didn't open a new ticket. Also, #6071 already has several checklist items to tighten up expectations around str vs. bytes.

@Eric-Arellano Eric-Arellano merged commit f12e8e3 into pantsbuild:master Jun 28, 2019
@Eric-Arellano Eric-Arellano deleted the replace-text-type branch June 28, 2019 21:55
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

2 participants