-
Notifications
You must be signed in to change notification settings - Fork 83
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
Goodbye python27 #150
Goodbye python27 #150
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.
Everything looks OK but there are other things related with Python 2.7 that should be removed.
assertRaisesRegexp
is deprecated; replace it byassertRaisesRegex
- all
__future__
imports can be safely removed ConfigParser
imports can also be removed;configparser
is the name of the module in Python3.- Check line 25 in
sortinghat/exceptions.py
tests/test_exceptions.py
andtests/test_parser_gitdm.py
have strings with the prefixu"..."
. This is not longer needed.- MySQLdb is not compatible with Python3.
db/database.py
references it. Documentation too. OperationalError
is not raised whenpymsql
is used.
References in the documentation should be also removed.
Please also rebase the PR. There are references to old code.
3751f2e
to
61b811a
Compare
sortinghat/cmd/add.py
Outdated
"""%(prog)s add [--name <name>] [--email <email>] [--username <user>] [--source <src>] [--uuid <uuid>] | ||
[--matching <matcher>] [--interactive]""" | ||
ADD_COMMAND_USAGE_MSG = """%(prog)s add [--name <name>] [--email <email>] | ||
[--username <user>] [--source <src>] [--uuid <uuid>] [--matching <matcher>] [--interactive]""" |
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.
Don't remove these blank spaces. They're there for a pretty printing when -h, --help
is in use.
sortinghat/cmd/profile.py
Outdated
"""%(prog)s profile [--name <name>] [--email <email>] [--gender <gender] | ||
[--country <code>] [--bot | --no-bot] <uuid>""" | ||
PROFILE_COMMAND_USAGE_MSG = """%(prog)s profile [--name <name>] [--email <email>] | ||
[--gender <gender] [--country <code>] [--bot | --no-bot] <uuid>""" |
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.
Same as in Add
command
sortinghat/exceptions.py
Outdated
def __str__(self): | ||
return self.__unicode__().encode('utf8') | ||
def __str__(self): | ||
return self.__unicode__() |
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.
Method __unicode__
can be removed. This method only needs to return self.msg
now.
61b811a
to
2b458f7
Compare
This code removes support for Python 2.7 from sortinghat. Thus, misc, bin, sortinghat and tests folders plus the travis.yml are modified accordingly.
This code fixes several flake8 errors to make the code compatible with PEP8 standard. Thus, the folders tests, bin, sortinghat, misc are modified accordingly.
2b458f7
to
bffcc97
Compare
This set of commits addresses #148. Thus, it removes support for Python 2.7