wavespeed 2.0.2__tar.gz → 2.0.3__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.
- wavespeed-2.0.3/.github/dependabot.yml +11 -0
- {wavespeed-2.0.2 → wavespeed-2.0.3}/.github/workflows/pre-commit.yml +1 -0
- {wavespeed-2.0.2 → wavespeed-2.0.3}/PKG-INFO +1 -1
- {wavespeed-2.0.2 → wavespeed-2.0.3}/src/wavespeed/_version.py +1 -1
- {wavespeed-2.0.2 → wavespeed-2.0.3}/src/wavespeed/api/client.py +6 -2
- {wavespeed-2.0.2 → wavespeed-2.0.3}/src/wavespeed.egg-info/PKG-INFO +1 -1
- {wavespeed-2.0.2 → wavespeed-2.0.3}/src/wavespeed.egg-info/SOURCES.txt +1 -0
- {wavespeed-2.0.2 → wavespeed-2.0.3}/src/wavespeed.egg-info/scm_file_list.json +1 -0
- wavespeed-2.0.3/src/wavespeed.egg-info/scm_version.json +8 -0
- {wavespeed-2.0.2 → wavespeed-2.0.3}/tests/test_api.py +16 -0
- wavespeed-2.0.2/src/wavespeed.egg-info/scm_version.json +0 -8
- {wavespeed-2.0.2 → wavespeed-2.0.3}/.github/workflows/claude.yml +0 -0
- {wavespeed-2.0.2 → wavespeed-2.0.3}/.github/workflows/python-packages.yml +0 -0
- {wavespeed-2.0.2 → wavespeed-2.0.3}/.github/workflows/python-publish.yml +0 -0
- {wavespeed-2.0.2 → wavespeed-2.0.3}/.github/workflows/tests.yml +0 -0
- {wavespeed-2.0.2 → wavespeed-2.0.3}/.gitignore +0 -0
- {wavespeed-2.0.2 → wavespeed-2.0.3}/.pre-commit-config.yaml +0 -0
- {wavespeed-2.0.2 → wavespeed-2.0.3}/CHANGELOG.md +0 -0
- {wavespeed-2.0.2 → wavespeed-2.0.3}/CLAUDE.md +0 -0
- {wavespeed-2.0.2 → wavespeed-2.0.3}/LICENSE +0 -0
- {wavespeed-2.0.2 → wavespeed-2.0.3}/MANIFEST.in +0 -0
- {wavespeed-2.0.2 → wavespeed-2.0.3}/README.md +0 -0
- {wavespeed-2.0.2 → wavespeed-2.0.3}/VERSIONING.md +0 -0
- {wavespeed-2.0.2 → wavespeed-2.0.3}/assets/wavespeed-logo-dark.svg +0 -0
- {wavespeed-2.0.2 → wavespeed-2.0.3}/assets/wavespeed-logo-light.svg +0 -0
- {wavespeed-2.0.2 → wavespeed-2.0.3}/pyproject.toml +0 -0
- {wavespeed-2.0.2 → wavespeed-2.0.3}/pytest.ini +0 -0
- {wavespeed-2.0.2 → wavespeed-2.0.3}/setup.cfg +0 -0
- {wavespeed-2.0.2 → wavespeed-2.0.3}/src/wavespeed/__init__.py +0 -0
- {wavespeed-2.0.2 → wavespeed-2.0.3}/src/wavespeed/_config_module.py +0 -0
- {wavespeed-2.0.2 → wavespeed-2.0.3}/src/wavespeed/api/__init__.py +0 -0
- {wavespeed-2.0.2 → wavespeed-2.0.3}/src/wavespeed/config.py +0 -0
- {wavespeed-2.0.2 → wavespeed-2.0.3}/src/wavespeed.egg-info/dependency_links.txt +0 -0
- {wavespeed-2.0.2 → wavespeed-2.0.3}/src/wavespeed.egg-info/not-zip-safe +0 -0
- {wavespeed-2.0.2 → wavespeed-2.0.3}/src/wavespeed.egg-info/requires.txt +0 -0
- {wavespeed-2.0.2 → wavespeed-2.0.3}/src/wavespeed.egg-info/top_level.txt +0 -0
- {wavespeed-2.0.2 → wavespeed-2.0.3}/tests/__init__.py +0 -0
- {wavespeed-2.0.2 → wavespeed-2.0.3}/tests/conftest.py +0 -0
- {wavespeed-2.0.2 → wavespeed-2.0.3}/tests/test_config.py +0 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
# Actions are pinned to commit SHAs; this keeps the pins moving.
|
|
4
|
+
- package-ecosystem: github-actions
|
|
5
|
+
directory: /
|
|
6
|
+
schedule:
|
|
7
|
+
interval: weekly
|
|
8
|
+
# One pull request per run instead of one per action.
|
|
9
|
+
groups:
|
|
10
|
+
actions:
|
|
11
|
+
patterns: ['*']
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
# This file is automatically generated by setuptools_scm
|
|
2
|
-
__version__ = "2.0.
|
|
2
|
+
__version__ = "2.0.3"
|
|
@@ -587,7 +587,8 @@ class Client:
|
|
|
587
587
|
URL of the uploaded file.
|
|
588
588
|
|
|
589
589
|
Raises:
|
|
590
|
-
ValueError: If API key is not configured
|
|
590
|
+
ValueError: If API key is not configured, or a non-seekable
|
|
591
|
+
stream exceeds the 200 MB upload limit.
|
|
591
592
|
FileNotFoundError: If file path does not exist.
|
|
592
593
|
RuntimeError: If upload fails.
|
|
593
594
|
|
|
@@ -627,7 +628,10 @@ class Client:
|
|
|
627
628
|
size = stream.tell() - start
|
|
628
629
|
stream.seek(start)
|
|
629
630
|
except (AttributeError, OSError, io.UnsupportedOperation):
|
|
630
|
-
|
|
631
|
+
max_size = 200 * 1024 * 1024
|
|
632
|
+
data = stream.read(max_size + 1)
|
|
633
|
+
if len(data) > max_size:
|
|
634
|
+
raise ValueError("File size exceeds the 200 MB limit.")
|
|
631
635
|
stream = io.BytesIO(data)
|
|
632
636
|
size = len(data)
|
|
633
637
|
|
|
@@ -582,6 +582,22 @@ class TestUpload(unittest.TestCase):
|
|
|
582
582
|
with self.assertRaises(FileNotFoundError):
|
|
583
583
|
client.upload("/nonexistent/path/to/file.png")
|
|
584
584
|
|
|
585
|
+
@patch("wavespeed.api.client.requests.post")
|
|
586
|
+
def test_upload_oversize_stream_raises(self, mock_post):
|
|
587
|
+
"""A non-seekable stream over the limit fails before any request."""
|
|
588
|
+
|
|
589
|
+
class Pipe:
|
|
590
|
+
name = "clip.mp4"
|
|
591
|
+
|
|
592
|
+
def read(self, n):
|
|
593
|
+
return bytes(n)
|
|
594
|
+
|
|
595
|
+
client = Client(api_key="test-key")
|
|
596
|
+
with self.assertRaises(ValueError) as ctx:
|
|
597
|
+
client.upload(Pipe())
|
|
598
|
+
self.assertIn("200 MB", str(ctx.exception))
|
|
599
|
+
mock_post.assert_not_called()
|
|
600
|
+
|
|
585
601
|
def test_upload_raises_without_api_key(self):
|
|
586
602
|
"""Test that upload raises ValueError without API key."""
|
|
587
603
|
client = Client()
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|