runwayml 2.3.5__tar.gz → 2.3.7__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 (71) hide show
  1. runwayml-2.3.7/.release-please-manifest.json +3 -0
  2. {runwayml-2.3.5 → runwayml-2.3.7}/CHANGELOG.md +24 -0
  3. {runwayml-2.3.5 → runwayml-2.3.7}/PKG-INFO +3 -4
  4. runwayml-2.3.7/bin/publish-pypi +6 -0
  5. {runwayml-2.3.5 → runwayml-2.3.7}/pyproject.toml +2 -4
  6. {runwayml-2.3.5 → runwayml-2.3.7}/requirements-dev.lock +1 -0
  7. {runwayml-2.3.5 → runwayml-2.3.7}/requirements.lock +1 -0
  8. {runwayml-2.3.5 → runwayml-2.3.7}/src/runwayml/_models.py +5 -2
  9. {runwayml-2.3.5 → runwayml-2.3.7}/src/runwayml/_version.py +1 -1
  10. {runwayml-2.3.5 → runwayml-2.3.7}/tests/test_models.py +32 -0
  11. runwayml-2.3.5/.release-please-manifest.json +0 -3
  12. runwayml-2.3.5/bin/publish-pypi +0 -9
  13. {runwayml-2.3.5 → runwayml-2.3.7}/.gitignore +0 -0
  14. {runwayml-2.3.5 → runwayml-2.3.7}/CONTRIBUTING.md +0 -0
  15. {runwayml-2.3.5 → runwayml-2.3.7}/LICENSE +0 -0
  16. {runwayml-2.3.5 → runwayml-2.3.7}/README.md +0 -0
  17. {runwayml-2.3.5 → runwayml-2.3.7}/SECURITY.md +0 -0
  18. {runwayml-2.3.5 → runwayml-2.3.7}/api.md +0 -0
  19. {runwayml-2.3.5 → runwayml-2.3.7}/bin/check-release-environment +0 -0
  20. {runwayml-2.3.5 → runwayml-2.3.7}/examples/.keep +0 -0
  21. {runwayml-2.3.5 → runwayml-2.3.7}/mypy.ini +0 -0
  22. {runwayml-2.3.5 → runwayml-2.3.7}/noxfile.py +0 -0
  23. {runwayml-2.3.5 → runwayml-2.3.7}/release-please-config.json +0 -0
  24. {runwayml-2.3.5 → runwayml-2.3.7}/src/runwayml/__init__.py +0 -0
  25. {runwayml-2.3.5 → runwayml-2.3.7}/src/runwayml/_base_client.py +0 -0
  26. {runwayml-2.3.5 → runwayml-2.3.7}/src/runwayml/_client.py +0 -0
  27. {runwayml-2.3.5 → runwayml-2.3.7}/src/runwayml/_compat.py +0 -0
  28. {runwayml-2.3.5 → runwayml-2.3.7}/src/runwayml/_constants.py +0 -0
  29. {runwayml-2.3.5 → runwayml-2.3.7}/src/runwayml/_exceptions.py +0 -0
  30. {runwayml-2.3.5 → runwayml-2.3.7}/src/runwayml/_files.py +0 -0
  31. {runwayml-2.3.5 → runwayml-2.3.7}/src/runwayml/_qs.py +0 -0
  32. {runwayml-2.3.5 → runwayml-2.3.7}/src/runwayml/_resource.py +0 -0
  33. {runwayml-2.3.5 → runwayml-2.3.7}/src/runwayml/_response.py +0 -0
  34. {runwayml-2.3.5 → runwayml-2.3.7}/src/runwayml/_streaming.py +0 -0
  35. {runwayml-2.3.5 → runwayml-2.3.7}/src/runwayml/_types.py +0 -0
  36. {runwayml-2.3.5 → runwayml-2.3.7}/src/runwayml/_utils/__init__.py +0 -0
  37. {runwayml-2.3.5 → runwayml-2.3.7}/src/runwayml/_utils/_logs.py +0 -0
  38. {runwayml-2.3.5 → runwayml-2.3.7}/src/runwayml/_utils/_proxy.py +0 -0
  39. {runwayml-2.3.5 → runwayml-2.3.7}/src/runwayml/_utils/_reflection.py +0 -0
  40. {runwayml-2.3.5 → runwayml-2.3.7}/src/runwayml/_utils/_streams.py +0 -0
  41. {runwayml-2.3.5 → runwayml-2.3.7}/src/runwayml/_utils/_sync.py +0 -0
  42. {runwayml-2.3.5 → runwayml-2.3.7}/src/runwayml/_utils/_transform.py +0 -0
  43. {runwayml-2.3.5 → runwayml-2.3.7}/src/runwayml/_utils/_typing.py +0 -0
  44. {runwayml-2.3.5 → runwayml-2.3.7}/src/runwayml/_utils/_utils.py +0 -0
  45. {runwayml-2.3.5 → runwayml-2.3.7}/src/runwayml/lib/.keep +0 -0
  46. {runwayml-2.3.5 → runwayml-2.3.7}/src/runwayml/py.typed +0 -0
  47. {runwayml-2.3.5 → runwayml-2.3.7}/src/runwayml/resources/__init__.py +0 -0
  48. {runwayml-2.3.5 → runwayml-2.3.7}/src/runwayml/resources/image_to_video.py +0 -0
  49. {runwayml-2.3.5 → runwayml-2.3.7}/src/runwayml/resources/tasks.py +0 -0
  50. {runwayml-2.3.5 → runwayml-2.3.7}/src/runwayml/types/__init__.py +0 -0
  51. {runwayml-2.3.5 → runwayml-2.3.7}/src/runwayml/types/image_to_video_create_params.py +0 -0
  52. {runwayml-2.3.5 → runwayml-2.3.7}/src/runwayml/types/image_to_video_create_response.py +0 -0
  53. {runwayml-2.3.5 → runwayml-2.3.7}/src/runwayml/types/task_retrieve_response.py +0 -0
  54. {runwayml-2.3.5 → runwayml-2.3.7}/tests/__init__.py +0 -0
  55. {runwayml-2.3.5 → runwayml-2.3.7}/tests/api_resources/__init__.py +0 -0
  56. {runwayml-2.3.5 → runwayml-2.3.7}/tests/api_resources/test_image_to_video.py +0 -0
  57. {runwayml-2.3.5 → runwayml-2.3.7}/tests/api_resources/test_tasks.py +0 -0
  58. {runwayml-2.3.5 → runwayml-2.3.7}/tests/conftest.py +0 -0
  59. {runwayml-2.3.5 → runwayml-2.3.7}/tests/sample_file.txt +0 -0
  60. {runwayml-2.3.5 → runwayml-2.3.7}/tests/test_client.py +0 -0
  61. {runwayml-2.3.5 → runwayml-2.3.7}/tests/test_deepcopy.py +0 -0
  62. {runwayml-2.3.5 → runwayml-2.3.7}/tests/test_extract_files.py +0 -0
  63. {runwayml-2.3.5 → runwayml-2.3.7}/tests/test_files.py +0 -0
  64. {runwayml-2.3.5 → runwayml-2.3.7}/tests/test_qs.py +0 -0
  65. {runwayml-2.3.5 → runwayml-2.3.7}/tests/test_required_args.py +0 -0
  66. {runwayml-2.3.5 → runwayml-2.3.7}/tests/test_response.py +0 -0
  67. {runwayml-2.3.5 → runwayml-2.3.7}/tests/test_streaming.py +0 -0
  68. {runwayml-2.3.5 → runwayml-2.3.7}/tests/test_transform.py +0 -0
  69. {runwayml-2.3.5 → runwayml-2.3.7}/tests/test_utils/test_proxy.py +0 -0
  70. {runwayml-2.3.5 → runwayml-2.3.7}/tests/test_utils/test_typing.py +0 -0
  71. {runwayml-2.3.5 → runwayml-2.3.7}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "2.3.7"
3
+ }
@@ -1,5 +1,29 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.3.7 (2025-03-17)
4
+
5
+ Full Changelog: [v2.3.6...v2.3.7](https://github.com/runwayml/sdk-python/compare/v2.3.6...v2.3.7)
6
+
7
+ ### Bug Fixes
8
+
9
+ * **ci:** ensure pip is always available ([#123](https://github.com/runwayml/sdk-python/issues/123)) ([e456349](https://github.com/runwayml/sdk-python/commit/e45634973c0cb9263d83ce0c1e437e65ab6c48b3))
10
+ * **ci:** remove publishing patch ([#125](https://github.com/runwayml/sdk-python/issues/125)) ([3592469](https://github.com/runwayml/sdk-python/commit/35924697f090e6198a03855d722627fc9194cdbc))
11
+
12
+ ## 2.3.6 (2025-03-15)
13
+
14
+ Full Changelog: [v2.3.5...v2.3.6](https://github.com/runwayml/sdk-python/compare/v2.3.5...v2.3.6)
15
+
16
+ ### Bug Fixes
17
+
18
+ * **types:** handle more discriminated union shapes ([#121](https://github.com/runwayml/sdk-python/issues/121)) ([51f8b42](https://github.com/runwayml/sdk-python/commit/51f8b42cf1efcb6294292d4a0b68522622ab95cd))
19
+
20
+
21
+ ### Chores
22
+
23
+ * **internal:** bump rye to 0.44.0 ([#120](https://github.com/runwayml/sdk-python/issues/120)) ([ea18df4](https://github.com/runwayml/sdk-python/commit/ea18df47d97d7d085562eb8fa1b2406cd75c264c))
24
+ * **internal:** codegen related update ([#119](https://github.com/runwayml/sdk-python/issues/119)) ([e72357e](https://github.com/runwayml/sdk-python/commit/e72357e9013730819d973a3efa128cd232574ebd))
25
+ * **internal:** remove extra empty newlines ([#117](https://github.com/runwayml/sdk-python/issues/117)) ([4f0e93e](https://github.com/runwayml/sdk-python/commit/4f0e93e5741d2dc0a96c4e211dc74d1d272a2126))
26
+
3
27
  ## 2.3.5 (2025-03-11)
4
28
 
5
29
  Full Changelog: [v2.3.4...v2.3.5](https://github.com/runwayml/sdk-python/compare/v2.3.4...v2.3.5)
@@ -1,12 +1,11 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.3
2
2
  Name: runwayml
3
- Version: 2.3.5
3
+ Version: 2.3.7
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
7
7
  Author-email: RunwayML <dev-feedback@runwayml.com>
8
- License-Expression: Apache-2.0
9
- License-File: LICENSE
8
+ License: Apache-2.0
10
9
  Classifier: Intended Audience :: Developers
11
10
  Classifier: License :: OSI Approved :: Apache Software License
12
11
  Classifier: Operating System :: MacOS
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env bash
2
+
3
+ set -eux
4
+ mkdir -p dist
5
+ rye build --clean
6
+ rye publish --yes --token=$PYPI_TOKEN
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "runwayml"
3
- version = "2.3.5"
3
+ version = "2.3.7"
4
4
  description = "The official Python library for the runwayml API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -38,7 +38,6 @@ Homepage = "https://github.com/runwayml/sdk-python"
38
38
  Repository = "https://github.com/runwayml/sdk-python"
39
39
 
40
40
 
41
-
42
41
  [tool.rye]
43
42
  managed = true
44
43
  # version pins are in requirements-dev.lock
@@ -87,7 +86,7 @@ typecheck = { chain = [
87
86
  "typecheck:mypy" = "mypy ."
88
87
 
89
88
  [build-system]
90
- requires = ["hatchling", "hatch-fancy-pypi-readme"]
89
+ requires = ["hatchling==1.26.3", "hatch-fancy-pypi-readme"]
91
90
  build-backend = "hatchling.build"
92
91
 
93
92
  [tool.hatch.build]
@@ -152,7 +151,6 @@ reportImplicitOverride = true
152
151
  reportImportCycles = false
153
152
  reportPrivateUsage = false
154
153
 
155
-
156
154
  [tool.ruff]
157
155
  line-length = 120
158
156
  output-format = "grouped"
@@ -7,6 +7,7 @@
7
7
  # all-features: true
8
8
  # with-sources: false
9
9
  # generate-hashes: false
10
+ # universal: false
10
11
 
11
12
  -e file:.
12
13
  annotated-types==0.6.0
@@ -7,6 +7,7 @@
7
7
  # all-features: true
8
8
  # with-sources: false
9
9
  # generate-hashes: false
10
+ # universal: false
10
11
 
11
12
  -e file:.
12
13
  annotated-types==0.6.0
@@ -65,7 +65,7 @@ from ._compat import (
65
65
  from ._constants import RAW_RESPONSE_HEADER
66
66
 
67
67
  if TYPE_CHECKING:
68
- from pydantic_core.core_schema import ModelField, LiteralSchema, ModelFieldsSchema
68
+ from pydantic_core.core_schema import ModelField, ModelSchema, LiteralSchema, ModelFieldsSchema
69
69
 
70
70
  __all__ = ["BaseModel", "GenericModel"]
71
71
 
@@ -646,15 +646,18 @@ def _build_discriminated_union_meta(*, union: type, meta_annotations: tuple[Any,
646
646
 
647
647
  def _extract_field_schema_pv2(model: type[BaseModel], field_name: str) -> ModelField | None:
648
648
  schema = model.__pydantic_core_schema__
649
+ if schema["type"] == "definitions":
650
+ schema = schema["schema"]
651
+
649
652
  if schema["type"] != "model":
650
653
  return None
651
654
 
655
+ schema = cast("ModelSchema", schema)
652
656
  fields_schema = schema["schema"]
653
657
  if fields_schema["type"] != "model-fields":
654
658
  return None
655
659
 
656
660
  fields_schema = cast("ModelFieldsSchema", fields_schema)
657
-
658
661
  field = fields_schema["fields"].get(field_name)
659
662
  if not field:
660
663
  return None
@@ -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.3.5" # x-release-please-version
4
+ __version__ = "2.3.7" # x-release-please-version
@@ -854,3 +854,35 @@ def test_field_named_cls() -> None:
854
854
  m = construct_type(value={"cls": "foo"}, type_=Model)
855
855
  assert isinstance(m, Model)
856
856
  assert isinstance(m.cls, str)
857
+
858
+
859
+ def test_discriminated_union_case() -> None:
860
+ class A(BaseModel):
861
+ type: Literal["a"]
862
+
863
+ data: bool
864
+
865
+ class B(BaseModel):
866
+ type: Literal["b"]
867
+
868
+ data: List[Union[A, object]]
869
+
870
+ class ModelA(BaseModel):
871
+ type: Literal["modelA"]
872
+
873
+ data: int
874
+
875
+ class ModelB(BaseModel):
876
+ type: Literal["modelB"]
877
+
878
+ required: str
879
+
880
+ data: Union[A, B]
881
+
882
+ # when constructing ModelA | ModelB, value data doesn't match ModelB exactly - missing `required`
883
+ m = construct_type(
884
+ value={"type": "modelB", "data": {"type": "a", "data": True}},
885
+ type_=cast(Any, Annotated[Union[ModelA, ModelB], PropertyInfo(discriminator="type")]),
886
+ )
887
+
888
+ assert isinstance(m, ModelB)
@@ -1,3 +0,0 @@
1
- {
2
- ".": "2.3.5"
3
- }
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- set -eux
4
- mkdir -p dist
5
- rye build --clean
6
- # Patching importlib-metadata version until upstream library version is updated
7
- # https://github.com/pypa/twine/issues/977#issuecomment-2189800841
8
- "$HOME/.rye/self/bin/python3" -m pip install 'importlib-metadata==7.2.1'
9
- rye publish --yes --token=$PYPI_TOKEN
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