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
Make codebase compatible with both Python 2.7 and 3 (#35) #50
Conversation
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.
IMO change of version should touch minor or major version number due to change of python code base. It is a break in compatibility: https://apr.apache.org/versioning.html
- python: 3.6 | ||
env: TOXENV=py36 | ||
- python: 2.7 # TODO: bump to 3.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.
What happened here? I found it in commit 2fc9aba and got it 😏
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.
Obsolete now
- python: 3.6 | ||
env: TOXENV=py36 | ||
- python: 2.7 # TODO: bump to 3.6 | ||
- python: 3.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.
IMO not needed any more after that change: https://changelog.travis-ci.com/the-default-python-version-for-your-builds-is-now-3-6-97935
Same for L4.
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.
Pls take a look at the updated matrix (that still takes 2.7 into account)
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.
pep8
run under python2.7 and python3.6. I do not know if it is needed, but maybe there are different rules for those versions. It seems to be okey.
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 put the entire cartesian product of possible envs/versions just to be sure nothing is missed :)
RELEASE_NOTES.md
Outdated
@@ -1,5 +1,9 @@ | |||
# Release notes | |||
|
|||
## New in git-machete 2.9.1 |
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.
IMO that change is a bit break in compatibility and should be reflected in at least minor number: 2.10.0
or even in major number: 3.0.0
.
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.
Actually... I now tried to ensure that it works both under Python 2.7 and Python 3, pls take a look :) Thus, it now merits at most minor version change.
@@ -44,31 +44,35 @@ def underline(s): | |||
return UNDERLINE + s + ENDC | |||
|
|||
|
|||
def star(f): # tuple unpacking in lambdas |
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.
Nice trick 👍
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.
Yeah, that's what stackoverflow adviced to emulate tuple unpacking in lambdas under Python 3... since this feature is gone :(
2eaa82d
to
e33cb55
Compare
@pasuder comments addressed, I tried to make codebase both Python 2 and 3 compatible... at least until next major relase. |
- python: 3.6 | ||
env: TOXENV=py36 | ||
- python: 2.7 # TODO: bump to 3.6 | ||
- python: 3.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.
pep8
run under python2.7 and python3.6. I do not know if it is needed, but maybe there are different rules for those versions. It seems to be okey.
No description provided.