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

Drop support for Python 2.6 and 3.3 #30

Merged
merged 3 commits into from
Oct 3, 2019

Conversation

ShaneHarvey
Copy link
Collaborator

Fixes #29.

Copy link
Collaborator

@ajdavis ajdavis left a 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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, interesting.

@@ -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.
Copy link
Collaborator

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')

Copy link
Collaborator Author

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

tests/test_mockupdb.py Outdated Show resolved Hide resolved
@ShaneHarvey ShaneHarvey merged commit 873e05c into mongodb-labs:master Oct 3, 2019
@ShaneHarvey ShaneHarvey deleted the drop-py26 branch October 3, 2019 16:59
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.

Drop support for Python 2.6 and 3.3
2 participants