omnata-plugin-runtime 0.3.28a82__py3-none-any.whl → 0.3.28a84__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -264,7 +264,7 @@ class SyncRequest(ABC):
264
264
  """
265
265
  return RateLimitedSession(
266
266
  run_deadline=self._run_deadline,
267
- cancellation_token=self._thread_cancellation_token,
267
+ thread_cancellation_token=self._thread_cancellation_token,
268
268
  max_retries=max_retries,
269
269
  backoff_factor=backoff_factor,
270
270
  statuses_to_include=statuses_to_include
@@ -13,9 +13,7 @@ import requests
13
13
  from pydantic import Field, root_validator
14
14
  from pydantic.json import pydantic_encoder
15
15
  from .configuration import SubscriptableBaseModel
16
- import time
17
16
  import pytz
18
- import dateparser
19
17
  from requests.adapters import HTTPAdapter
20
18
  from urllib3.util.retry import Retry
21
19
 
@@ -411,7 +409,10 @@ class RateLimitedSession(requests.Session):
411
409
  if retry_after.isdigit():
412
410
  wait_time = int(retry_after)
413
411
  else:
414
- retry_datetime = dateparser.parse(retry_after)
412
+ # Retry-After can be a date in the format specified in https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After
413
+ # e.g. Fri, 31 Dec 1999 23:59:59 GMT
414
+ # we'll parse it using the standard datetime parser
415
+ retry_datetime = datetime.datetime.strptime(retry_after, "%a, %d %b %Y %H:%M:%S %Z")
415
416
  retry_datetime = retry_datetime.replace(tzinfo=pytz.UTC)
416
417
  current_datetime = datetime.datetime.now(pytz.UTC)
417
418
  wait_time = (retry_datetime - current_datetime).total_seconds()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: omnata-plugin-runtime
3
- Version: 0.3.28a82
3
+ Version: 0.3.28a84
4
4
  Summary: Classes and common runtime components for building and running Omnata Plugins
5
5
  Author: James Weakley
6
6
  Author-email: james.weakley@omnata.com
@@ -11,7 +11,6 @@ Classifier: Programming Language :: Python :: 3.9
11
11
  Classifier: Programming Language :: Python :: 3.10
12
12
  Requires-Dist: certifi (<=2023.11.17)
13
13
  Requires-Dist: charset-normalizer (<=2.0.4)
14
- Requires-Dist: dateparser (<=1.1.8)
15
14
  Requires-Dist: idna (<=3.4)
16
15
  Requires-Dist: jinja2 (>=3.1.2)
17
16
  Requires-Dist: markupsafe (<=2.1.3)
@@ -23,7 +22,6 @@ Requires-Dist: pydantic (>=1,<=1.10.12)
23
22
  Requires-Dist: pyjwt (<=2.4.0)
24
23
  Requires-Dist: pyopenssl (<=23.2.0)
25
24
  Requires-Dist: pytz (<=2023.3.post1)
26
- Requires-Dist: regex (<=2023.10.3)
27
25
  Requires-Dist: requests (>=2,<=2.31.0)
28
26
  Requires-Dist: setuptools (>=68.2.2)
29
27
  Requires-Dist: snowflake-snowpark-python (>=1,<2)
@@ -3,10 +3,10 @@ omnata_plugin_runtime/api.py,sha256=_N5ok5LN7GDO4J9n3yduXp3tpjmhpySY__U2baiygrs,
3
3
  omnata_plugin_runtime/configuration.py,sha256=7cMekoY8CeZAJHpASU6tCMidF55Hzfr7CD74jtebqIY,35742
4
4
  omnata_plugin_runtime/forms.py,sha256=pw_aKVsXSz47EP8PFBI3VDwdSN5IjvZxp8JTjO1V130,18421
5
5
  omnata_plugin_runtime/logging.py,sha256=bn7eKoNWvtuyTk7RTwBS9UARMtqkiICtgMtzq3KA2V0,3272
6
- omnata_plugin_runtime/omnata_plugin.py,sha256=Ptf0wPdgC1HPbfxIIzhwRWAXmH9kYQT4UXWhhuCCt2Q,105241
6
+ omnata_plugin_runtime/omnata_plugin.py,sha256=aXC-Ui9qeYKJM7VCZtZLQsVod9yH8ecEQ6e-IuJuVnY,105248
7
7
  omnata_plugin_runtime/plugin_entrypoints.py,sha256=D2f0Qih7KTJNXIDYkA-E55RTEK_7Jtv9ySqspWxERVA,28272
8
- omnata_plugin_runtime/rate_limiting.py,sha256=izUOQluYERhlerUbPNnpNLTWUfKRPHTyAb_Sx3xYVJk,21492
9
- omnata_plugin_runtime-0.3.28a82.dist-info/LICENSE,sha256=IMF9i4xIpgCADf0U-V1cuf9HBmqWQd3qtI3FSuyW4zE,26526
10
- omnata_plugin_runtime-0.3.28a82.dist-info/METADATA,sha256=evqJ7mt2hSh9mJO7DWPtFomI5RK3rqrfEm2GxJsWago,1675
11
- omnata_plugin_runtime-0.3.28a82.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
12
- omnata_plugin_runtime-0.3.28a82.dist-info/RECORD,,
8
+ omnata_plugin_runtime/rate_limiting.py,sha256=n83ANCla6DLwM_oHKmTKHG-JFM99i5-KjsgnkB9pYGo,21786
9
+ omnata_plugin_runtime-0.3.28a84.dist-info/LICENSE,sha256=IMF9i4xIpgCADf0U-V1cuf9HBmqWQd3qtI3FSuyW4zE,26526
10
+ omnata_plugin_runtime-0.3.28a84.dist-info/METADATA,sha256=GQsx3J1EHelIRI53WezceZ8x5BOGwAhFPEeqOUUODnU,1604
11
+ omnata_plugin_runtime-0.3.28a84.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
12
+ omnata_plugin_runtime-0.3.28a84.dist-info/RECORD,,