-
Notifications
You must be signed in to change notification settings - Fork 0
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
Cleanup and 3.x compatibility #5
Conversation
Current coverage is 91.66% (diff: 92.59%)@@ master #5 diff @@
==========================================
Files 2 2
Lines 172 156 -16
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
- Hits 154 143 -11
+ Misses 18 13 -5
Partials 0 0
|
@@ -1,6 +1,7 @@ | |||
language: python | |||
python: | |||
- "2.7" | |||
- "3.4" |
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'd be nice to have travis build across all versions of python:
diff --git a/.travis.yml b/.travis.yml
index 17306a6..116b0a4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,13 @@
language: python
python:
+ - "2.6"
- "2.7"
+ - "3.2"
+ - "3.3"
+ - "3.4"
+ - "3.5"
+ - "3.5-dev" # 3.5 development branch
+ - "nightly" # currently points to 3.6-dev
install:
- pip install codecov pep8
- python setup.py install
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 should support 3.2 because very few people use it and 3.2 compatibility is more complicated: the u'unicode string'
was removed in 3.0 and only readded in 3.3.
Given that travis relies on volunteers for computing resources, I don't think we should have a build for every version. I think 2.7, 3.3, and nightly should be enough, and maybe 2.6 if that is necessary.
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 should support 3.2 because very few people use it and 3.2 compatibility is more complicated: the
u'unicode string'
was removed in 3.0 and only readded in 3.3.
Ok, that sounds reasonable. Why don't you update the README with a list of supported Python versions so that it's clear.
Given that travis relies on volunteers for computing resources
I wouldn't worry about that too much. Millions of projects use Travis, and us using a few more builds is not going to make a difference.
I think 2.7, 3.3, and nightly should be enough, and maybe 2.6 if that is necessary.
Given my above reasoning, how about 2.6
, 3.3
, 3.4
, 3.5
, 3.5-dev
, and nightly
? I think 2.6
might not have codecov
. If that's the case, omit the codecov
step. I'm not too keen on 2.6
, so if it's causing lots of problems, don't worry about it. But the other versions I listed I think we should try to support if possible.
Awesome job! I'm so glad you figured this out, because I had significant trouble figuring out the details of unicode compatibility across Python 2 and 3. 🎉 In addition to my inline notes, could you please add some documentation to the |
The behavior of |
Hmm... I wonder whether there's a way to use a 3rd party library, or the |
Conflicts: README.md
@@ -12,3 +12,4 @@ Version numbers `MAJOR.MINOR.PATCH` should follow a system inspired by [semantic | |||
1. PATCH version when you make backwards-compatible bug fixes. | |||
|
|||
Create a [release](https://help.github.com/articles/creating-releases/) on Github for each new version. | |||
>>>>>>> master |
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.
delete
Other than deleting the accidentally left (just delete it, and merge, no need to re-review) |
Changes:
__eq__
and__repr__
Fixes #2 and unblocks #3.