Skip to content

Commit 8e3f786

Browse files
authored
Merge pull request #43 from terminaloutcomes/removenumpy
Removing numpy dependency
2 parents 0b36642 + 631122a commit 8e3f786

10 files changed

+5
-12
lines changed

opsgenie_sdk/api_client.py

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
# python 2 and python 3 compatibility library
2525
import six
2626
import tenacity
27-
from numpy import long
2827
from six.moves.urllib.parse import quote
2928
from urllib3.exceptions import HTTPError
3029

opsgenie_sdk/rest.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import certifi
2424
# python 2 and python 3 compatibility library
2525
import six
26-
from numpy import long
2726
from six.moves.urllib.parse import urlencode
2827
from opsgenie_sdk import errors
2928
from .metrics import HttpMetric
@@ -153,7 +152,7 @@ def request(self, method, url, query_params=None, headers=None,
153152

154153
timeout = None
155154
if _request_timeout:
156-
if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821
155+
if isinstance(_request_timeout, six.integer_types):
157156
timeout = urllib3.Timeout(total=_request_timeout)
158157
elif (isinstance(_request_timeout, tuple) and
159158
len(_request_timeout) == 2):

requirements.txt

-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ six >= 1.10
33
python_dateutil >= 2.5.3
44
setuptools >= 21.0.0
55
urllib3 >= 1.26.2
6-
numpy >= 1.16.3
76
tenacity >= 5.0.4

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
# prerequisite: setuptools
2525
# http://pypi.python.org/pypi/setuptools
2626

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

2929
with open("README.md", "r") as fh:
3030
long_description = fh.read()

templates-original/rest.mustache

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ class RESTClientObject(object):
133133

134134
timeout = None
135135
if _request_timeout:
136-
if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821
136+
if isinstance(_request_timeout, six.integer_types):
137137
timeout = urllib3.Timeout(total=_request_timeout)
138138
elif (isinstance(_request_timeout, tuple) and
139139
len(_request_timeout) == 2):

templates/README_onlypackage.mustache

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ To be able to use it, you will need these dependencies in your own package that
2929
* six >= 1.10
3030
* certifi
3131
* python-dateutil
32-
* numpy >= 1.16.3
3332
* tenacity >= 5.0.4
3433
{{#asyncio}}
3534
* aiohttp

templates/api_client.mustache

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import uuid
1515
# python 2 and python 3 compatibility library
1616
import six
1717
import tenacity
18-
from numpy import long
1918
from six.moves.urllib.parse import quote
2019
from urllib3.exceptions import HTTPError
2120
{{#tornado}}

templates/requirements.mustache

-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ six >= 1.10
33
python_dateutil >= 2.5.3
44
setuptools >= 21.0.0
55
urllib3 >= 1.26.2
6-
numpy >= 1.16.3
76
tenacity >= 5.0.4

templates/rest.mustache

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import ssl
1414
import certifi
1515
# python 2 and python 3 compatibility library
1616
import six
17-
from numpy import long
1817
from six.moves.urllib.parse import urlencode
1918
from {{packageName}} import errors
2019
from .metrics import HttpMetric
@@ -144,7 +143,7 @@ class RESTClientObject(object):
144143

145144
timeout = None
146145
if _request_timeout:
147-
if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821
146+
if isinstance(_request_timeout, six.integer_types):
148147
timeout = urllib3.Timeout(total=_request_timeout)
149148
elif (isinstance(_request_timeout, tuple) and
150149
len(_request_timeout) == 2):

templates/setup.mustache

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ VERSION = "{{packageVersion}}"
1818
# prerequisite: setuptools
1919
# http://pypi.python.org/pypi/setuptools
2020

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

0 commit comments

Comments
 (0)