connector-py 4.182.0__py3-none-any.whl → 4.184.0__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.
- connector/__about__.py +1 -1
- connector/oai/base_clients.py +4 -2
- connector/oai/errors.py +4 -0
- {connector_py-4.182.0.dist-info → connector_py-4.184.0.dist-info}/METADATA +1 -1
- {connector_py-4.182.0.dist-info → connector_py-4.184.0.dist-info}/RECORD +9 -9
- {connector_py-4.182.0.dist-info → connector_py-4.184.0.dist-info}/WHEEL +1 -1
- {connector_py-4.182.0.dist-info → connector_py-4.184.0.dist-info}/entry_points.txt +0 -0
- {connector_py-4.182.0.dist-info → connector_py-4.184.0.dist-info}/licenses/LICENSE.txt +0 -0
- {connector_py-4.182.0.dist-info → connector_py-4.184.0.dist-info}/top_level.txt +0 -0
connector/__about__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "4.
|
|
1
|
+
__version__ = "4.184.0"
|
connector/oai/base_clients.py
CHANGED
|
@@ -10,6 +10,7 @@ from connector_sdk_types.generated import ErrorCode
|
|
|
10
10
|
from gql import Client
|
|
11
11
|
from gql.client import AsyncClientSession
|
|
12
12
|
from gql.dsl import DSLSchema
|
|
13
|
+
from gql.transport.httpx import HTTPXAsyncTransport as GqlHTTPXAsyncTransport
|
|
13
14
|
from graphql import DocumentNode, GraphQLSchema, build_client_schema, build_schema
|
|
14
15
|
from httpx import Response
|
|
15
16
|
from typing_extensions import Self
|
|
@@ -181,7 +182,7 @@ class RateLimitedClient(AsyncClient):
|
|
|
181
182
|
class RateLimitedHTTPXAsyncTransport(HTTPXAsyncTransport):
|
|
182
183
|
"""A wrapper around HTTPXAsyncTransport that applies rate limiting to GraphQL requests."""
|
|
183
184
|
|
|
184
|
-
def __init__(self, base_transport:
|
|
185
|
+
def __init__(self, base_transport: GqlHTTPXAsyncTransport, rate_limit_config: RateLimitConfig):
|
|
185
186
|
# Copy all attributes from base transport, but exclude 'execute' to avoid shadowing our method
|
|
186
187
|
base_dict = {k: v for k, v in base_transport.__dict__.items() if k != "execute"}
|
|
187
188
|
self.__dict__.update(base_dict)
|
|
@@ -348,7 +349,8 @@ class BaseGraphQLSession(AsyncClientSession):
|
|
|
348
349
|
rate_limiting = rate_limit_config or cls._rate_limit_config
|
|
349
350
|
if rate_limiting is not None and "transport" in client_args:
|
|
350
351
|
transport = client_args["transport"]
|
|
351
|
-
|
|
352
|
+
# wrap any gql HTTPX transport (tests use the GqlHTTPXAsyncTransport, client uses the SDK's HTTPXAsyncTransport)
|
|
353
|
+
if isinstance(transport, GqlHTTPXAsyncTransport):
|
|
352
354
|
client_args["transport"] = RateLimitedHTTPXAsyncTransport(transport, rate_limiting)
|
|
353
355
|
|
|
354
356
|
return Client(**client_args)
|
connector/oai/errors.py
CHANGED
|
@@ -200,6 +200,10 @@ class HTTPHandler(ExceptionHandler):
|
|
|
200
200
|
response.error.error_code = ErrorCode.RATE_LIMIT
|
|
201
201
|
case 502:
|
|
202
202
|
response.error.error_code = ErrorCode.BAD_GATEWAY
|
|
203
|
+
case 503:
|
|
204
|
+
response.error.error_code = ErrorCode.BAD_GATEWAY
|
|
205
|
+
case 504:
|
|
206
|
+
response.error.error_code = ErrorCode.BAD_GATEWAY
|
|
203
207
|
case _:
|
|
204
208
|
response.error.error_code = ErrorCode.API_ERROR
|
|
205
209
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
connector/__about__.py,sha256=
|
|
1
|
+
connector/__about__.py,sha256=6bnw9CHVWLJ8cGcVbZK9ph0QVDJ1WaE0JfcFVkrFh1Y,24
|
|
2
2
|
connector/__init__.py,sha256=QUNbfyRmjFwfO296tG-H_d8FFCqcNc3kAu1QfYGtP38,84
|
|
3
3
|
connector/auth_helper.py,sha256=0HBFYwd0ixOL46blGvb1ot0a8ZOmNutU13Q95JGN04Q,637
|
|
4
4
|
connector/ca_certs.py,sha256=h7l8FvUsGXAvQC73BA2x5HJccxC5ooIOOww0mTSEerw,603
|
|
@@ -200,9 +200,9 @@ connector/generated/models/validated_credentials.py,sha256=2Mmr2P8YmjCKxMoBmeV_-
|
|
|
200
200
|
connector/generated/models/vendor.py,sha256=JOyV0pbjcKJYMHeXjtL9ttQ5UGZCm4W0WMCh5pp-rp4,316
|
|
201
201
|
connector/handlers/lumos_log_handler.py,sha256=KHy7KyZV0PisZqvOaX3V1bVDqNfaJi0yvTQdzdHUQTE,3190
|
|
202
202
|
connector/oai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
203
|
-
connector/oai/base_clients.py,sha256=
|
|
203
|
+
connector/oai/base_clients.py,sha256=G0c0EteKFmmuybdjyzII1g9qWmMeE0CTrI5jXOqkwfk,15248
|
|
204
204
|
connector/oai/capability.py,sha256=01itvXellF2GyxEdSkdlXP6JOEhQsTF5TBiWORfEG94,33253
|
|
205
|
-
connector/oai/errors.py,sha256=
|
|
205
|
+
connector/oai/errors.py,sha256=i84p1Hn1JFl6cHzEkOMEu_JucD5pC9cT8TMTJd9x6ag,9471
|
|
206
206
|
connector/oai/fingerprint.py,sha256=AmHpybwoVrhrrNosLxVfRl_cFiKhCuSG-8poqRfVs5c,103
|
|
207
207
|
connector/oai/integration.py,sha256=QSdVCsX4_nCdhmmBohHsfNQSTvExLwD89sDxBxnOkQw,19729
|
|
208
208
|
connector/oai/capabilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -278,7 +278,7 @@ connector/utils/sync_to_async.py,sha256=sL7p_gJT5fQXbwXL1OIe93rlxWlnvmdK_espSNbQ
|
|
|
278
278
|
connector/utils/test.py,sha256=nvGSsVCCnellamh8nwZK6jLDp1n_irw9NaDPTNpJ9E4,656
|
|
279
279
|
connector/utils/test_case_insensitive_dict.py,sha256=VIUnWVKOh1hrXHk0kllMtaqh-9h6apahPHt9U7oBGp0,356
|
|
280
280
|
connector/utils/validation_utils.py,sha256=ih-EFW-ei-fKil0U2n0y4GePuA-Jz76XryExFBppHLk,1352
|
|
281
|
-
connector_py-4.
|
|
281
|
+
connector_py-4.184.0.dist-info/licenses/LICENSE.txt,sha256=5GN09YoDG6soQSs8dUL08aXcF-QA17TtDOoixKVPzsc,11346
|
|
282
282
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
283
283
|
tests/test_cli.py,sha256=6sk1fmfXDTFbdVAKDCKRSo2hslrg_bywjo3rbYJFjPs,8937
|
|
284
284
|
tests/test_compile.py,sha256=NkPUC7GGvO3dGAgIIz5o0z5Rr5qDeQLtH_IJBlE1wHE,5689
|
|
@@ -325,8 +325,8 @@ tests/utils/test_pagination.py,sha256=_VCeSTmbcqzMSESNuM9ta3-zxDempIJGR_CkcKRjCO
|
|
|
325
325
|
tests/utils/test_pagination_decode_cases.py,sha256=Ogtprql_vwTWkHV_JceemNtJQMKNekDWAa1yj09uPnw,221
|
|
326
326
|
tests/utils/test_pagination_duality_cases.py,sha256=Z_mI5PNbeKyTzdxdabfVDvOrCcbCgH8EuulVmb4Dcco,928
|
|
327
327
|
tests/utils/test_pagination_encode_cases.py,sha256=XsJ5PvlHT4stu3x6YF3-WADMk8ftfbDGOmbcof2_tiE,635
|
|
328
|
-
connector_py-4.
|
|
329
|
-
connector_py-4.
|
|
330
|
-
connector_py-4.
|
|
331
|
-
connector_py-4.
|
|
332
|
-
connector_py-4.
|
|
328
|
+
connector_py-4.184.0.dist-info/METADATA,sha256=Vwmpe6lyZWc5Oj0YleHUyfu8BCWRo346BdRIjmLfZtU,18641
|
|
329
|
+
connector_py-4.184.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
330
|
+
connector_py-4.184.0.dist-info/entry_points.txt,sha256=D7nFwDmXoeHYpRVov7TrlbOtZqe9q1dOdkUY0GK0AEg,50
|
|
331
|
+
connector_py-4.184.0.dist-info/top_level.txt,sha256=a1lmLxeM8B6LFAD0kkCE1ZAK3rJP9Uv0Jd1fHSskX-k,16
|
|
332
|
+
connector_py-4.184.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|