Skip to content

Commit

Permalink
Merge pull request #43 from terminaloutcomes/removenumpy
Browse files Browse the repository at this point in the history
Removing numpy dependency
  • Loading branch information
mhamzak008 authored Jan 25, 2021
2 parents 0b36642 + 631122a commit 8e3f786
Show file tree
Hide file tree
Showing 10 changed files with 5 additions and 12 deletions.
1 change: 0 additions & 1 deletion opsgenie_sdk/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
# python 2 and python 3 compatibility library
import six
import tenacity
from numpy import long
from six.moves.urllib.parse import quote
from urllib3.exceptions import HTTPError

Expand Down
3 changes: 1 addition & 2 deletions opsgenie_sdk/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import certifi
# python 2 and python 3 compatibility library
import six
from numpy import long
from six.moves.urllib.parse import urlencode
from opsgenie_sdk import errors
from .metrics import HttpMetric
Expand Down Expand Up @@ -153,7 +152,7 @@ def request(self, method, url, query_params=None, headers=None,

timeout = None
if _request_timeout:
if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821
if isinstance(_request_timeout, six.integer_types):
timeout = urllib3.Timeout(total=_request_timeout)
elif (isinstance(_request_timeout, tuple) and
len(_request_timeout) == 2):
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ six >= 1.10
python_dateutil >= 2.5.3
setuptools >= 21.0.0
urllib3 >= 1.26.2
numpy >= 1.16.3
tenacity >= 5.0.4
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["urllib3 >= 1.26.2", "six >= 1.10", "certifi", "python-dateutil", "numpy >= 1.16.3", "setuptools >= 21.0.0", "tenacity >= 5.0.4"]
REQUIRES = ["urllib3 >= 1.26.2", "six >= 1.10", "certifi", "python-dateutil", "setuptools >= 21.0.0", "tenacity >= 5.0.4"]

with open("README.md", "r") as fh:
long_description = fh.read()
Expand Down
2 changes: 1 addition & 1 deletion templates-original/rest.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class RESTClientObject(object):

timeout = None
if _request_timeout:
if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821
if isinstance(_request_timeout, six.integer_types):
timeout = urllib3.Timeout(total=_request_timeout)
elif (isinstance(_request_timeout, tuple) and
len(_request_timeout) == 2):
Expand Down
1 change: 0 additions & 1 deletion templates/README_onlypackage.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ To be able to use it, you will need these dependencies in your own package that
* six >= 1.10
* certifi
* python-dateutil
* numpy >= 1.16.3
* tenacity >= 5.0.4
{{#asyncio}}
* aiohttp
Expand Down
1 change: 0 additions & 1 deletion templates/api_client.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import uuid
# python 2 and python 3 compatibility library
import six
import tenacity
from numpy import long
from six.moves.urllib.parse import quote
from urllib3.exceptions import HTTPError
{{#tornado}}
Expand Down
1 change: 0 additions & 1 deletion templates/requirements.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ six >= 1.10
python_dateutil >= 2.5.3
setuptools >= 21.0.0
urllib3 >= 1.26.2
numpy >= 1.16.3
tenacity >= 5.0.4
3 changes: 1 addition & 2 deletions templates/rest.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import ssl
import certifi
# python 2 and python 3 compatibility library
import six
from numpy import long
from six.moves.urllib.parse import urlencode
from {{packageName}} import errors
from .metrics import HttpMetric
Expand Down Expand Up @@ -144,7 +143,7 @@ class RESTClientObject(object):

timeout = None
if _request_timeout:
if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821
if isinstance(_request_timeout, six.integer_types):
timeout = urllib3.Timeout(total=_request_timeout)
elif (isinstance(_request_timeout, tuple) and
len(_request_timeout) == 2):
Expand Down
2 changes: 1 addition & 1 deletion templates/setup.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ VERSION = "{{packageVersion}}"
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["urllib3 >= 1.26.2", "six >= 1.10", "certifi", "python-dateutil", "numpy >= 1.16.3", "setuptools >= 21.0.0", "tenacity >= 5.0.4"]
REQUIRES = ["urllib3 >= 1.26.2", "six >= 1.10", "certifi", "python-dateutil", "setuptools >= 21.0.0", "tenacity >= 5.0.4"]
{{#asyncio}}
REQUIRES.append("aiohttp >= 3.0.0")
{{/asyncio}}
Expand Down

0 comments on commit 8e3f786

Please sign in to comment.