runwayml 2.1.8__py3-none-any.whl → 2.1.9__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.
runwayml/_base_client.py CHANGED
@@ -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())
runwayml/_models.py CHANGED
@@ -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):
runwayml/_response.py CHANGED
@@ -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 (
runwayml/_version.py CHANGED
@@ -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.9" # 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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: runwayml
3
- Version: 2.1.8
3
+ Version: 2.1.9
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.
@@ -1,17 +1,17 @@
1
1
  runwayml/__init__.py,sha256=iXnJfH73wbj9IxfCHpwfWBxgOa9C4FRrrbBZM5f3biw,2476
2
- runwayml/_base_client.py,sha256=Ehfq1oaghucmu9n_MpuoOlH-qZGbetwzgNOmVG81cns,68038
2
+ runwayml/_base_client.py,sha256=TXFvRY1-arZnZOXHsADOiHtSsP6w5TyPEAY9JhD_qvA,68132
3
3
  runwayml/_client.py,sha256=4y5GISlJ-EYAWKfNIj6p2W_7KwJY3bHVkCYU7yNJBtU,16453
4
4
  runwayml/_compat.py,sha256=VWemUKbj6DDkQ-O4baSpHVLJafotzeXmCQGJugfVTIw,6580
5
5
  runwayml/_constants.py,sha256=JE8kyZa2Q4NK_i4fO--8siEYTzeHnT0fYbOFDgDP4uk,464
6
6
  runwayml/_exceptions.py,sha256=p2Q8kywHCVQzArLQL4Ht-HetTBhAvevU6yDvEq7PpIE,3224
7
7
  runwayml/_files.py,sha256=mf4dOgL4b0ryyZlbqLhggD3GVgDf6XxdGFAgce01ugE,3549
8
- runwayml/_models.py,sha256=qpmTQHj3NFzkBiSiz0W8MO18UcOOqQPMBucMuBFUx7I,28649
8
+ runwayml/_models.py,sha256=B6f-C-F-PbDp3jRKCLksaAS9osC2g1xs7DpoZV1dlUE,28659
9
9
  runwayml/_qs.py,sha256=AOkSz4rHtK4YI3ZU_kzea-zpwBUgEY8WniGmTPyEimc,4846
10
10
  runwayml/_resource.py,sha256=BF-j3xY5eRTKmuTxg8eDhLtLP4MLB1phDh_B6BKipKA,1112
11
- runwayml/_response.py,sha256=RetJb-IkgnyakTwxVpNoHS4r6gR-fWncQ1z-t_E4x1A,28677
11
+ runwayml/_response.py,sha256=pCIoaft2BgSqupUW_TxmH5Z_SWl1SvAOYRo3_Kveg2o,28801
12
12
  runwayml/_streaming.py,sha256=NSVuAgknVQWU1cgZEjQn01IdZKKynb5rOeYp5Lo-OEQ,10108
13
13
  runwayml/_types.py,sha256=oHct1QQY_lI8bepCgfWDZm2N5VNi0e6o1iLeiTh4Y_0,6145
14
- runwayml/_version.py,sha256=XM1UJWWfFBIwfYQkXtM0Bt8j9HNc0kkiwHT_reQ0zpU,160
14
+ runwayml/_version.py,sha256=IULyIi7P7trRIN_Z9qBd1A5QXWdyBPUQ5zzarN0eDMQ,160
15
15
  runwayml/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  runwayml/_utils/__init__.py,sha256=PNZ_QJuzZEgyYXqkO1HVhGkj5IU9bglVUcw7H-Knjzw,2062
17
17
  runwayml/_utils/_logs.py,sha256=ZfS5W59hdqEBVV86lNrk28PhvUxtHOzs9JqiLhSu0pI,780
@@ -24,13 +24,13 @@ runwayml/_utils/_typing.py,sha256=nTJz0jcrQbEgxwy4TtAkNxuU0QHHlmc6mQtA6vIR8tg,45
24
24
  runwayml/_utils/_utils.py,sha256=8UmbPOy_AAr2uUjjFui-VZSrVBHRj6bfNEKRp5YZP2A,12004
25
25
  runwayml/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
26
26
  runwayml/resources/__init__.py,sha256=O-ZVFaODsGXK0pKVlV4HKoeJyq3p9sK_9COJTv7P1WM,1069
27
- runwayml/resources/image_to_video.py,sha256=bts-S7MA6Rk9p1BMx-2J8WOdrP5iw4c4Kor6jiYaseE,9391
28
- runwayml/resources/tasks.py,sha256=j80KvE6QkVAJvfIUx37tJEizcBB1u5vhd9zkSiv6Tuk,9681
27
+ runwayml/resources/image_to_video.py,sha256=nFtSEAMAyIlLrWNX9o_HneXfaoHQq2cunv8I0ntglQA,9383
28
+ runwayml/resources/tasks.py,sha256=-VT3qetYcaqn4FskekxhN_fCTozMl1GqxGpGwxV8M60,9673
29
29
  runwayml/types/__init__.py,sha256=R3cLEXzpcEpEOuxaFBo3R72ewH1LtjpkZ0aYOIt1CAo,400
30
30
  runwayml/types/image_to_video_create_params.py,sha256=98DsjOHnmHEi8mVjZOQEDL3P1hJUT8uktp0mDA5WJ5Y,1869
31
31
  runwayml/types/image_to_video_create_response.py,sha256=l5GszzUSItV-ZYHCB8hH_GSVibUZEkzfRLrAhXkd8O4,346
32
32
  runwayml/types/task_retrieve_response.py,sha256=v8y2bLxsW6srzScW-B3Akv72q_PI_NQmduGrGRQMHds,2139
33
- runwayml-2.1.8.dist-info/METADATA,sha256=eQrUjmuEQeYWSfSvFDbRr2nwwPlT5Csb5xMUAz9twTg,13578
34
- runwayml-2.1.8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
35
- runwayml-2.1.8.dist-info/licenses/LICENSE,sha256=baeFj6izBWIm6A5_7N3-WAsy_VYpDF05Dd4zS1zsfZI,11338
36
- runwayml-2.1.8.dist-info/RECORD,,
33
+ runwayml-2.1.9.dist-info/METADATA,sha256=_DmqK4XPHuvmyK1sknapefyhSU7rbMee56MFefhAv4I,13559
34
+ runwayml-2.1.9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
35
+ runwayml-2.1.9.dist-info/licenses/LICENSE,sha256=baeFj6izBWIm6A5_7N3-WAsy_VYpDF05Dd4zS1zsfZI,11338
36
+ runwayml-2.1.9.dist-info/RECORD,,