onebusaway 1.12.0__py3-none-any.whl → 1.12.2__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.
- onebusaway/_base_client.py +16 -2
- onebusaway/_version.py +1 -1
- {onebusaway-1.12.0.dist-info → onebusaway-1.12.2.dist-info}/METADATA +3 -3
- {onebusaway-1.12.0.dist-info → onebusaway-1.12.2.dist-info}/RECORD +6 -6
- {onebusaway-1.12.0.dist-info → onebusaway-1.12.2.dist-info}/WHEEL +0 -0
- {onebusaway-1.12.0.dist-info → onebusaway-1.12.2.dist-info}/licenses/LICENSE +0 -0
onebusaway/_base_client.py
CHANGED
@@ -1071,7 +1071,14 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
1071
1071
|
) -> ResponseT:
|
1072
1072
|
origin = get_origin(cast_to) or cast_to
|
1073
1073
|
|
1074
|
-
if
|
1074
|
+
if (
|
1075
|
+
inspect.isclass(origin)
|
1076
|
+
and issubclass(origin, BaseAPIResponse)
|
1077
|
+
# we only want to actually return the custom BaseAPIResponse class if we're
|
1078
|
+
# returning the raw response, or if we're not streaming SSE, as if we're streaming
|
1079
|
+
# SSE then `cast_to` doesn't actively reflect the type we need to parse into
|
1080
|
+
and (not stream or bool(response.request.headers.get(RAW_RESPONSE_HEADER)))
|
1081
|
+
):
|
1075
1082
|
if not issubclass(origin, APIResponse):
|
1076
1083
|
raise TypeError(f"API Response types must subclass {APIResponse}; Received {origin}")
|
1077
1084
|
|
@@ -1574,7 +1581,14 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
1574
1581
|
) -> ResponseT:
|
1575
1582
|
origin = get_origin(cast_to) or cast_to
|
1576
1583
|
|
1577
|
-
if
|
1584
|
+
if (
|
1585
|
+
inspect.isclass(origin)
|
1586
|
+
and issubclass(origin, BaseAPIResponse)
|
1587
|
+
# we only want to actually return the custom BaseAPIResponse class if we're
|
1588
|
+
# returning the raw response, or if we're not streaming SSE, as if we're streaming
|
1589
|
+
# SSE then `cast_to` doesn't actively reflect the type we need to parse into
|
1590
|
+
and (not stream or bool(response.request.headers.get(RAW_RESPONSE_HEADER)))
|
1591
|
+
):
|
1578
1592
|
if not issubclass(origin, AsyncAPIResponse):
|
1579
1593
|
raise TypeError(f"API Response types must subclass {AsyncAPIResponse}; Received {origin}")
|
1580
1594
|
|
onebusaway/_version.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: onebusaway
|
3
|
-
Version: 1.12.
|
3
|
+
Version: 1.12.2
|
4
4
|
Summary: The official Python library for the onebusaway-sdk API
|
5
5
|
Project-URL: Homepage, https://github.com/OneBusAway/python-sdk
|
6
6
|
Project-URL: Repository, https://github.com/OneBusAway/python-sdk
|
@@ -31,7 +31,7 @@ Description-Content-Type: text/markdown
|
|
31
31
|
|
32
32
|
# OneBusAway SDK Python API library
|
33
33
|
|
34
|
-
[](https://pypi.org/project/onebusaway/)
|
34
|
+
[>)](https://pypi.org/project/onebusaway/)
|
35
35
|
|
36
36
|
|
37
37
|
The Onebusaway SDK Python library provides convenient access to the Onebusaway SDK REST API from any Python 3.8+
|
@@ -169,7 +169,7 @@ client.with_options(max_retries=5).current_time.retrieve()
|
|
169
169
|
### Timeouts
|
170
170
|
|
171
171
|
By default requests time out after 1 minute. You can configure this with a `timeout` option,
|
172
|
-
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration) object:
|
172
|
+
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:
|
173
173
|
|
174
174
|
```python
|
175
175
|
from onebusaway import OnebusawaySDK
|
@@ -1,5 +1,5 @@
|
|
1
1
|
onebusaway/__init__.py,sha256=ku3rAJ6hbPMCdJIRExmanIm3dbFgnYN0uQsNyd7IIsU,2623
|
2
|
-
onebusaway/_base_client.py,sha256=
|
2
|
+
onebusaway/_base_client.py,sha256=r8AanDIn8oBTvs_PTcDdcrNq5YGVAn6y_hnZUJ4Y6QM,65888
|
3
3
|
onebusaway/_client.py,sha256=dGw5u-pBQRdxZLFdYVOATktwqgNSIWv3y2PyH_ziaKU,37100
|
4
4
|
onebusaway/_compat.py,sha256=VWemUKbj6DDkQ-O4baSpHVLJafotzeXmCQGJugfVTIw,6580
|
5
5
|
onebusaway/_constants.py,sha256=S14PFzyN9-I31wiV7SmIlL5Ga0MLHxdvegInGdXH7tM,462
|
@@ -11,7 +11,7 @@ onebusaway/_resource.py,sha256=t-CkWpnm2UyE1uiv87GODlyRcQ_8h5eXmSVoE-1u35w,1142
|
|
11
11
|
onebusaway/_response.py,sha256=x_FC3ZoD8JnfQRtZibna0wxoBtNzKcVictes8B7N6NQ,28848
|
12
12
|
onebusaway/_streaming.py,sha256=PC8tKxRCeoJn8xKBBxXTlppGSI4TOMYVNfxrabFkRfc,10128
|
13
13
|
onebusaway/_types.py,sha256=OUYNO_zPft2ZRZXakg0aIsBjCoAJLRet90u8LO8WBB4,6201
|
14
|
-
onebusaway/_version.py,sha256=
|
14
|
+
onebusaway/_version.py,sha256=QPsox1E7fSEPBprjXQHQC3hUdE6XwwLnILhcbPIk-Gg,163
|
15
15
|
onebusaway/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
16
16
|
onebusaway/_utils/__init__.py,sha256=PNZ_QJuzZEgyYXqkO1HVhGkj5IU9bglVUcw7H-Knjzw,2062
|
17
17
|
onebusaway/_utils/_logs.py,sha256=tVIAhl7_vbQL4nJ8QdLAHJ0YzQYbW2gTATmjneY_JxI,790
|
@@ -104,7 +104,7 @@ onebusaway/types/vehicles_for_agency_list_response.py,sha256=IUX2zHummRU2ChQsGYt
|
|
104
104
|
onebusaway/types/shared/__init__.py,sha256=ui9M5r_ahasuyksUJVAHHYtdXvg3L_uxVgJY6LMdiPY,201
|
105
105
|
onebusaway/types/shared/references.py,sha256=By29adWfDkZwH6_80NFuvP5NPKOcz9JUqUzaq-iAjQw,7317
|
106
106
|
onebusaway/types/shared/response_wrapper.py,sha256=0i161M7PC8iPq2RzNt8DxZFlvSvdgD9xBcs0ugER0rY,331
|
107
|
-
onebusaway-1.12.
|
108
|
-
onebusaway-1.12.
|
109
|
-
onebusaway-1.12.
|
110
|
-
onebusaway-1.12.
|
107
|
+
onebusaway-1.12.2.dist-info/METADATA,sha256=_Sd5E_XWfmkTPazSAR25dvEG7aiCBvNYGfR2VJAqE5Q,12811
|
108
|
+
onebusaway-1.12.2.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
109
|
+
onebusaway-1.12.2.dist-info/licenses/LICENSE,sha256=czZkEz_7Kzvn7AGsFsY_RUYL132SXtB5Mcrjoq29Vfo,11344
|
110
|
+
onebusaway-1.12.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|