Skip to content
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

Merged
merged 2 commits into from
Jun 20, 2018
Merged

Goodbye python27 #150

merged 2 commits into from
Jun 20, 2018

Conversation

valeriocos
Copy link
Member

@valeriocos valeriocos commented Jun 19, 2018

This set of commits addresses #148. Thus, it removes support for Python 2.7

@valeriocos valeriocos requested a review from sduenas June 19, 2018 13:16
Copy link
Member

@sduenas sduenas left a 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 by assertRaisesRegex
  • 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 and tests/test_parser_gitdm.py have strings with the prefix u"...". This is not longer needed.
  • MySQLdb is not compatible with Python3. db/database.py references it. Documentation too.
  • OperationalError is not raised when pymsql is used.

References in the documentation should be also removed.

Please also rebase the PR. There are references to old code.

@valeriocos valeriocos force-pushed the goodbye-python27 branch 2 times, most recently from 3751f2e to 61b811a Compare June 19, 2018 17:50
"""%(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]"""
Copy link
Member

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.

"""%(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>"""
Copy link
Member

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

def __str__(self):
return self.__unicode__().encode('utf8')
def __str__(self):
return self.__unicode__()
Copy link
Member

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.

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.
@sduenas sduenas merged commit bffcc97 into chaoss:master Jun 20, 2018
@valeriocos
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants