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

Add Python 3.7 and 3.8 Travis builds #186

Merged
merged 4 commits into from
Jan 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ python:
- '3.4'
- '3.5'
- '3.6'
- '3.6-dev'
- '3.7-dev'
- '3.7'
- '3.8'
before_script:
- pip install tox
- if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then pip install flake8 flake8-bugbear; fi
Expand Down
1 change: 0 additions & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"


[dev-packages]
pre-commit = "*"
tox = "*"
Expand Down
10 changes: 0 additions & 10 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
# Configuration file for Tox, a general virtualenv managment tool.
# Website (June 2016): http://tox.readthedocs.io/en/latest/

[tox]
# These are all "default" test environments provided by Tox.
# They are automatically created upon invoking the "tox" CLI.
envlist = py27, py36

[testenv]
deps = pipenv
commands = pipenv install --skip-lock
pipenv run py.test tests \
--cov-config .coveragerc \
--cov=uplink \
{posargs} # Substitute with tox positional arguments

# Ensure pipenv runs the tests against a clean virtual environment,
# for better parity between Travis CI builds and testing on a local
# machine during development.
setenv = PIPENV_IGNORE_VIRTUALENVS = 1
12 changes: 10 additions & 2 deletions uplink/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def __init__(self, token):
token_param = ExampleApiTokenParam(TOKEN)
api_consumer = SomeApiConsumerClass(BASE_URL, auth=token_param)
"""

def __init__(self, param, token):
self._param = param
self._param_value = token
Expand Down Expand Up @@ -97,6 +98,7 @@ def __init__(self, token):
token_header = ExampleApiTokenHeader(TOKEN)
api_consumer = SomeApiConsumerClass(BASE_URL, auth=token_header)
"""

_header = None
_prefix = None

Expand Down Expand Up @@ -161,6 +163,7 @@ class ProxyAuth(BasicAuth):
)
github = GitHub(BASE_URL, auth=auth_methods)
"""

_header = "Proxy-Authorization"


Expand Down Expand Up @@ -226,8 +229,11 @@ class MultiAuth(object):
for method in auth_methods:
print(method.__class__.__name__)
"""

def __init__(self, *auth_methods):
self._auth_methods = [get_auth(auth_method) for auth_method in auth_methods]
self._auth_methods = [
get_auth(auth_method) for auth_method in auth_methods
]

def __call__(self, request_builder):
for auth_method in self._auth_methods:
Expand All @@ -243,4 +249,6 @@ def append(self, auth_method):
self._auth_methods.append(get_auth(auth_method))

def extend(self, auth_methods):
self._auth_methods.extend([get_auth(auth_method) for auth_method in auth_methods])
self._auth_methods.extend(
[get_auth(auth_method) for auth_method in auth_methods]
)