runwayml 3.7.0__tar.gz → 3.7.2__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 (90) hide show
  1. runwayml-3.7.2/.release-please-manifest.json +3 -0
  2. {runwayml-3.7.0 → runwayml-3.7.2}/CHANGELOG.md +16 -0
  3. {runwayml-3.7.0 → runwayml-3.7.2}/PKG-INFO +1 -1
  4. {runwayml-3.7.0 → runwayml-3.7.2}/pyproject.toml +1 -1
  5. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/_models.py +24 -3
  6. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/_version.py +1 -1
  7. {runwayml-3.7.0 → runwayml-3.7.2}/tests/test_models.py +28 -1
  8. runwayml-3.7.0/.release-please-manifest.json +0 -3
  9. {runwayml-3.7.0 → runwayml-3.7.2}/.gitignore +0 -0
  10. {runwayml-3.7.0 → runwayml-3.7.2}/CONTRIBUTING.md +0 -0
  11. {runwayml-3.7.0 → runwayml-3.7.2}/LICENSE +0 -0
  12. {runwayml-3.7.0 → runwayml-3.7.2}/README.md +0 -0
  13. {runwayml-3.7.0 → runwayml-3.7.2}/SECURITY.md +0 -0
  14. {runwayml-3.7.0 → runwayml-3.7.2}/api.md +0 -0
  15. {runwayml-3.7.0 → runwayml-3.7.2}/bin/check-release-environment +0 -0
  16. {runwayml-3.7.0 → runwayml-3.7.2}/bin/publish-pypi +0 -0
  17. {runwayml-3.7.0 → runwayml-3.7.2}/examples/.keep +0 -0
  18. {runwayml-3.7.0 → runwayml-3.7.2}/examples/generate_image.py +0 -0
  19. {runwayml-3.7.0 → runwayml-3.7.2}/mypy.ini +0 -0
  20. {runwayml-3.7.0 → runwayml-3.7.2}/noxfile.py +0 -0
  21. {runwayml-3.7.0 → runwayml-3.7.2}/release-please-config.json +0 -0
  22. {runwayml-3.7.0 → runwayml-3.7.2}/requirements-dev.lock +0 -0
  23. {runwayml-3.7.0 → runwayml-3.7.2}/requirements.lock +0 -0
  24. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/__init__.py +0 -0
  25. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/_base_client.py +0 -0
  26. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/_client.py +0 -0
  27. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/_compat.py +0 -0
  28. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/_constants.py +0 -0
  29. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/_exceptions.py +0 -0
  30. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/_files.py +0 -0
  31. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/_qs.py +0 -0
  32. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/_resource.py +0 -0
  33. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/_response.py +0 -0
  34. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/_streaming.py +0 -0
  35. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/_types.py +0 -0
  36. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/_utils/__init__.py +0 -0
  37. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/_utils/_logs.py +0 -0
  38. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/_utils/_proxy.py +0 -0
  39. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/_utils/_reflection.py +0 -0
  40. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/_utils/_resources_proxy.py +0 -0
  41. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/_utils/_streams.py +0 -0
  42. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/_utils/_sync.py +0 -0
  43. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/_utils/_transform.py +0 -0
  44. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/_utils/_typing.py +0 -0
  45. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/_utils/_utils.py +0 -0
  46. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/lib/.keep +0 -0
  47. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/lib/polling.py +0 -0
  48. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/py.typed +0 -0
  49. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/resources/__init__.py +0 -0
  50. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/resources/character_performance.py +0 -0
  51. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/resources/image_to_video.py +0 -0
  52. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/resources/organization.py +0 -0
  53. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/resources/tasks.py +0 -0
  54. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/resources/text_to_image.py +0 -0
  55. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/resources/video_upscale.py +0 -0
  56. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/types/__init__.py +0 -0
  57. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/types/character_performance_create_params.py +0 -0
  58. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/types/character_performance_create_response.py +0 -0
  59. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/types/image_to_video_create_params.py +0 -0
  60. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/types/image_to_video_create_response.py +0 -0
  61. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/types/organization_retrieve_response.py +0 -0
  62. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/types/organization_retrieve_usage_params.py +0 -0
  63. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/types/organization_retrieve_usage_response.py +0 -0
  64. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/types/task_retrieve_response.py +0 -0
  65. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/types/text_to_image_create_params.py +0 -0
  66. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/types/text_to_image_create_response.py +0 -0
  67. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/types/video_upscale_create_params.py +0 -0
  68. {runwayml-3.7.0 → runwayml-3.7.2}/src/runwayml/types/video_upscale_create_response.py +0 -0
  69. {runwayml-3.7.0 → runwayml-3.7.2}/tests/__init__.py +0 -0
  70. {runwayml-3.7.0 → runwayml-3.7.2}/tests/api_resources/__init__.py +0 -0
  71. {runwayml-3.7.0 → runwayml-3.7.2}/tests/api_resources/test_character_performance.py +0 -0
  72. {runwayml-3.7.0 → runwayml-3.7.2}/tests/api_resources/test_image_to_video.py +0 -0
  73. {runwayml-3.7.0 → runwayml-3.7.2}/tests/api_resources/test_organization.py +0 -0
  74. {runwayml-3.7.0 → runwayml-3.7.2}/tests/api_resources/test_tasks.py +0 -0
  75. {runwayml-3.7.0 → runwayml-3.7.2}/tests/api_resources/test_text_to_image.py +0 -0
  76. {runwayml-3.7.0 → runwayml-3.7.2}/tests/api_resources/test_video_upscale.py +0 -0
  77. {runwayml-3.7.0 → runwayml-3.7.2}/tests/conftest.py +0 -0
  78. {runwayml-3.7.0 → runwayml-3.7.2}/tests/sample_file.txt +0 -0
  79. {runwayml-3.7.0 → runwayml-3.7.2}/tests/test_client.py +0 -0
  80. {runwayml-3.7.0 → runwayml-3.7.2}/tests/test_deepcopy.py +0 -0
  81. {runwayml-3.7.0 → runwayml-3.7.2}/tests/test_extract_files.py +0 -0
  82. {runwayml-3.7.0 → runwayml-3.7.2}/tests/test_files.py +0 -0
  83. {runwayml-3.7.0 → runwayml-3.7.2}/tests/test_qs.py +0 -0
  84. {runwayml-3.7.0 → runwayml-3.7.2}/tests/test_required_args.py +0 -0
  85. {runwayml-3.7.0 → runwayml-3.7.2}/tests/test_response.py +0 -0
  86. {runwayml-3.7.0 → runwayml-3.7.2}/tests/test_streaming.py +0 -0
  87. {runwayml-3.7.0 → runwayml-3.7.2}/tests/test_transform.py +0 -0
  88. {runwayml-3.7.0 → runwayml-3.7.2}/tests/test_utils/test_proxy.py +0 -0
  89. {runwayml-3.7.0 → runwayml-3.7.2}/tests/test_utils/test_typing.py +0 -0
  90. {runwayml-3.7.0 → runwayml-3.7.2}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "3.7.2"
3
+ }
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.7.2 (2025-07-23)
4
+
5
+ Full Changelog: [v3.7.1...v3.7.2](https://github.com/runwayml/sdk-python/compare/v3.7.1...v3.7.2)
6
+
7
+ ### Bug Fixes
8
+
9
+ * **parsing:** parse extra field types ([dc5dd24](https://github.com/runwayml/sdk-python/commit/dc5dd24d7ab7904c7c246ba7255c54c85e7dee40))
10
+
11
+ ## 3.7.1 (2025-07-22)
12
+
13
+ Full Changelog: [v3.7.0...v3.7.1](https://github.com/runwayml/sdk-python/compare/v3.7.0...v3.7.1)
14
+
15
+ ### Bug Fixes
16
+
17
+ * **parsing:** ignore empty metadata ([33c5e49](https://github.com/runwayml/sdk-python/commit/33c5e498bb3903d63f7c9ef308a2e49db4dc5efd))
18
+
3
19
  ## 3.7.0 (2025-07-19)
4
20
 
5
21
  Full Changelog: [v3.6.5...v3.7.0](https://github.com/runwayml/sdk-python/compare/v3.6.5...v3.7.0)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: runwayml
3
- Version: 3.7.0
3
+ Version: 3.7.2
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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "runwayml"
3
- version = "3.7.0"
3
+ version = "3.7.2"
4
4
  description = "The official Python library for the runwayml API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -208,14 +208,18 @@ class BaseModel(pydantic.BaseModel):
208
208
  else:
209
209
  fields_values[name] = field_get_default(field)
210
210
 
211
+ extra_field_type = _get_extra_fields_type(__cls)
212
+
211
213
  _extra = {}
212
214
  for key, value in values.items():
213
215
  if key not in model_fields:
216
+ parsed = construct_type(value=value, type_=extra_field_type) if extra_field_type is not None else value
217
+
214
218
  if PYDANTIC_V2:
215
- _extra[key] = value
219
+ _extra[key] = parsed
216
220
  else:
217
221
  _fields_set.add(key)
218
- fields_values[key] = value
222
+ fields_values[key] = parsed
219
223
 
220
224
  object.__setattr__(m, "__dict__", fields_values)
221
225
 
@@ -370,6 +374,23 @@ def _construct_field(value: object, field: FieldInfo, key: str) -> object:
370
374
  return construct_type(value=value, type_=type_, metadata=getattr(field, "metadata", None))
371
375
 
372
376
 
377
+ def _get_extra_fields_type(cls: type[pydantic.BaseModel]) -> type | None:
378
+ if not PYDANTIC_V2:
379
+ # TODO
380
+ return None
381
+
382
+ schema = cls.__pydantic_core_schema__
383
+ if schema["type"] == "model":
384
+ fields = schema["schema"]
385
+ if fields["type"] == "model-fields":
386
+ extras = fields.get("extras_schema")
387
+ if extras and "cls" in extras:
388
+ # mypy can't narrow the type
389
+ return extras["cls"] # type: ignore[no-any-return]
390
+
391
+ return None
392
+
393
+
373
394
  def is_basemodel(type_: type) -> bool:
374
395
  """Returns whether or not the given type is either a `BaseModel` or a union of `BaseModel`"""
375
396
  if is_union(type_):
@@ -439,7 +460,7 @@ def construct_type(*, value: object, type_: object, metadata: Optional[List[Any]
439
460
  type_ = type_.__value__ # type: ignore[unreachable]
440
461
 
441
462
  # unwrap `Annotated[T, ...]` -> `T`
442
- if metadata is not None:
463
+ if metadata is not None and len(metadata) > 0:
443
464
  meta: tuple[Any, ...] = tuple(metadata)
444
465
  elif is_annotated_type(type_):
445
466
  meta = get_args(type_)[1:]
@@ -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__ = "3.7.0" # x-release-please-version
4
+ __version__ = "3.7.2" # x-release-please-version
@@ -1,5 +1,5 @@
1
1
  import json
2
- from typing import Any, Dict, List, Union, Optional, cast
2
+ from typing import TYPE_CHECKING, Any, Dict, List, Union, Optional, cast
3
3
  from datetime import datetime, timezone
4
4
  from typing_extensions import Literal, Annotated, TypeAliasType
5
5
 
@@ -934,3 +934,30 @@ def test_nested_discriminated_union() -> None:
934
934
  )
935
935
  assert isinstance(model, Type1)
936
936
  assert isinstance(model.value, InnerType2)
937
+
938
+
939
+ @pytest.mark.skipif(not PYDANTIC_V2, reason="this is only supported in pydantic v2 for now")
940
+ def test_extra_properties() -> None:
941
+ class Item(BaseModel):
942
+ prop: int
943
+
944
+ class Model(BaseModel):
945
+ __pydantic_extra__: Dict[str, Item] = Field(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
946
+
947
+ other: str
948
+
949
+ if TYPE_CHECKING:
950
+
951
+ def __getattr__(self, attr: str) -> Item: ...
952
+
953
+ model = construct_type(
954
+ type_=Model,
955
+ value={
956
+ "a": {"prop": 1},
957
+ "other": "foo",
958
+ },
959
+ )
960
+ assert isinstance(model, Model)
961
+ assert model.a.prop == 1
962
+ assert isinstance(model.a, Item)
963
+ assert model.other == "foo"
@@ -1,3 +0,0 @@
1
- {
2
- ".": "3.7.0"
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes