runwayml 3.6.2__tar.gz → 3.6.4__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 (84) hide show
  1. runwayml-3.6.4/.release-please-manifest.json +3 -0
  2. {runwayml-3.6.2 → runwayml-3.6.4}/CHANGELOG.md +17 -0
  3. {runwayml-3.6.2 → runwayml-3.6.4}/PKG-INFO +2 -1
  4. {runwayml-3.6.2 → runwayml-3.6.4}/pyproject.toml +2 -1
  5. {runwayml-3.6.2 → runwayml-3.6.4}/requirements-dev.lock +2 -2
  6. {runwayml-3.6.2 → runwayml-3.6.4}/requirements.lock +2 -2
  7. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/_models.py +8 -5
  8. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/_version.py +1 -1
  9. {runwayml-3.6.2 → runwayml-3.6.4}/tests/test_models.py +45 -0
  10. runwayml-3.6.2/.release-please-manifest.json +0 -3
  11. {runwayml-3.6.2 → runwayml-3.6.4}/.gitignore +0 -0
  12. {runwayml-3.6.2 → runwayml-3.6.4}/CONTRIBUTING.md +0 -0
  13. {runwayml-3.6.2 → runwayml-3.6.4}/LICENSE +0 -0
  14. {runwayml-3.6.2 → runwayml-3.6.4}/README.md +0 -0
  15. {runwayml-3.6.2 → runwayml-3.6.4}/SECURITY.md +0 -0
  16. {runwayml-3.6.2 → runwayml-3.6.4}/api.md +0 -0
  17. {runwayml-3.6.2 → runwayml-3.6.4}/bin/check-release-environment +0 -0
  18. {runwayml-3.6.2 → runwayml-3.6.4}/bin/publish-pypi +0 -0
  19. {runwayml-3.6.2 → runwayml-3.6.4}/examples/.keep +0 -0
  20. {runwayml-3.6.2 → runwayml-3.6.4}/examples/generate_image.py +0 -0
  21. {runwayml-3.6.2 → runwayml-3.6.4}/mypy.ini +0 -0
  22. {runwayml-3.6.2 → runwayml-3.6.4}/noxfile.py +0 -0
  23. {runwayml-3.6.2 → runwayml-3.6.4}/release-please-config.json +0 -0
  24. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/__init__.py +0 -0
  25. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/_base_client.py +0 -0
  26. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/_client.py +0 -0
  27. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/_compat.py +0 -0
  28. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/_constants.py +0 -0
  29. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/_exceptions.py +0 -0
  30. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/_files.py +0 -0
  31. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/_qs.py +0 -0
  32. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/_resource.py +0 -0
  33. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/_response.py +0 -0
  34. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/_streaming.py +0 -0
  35. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/_types.py +0 -0
  36. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/_utils/__init__.py +0 -0
  37. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/_utils/_logs.py +0 -0
  38. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/_utils/_proxy.py +0 -0
  39. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/_utils/_reflection.py +0 -0
  40. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/_utils/_resources_proxy.py +0 -0
  41. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/_utils/_streams.py +0 -0
  42. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/_utils/_sync.py +0 -0
  43. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/_utils/_transform.py +0 -0
  44. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/_utils/_typing.py +0 -0
  45. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/_utils/_utils.py +0 -0
  46. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/lib/.keep +0 -0
  47. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/lib/polling.py +0 -0
  48. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/py.typed +0 -0
  49. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/resources/__init__.py +0 -0
  50. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/resources/image_to_video.py +0 -0
  51. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/resources/organization.py +0 -0
  52. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/resources/tasks.py +0 -0
  53. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/resources/text_to_image.py +0 -0
  54. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/resources/video_upscale.py +0 -0
  55. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/types/__init__.py +0 -0
  56. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/types/image_to_video_create_params.py +0 -0
  57. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/types/image_to_video_create_response.py +0 -0
  58. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/types/organization_retrieve_response.py +0 -0
  59. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/types/task_retrieve_response.py +0 -0
  60. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/types/text_to_image_create_params.py +0 -0
  61. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/types/text_to_image_create_response.py +0 -0
  62. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/types/video_upscale_create_params.py +0 -0
  63. {runwayml-3.6.2 → runwayml-3.6.4}/src/runwayml/types/video_upscale_create_response.py +0 -0
  64. {runwayml-3.6.2 → runwayml-3.6.4}/tests/__init__.py +0 -0
  65. {runwayml-3.6.2 → runwayml-3.6.4}/tests/api_resources/__init__.py +0 -0
  66. {runwayml-3.6.2 → runwayml-3.6.4}/tests/api_resources/test_image_to_video.py +0 -0
  67. {runwayml-3.6.2 → runwayml-3.6.4}/tests/api_resources/test_organization.py +0 -0
  68. {runwayml-3.6.2 → runwayml-3.6.4}/tests/api_resources/test_tasks.py +0 -0
  69. {runwayml-3.6.2 → runwayml-3.6.4}/tests/api_resources/test_text_to_image.py +0 -0
  70. {runwayml-3.6.2 → runwayml-3.6.4}/tests/api_resources/test_video_upscale.py +0 -0
  71. {runwayml-3.6.2 → runwayml-3.6.4}/tests/conftest.py +0 -0
  72. {runwayml-3.6.2 → runwayml-3.6.4}/tests/sample_file.txt +0 -0
  73. {runwayml-3.6.2 → runwayml-3.6.4}/tests/test_client.py +0 -0
  74. {runwayml-3.6.2 → runwayml-3.6.4}/tests/test_deepcopy.py +0 -0
  75. {runwayml-3.6.2 → runwayml-3.6.4}/tests/test_extract_files.py +0 -0
  76. {runwayml-3.6.2 → runwayml-3.6.4}/tests/test_files.py +0 -0
  77. {runwayml-3.6.2 → runwayml-3.6.4}/tests/test_qs.py +0 -0
  78. {runwayml-3.6.2 → runwayml-3.6.4}/tests/test_required_args.py +0 -0
  79. {runwayml-3.6.2 → runwayml-3.6.4}/tests/test_response.py +0 -0
  80. {runwayml-3.6.2 → runwayml-3.6.4}/tests/test_streaming.py +0 -0
  81. {runwayml-3.6.2 → runwayml-3.6.4}/tests/test_transform.py +0 -0
  82. {runwayml-3.6.2 → runwayml-3.6.4}/tests/test_utils/test_proxy.py +0 -0
  83. {runwayml-3.6.2 → runwayml-3.6.4}/tests/test_utils/test_typing.py +0 -0
  84. {runwayml-3.6.2 → runwayml-3.6.4}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "3.6.4"
3
+ }
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.6.4 (2025-07-10)
4
+
5
+ Full Changelog: [v3.6.3...v3.6.4](https://github.com/runwayml/sdk-python/compare/v3.6.3...v3.6.4)
6
+
7
+ ### Bug Fixes
8
+
9
+ * **parsing:** correctly handle nested discriminated unions ([813daf2](https://github.com/runwayml/sdk-python/commit/813daf265fdd93af5500a1b7cf2c7def33f31e08))
10
+
11
+ ## 3.6.3 (2025-07-09)
12
+
13
+ Full Changelog: [v3.6.2...v3.6.3](https://github.com/runwayml/sdk-python/compare/v3.6.2...v3.6.3)
14
+
15
+ ### Chores
16
+
17
+ * **internal:** bump pinned h11 dep ([25ee0aa](https://github.com/runwayml/sdk-python/commit/25ee0aadb87786a3825169c3e84cc80398188ba5))
18
+ * **package:** mark python 3.13 as supported ([b50298a](https://github.com/runwayml/sdk-python/commit/b50298a999f71b7ce49e640eac691ca71ee39135))
19
+
3
20
  ## 3.6.2 (2025-07-08)
4
21
 
5
22
  Full Changelog: [v3.6.1...v3.6.2](https://github.com/runwayml/sdk-python/compare/v3.6.1...v3.6.2)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: runwayml
3
- Version: 3.6.2
3
+ Version: 3.6.4
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
@@ -18,6 +18,7 @@ Classifier: Programming Language :: Python :: 3.9
18
18
  Classifier: Programming Language :: Python :: 3.10
19
19
  Classifier: Programming Language :: Python :: 3.11
20
20
  Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
21
22
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
23
  Classifier: Typing :: Typed
23
24
  Requires-Python: >=3.8
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "runwayml"
3
- version = "3.6.2"
3
+ version = "3.6.4"
4
4
  description = "The official Python library for the runwayml API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -24,6 +24,7 @@ classifiers = [
24
24
  "Programming Language :: Python :: 3.10",
25
25
  "Programming Language :: Python :: 3.11",
26
26
  "Programming Language :: Python :: 3.12",
27
+ "Programming Language :: Python :: 3.13",
27
28
  "Operating System :: OS Independent",
28
29
  "Operating System :: POSIX",
29
30
  "Operating System :: MacOS",
@@ -48,9 +48,9 @@ filelock==3.12.4
48
48
  frozenlist==1.6.2
49
49
  # via aiohttp
50
50
  # via aiosignal
51
- h11==0.14.0
51
+ h11==0.16.0
52
52
  # via httpcore
53
- httpcore==1.0.2
53
+ httpcore==1.0.9
54
54
  # via httpx
55
55
  httpx==0.28.1
56
56
  # via httpx-aiohttp
@@ -36,9 +36,9 @@ exceptiongroup==1.2.2
36
36
  frozenlist==1.6.2
37
37
  # via aiohttp
38
38
  # via aiosignal
39
- h11==0.14.0
39
+ h11==0.16.0
40
40
  # via httpcore
41
- httpcore==1.0.2
41
+ httpcore==1.0.9
42
42
  # via httpx
43
43
  httpx==0.28.1
44
44
  # via httpx-aiohttp
@@ -2,9 +2,10 @@ from __future__ import annotations
2
2
 
3
3
  import os
4
4
  import inspect
5
- from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, cast
5
+ from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, Optional, cast
6
6
  from datetime import date, datetime
7
7
  from typing_extensions import (
8
+ List,
8
9
  Unpack,
9
10
  Literal,
10
11
  ClassVar,
@@ -366,7 +367,7 @@ def _construct_field(value: object, field: FieldInfo, key: str) -> object:
366
367
  if type_ is None:
367
368
  raise RuntimeError(f"Unexpected field type is None for {key}")
368
369
 
369
- return construct_type(value=value, type_=type_)
370
+ return construct_type(value=value, type_=type_, metadata=getattr(field, "metadata", None))
370
371
 
371
372
 
372
373
  def is_basemodel(type_: type) -> bool:
@@ -420,7 +421,7 @@ def construct_type_unchecked(*, value: object, type_: type[_T]) -> _T:
420
421
  return cast(_T, construct_type(value=value, type_=type_))
421
422
 
422
423
 
423
- def construct_type(*, value: object, type_: object) -> object:
424
+ def construct_type(*, value: object, type_: object, metadata: Optional[List[Any]] = None) -> object:
424
425
  """Loose coercion to the expected type with construction of nested values.
425
426
 
426
427
  If the given value does not match the expected type then it is returned as-is.
@@ -438,8 +439,10 @@ def construct_type(*, value: object, type_: object) -> object:
438
439
  type_ = type_.__value__ # type: ignore[unreachable]
439
440
 
440
441
  # unwrap `Annotated[T, ...]` -> `T`
441
- if is_annotated_type(type_):
442
- meta: tuple[Any, ...] = get_args(type_)[1:]
442
+ if metadata is not None:
443
+ meta: tuple[Any, ...] = tuple(metadata)
444
+ elif is_annotated_type(type_):
445
+ meta = get_args(type_)[1:]
443
446
  type_ = extract_type_arg(type_, 0)
444
447
  else:
445
448
  meta = tuple()
@@ -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.6.2" # x-release-please-version
4
+ __version__ = "3.6.4" # x-release-please-version
@@ -889,3 +889,48 @@ def test_discriminated_union_case() -> None:
889
889
  )
890
890
 
891
891
  assert isinstance(m, ModelB)
892
+
893
+
894
+ def test_nested_discriminated_union() -> None:
895
+ class InnerType1(BaseModel):
896
+ type: Literal["type_1"]
897
+
898
+ class InnerModel(BaseModel):
899
+ inner_value: str
900
+
901
+ class InnerType2(BaseModel):
902
+ type: Literal["type_2"]
903
+ some_inner_model: InnerModel
904
+
905
+ class Type1(BaseModel):
906
+ base_type: Literal["base_type_1"]
907
+ value: Annotated[
908
+ Union[
909
+ InnerType1,
910
+ InnerType2,
911
+ ],
912
+ PropertyInfo(discriminator="type"),
913
+ ]
914
+
915
+ class Type2(BaseModel):
916
+ base_type: Literal["base_type_2"]
917
+
918
+ T = Annotated[
919
+ Union[
920
+ Type1,
921
+ Type2,
922
+ ],
923
+ PropertyInfo(discriminator="base_type"),
924
+ ]
925
+
926
+ model = construct_type(
927
+ type_=T,
928
+ value={
929
+ "base_type": "base_type_1",
930
+ "value": {
931
+ "type": "type_2",
932
+ },
933
+ },
934
+ )
935
+ assert isinstance(model, Type1)
936
+ assert isinstance(model.value, InnerType2)
@@ -1,3 +0,0 @@
1
- {
2
- ".": "3.6.2"
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