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

Replaced all types that are either missing or deprecated in Python3 with suitable alternatives that are still compatible with Python2. #82

Merged
merged 18 commits into from
Dec 12, 2020

Conversation

arizvisa
Copy link
Owner

Python3 removes types from the types module like types.NoneType and types.TypeType. This PR replaces types.NoneType with None.__class__, and types.TypeType with builtins.type. The basestring base class is also removed as there is now only one str class to rule them all. In order to retain Python2 compatibility, this class is replaced with six.string_types.

This PR is the third part of the fix for issue #76, and is dependant on PR #81.

@arizvisa arizvisa self-assigned this Nov 26, 2020
Copy link
Owner Author

@arizvisa arizvisa left a comment

Choose a reason for hiding this comment

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

Looks good to me. Also, grepping says this is the truth. My eyes hurt.

@arizvisa arizvisa force-pushed the GH-76.types branch 2 times, most recently from cba2d10 to 9a68f72 Compare December 4, 2020 02:20
…stead use the `six.string_types` tuple for Python3 compatibility.
…tead use the `six.string_types` tuple for Python3 compatibility.
…nstead use the `six.string_types` tuple for Python3 compatibility.
… instead use the `six.string_types` tuple for Python3 compatibility.
… instead use the `six.string_types` tuple for Python3 compatibility.
…stead use the `six.string_types` tuple for Python3 compatibility.
…to instead use the `six.string_types` tuple for Python3 compatibility.
…nstead use the `six.string_types` tuple for Python3 compatibility.
…ead use the `six.string_types` tuple for Python3 compatibility.
…use the `six.string_types` tuple for Python3 compatibility.
…nce integers defined with `int` are the exact same thing.
Copy link
Owner Author

@arizvisa arizvisa left a comment

Choose a reason for hiding this comment

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

This was also a simple rename for basestring and types.NoneType to six.string_types, and removal of the long type.. Looks like I was able to get everything.

@arizvisa
Copy link
Owner Author

Switching the merge target to master since the PR it was based on was already merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant