runwayml 3.6.3__tar.gz → 3.6.5__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.5/.release-please-manifest.json +3 -0
  2. {runwayml-3.6.3 → runwayml-3.6.5}/CHANGELOG.md +21 -0
  3. {runwayml-3.6.3 → runwayml-3.6.5}/PKG-INFO +4 -3
  4. {runwayml-3.6.3 → runwayml-3.6.5}/README.md +2 -1
  5. {runwayml-3.6.3 → runwayml-3.6.5}/pyproject.toml +2 -2
  6. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/_base_client.py +9 -2
  7. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/_models.py +8 -5
  8. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/_version.py +1 -1
  9. {runwayml-3.6.3 → runwayml-3.6.5}/tests/test_client.py +2 -2
  10. {runwayml-3.6.3 → runwayml-3.6.5}/tests/test_models.py +45 -0
  11. runwayml-3.6.3/.release-please-manifest.json +0 -3
  12. {runwayml-3.6.3 → runwayml-3.6.5}/.gitignore +0 -0
  13. {runwayml-3.6.3 → runwayml-3.6.5}/CONTRIBUTING.md +0 -0
  14. {runwayml-3.6.3 → runwayml-3.6.5}/LICENSE +0 -0
  15. {runwayml-3.6.3 → runwayml-3.6.5}/SECURITY.md +0 -0
  16. {runwayml-3.6.3 → runwayml-3.6.5}/api.md +0 -0
  17. {runwayml-3.6.3 → runwayml-3.6.5}/bin/check-release-environment +0 -0
  18. {runwayml-3.6.3 → runwayml-3.6.5}/bin/publish-pypi +0 -0
  19. {runwayml-3.6.3 → runwayml-3.6.5}/examples/.keep +0 -0
  20. {runwayml-3.6.3 → runwayml-3.6.5}/examples/generate_image.py +0 -0
  21. {runwayml-3.6.3 → runwayml-3.6.5}/mypy.ini +0 -0
  22. {runwayml-3.6.3 → runwayml-3.6.5}/noxfile.py +0 -0
  23. {runwayml-3.6.3 → runwayml-3.6.5}/release-please-config.json +0 -0
  24. {runwayml-3.6.3 → runwayml-3.6.5}/requirements-dev.lock +0 -0
  25. {runwayml-3.6.3 → runwayml-3.6.5}/requirements.lock +0 -0
  26. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/__init__.py +0 -0
  27. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/_client.py +0 -0
  28. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/_compat.py +0 -0
  29. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/_constants.py +0 -0
  30. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/_exceptions.py +0 -0
  31. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/_files.py +0 -0
  32. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/_qs.py +0 -0
  33. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/_resource.py +0 -0
  34. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/_response.py +0 -0
  35. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/_streaming.py +0 -0
  36. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/_types.py +0 -0
  37. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/_utils/__init__.py +0 -0
  38. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/_utils/_logs.py +0 -0
  39. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/_utils/_proxy.py +0 -0
  40. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/_utils/_reflection.py +0 -0
  41. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/_utils/_resources_proxy.py +0 -0
  42. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/_utils/_streams.py +0 -0
  43. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/_utils/_sync.py +0 -0
  44. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/_utils/_transform.py +0 -0
  45. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/_utils/_typing.py +0 -0
  46. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/_utils/_utils.py +0 -0
  47. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/lib/.keep +0 -0
  48. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/lib/polling.py +0 -0
  49. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/py.typed +0 -0
  50. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/resources/__init__.py +0 -0
  51. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/resources/image_to_video.py +0 -0
  52. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/resources/organization.py +0 -0
  53. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/resources/tasks.py +0 -0
  54. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/resources/text_to_image.py +0 -0
  55. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/resources/video_upscale.py +0 -0
  56. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/types/__init__.py +0 -0
  57. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/types/image_to_video_create_params.py +0 -0
  58. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/types/image_to_video_create_response.py +0 -0
  59. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/types/organization_retrieve_response.py +0 -0
  60. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/types/task_retrieve_response.py +0 -0
  61. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/types/text_to_image_create_params.py +0 -0
  62. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/types/text_to_image_create_response.py +0 -0
  63. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/types/video_upscale_create_params.py +0 -0
  64. {runwayml-3.6.3 → runwayml-3.6.5}/src/runwayml/types/video_upscale_create_response.py +0 -0
  65. {runwayml-3.6.3 → runwayml-3.6.5}/tests/__init__.py +0 -0
  66. {runwayml-3.6.3 → runwayml-3.6.5}/tests/api_resources/__init__.py +0 -0
  67. {runwayml-3.6.3 → runwayml-3.6.5}/tests/api_resources/test_image_to_video.py +0 -0
  68. {runwayml-3.6.3 → runwayml-3.6.5}/tests/api_resources/test_organization.py +0 -0
  69. {runwayml-3.6.3 → runwayml-3.6.5}/tests/api_resources/test_tasks.py +0 -0
  70. {runwayml-3.6.3 → runwayml-3.6.5}/tests/api_resources/test_text_to_image.py +0 -0
  71. {runwayml-3.6.3 → runwayml-3.6.5}/tests/api_resources/test_video_upscale.py +0 -0
  72. {runwayml-3.6.3 → runwayml-3.6.5}/tests/conftest.py +0 -0
  73. {runwayml-3.6.3 → runwayml-3.6.5}/tests/sample_file.txt +0 -0
  74. {runwayml-3.6.3 → runwayml-3.6.5}/tests/test_deepcopy.py +0 -0
  75. {runwayml-3.6.3 → runwayml-3.6.5}/tests/test_extract_files.py +0 -0
  76. {runwayml-3.6.3 → runwayml-3.6.5}/tests/test_files.py +0 -0
  77. {runwayml-3.6.3 → runwayml-3.6.5}/tests/test_qs.py +0 -0
  78. {runwayml-3.6.3 → runwayml-3.6.5}/tests/test_required_args.py +0 -0
  79. {runwayml-3.6.3 → runwayml-3.6.5}/tests/test_response.py +0 -0
  80. {runwayml-3.6.3 → runwayml-3.6.5}/tests/test_streaming.py +0 -0
  81. {runwayml-3.6.3 → runwayml-3.6.5}/tests/test_transform.py +0 -0
  82. {runwayml-3.6.3 → runwayml-3.6.5}/tests/test_utils/test_proxy.py +0 -0
  83. {runwayml-3.6.3 → runwayml-3.6.5}/tests/test_utils/test_typing.py +0 -0
  84. {runwayml-3.6.3 → runwayml-3.6.5}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "3.6.5"
3
+ }
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.6.5 (2025-07-12)
4
+
5
+ Full Changelog: [v3.6.4...v3.6.5](https://github.com/runwayml/sdk-python/compare/v3.6.4...v3.6.5)
6
+
7
+ ### Bug Fixes
8
+
9
+ * **client:** don't send Content-Type header on GET requests ([6567867](https://github.com/runwayml/sdk-python/commit/656786737e8ee74a40c731b6d2659b1c1b34ce20))
10
+
11
+
12
+ ### Chores
13
+
14
+ * **readme:** fix version rendering on pypi ([f38de2a](https://github.com/runwayml/sdk-python/commit/f38de2a823870a12ce893324e4889a5aec5a3392))
15
+
16
+ ## 3.6.4 (2025-07-10)
17
+
18
+ Full Changelog: [v3.6.3...v3.6.4](https://github.com/runwayml/sdk-python/compare/v3.6.3...v3.6.4)
19
+
20
+ ### Bug Fixes
21
+
22
+ * **parsing:** correctly handle nested discriminated unions ([813daf2](https://github.com/runwayml/sdk-python/commit/813daf265fdd93af5500a1b7cf2c7def33f31e08))
23
+
3
24
  ## 3.6.3 (2025-07-09)
4
25
 
5
26
  Full Changelog: [v3.6.2...v3.6.3](https://github.com/runwayml/sdk-python/compare/v3.6.2...v3.6.3)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: runwayml
3
- Version: 3.6.3
3
+ Version: 3.6.5
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
@@ -30,12 +30,13 @@ Requires-Dist: sniffio
30
30
  Requires-Dist: typing-extensions<5,>=4.10
31
31
  Provides-Extra: aiohttp
32
32
  Requires-Dist: aiohttp; extra == 'aiohttp'
33
- Requires-Dist: httpx-aiohttp>=0.1.6; extra == 'aiohttp'
33
+ Requires-Dist: httpx-aiohttp>=0.1.8; extra == 'aiohttp'
34
34
  Description-Content-Type: text/markdown
35
35
 
36
36
  # RunwayML Python API library
37
37
 
38
- [![PyPI version](https://github.com/runwayml/sdk-python/tree/main/<https://img.shields.io/pypi/v/runwayml.svg?label=pypi%20(stable)>)](https://pypi.org/project/runwayml/)
38
+ <!-- prettier-ignore -->
39
+ [![PyPI version](https://img.shields.io/pypi/v/runwayml.svg?label=pypi%20(stable))](https://pypi.org/project/runwayml/)
39
40
 
40
41
  The RunwayML Python library provides convenient access to the RunwayML REST API from any Python 3.8+
41
42
  application. The library includes type definitions for all request params and response fields,
@@ -1,6 +1,7 @@
1
1
  # RunwayML Python API library
2
2
 
3
- [![PyPI version](<https://img.shields.io/pypi/v/runwayml.svg?label=pypi%20(stable)>)](https://pypi.org/project/runwayml/)
3
+ <!-- prettier-ignore -->
4
+ [![PyPI version](https://img.shields.io/pypi/v/runwayml.svg?label=pypi%20(stable))](https://pypi.org/project/runwayml/)
4
5
 
5
6
  The RunwayML Python library provides convenient access to the RunwayML REST API from any Python 3.8+
6
7
  application. The library includes type definitions for all request params and response fields,
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "runwayml"
3
- version = "3.6.3"
3
+ version = "3.6.5"
4
4
  description = "The official Python library for the runwayml API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -39,7 +39,7 @@ Homepage = "https://github.com/runwayml/sdk-python"
39
39
  Repository = "https://github.com/runwayml/sdk-python"
40
40
 
41
41
  [project.optional-dependencies]
42
- aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.6"]
42
+ aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.8"]
43
43
 
44
44
  [tool.rye]
45
45
  managed = true
@@ -529,6 +529,15 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
529
529
  # work around https://github.com/encode/httpx/discussions/2880
530
530
  kwargs["extensions"] = {"sni_hostname": prepared_url.host.replace("_", "-")}
531
531
 
532
+ is_body_allowed = options.method.lower() != "get"
533
+
534
+ if is_body_allowed:
535
+ kwargs["json"] = json_data if is_given(json_data) else None
536
+ kwargs["files"] = files
537
+ else:
538
+ headers.pop("Content-Type", None)
539
+ kwargs.pop("data", None)
540
+
532
541
  # TODO: report this error to httpx
533
542
  return self._client.build_request( # pyright: ignore[reportUnknownMemberType]
534
543
  headers=headers,
@@ -540,8 +549,6 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
540
549
  # so that passing a `TypedDict` doesn't cause an error.
541
550
  # https://github.com/microsoft/pyright/issues/3526#event-6715453066
542
551
  params=self.qs.stringify(cast(Mapping[str, Any], params)) if params else None,
543
- json=json_data if is_given(json_data) else None,
544
- files=files,
545
552
  **kwargs,
546
553
  )
547
554
 
@@ -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.3" # x-release-please-version
4
+ __version__ = "3.6.5" # x-release-please-version
@@ -464,7 +464,7 @@ class TestRunwayML:
464
464
  def test_multipart_repeating_array(self, client: RunwayML) -> None:
465
465
  request = client._build_request(
466
466
  FinalRequestOptions.construct(
467
- method="get",
467
+ method="post",
468
468
  url="/foo",
469
469
  headers={"Content-Type": "multipart/form-data; boundary=6b7ba517decee4a450543ea6ae821c82"},
470
470
  json_data={"array": ["foo", "bar"]},
@@ -1281,7 +1281,7 @@ class TestAsyncRunwayML:
1281
1281
  def test_multipart_repeating_array(self, async_client: AsyncRunwayML) -> None:
1282
1282
  request = async_client._build_request(
1283
1283
  FinalRequestOptions.construct(
1284
- method="get",
1284
+ method="post",
1285
1285
  url="/foo",
1286
1286
  headers={"Content-Type": "multipart/form-data; boundary=6b7ba517decee4a450543ea6ae821c82"},
1287
1287
  json_data={"array": ["foo", "bar"]},
@@ -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.3"
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