sumo-wrapper-python 1.0.13__py3-none-any.whl → 1.0.14__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of sumo-wrapper-python might be problematic. Click here for more details.

sumo/wrapper/_version.py CHANGED
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '1.0.13'
16
- __version_tuple__ = version_tuple = (1, 0, 13)
15
+ __version__ = version = '1.0.14'
16
+ __version_tuple__ = version_tuple = (1, 0, 14)
@@ -2,6 +2,7 @@ import logging
2
2
  import asyncio
3
3
  import httpx
4
4
  import jwt
5
+ import re
5
6
 
6
7
  from ._blob_client import BlobClient
7
8
  from ._logging import LogHandlerSumo
@@ -49,8 +50,8 @@ class SumoClient:
49
50
  raise ValueError(f"Invalid environment: {env}")
50
51
 
51
52
  self._retry_strategy = retry_strategy
52
- self._client = httpx.Client(follow_redirects=True)
53
- self._async_client = httpx.AsyncClient(follow_redirects=True)
53
+ self._client = httpx.Client()
54
+ self._async_client = httpx.AsyncClient()
54
55
 
55
56
  self._timeout = timeout
56
57
 
@@ -197,12 +198,22 @@ class SumoClient:
197
198
 
198
199
  headers.update(self.auth.get_authorization())
199
200
 
201
+ follow_redirects = False
202
+ if (
203
+ re.match(
204
+ r"^/objects\('[0-9a-fA-F-]{8}-[0-9a-fA-F-]{4}-[0-9a-fA-F-]{4}-[0-9a-fA-F-]{4}-[0-9a-fA-F-]{12}'\)/blob$", # noqa: E501
205
+ path,
206
+ )
207
+ is not None
208
+ ):
209
+ follow_redirects = True
210
+
200
211
  def _get():
201
212
  return self._client.get(
202
213
  f"{self.base_url}{path}",
203
214
  params=params,
204
215
  headers=headers,
205
- follow_redirects=True,
216
+ follow_redirects=follow_redirects,
206
217
  timeout=self._timeout,
207
218
  )
208
219
 
@@ -424,11 +435,22 @@ class SumoClient:
424
435
 
425
436
  headers.update(self.auth.get_authorization())
426
437
 
438
+ follow_redirects = False
439
+ if (
440
+ re.match(
441
+ r"^/objects\('[0-9a-fA-F-]{8}-[0-9a-fA-F-]{4}-[0-9a-fA-F-]{4}-[0-9a-fA-F-]{4}-[0-9a-fA-F-]{12}'\)/blob$", # noqa: E501
442
+ path,
443
+ )
444
+ is not None
445
+ ):
446
+ follow_redirects = True
447
+
427
448
  async def _get():
428
449
  return await self._async_client.get(
429
450
  f"{self.base_url}{path}",
430
451
  params=params,
431
452
  headers=headers,
453
+ follow_redirects=follow_redirects,
432
454
  timeout=self._timeout,
433
455
  )
434
456
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sumo-wrapper-python
3
- Version: 1.0.13
3
+ Version: 1.0.14
4
4
  Summary: Python wrapper for the Sumo API
5
5
  Author: Equinor
6
6
  License: Apache License
@@ -5,13 +5,13 @@ sumo/wrapper/_blob_client.py,sha256=SyfyFZ1hHVWKU4lmgUqSjl5TaK_OJNQ__0wDETrp-ag,
5
5
  sumo/wrapper/_decorators.py,sha256=3IEi6GXVkkDACHoo8dOeDoBtZh5TlJ6Tw0qlpOVHqLQ,806
6
6
  sumo/wrapper/_logging.py,sha256=lnhjn6oQna33jZpzeZ7IeBya2uKNfrzXr_C3nw7txo0,965
7
7
  sumo/wrapper/_retry_strategy.py,sha256=_V-KzAyP1nAeHf1lhc_syxlaKj5CQz-tIsCYs2DONe0,2495
8
- sumo/wrapper/_version.py,sha256=CZ8Zo1p2pk-2aVQ1p1ONwv-G7Nuh-enuBbQWiK4K-Fs,413
8
+ sumo/wrapper/_version.py,sha256=sEq8Tf4d_nMnRZA-jwnwrmVPC7MsZNgsD8EqI9_88Pg,413
9
9
  sumo/wrapper/config.py,sha256=6t7qqjrrmd11m4VMlRryiMYw2JDU_R51305woAP1TAs,865
10
10
  sumo/wrapper/login.py,sha256=IlENRNdSc2UPmGdrcxjziovMVYpV40qQSnAuDy5LKh4,2375
11
- sumo/wrapper/sumo_client.py,sha256=itx4zZBMA7JmgPOEVRI37_QNpJPpBvK7UokeLMRgnvE,15770
12
- sumo_wrapper_python-1.0.13.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
13
- sumo_wrapper_python-1.0.13.dist-info/METADATA,sha256=1Pa2-GVAakpaspTypl2boMl4BxAfv_uxezUldnEWs68,14462
14
- sumo_wrapper_python-1.0.13.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
15
- sumo_wrapper_python-1.0.13.dist-info/entry_points.txt,sha256=V_vGky2C3He5vohJAxnBdvpt_fqfUDFj5irUm9HtoFc,55
16
- sumo_wrapper_python-1.0.13.dist-info/top_level.txt,sha256=rLbKyH9rWgCj3PoLeR7fvC5X8vCaUc5LF8-Y_GBWZL0,5
17
- sumo_wrapper_python-1.0.13.dist-info/RECORD,,
11
+ sumo/wrapper/sumo_client.py,sha256=wlPUc1RdXP-9K2JHYqp3CvYp8lfceJ-cGV0-3Q7GpDA,16425
12
+ sumo_wrapper_python-1.0.14.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
13
+ sumo_wrapper_python-1.0.14.dist-info/METADATA,sha256=QlgT1mfE6xhBm-oCGrus9lGZSIsLsVMh8jdRXacIuBU,14462
14
+ sumo_wrapper_python-1.0.14.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
15
+ sumo_wrapper_python-1.0.14.dist-info/entry_points.txt,sha256=V_vGky2C3He5vohJAxnBdvpt_fqfUDFj5irUm9HtoFc,55
16
+ sumo_wrapper_python-1.0.14.dist-info/top_level.txt,sha256=rLbKyH9rWgCj3PoLeR7fvC5X8vCaUc5LF8-Y_GBWZL0,5
17
+ sumo_wrapper_python-1.0.14.dist-info/RECORD,,