-
Notifications
You must be signed in to change notification settings - Fork 12
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
Drop support for Python 2.6 and 3.3 #30
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.
tests/__init__.py
currently tries to import unittest2, that can be removed.
- python: 3.6 | ||
env: TOXENV=py36-test | ||
- python: 3.7 | ||
env: TOXENV=py37-test | ||
# 3.7 requires sudo: https://github.com/travis-ci/travis-ci/issues/9831 |
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.
Oh, interesting.
mockupdb/__init__.py
Outdated
@@ -205,7 +201,7 @@ def __init__(self): | |||
|
|||
def result(self, timeout=None): | |||
self._event.wait(timeout) | |||
# wait() always returns None in Python 2.6. | |||
# wait() always returns None in Python 2. |
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 it returns a bool in Python 2.7. So I believe this could now be:
if not self._event.wait(timeout):
raise AssertionError('timed out waiting for Future')
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.
Oh you're right! I was looking at the python 3 docs which only mention 3.1 not 2.7:
Changed in version 3.1: Previously, the method always returned None.
https://docs.python.org/3/library/threading.html#threading.Event.wait
https://docs.python.org/2/library/threading.html#threading.Event.wait
Fixes #29.