-
Notifications
You must be signed in to change notification settings - Fork 766
Voice response devx5021 and Python testing, compatibility #346
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
Conversation
@@ -1,7 +1,7 @@ | |||
.PHONY: clean install analysis test test-install develop docs docs-install | |||
|
|||
venv: | |||
virtualenv venv | |||
virtualenv --python=python venv |
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.
whats the benefit of doing --python=python? Isnt that the default?
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.
Adding --python=python
uses the standard alias Travis-CI sets up in each environment, which seemed to be the simplest way to use the intended test version. I can look around for another way if you think there is one.
twilio/http/validation_client.py
Outdated
try: | ||
from urllib.parse import urlparse | ||
except ImportError: | ||
from urlparse import urlparse |
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.
We might want to do this in the compat.py
file and then import urlparse
from that so this file doesnt have to care which versio
8000
n of python its being run under.
twilio/http/validation_client.py
Outdated
@@ -70,7 +73,8 @@ def request(self, method, url, params=None, data=None, headers=None, auth=None, | |||
timeout=timeout, | |||
) | |||
|
|||
return Response(int(response.status_code), response.content.decode('utf-8')) | |||
# return Response(int(response.status_code), response.content.decode('utf-8')) |
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.
remove comment
lineno=func.func_code.co_firstlineno + 1 | ||
) | ||
warnings.simplefilter('always', DeprecationWarning) | ||
warnings.warn("Call to deprecated function {}.".format(func.__name__), category=DeprecationWarning, stacklevel=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.
why did this need to change?
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.
func.func_code
is no longer an attribute in Python 3, and the decorator is only used on grants.py:108
.
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.
ok
…sing correct Python version in each test environment) Install appropriate version of virtualenv for python, fixes Python 3.6 build because Travis-CI comes with virtualenv 12.0.1 by default
Pushing fixes and ammending commits. |
d922f61
to
af88416
Compare
twilio/compat.py
Outdated
@@ -1,3 +1,5 @@ | |||
import six |
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.
Delete this.
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.
LGTM
… http_client was converted as well and now has tests.
af88416
to
3519817
Compare
muted
parameter