Skip to content

Commit

Permalink
Merge 71d92d9 into 816ae4a
Browse files Browse the repository at this point in the history
  • Loading branch information
kosmos342 committed Nov 27, 2019
2 parents 816ae4a + 71d92d9 commit ad076e4
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 17 deletions.
15 changes: 7 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ sudo: false
cache:
directories:
- $HOME/.cache/pip
env:
- TOXENV=py27
- TOXENV=py33
- TOXENV=py34
- TOXENV=pypy
install:
- pip install tox
python:
- "2.7"
- "3.5"
- "3.6"
- "3.7"
- "3.8"
script:
- tox
- nosetests --with-cover --cover-package=demands
after_success:
- coveralls
notifications:
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# [Changelog](https://github.com/yola/demands/releases)

## 5.0.0

* Remove deprecation warning on Python 3.
* Add Python 3.5, 3.6, 3.7, 3.8 as supported.
* Remove Python 3.3, 3.4 as supported.

## 4.1.0

* Add proper handling of empty next page in paginated result set.
Expand Down
14 changes: 9 additions & 5 deletions demands/__init__.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
import copy
import inspect
import json
import logging
import time

from requests import Session
from six import iteritems, itervalues

from six import PY2, iteritems, itervalues

__doc__ = 'Base HTTP service client'
__version__ = '4.1.0'
__version__ = '5.0.0'
__url__ = 'https://github.com/yola/demands'

log = logging.getLogger(__name__)


def get_args(fun):
if PY2:
return inspect.getargspec(fun)[0]
return tuple(p.name for p in inspect.signature(fun).parameters.values())


class HTTPServiceError(AssertionError):
def __init__(self, response):
"""
Expand Down Expand Up @@ -49,7 +53,7 @@ class HTTPServiceClient(Session):
:param cookies: (optional) Dict only, CookieJar not supported
"""

_VALID_REQUEST_ARGS = inspect.getargspec(Session.request)[0]
_VALID_REQUEST_ARGS = get_args(Session.request)

def __init__(self, url, **kwargs):
super(HTTPServiceClient, self).__init__()
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
coverage < 4.0.0
coverage < 5.0.0
flake8 < 3.0.0
mock < 2.0.0
funcsigs
Expand Down
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Software Development :: Libraries',
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py27, py33, py34, pypy
envlist = py27, py35, py36, py37, py38, pypy

[testenv]
deps =
Expand Down

0 comments on commit ad076e4

Please sign in to comment.