Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

Commit 4125e8f

Browse files
authored
Alpha11 (#155)
* Check for credentials in instance instead of self.access_token_, fixes #153 * Refrain from passing credentials kwarg to get_job_results() in iter_job_results(), fixes #154 * Bump version
1 parent 7877345 commit 4125e8f

File tree

6 files changed

+13
-10
lines changed

6 files changed

+13
-10
lines changed

HISTORY.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# History
22

3+
## 2.0.0-alpha11 (2020-04-13)
4+
5+
- Refrain from passing credentials kwarg to get_job_results() in iter_job_results(), fixes #154
6+
- Check for credentials in instance instead of self.access*token*, fixes #153
7+
38
## 2.0.0-alpha10 (2020-04-09)
49

510
- Refactored how and where credentials are applied to request headers (#151)

pan_cortex_data_lake/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""Main package for cortex."""
44

55
__author__ = "Palo Alto Networks"
6-
__version__ = "2.0.0-a10"
6+
__version__ = "2.0.0-a11"
77

88
from .exceptions import ( # noqa: F401
99
CortexError,

pan_cortex_data_lake/credentials.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,10 @@ def refresh(self, access_token=None, **kwargs):
478478
with self.token_lock:
479479
if access_token == self.access_token or access_token is None:
480480
if self.developer_token is not None and not any(
481-
[self.access_token_, os.getenv("PAN_ACCESS_TOKEN")]
481+
[
482+
os.getenv("PAN_ACCESS_TOKEN"),
483+
self._credentials_found_in_instance,
484+
]
482485
):
483486
parsed_provider = urlparse(self.developer_token_provider)
484487
url = "{}://{}".format(

pan_cortex_data_lake/query.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ def iter_job_results(
219219
requests.Response: Requests Response() object.
220220
221221
"""
222-
credentials = kwargs.pop("credentials", None)
223222
params = kwargs.pop("params", {})
224223
enforce_json = kwargs.pop("enforce_json", True)
225224
for name, value in [
@@ -234,11 +233,7 @@ def iter_job_results(
234233
params.update({name: value})
235234
while True:
236235
r = self.get_job_results(
237-
job_id=job_id,
238-
params=params,
239-
enforce_json=enforce_json,
240-
credentials=credentials,
241-
**kwargs
236+
job_id=job_id, params=params, enforce_json=enforce_json, **kwargs
242237
)
243238
if not r.ok:
244239
raise HTTPError("%s" % r.text)

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 2.0.0a10
2+
current_version = 2.0.0a11
33
commit = True
44
tag = True
55

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
setup(
2424
name="pan-cortex-data-lake",
25-
version="2.0.0-a10",
25+
version="2.0.0-a11",
2626
description="Python idiomatic SDK for Cortex™ Data Lake.",
2727
long_description=readme + "\n\n" + history,
2828
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)