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
removing the need for the six module while keeping Py2/3 compatibility #181
Conversation
from decimal import Decimal | ||
from time import time as now | ||
|
||
try: | ||
from io import BytesIO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The io
module works on Python 2.6+ and 3.0+ and has BytesIO
on both. Why not just use that instead of incorrectly using StringIO?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the presence of the six
import I read implied pre-2.6 compatibility. If that is not needed then I can change this to be just from io import BytesIO
. But as it is it has this effect on 2.6+.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see absolutely no reason to support 2.5 unless @johnsheehan has a different opinion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to support pre 2.6.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2.6 and up is fine with me.
i'm not as well versed on |
You should remove the dependency from |
Done |
I noticed that there is relatively little use of the six module in the project, and these minor changes remove the need altogether.