-
Notifications
You must be signed in to change notification settings - Fork 11
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
chore: drop python 2 support and run test in PRs #328
Conversation
I've approved the other PR. When that's merged and you've rebased this on top of master and pushed again, I'll review this :) |
…se by get_number_of_args_py2
888f6ec
to
2975d63
Compare
Okay, I've worked my way through all the commits (thanks for the suggestion). I'm okay with just merging this as-is, but beware that you're still going to need to remove the six library in a future PR. Also, I'm concerned that the github actions are no longer running our unit tests... that seems bad? (probably good to fix that in another PR too). |
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.
Please fix the github actions unit tests next!
I added the fix for the GitHub action to have the testing here and ensure everything works well. I'll merge this. Thanks @jolyonb. |
Description
This PR edits and removes functions related to Python 2—all the corrections were made based on searching for Python 2 comments in the code.
Related to #326
Note
I think it is easier to review this PR by commit.
Details
reload
fromimportlib
.mock
fromunittest
and not fromhelpers
for clarity and correctness.text_string
function, that was created for Python 2.get_number_of_args_py2
function.get_number_of_args_py3
inget_number_of_args
.get_builtin_positional_args_py2
because it is no longer used inget_number_of_args_py2
.ensure_text
function because was used to maintain compatibility with Python 2.UNICODE_PREFIX
variable used for Python 2.format_message_with_locations
.How to test
Code
All the checks are passed.
Integration:
Environment
Data
For more info:
tutor dev do importdemocourse -h
Test
python_lib.zip
and add this one:python_lib.zip
Note
If you want to create your python_lib from this version, you can clone the repo, enter in it, and then: