Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix #274: String Types Py2 vs. Py3 compatibility #275

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 1 commit into from
Oct 17, 2020

Conversation

tomschr
Copy link
Member

@tomschr tomschr commented Jul 10, 2020

This fixes #274 and contains:

fixes problems between different string types. In Python2 str vs. unicode and in Python3 str vs. bytes.


@eli-darkly I've tried to recycle some code from the six project. Maybe there is an easier way, maybe we can improve some ugly code. Would you like to have a look at? Thank you! ❤️

@tomschr tomschr added the Bug Error, flaw or fault to produce incorrect or unexpected results label Jul 10, 2020
@tomschr tomschr requested a review from a team July 10, 2020 06:34
@tomschr tomschr self-assigned this Jul 10, 2020
@tomschr tomschr force-pushed the bugfix/274-typeerror branch 3 times, most recently from 282d185 to 9d30056 Compare July 10, 2020 06:54
test_py2.py Outdated Show resolved Hide resolved
@tomschr tomschr force-pushed the bugfix/274-typeerror branch from 9d30056 to 979b3d5 Compare July 22, 2020 07:29
@tomschr tomschr added the Release_2.x.y Only for the major release 2 label Oct 16, 2020
@tomschr tomschr force-pushed the bugfix/274-typeerror branch from 979b3d5 to 19f4e18 Compare October 16, 2020 13:09
@tomschr
Copy link
Member Author

tomschr commented Oct 16, 2020

@eli-darkly Eli, sorry for the long delay. I've added you as a contributor and documented this in our documentation. If you would like to have a final look I can merge and create a new release.

@tomschr tomschr force-pushed the bugfix/274-typeerror branch from 2d1c4b0 to 79f901a Compare October 17, 2020 08:33
This fixes problems between different string types. In Python2
str vs. unicode and in Python3 str vs. bytes.

* Add some code from six project
* Suppress two flake8 issues (false positives)
* Update Changelog
* Update CONTRIBUTORS
* Document creating a version from a byte string

Co-authored-by: Eli Bishop <eli-darkly@users.noreply.github.com>
@tomschr tomschr force-pushed the bugfix/274-typeerror branch from 79f901a to 00fb7c4 Compare October 17, 2020 08:38
@tomschr tomschr changed the title Fix #274: Py2 vs. Py3 incompatibility Fix #274: String Types Py2 vs. Py3 compatibility Oct 17, 2020
@tomschr tomschr merged commit 20e5c4f into python-semver:master Oct 17, 2020
@tomschr tomschr deleted the bugfix/274-typeerror branch October 17, 2020 09:09
@tomschr tomschr mentioned this pull request Oct 17, 2020
3 tasks
tomschr added a commit to tomschr/python-semver that referenced this pull request Oct 17, 2020
* python-semver#274 / python-semver#275 String Types Py2 vs. Py3 compatibility
* python-semver#277 Turn VersionInfo.parse into classmethod to allow subclasses
* python-semver#286 Add author and update changelog for python-semver#276/python-semver#277
@tomschr tomschr mentioned this pull request Oct 17, 2020
tomschr added a commit that referenced this pull request Oct 17, 2020
* #274 / #275 String Types Py2 vs. Py3 compatibility
* #277 Turn VersionInfo.parse into classmethod to allow subclasses
* #286 Add author and update changelog for #276/#277
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Error, flaw or fault to produce incorrect or unexpected results Release_2.x.y Only for the major release 2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Py2 vs. Py3 incompatibility: TypeError
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.