-
Notifications
You must be signed in to change notification settings - Fork 16
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
Fixing compatibility issues with Python3 #17
Conversation
Thanks for the pull request, @Ivanca! I've created OSPR-2511 to keep track of it in JIRA. JIRA is a place for product owners to prioritize feature reviews by the engineering development teams. Feel free to add as much of the following information to the ticket:
All technical communication about the code itself will still be done via the GitHub pull request interface. As a reminder, our process documentation is here. If you like, you can add yourself to the AUTHORS file for this repo, though that isn't required. Please see the CONTRIBUTING file for more information. |
Codecov Report
@@ Coverage Diff @@
## master #17 +/- ##
==========================================
+ Coverage 93.47% 93.62% +0.15%
==========================================
Files 12 12
Lines 628 643 +15
Branches 34 44 +10
==========================================
+ Hits 587 602 +15
Misses 34 34
Partials 7 7
Continue to review full report at Codecov.
|
I don't fully understand what the "codevob" is asking for here; more clarity in the changes that need to be made (if any) would be appreciated. |
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.
You added a few lines of code to the test that are only executed under Python 3, so codecov is complaining that the percentage of the file executed during the Python-2-only test suite decreased slightly. Try adding testing for Python 3.5 and/or 3.6 in tox.ini
and .travis.yml
to fix that. Feel free to remove tests for Django versions below 1.11 while you're at it. Links to the relevant tox and Travis documentation are below, let me know if you want help figuring it out:
config_models/models.py
Outdated
@@ -9,7 +9,7 @@ | |||
from django.utils.translation import ugettext_lazy as _ | |||
|
|||
from rest_framework.utils import model_meta | |||
|
|||
import six |
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 see six
among the dependencies in setup.py
yet. Maybe just use the version bundled with django.utils
as you used in the file below?
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; fixed now on last commit (imports from django.utils)
The errors under Python 3.6 are due to the |
Finally all checks passing now 👍 @jmbowman |
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.
Looking great! Could you fix one more problem while you're in here? The last merge to master was marked as a failure because all of the Travis workers tried deploying to PyPI, and only the one that finished first succeeded. You should only need to add appropriate python
and condition
entries to the on
block in .travis.yml
, like the ones here.
@@ -62,5 +62,6 @@ def get_version(*file_paths): | |||
'Natural Language :: English', | |||
'Programming Language :: Python :: 2', | |||
'Programming Language :: Python :: 2.7', | |||
'Programming Language :: Python :: 3', |
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.
Should probably add an entry for 3.6 here also.
done |
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.
Great, thanks! Please squash the commits, then I'll go ahead and merge this and prepare a new release.
Commits squashed. |
@Ivanca 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
Background: An effort is being made to move everything from Python 2.7 to 3, including making this repository compatible with both as specified on this JIRA issue: https://openedx.atlassian.net/projects/INCR/issues/INCR-18?filter=allopenissues and these changes aim to do that.
Studio Updates: None.
LMS Updates: None
Testing: Same ones as before (and have been updated to be compatible with both as well), passing.