runwayml 2.1.8__tar.gz → 2.1.10__tar.gz

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.
Files changed (70) hide show
  1. runwayml-2.1.10/.release-please-manifest.json +3 -0
  2. {runwayml-2.1.8 → runwayml-2.1.10}/CHANGELOG.md +33 -0
  3. {runwayml-2.1.8 → runwayml-2.1.10}/PKG-INFO +4 -5
  4. {runwayml-2.1.8 → runwayml-2.1.10}/README.md +3 -4
  5. {runwayml-2.1.8 → runwayml-2.1.10}/mypy.ini +1 -1
  6. {runwayml-2.1.8 → runwayml-2.1.10}/pyproject.toml +3 -2
  7. {runwayml-2.1.8 → runwayml-2.1.10}/requirements-dev.lock +4 -5
  8. {runwayml-2.1.8 → runwayml-2.1.10}/requirements.lock +1 -2
  9. {runwayml-2.1.8 → runwayml-2.1.10}/src/runwayml/_base_client.py +6 -0
  10. {runwayml-2.1.8 → runwayml-2.1.10}/src/runwayml/_models.py +4 -4
  11. {runwayml-2.1.8 → runwayml-2.1.10}/src/runwayml/_response.py +9 -3
  12. {runwayml-2.1.8 → runwayml-2.1.10}/src/runwayml/_version.py +1 -1
  13. {runwayml-2.1.8 → runwayml-2.1.10}/src/runwayml/resources/image_to_video.py +2 -2
  14. {runwayml-2.1.8 → runwayml-2.1.10}/src/runwayml/resources/tasks.py +2 -2
  15. {runwayml-2.1.8 → runwayml-2.1.10}/tests/test_client.py +18 -7
  16. {runwayml-2.1.8 → runwayml-2.1.10}/tests/test_models.py +10 -0
  17. runwayml-2.1.8/.release-please-manifest.json +0 -3
  18. {runwayml-2.1.8 → runwayml-2.1.10}/.gitignore +0 -0
  19. {runwayml-2.1.8 → runwayml-2.1.10}/CONTRIBUTING.md +0 -0
  20. {runwayml-2.1.8 → runwayml-2.1.10}/LICENSE +0 -0
  21. {runwayml-2.1.8 → runwayml-2.1.10}/SECURITY.md +0 -0
  22. {runwayml-2.1.8 → runwayml-2.1.10}/api.md +0 -0
  23. {runwayml-2.1.8 → runwayml-2.1.10}/bin/check-release-environment +0 -0
  24. {runwayml-2.1.8 → runwayml-2.1.10}/bin/publish-pypi +0 -0
  25. {runwayml-2.1.8 → runwayml-2.1.10}/examples/.keep +0 -0
  26. {runwayml-2.1.8 → runwayml-2.1.10}/noxfile.py +0 -0
  27. {runwayml-2.1.8 → runwayml-2.1.10}/release-please-config.json +0 -0
  28. {runwayml-2.1.8 → runwayml-2.1.10}/src/runwayml/__init__.py +0 -0
  29. {runwayml-2.1.8 → runwayml-2.1.10}/src/runwayml/_client.py +0 -0
  30. {runwayml-2.1.8 → runwayml-2.1.10}/src/runwayml/_compat.py +0 -0
  31. {runwayml-2.1.8 → runwayml-2.1.10}/src/runwayml/_constants.py +0 -0
  32. {runwayml-2.1.8 → runwayml-2.1.10}/src/runwayml/_exceptions.py +0 -0
  33. {runwayml-2.1.8 → runwayml-2.1.10}/src/runwayml/_files.py +0 -0
  34. {runwayml-2.1.8 → runwayml-2.1.10}/src/runwayml/_qs.py +0 -0
  35. {runwayml-2.1.8 → runwayml-2.1.10}/src/runwayml/_resource.py +0 -0
  36. {runwayml-2.1.8 → runwayml-2.1.10}/src/runwayml/_streaming.py +0 -0
  37. {runwayml-2.1.8 → runwayml-2.1.10}/src/runwayml/_types.py +0 -0
  38. {runwayml-2.1.8 → runwayml-2.1.10}/src/runwayml/_utils/__init__.py +0 -0
  39. {runwayml-2.1.8 → runwayml-2.1.10}/src/runwayml/_utils/_logs.py +0 -0
  40. {runwayml-2.1.8 → runwayml-2.1.10}/src/runwayml/_utils/_proxy.py +0 -0
  41. {runwayml-2.1.8 → runwayml-2.1.10}/src/runwayml/_utils/_reflection.py +0 -0
  42. {runwayml-2.1.8 → runwayml-2.1.10}/src/runwayml/_utils/_streams.py +0 -0
  43. {runwayml-2.1.8 → runwayml-2.1.10}/src/runwayml/_utils/_sync.py +0 -0
  44. {runwayml-2.1.8 → runwayml-2.1.10}/src/runwayml/_utils/_transform.py +0 -0
  45. {runwayml-2.1.8 → runwayml-2.1.10}/src/runwayml/_utils/_typing.py +0 -0
  46. {runwayml-2.1.8 → runwayml-2.1.10}/src/runwayml/_utils/_utils.py +0 -0
  47. {runwayml-2.1.8 → runwayml-2.1.10}/src/runwayml/lib/.keep +0 -0
  48. {runwayml-2.1.8 → runwayml-2.1.10}/src/runwayml/py.typed +0 -0
  49. {runwayml-2.1.8 → runwayml-2.1.10}/src/runwayml/resources/__init__.py +0 -0
  50. {runwayml-2.1.8 → runwayml-2.1.10}/src/runwayml/types/__init__.py +0 -0
  51. {runwayml-2.1.8 → runwayml-2.1.10}/src/runwayml/types/image_to_video_create_params.py +0 -0
  52. {runwayml-2.1.8 → runwayml-2.1.10}/src/runwayml/types/image_to_video_create_response.py +0 -0
  53. {runwayml-2.1.8 → runwayml-2.1.10}/src/runwayml/types/task_retrieve_response.py +0 -0
  54. {runwayml-2.1.8 → runwayml-2.1.10}/tests/__init__.py +0 -0
  55. {runwayml-2.1.8 → runwayml-2.1.10}/tests/api_resources/__init__.py +0 -0
  56. {runwayml-2.1.8 → runwayml-2.1.10}/tests/api_resources/test_image_to_video.py +0 -0
  57. {runwayml-2.1.8 → runwayml-2.1.10}/tests/api_resources/test_tasks.py +0 -0
  58. {runwayml-2.1.8 → runwayml-2.1.10}/tests/conftest.py +0 -0
  59. {runwayml-2.1.8 → runwayml-2.1.10}/tests/sample_file.txt +0 -0
  60. {runwayml-2.1.8 → runwayml-2.1.10}/tests/test_deepcopy.py +0 -0
  61. {runwayml-2.1.8 → runwayml-2.1.10}/tests/test_extract_files.py +0 -0
  62. {runwayml-2.1.8 → runwayml-2.1.10}/tests/test_files.py +0 -0
  63. {runwayml-2.1.8 → runwayml-2.1.10}/tests/test_qs.py +0 -0
  64. {runwayml-2.1.8 → runwayml-2.1.10}/tests/test_required_args.py +0 -0
  65. {runwayml-2.1.8 → runwayml-2.1.10}/tests/test_response.py +0 -0
  66. {runwayml-2.1.8 → runwayml-2.1.10}/tests/test_streaming.py +0 -0
  67. {runwayml-2.1.8 → runwayml-2.1.10}/tests/test_transform.py +0 -0
  68. {runwayml-2.1.8 → runwayml-2.1.10}/tests/test_utils/test_proxy.py +0 -0
  69. {runwayml-2.1.8 → runwayml-2.1.10}/tests/test_utils/test_typing.py +0 -0
  70. {runwayml-2.1.8 → runwayml-2.1.10}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "2.1.10"
3
+ }
@@ -1,5 +1,38 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.1.10 (2025-01-24)
4
+
5
+ Full Changelog: [v2.1.9...v2.1.10](https://github.com/runwayml/sdk-python/compare/v2.1.9...v2.1.10)
6
+
7
+ ### Chores
8
+
9
+ * **internal:** minor formatting changes ([#80](https://github.com/runwayml/sdk-python/issues/80)) ([067f47a](https://github.com/runwayml/sdk-python/commit/067f47a1a59f15c71018bb28f3606832f223b42f))
10
+ * **internal:** minor style changes ([#78](https://github.com/runwayml/sdk-python/issues/78)) ([bd0eb4a](https://github.com/runwayml/sdk-python/commit/bd0eb4a84756ca8e8cf40935513358eac470d750))
11
+
12
+ ## 2.1.9 (2025-01-21)
13
+
14
+ Full Changelog: [v2.1.8...v2.1.9](https://github.com/runwayml/sdk-python/compare/v2.1.8...v2.1.9)
15
+
16
+ ### Bug Fixes
17
+
18
+ * add back missing docstrings ([#73](https://github.com/runwayml/sdk-python/issues/73)) ([8eac71e](https://github.com/runwayml/sdk-python/commit/8eac71e781ff81d00129ea224863a20bb70f00f6))
19
+ * **client:** only call .close() when needed ([#69](https://github.com/runwayml/sdk-python/issues/69)) ([4a48c73](https://github.com/runwayml/sdk-python/commit/4a48c73760d38c1f22aa73cc79f3eb1bc497e1c5))
20
+ * correctly handle deserialising `cls` fields ([#71](https://github.com/runwayml/sdk-python/issues/71)) ([6db1a75](https://github.com/runwayml/sdk-python/commit/6db1a751d3be4f8905bfed74c99b2423acfcd003))
21
+ * **tests:** make test_get_platform less flaky ([#75](https://github.com/runwayml/sdk-python/issues/75)) ([7199a24](https://github.com/runwayml/sdk-python/commit/7199a24ae13750d56648d5f4a7a2a6a2ad3ea9c4))
22
+
23
+
24
+ ### Chores
25
+
26
+ * **internal:** avoid pytest-asyncio deprecation warning ([#76](https://github.com/runwayml/sdk-python/issues/76)) ([bff6464](https://github.com/runwayml/sdk-python/commit/bff646451b0b116acd763ff7d2432a9cd921fa2f))
27
+ * **internal:** codegen related update ([#67](https://github.com/runwayml/sdk-python/issues/67)) ([027aa11](https://github.com/runwayml/sdk-python/commit/027aa11dabfccf461fb33aab458a50d96d715ff9))
28
+ * **internal:** codegen related update ([#70](https://github.com/runwayml/sdk-python/issues/70)) ([38c71dc](https://github.com/runwayml/sdk-python/commit/38c71dc74ab8028b109a51266edac077549aea0b))
29
+ * **internal:** codegen related update ([#72](https://github.com/runwayml/sdk-python/issues/72)) ([d4b14b4](https://github.com/runwayml/sdk-python/commit/d4b14b4a6dfecb7f5edc18442f8326213c63db40))
30
+
31
+
32
+ ### Documentation
33
+
34
+ * **raw responses:** fix duplicate `the` ([#74](https://github.com/runwayml/sdk-python/issues/74)) ([0d563ee](https://github.com/runwayml/sdk-python/commit/0d563ee146cef940d78a026302229f3949c034fc))
35
+
3
36
  ## 2.1.8 (2025-01-08)
4
37
 
5
38
  Full Changelog: [v2.1.7...v2.1.8](https://github.com/runwayml/sdk-python/compare/v2.1.7...v2.1.8)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: runwayml
3
- Version: 2.1.8
3
+ Version: 2.1.10
4
4
  Summary: The official Python library for the runwayml API
5
5
  Project-URL: Homepage, https://github.com/runwayml/sdk-python
6
6
  Project-URL: Repository, https://github.com/runwayml/sdk-python
@@ -145,7 +145,7 @@ except runwayml.APIStatusError as e:
145
145
  print(e.response)
146
146
  ```
147
147
 
148
- Error codes are as followed:
148
+ Error codes are as follows:
149
149
 
150
150
  | Status Code | Error Type |
151
151
  | ----------- | -------------------------- |
@@ -292,8 +292,7 @@ If you need to access undocumented endpoints, params, or response properties, th
292
292
  #### Undocumented endpoints
293
293
 
294
294
  To make requests to undocumented endpoints, you can make requests using `client.get`, `client.post`, and other
295
- http verbs. Options on the client will be respected (such as retries) will be respected when making this
296
- request.
295
+ http verbs. Options on the client will be respected (such as retries) when making this request.
297
296
 
298
297
  ```py
299
298
  import httpx
@@ -365,7 +364,7 @@ with RunwayML() as client:
365
364
  This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:
366
365
 
367
366
  1. Changes that only affect static types, without breaking runtime behavior.
368
- 2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals)_.
367
+ 2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_
369
368
  3. Changes that we do not expect to impact the vast majority of users in practice.
370
369
 
371
370
  We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
@@ -113,7 +113,7 @@ except runwayml.APIStatusError as e:
113
113
  print(e.response)
114
114
  ```
115
115
 
116
- Error codes are as followed:
116
+ Error codes are as follows:
117
117
 
118
118
  | Status Code | Error Type |
119
119
  | ----------- | -------------------------- |
@@ -260,8 +260,7 @@ If you need to access undocumented endpoints, params, or response properties, th
260
260
  #### Undocumented endpoints
261
261
 
262
262
  To make requests to undocumented endpoints, you can make requests using `client.get`, `client.post`, and other
263
- http verbs. Options on the client will be respected (such as retries) will be respected when making this
264
- request.
263
+ http verbs. Options on the client will be respected (such as retries) when making this request.
265
264
 
266
265
  ```py
267
266
  import httpx
@@ -333,7 +332,7 @@ with RunwayML() as client:
333
332
  This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:
334
333
 
335
334
  1. Changes that only affect static types, without breaking runtime behavior.
336
- 2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals)_.
335
+ 2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_
337
336
  3. Changes that we do not expect to impact the vast majority of users in practice.
338
337
 
339
338
  We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
@@ -41,7 +41,7 @@ cache_fine_grained = True
41
41
  # ```
42
42
  # Changing this codegen to make mypy happy would increase complexity
43
43
  # and would not be worth it.
44
- disable_error_code = func-returns-value
44
+ disable_error_code = func-returns-value,overload-cannot-match
45
45
 
46
46
  # https://github.com/python/mypy/issues/12162
47
47
  [mypy.overrides]
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "runwayml"
3
- version = "2.1.8"
3
+ version = "2.1.10"
4
4
  description = "The official Python library for the runwayml API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -54,7 +54,7 @@ dev-dependencies = [
54
54
  "dirty-equals>=0.6.0",
55
55
  "importlib-metadata>=6.7.0",
56
56
  "rich>=13.7.1",
57
- "nest_asyncio==1.6.0"
57
+ "nest_asyncio==1.6.0",
58
58
  ]
59
59
 
60
60
  [tool.rye.scripts]
@@ -129,6 +129,7 @@ testpaths = ["tests"]
129
129
  addopts = "--tb=short"
130
130
  xfail_strict = true
131
131
  asyncio_mode = "auto"
132
+ asyncio_default_fixture_loop_scope = "session"
132
133
  filterwarnings = [
133
134
  "error"
134
135
  ]
@@ -35,7 +35,7 @@ h11==0.14.0
35
35
  # via httpcore
36
36
  httpcore==1.0.2
37
37
  # via httpx
38
- httpx==0.25.2
38
+ httpx==0.28.1
39
39
  # via respx
40
40
  # via runwayml
41
41
  idna==3.4
@@ -48,7 +48,7 @@ markdown-it-py==3.0.0
48
48
  # via rich
49
49
  mdurl==0.1.2
50
50
  # via markdown-it-py
51
- mypy==1.13.0
51
+ mypy==1.14.1
52
52
  mypy-extensions==1.0.0
53
53
  # via mypy
54
54
  nest-asyncio==1.6.0
@@ -68,7 +68,7 @@ pydantic-core==2.27.1
68
68
  # via pydantic
69
69
  pygments==2.18.0
70
70
  # via rich
71
- pyright==1.1.390
71
+ pyright==1.1.392.post0
72
72
  pytest==8.3.3
73
73
  # via pytest-asyncio
74
74
  pytest-asyncio==0.24.0
@@ -76,7 +76,7 @@ python-dateutil==2.8.2
76
76
  # via time-machine
77
77
  pytz==2023.3.post1
78
78
  # via dirty-equals
79
- respx==0.20.2
79
+ respx==0.22.0
80
80
  rich==13.7.1
81
81
  ruff==0.6.9
82
82
  setuptools==68.2.2
@@ -85,7 +85,6 @@ six==1.16.0
85
85
  # via python-dateutil
86
86
  sniffio==1.3.0
87
87
  # via anyio
88
- # via httpx
89
88
  # via runwayml
90
89
  time-machine==2.9.0
91
90
  tomli==2.0.2
@@ -25,7 +25,7 @@ h11==0.14.0
25
25
  # via httpcore
26
26
  httpcore==1.0.2
27
27
  # via httpx
28
- httpx==0.25.2
28
+ httpx==0.28.1
29
29
  # via runwayml
30
30
  idna==3.4
31
31
  # via anyio
@@ -36,7 +36,6 @@ pydantic-core==2.27.1
36
36
  # via pydantic
37
37
  sniffio==1.3.0
38
38
  # via anyio
39
- # via httpx
40
39
  # via runwayml
41
40
  typing-extensions==4.12.2
42
41
  # via anyio
@@ -767,6 +767,9 @@ else:
767
767
 
768
768
  class SyncHttpxClientWrapper(DefaultHttpxClient):
769
769
  def __del__(self) -> None:
770
+ if self.is_closed:
771
+ return
772
+
770
773
  try:
771
774
  self.close()
772
775
  except Exception:
@@ -1334,6 +1337,9 @@ else:
1334
1337
 
1335
1338
  class AsyncHttpxClientWrapper(DefaultAsyncHttpxClient):
1336
1339
  def __del__(self) -> None:
1340
+ if self.is_closed:
1341
+ return
1342
+
1337
1343
  try:
1338
1344
  # TODO(someday): support non asyncio runtimes here
1339
1345
  asyncio.get_running_loop().create_task(self.aclose())
@@ -179,14 +179,14 @@ class BaseModel(pydantic.BaseModel):
179
179
  @classmethod
180
180
  @override
181
181
  def construct( # pyright: ignore[reportIncompatibleMethodOverride]
182
- cls: Type[ModelT],
182
+ __cls: Type[ModelT],
183
183
  _fields_set: set[str] | None = None,
184
184
  **values: object,
185
185
  ) -> ModelT:
186
- m = cls.__new__(cls)
186
+ m = __cls.__new__(__cls)
187
187
  fields_values: dict[str, object] = {}
188
188
 
189
- config = get_model_config(cls)
189
+ config = get_model_config(__cls)
190
190
  populate_by_name = (
191
191
  config.allow_population_by_field_name
192
192
  if isinstance(config, _ConfigProtocol)
@@ -196,7 +196,7 @@ class BaseModel(pydantic.BaseModel):
196
196
  if _fields_set is None:
197
197
  _fields_set = set()
198
198
 
199
- model_fields = get_model_fields(cls)
199
+ model_fields = get_model_fields(__cls)
200
200
  for name, field in model_fields.items():
201
201
  key = field.alias
202
202
  if key is None or (key not in values and populate_by_name):
@@ -136,6 +136,8 @@ class BaseAPIResponse(Generic[R]):
136
136
  if cast_to and is_annotated_type(cast_to):
137
137
  cast_to = extract_type_arg(cast_to, 0)
138
138
 
139
+ origin = get_origin(cast_to) or cast_to
140
+
139
141
  if self._is_sse_stream:
140
142
  if to:
141
143
  if not is_stream_class_type(to):
@@ -195,8 +197,6 @@ class BaseAPIResponse(Generic[R]):
195
197
  if cast_to == bool:
196
198
  return cast(R, response.text.lower() == "true")
197
199
 
198
- origin = get_origin(cast_to) or cast_to
199
-
200
200
  if origin == APIResponse:
201
201
  raise RuntimeError("Unexpected state - cast_to is `APIResponse`")
202
202
 
@@ -210,7 +210,13 @@ class BaseAPIResponse(Generic[R]):
210
210
  raise ValueError(f"Subclasses of httpx.Response cannot be passed to `cast_to`")
211
211
  return cast(R, response)
212
212
 
213
- if inspect.isclass(origin) and not issubclass(origin, BaseModel) and issubclass(origin, pydantic.BaseModel):
213
+ if (
214
+ inspect.isclass(
215
+ origin # pyright: ignore[reportUnknownArgumentType]
216
+ )
217
+ and not issubclass(origin, BaseModel)
218
+ and issubclass(origin, pydantic.BaseModel)
219
+ ):
214
220
  raise TypeError("Pydantic models must subclass our base model type, e.g. `from runwayml import BaseModel`")
215
221
 
216
222
  if (
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "runwayml"
4
- __version__ = "2.1.8" # x-release-please-version
4
+ __version__ = "2.1.10" # x-release-please-version
@@ -31,7 +31,7 @@ class ImageToVideoResource(SyncAPIResource):
31
31
  @cached_property
32
32
  def with_raw_response(self) -> ImageToVideoResourceWithRawResponse:
33
33
  """
34
- This property can be used as a prefix for any HTTP method call to return the
34
+ This property can be used as a prefix for any HTTP method call to return
35
35
  the raw response object instead of the parsed content.
36
36
 
37
37
  For more information, see https://www.github.com/runwayml/sdk-python#accessing-raw-response-data-eg-headers
@@ -120,7 +120,7 @@ class AsyncImageToVideoResource(AsyncAPIResource):
120
120
  @cached_property
121
121
  def with_raw_response(self) -> AsyncImageToVideoResourceWithRawResponse:
122
122
  """
123
- This property can be used as a prefix for any HTTP method call to return the
123
+ This property can be used as a prefix for any HTTP method call to return
124
124
  the raw response object instead of the parsed content.
125
125
 
126
126
  For more information, see https://www.github.com/runwayml/sdk-python#accessing-raw-response-data-eg-headers
@@ -23,7 +23,7 @@ class TasksResource(SyncAPIResource):
23
23
  @cached_property
24
24
  def with_raw_response(self) -> TasksResourceWithRawResponse:
25
25
  """
26
- This property can be used as a prefix for any HTTP method call to return the
26
+ This property can be used as a prefix for any HTTP method call to return
27
27
  the raw response object instead of the parsed content.
28
28
 
29
29
  For more information, see https://www.github.com/runwayml/sdk-python#accessing-raw-response-data-eg-headers
@@ -118,7 +118,7 @@ class AsyncTasksResource(AsyncAPIResource):
118
118
  @cached_property
119
119
  def with_raw_response(self) -> AsyncTasksResourceWithRawResponse:
120
120
  """
121
- This property can be used as a prefix for any HTTP method call to return the
121
+ This property can be used as a prefix for any HTTP method call to return
122
122
  the raw response object instead of the parsed content.
123
123
 
124
124
  For more information, see https://www.github.com/runwayml/sdk-python#accessing-raw-response-data-eg-headers
@@ -6,6 +6,7 @@ import gc
6
6
  import os
7
7
  import sys
8
8
  import json
9
+ import time
9
10
  import asyncio
10
11
  import inspect
11
12
  import subprocess
@@ -1661,10 +1662,20 @@ class TestAsyncRunwayML:
1661
1662
  [sys.executable, "-c", test_code],
1662
1663
  text=True,
1663
1664
  ) as process:
1664
- try:
1665
- process.wait(2)
1666
- if process.returncode:
1667
- raise AssertionError("calling get_platform using asyncify resulted in a non-zero exit code")
1668
- except subprocess.TimeoutExpired as e:
1669
- process.kill()
1670
- raise AssertionError("calling get_platform using asyncify resulted in a hung process") from e
1665
+ timeout = 10 # seconds
1666
+
1667
+ start_time = time.monotonic()
1668
+ while True:
1669
+ return_code = process.poll()
1670
+ if return_code is not None:
1671
+ if return_code != 0:
1672
+ raise AssertionError("calling get_platform using asyncify resulted in a non-zero exit code")
1673
+
1674
+ # success
1675
+ break
1676
+
1677
+ if time.monotonic() - start_time > timeout:
1678
+ process.kill()
1679
+ raise AssertionError("calling get_platform using asyncify resulted in a hung process")
1680
+
1681
+ time.sleep(0.1)
@@ -844,3 +844,13 @@ def test_type_alias_type() -> None:
844
844
  assert m.alias == "foo"
845
845
  assert isinstance(m.union, str)
846
846
  assert m.union == "bar"
847
+
848
+
849
+ @pytest.mark.skipif(not PYDANTIC_V2, reason="TypeAliasType is not supported in Pydantic v1")
850
+ def test_field_named_cls() -> None:
851
+ class Model(BaseModel):
852
+ cls: str
853
+
854
+ m = construct_type(value={"cls": "foo"}, type_=Model)
855
+ assert isinstance(m, Model)
856
+ assert isinstance(m.cls, str)
@@ -1,3 +0,0 @@
1
- {
2
- ".": "2.1.8"
3
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes