runwayml 3.12.0__tar.gz → 3.12.1__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 (97) hide show
  1. runwayml-3.12.1/.release-please-manifest.json +3 -0
  2. {runwayml-3.12.0 → runwayml-3.12.1}/CHANGELOG.md +9 -0
  3. {runwayml-3.12.0 → runwayml-3.12.1}/PKG-INFO +1 -1
  4. {runwayml-3.12.0 → runwayml-3.12.1}/pyproject.toml +53 -2
  5. {runwayml-3.12.0 → runwayml-3.12.1}/requirements-dev.lock +0 -1
  6. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/_version.py +1 -1
  7. {runwayml-3.12.0 → runwayml-3.12.1}/tests/test_client.py +6 -47
  8. runwayml-3.12.0/.release-please-manifest.json +0 -3
  9. runwayml-3.12.0/mypy.ini +0 -50
  10. {runwayml-3.12.0 → runwayml-3.12.1}/.gitignore +0 -0
  11. {runwayml-3.12.0 → runwayml-3.12.1}/CONTRIBUTING.md +0 -0
  12. {runwayml-3.12.0 → runwayml-3.12.1}/LICENSE +0 -0
  13. {runwayml-3.12.0 → runwayml-3.12.1}/README.md +0 -0
  14. {runwayml-3.12.0 → runwayml-3.12.1}/SECURITY.md +0 -0
  15. {runwayml-3.12.0 → runwayml-3.12.1}/api.md +0 -0
  16. {runwayml-3.12.0 → runwayml-3.12.1}/bin/check-release-environment +0 -0
  17. {runwayml-3.12.0 → runwayml-3.12.1}/bin/publish-pypi +0 -0
  18. {runwayml-3.12.0 → runwayml-3.12.1}/examples/.keep +0 -0
  19. {runwayml-3.12.0 → runwayml-3.12.1}/examples/generate_image.py +0 -0
  20. {runwayml-3.12.0 → runwayml-3.12.1}/noxfile.py +0 -0
  21. {runwayml-3.12.0 → runwayml-3.12.1}/release-please-config.json +0 -0
  22. {runwayml-3.12.0 → runwayml-3.12.1}/requirements.lock +0 -0
  23. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/__init__.py +0 -0
  24. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/_base_client.py +0 -0
  25. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/_client.py +0 -0
  26. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/_compat.py +0 -0
  27. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/_constants.py +0 -0
  28. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/_exceptions.py +0 -0
  29. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/_files.py +0 -0
  30. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/_models.py +0 -0
  31. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/_qs.py +0 -0
  32. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/_resource.py +0 -0
  33. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/_response.py +0 -0
  34. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/_streaming.py +0 -0
  35. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/_types.py +0 -0
  36. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/_utils/__init__.py +0 -0
  37. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/_utils/_compat.py +0 -0
  38. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/_utils/_datetime_parse.py +0 -0
  39. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/_utils/_logs.py +0 -0
  40. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/_utils/_proxy.py +0 -0
  41. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/_utils/_reflection.py +0 -0
  42. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/_utils/_resources_proxy.py +0 -0
  43. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/_utils/_streams.py +0 -0
  44. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/_utils/_sync.py +0 -0
  45. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/_utils/_transform.py +0 -0
  46. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/_utils/_typing.py +0 -0
  47. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/_utils/_utils.py +0 -0
  48. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/lib/.keep +0 -0
  49. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/lib/polling.py +0 -0
  50. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/py.typed +0 -0
  51. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/resources/__init__.py +0 -0
  52. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/resources/character_performance.py +0 -0
  53. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/resources/image_to_video.py +0 -0
  54. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/resources/organization.py +0 -0
  55. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/resources/tasks.py +0 -0
  56. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/resources/text_to_image.py +0 -0
  57. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/resources/video_to_video.py +0 -0
  58. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/resources/video_upscale.py +0 -0
  59. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/types/__init__.py +0 -0
  60. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/types/character_performance_create_params.py +0 -0
  61. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/types/character_performance_create_response.py +0 -0
  62. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/types/image_to_video_create_params.py +0 -0
  63. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/types/image_to_video_create_response.py +0 -0
  64. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/types/organization_retrieve_response.py +0 -0
  65. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/types/organization_retrieve_usage_params.py +0 -0
  66. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/types/organization_retrieve_usage_response.py +0 -0
  67. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/types/task_retrieve_response.py +0 -0
  68. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/types/text_to_image_create_params.py +0 -0
  69. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/types/text_to_image_create_response.py +0 -0
  70. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/types/video_to_video_create_params.py +0 -0
  71. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/types/video_to_video_create_response.py +0 -0
  72. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/types/video_upscale_create_params.py +0 -0
  73. {runwayml-3.12.0 → runwayml-3.12.1}/src/runwayml/types/video_upscale_create_response.py +0 -0
  74. {runwayml-3.12.0 → runwayml-3.12.1}/tests/__init__.py +0 -0
  75. {runwayml-3.12.0 → runwayml-3.12.1}/tests/api_resources/__init__.py +0 -0
  76. {runwayml-3.12.0 → runwayml-3.12.1}/tests/api_resources/test_character_performance.py +0 -0
  77. {runwayml-3.12.0 → runwayml-3.12.1}/tests/api_resources/test_image_to_video.py +0 -0
  78. {runwayml-3.12.0 → runwayml-3.12.1}/tests/api_resources/test_organization.py +0 -0
  79. {runwayml-3.12.0 → runwayml-3.12.1}/tests/api_resources/test_tasks.py +0 -0
  80. {runwayml-3.12.0 → runwayml-3.12.1}/tests/api_resources/test_text_to_image.py +0 -0
  81. {runwayml-3.12.0 → runwayml-3.12.1}/tests/api_resources/test_video_to_video.py +0 -0
  82. {runwayml-3.12.0 → runwayml-3.12.1}/tests/api_resources/test_video_upscale.py +0 -0
  83. {runwayml-3.12.0 → runwayml-3.12.1}/tests/conftest.py +0 -0
  84. {runwayml-3.12.0 → runwayml-3.12.1}/tests/sample_file.txt +0 -0
  85. {runwayml-3.12.0 → runwayml-3.12.1}/tests/test_deepcopy.py +0 -0
  86. {runwayml-3.12.0 → runwayml-3.12.1}/tests/test_extract_files.py +0 -0
  87. {runwayml-3.12.0 → runwayml-3.12.1}/tests/test_files.py +0 -0
  88. {runwayml-3.12.0 → runwayml-3.12.1}/tests/test_models.py +0 -0
  89. {runwayml-3.12.0 → runwayml-3.12.1}/tests/test_qs.py +0 -0
  90. {runwayml-3.12.0 → runwayml-3.12.1}/tests/test_required_args.py +0 -0
  91. {runwayml-3.12.0 → runwayml-3.12.1}/tests/test_response.py +0 -0
  92. {runwayml-3.12.0 → runwayml-3.12.1}/tests/test_streaming.py +0 -0
  93. {runwayml-3.12.0 → runwayml-3.12.1}/tests/test_transform.py +0 -0
  94. {runwayml-3.12.0 → runwayml-3.12.1}/tests/test_utils/test_datetime_parse.py +0 -0
  95. {runwayml-3.12.0 → runwayml-3.12.1}/tests/test_utils/test_proxy.py +0 -0
  96. {runwayml-3.12.0 → runwayml-3.12.1}/tests/test_utils/test_typing.py +0 -0
  97. {runwayml-3.12.0 → runwayml-3.12.1}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "3.12.1"
3
+ }
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.12.1 (2025-09-06)
4
+
5
+ Full Changelog: [v3.12.0...v3.12.1](https://github.com/runwayml/sdk-python/compare/v3.12.0...v3.12.1)
6
+
7
+ ### Chores
8
+
9
+ * **internal:** move mypy configurations to `pyproject.toml` file ([0ff4ea5](https://github.com/runwayml/sdk-python/commit/0ff4ea5666ec784f6a5d72fa8df1daff3af86fbf))
10
+ * **tests:** simplify `get_platform` test ([5b651b2](https://github.com/runwayml/sdk-python/commit/5b651b2b45dc7550e29fc970705bbb4806701433))
11
+
3
12
  ## 3.12.0 (2025-09-04)
4
13
 
5
14
  Full Changelog: [v3.11.0...v3.12.0](https://github.com/runwayml/sdk-python/compare/v3.11.0...v3.12.0)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: runwayml
3
- Version: 3.12.0
3
+ Version: 3.12.1
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.12.0"
3
+ version = "3.12.1"
4
4
  description = "The official Python library for the runwayml API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -56,7 +56,6 @@ dev-dependencies = [
56
56
  "dirty-equals>=0.6.0",
57
57
  "importlib-metadata>=6.7.0",
58
58
  "rich>=13.7.1",
59
- "nest_asyncio==1.6.0",
60
59
  "pytest-xdist>=3.6.1",
61
60
  ]
62
61
 
@@ -157,6 +156,58 @@ reportOverlappingOverload = false
157
156
  reportImportCycles = false
158
157
  reportPrivateUsage = false
159
158
 
159
+ [tool.mypy]
160
+ pretty = true
161
+ show_error_codes = true
162
+
163
+ # Exclude _files.py because mypy isn't smart enough to apply
164
+ # the correct type narrowing and as this is an internal module
165
+ # it's fine to just use Pyright.
166
+ #
167
+ # We also exclude our `tests` as mypy doesn't always infer
168
+ # types correctly and Pyright will still catch any type errors.
169
+ exclude = ['src/runwayml/_files.py', '_dev/.*.py', 'tests/.*']
170
+
171
+ strict_equality = true
172
+ implicit_reexport = true
173
+ check_untyped_defs = true
174
+ no_implicit_optional = true
175
+
176
+ warn_return_any = true
177
+ warn_unreachable = true
178
+ warn_unused_configs = true
179
+
180
+ # Turn these options off as it could cause conflicts
181
+ # with the Pyright options.
182
+ warn_unused_ignores = false
183
+ warn_redundant_casts = false
184
+
185
+ disallow_any_generics = true
186
+ disallow_untyped_defs = true
187
+ disallow_untyped_calls = true
188
+ disallow_subclassing_any = true
189
+ disallow_incomplete_defs = true
190
+ disallow_untyped_decorators = true
191
+ cache_fine_grained = true
192
+
193
+ # By default, mypy reports an error if you assign a value to the result
194
+ # of a function call that doesn't return anything. We do this in our test
195
+ # cases:
196
+ # ```
197
+ # result = ...
198
+ # assert result is None
199
+ # ```
200
+ # Changing this codegen to make mypy happy would increase complexity
201
+ # and would not be worth it.
202
+ disable_error_code = "func-returns-value,overload-cannot-match"
203
+
204
+ # https://github.com/python/mypy/issues/12162
205
+ [[tool.mypy.overrides]]
206
+ module = "black.files.*"
207
+ ignore_errors = true
208
+ ignore_missing_imports = true
209
+
210
+
160
211
  [tool.ruff]
161
212
  line-length = 120
162
213
  output-format = "grouped"
@@ -75,7 +75,6 @@ multidict==6.4.4
75
75
  mypy==1.14.1
76
76
  mypy-extensions==1.0.0
77
77
  # via mypy
78
- nest-asyncio==1.6.0
79
78
  nodeenv==1.8.0
80
79
  # via pyright
81
80
  nox==2023.4.22
@@ -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.12.0" # x-release-please-version
4
+ __version__ = "3.12.1" # x-release-please-version
@@ -6,13 +6,10 @@ import gc
6
6
  import os
7
7
  import sys
8
8
  import json
9
- import time
10
9
  import asyncio
11
10
  import inspect
12
- import subprocess
13
11
  import tracemalloc
14
12
  from typing import Any, Union, cast
15
- from textwrap import dedent
16
13
  from unittest import mock
17
14
  from typing_extensions import Literal
18
15
 
@@ -23,14 +20,17 @@ from pydantic import ValidationError
23
20
 
24
21
  from runwayml import RunwayML, AsyncRunwayML, APIResponseValidationError
25
22
  from runwayml._types import Omit
23
+ from runwayml._utils import asyncify
26
24
  from runwayml._models import BaseModel, FinalRequestOptions
27
25
  from runwayml._exceptions import RunwayMLError, APIStatusError, APITimeoutError, APIResponseValidationError
28
26
  from runwayml._base_client import (
29
27
  DEFAULT_TIMEOUT,
30
28
  HTTPX_DEFAULT_TIMEOUT,
31
29
  BaseClient,
30
+ OtherPlatform,
32
31
  DefaultHttpxClient,
33
32
  DefaultAsyncHttpxClient,
33
+ get_platform,
34
34
  make_request_options,
35
35
  )
36
36
 
@@ -1661,50 +1661,9 @@ class TestAsyncRunwayML:
1661
1661
 
1662
1662
  assert response.http_request.headers.get("x-stainless-retry-count") == "42"
1663
1663
 
1664
- def test_get_platform(self) -> None:
1665
- # A previous implementation of asyncify could leave threads unterminated when
1666
- # used with nest_asyncio.
1667
- #
1668
- # Since nest_asyncio.apply() is global and cannot be un-applied, this
1669
- # test is run in a separate process to avoid affecting other tests.
1670
- test_code = dedent("""
1671
- import asyncio
1672
- import nest_asyncio
1673
- import threading
1674
-
1675
- from runwayml._utils import asyncify
1676
- from runwayml._base_client import get_platform
1677
-
1678
- async def test_main() -> None:
1679
- result = await asyncify(get_platform)()
1680
- print(result)
1681
- for thread in threading.enumerate():
1682
- print(thread.name)
1683
-
1684
- nest_asyncio.apply()
1685
- asyncio.run(test_main())
1686
- """)
1687
- with subprocess.Popen(
1688
- [sys.executable, "-c", test_code],
1689
- text=True,
1690
- ) as process:
1691
- timeout = 10 # seconds
1692
-
1693
- start_time = time.monotonic()
1694
- while True:
1695
- return_code = process.poll()
1696
- if return_code is not None:
1697
- if return_code != 0:
1698
- raise AssertionError("calling get_platform using asyncify resulted in a non-zero exit code")
1699
-
1700
- # success
1701
- break
1702
-
1703
- if time.monotonic() - start_time > timeout:
1704
- process.kill()
1705
- raise AssertionError("calling get_platform using asyncify resulted in a hung process")
1706
-
1707
- time.sleep(0.1)
1664
+ async def test_get_platform(self) -> None:
1665
+ platform = await asyncify(get_platform)()
1666
+ assert isinstance(platform, (str, OtherPlatform))
1708
1667
 
1709
1668
  async def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None:
1710
1669
  # Test that the proxy environment variables are set correctly
@@ -1,3 +0,0 @@
1
- {
2
- ".": "3.12.0"
3
- }
runwayml-3.12.0/mypy.ini DELETED
@@ -1,50 +0,0 @@
1
- [mypy]
2
- pretty = True
3
- show_error_codes = True
4
-
5
- # Exclude _files.py because mypy isn't smart enough to apply
6
- # the correct type narrowing and as this is an internal module
7
- # it's fine to just use Pyright.
8
- #
9
- # We also exclude our `tests` as mypy doesn't always infer
10
- # types correctly and Pyright will still catch any type errors.
11
- exclude = ^(src/runwayml/_files\.py|_dev/.*\.py|tests/.*)$
12
-
13
- strict_equality = True
14
- implicit_reexport = True
15
- check_untyped_defs = True
16
- no_implicit_optional = True
17
-
18
- warn_return_any = True
19
- warn_unreachable = True
20
- warn_unused_configs = True
21
-
22
- # Turn these options off as it could cause conflicts
23
- # with the Pyright options.
24
- warn_unused_ignores = False
25
- warn_redundant_casts = False
26
-
27
- disallow_any_generics = True
28
- disallow_untyped_defs = True
29
- disallow_untyped_calls = True
30
- disallow_subclassing_any = True
31
- disallow_incomplete_defs = True
32
- disallow_untyped_decorators = True
33
- cache_fine_grained = True
34
-
35
- # By default, mypy reports an error if you assign a value to the result
36
- # of a function call that doesn't return anything. We do this in our test
37
- # cases:
38
- # ```
39
- # result = ...
40
- # assert result is None
41
- # ```
42
- # Changing this codegen to make mypy happy would increase complexity
43
- # and would not be worth it.
44
- disable_error_code = func-returns-value,overload-cannot-match
45
-
46
- # https://github.com/python/mypy/issues/12162
47
- [mypy.overrides]
48
- module = "black.files.*"
49
- ignore_errors = true
50
- ignore_missing_imports = true
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