Open
Conversation
added 5 commits
August 21, 2014 11:00
- Cleaned up mix of bytes and str. - Replaced all the comparing hexlified values, etc., with struct. - Replaced multi-arg print statements with single-arg print w/format. - Only tested with 2.7, 3.3, and trunk (pre-3.5)
- ...although it doesn't seem to work with pep8 1.3 or later anyway...
- It was setting options the old-style way. - The only option it was setting is deprecated.
Owner
|
@abarnert We just merged some large project changes which most importantly includes scaffolding for a test suite, however, we still don't have enough test coverage yet. Ideally we'd have closer to full test coverage before merging this but for now we'll just have to eye-ball it and test by hand. With that said would you mind rebasing this PR against the latest develop branch? When that's done I'd like to have @Renelvon review this with me before merging. Thanks! |
Collaborator
|
@abarnert You don't have to worry about Python 2.6 any longer; it isn't supported as of version 0.1.0. Hope that helps you implementing Python 3.x compatibility easier. |
|
Could you upload you packege to PyPi (pip) ? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I updated the code to be Python 3-compatible; it should run under any 2.6+/3.2+.
I smoke-tested with 2.6, 2.7, 3.3, and pre-3.5 trunk with CPython, and 2.7 and 3.2 with PyPy 2.3.1.
Rather than try to fix all the mixed-str-and-bytes stuff caused by trying to work with hex strings instead of raw bytes, I changed it to use
struct.pack/unpackeverywhere. I believe I caught and fixed at least one bug along the way where a hex string was sent in place of the bytes it represented. But I wouldn't be too surprised if I also added at least one bug. Unfortunately, there doesn't seem to be a test suite, and I'm not sure how to stress-test it myself.I also cleaned up the code so that it passes PEP8 (no point adding an automated PEP8 test to just ignore the warnings…), and updated
check.pyso that it works with PEP8 1.3 and later.