diff --git a/MANIFEST.in b/MANIFEST.in index 5dd7e21d..c0522bde 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,4 @@ +include runpod/py.typed include runpod/serverless/binaries/gpu_test include runpod/serverless/binaries/README.md include build_tools/gpu_test.c diff --git a/pyproject.toml b/pyproject.toml index d4639a15..407c4ad7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,6 +50,7 @@ include-package-data = true [tool.setuptools.package-data] runpod = [ + "py.typed", "serverless/binaries/gpu_test", "serverless/binaries/README.md", ] @@ -69,7 +70,7 @@ dev = [ "twine>=6.1.0", ] test = [ - "asynctest", + "nest_asyncio", "faker", "pytest-asyncio", "pytest-cov", diff --git a/pytest.ini b/pytest.ini index 1c2c135e..653f15f0 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,12 +1,5 @@ [pytest] -addopts = --durations=10 --cov-config=.coveragerc --timeout=120 --timeout_method=thread --cov=runpod --cov-report=xml --cov-report=term-missing --cov-fail-under=90 -p no:cacheprovider -p no:unraisableexception -filterwarnings = - error - # Third-party deps (e.g. backoff) still call asyncio APIs that 3.14 deprecates - # and slates for removal in 3.16. The SDK's own code does not; at runtime these - # only warn. Don't fail the suite on them until the deps update. - ignore:'asyncio\.get_event_loop_policy' is deprecated:DeprecationWarning - ignore:'asyncio\.iscoroutinefunction' is deprecated:DeprecationWarning +addopts = --durations=10 --cov-config=pyproject.toml --timeout=120 --timeout_method=thread --cov=runpod --cov-report=xml --cov-report=term-missing --cov-fail-under=90 -W error -W ignore::DeprecationWarning:backoff\._decorator -p no:cacheprovider -p no:unraisableexception python_files = tests.py test_*.py *_test.py norecursedirs = venv *.egg-info .git build tests/e2e asyncio_mode = auto diff --git a/runpod/py.typed b/runpod/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/setup.py b/setup.py index 6fbfa776..41caebd3 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,6 @@ extras_require = { "test": [ - "asynctest", "faker", "nest_asyncio", "pytest", @@ -60,6 +59,7 @@ include_package_data=True, package_data={ "runpod": [ + "py.typed", "serverless/binaries/gpu_test", "serverless/binaries/README.md", ] diff --git a/tests/test_serverless/test_modules/test_fitness/test_system_checks.py b/tests/test_serverless/test_modules/test_fitness/test_system_checks.py index 2ac370b1..539d3841 100644 --- a/tests/test_serverless/test_modules/test_fitness/test_system_checks.py +++ b/tests/test_serverless/test_modules/test_fitness/test_system_checks.py @@ -6,6 +6,7 @@ """ import asyncio +import inspect from unittest.mock import patch, MagicMock, AsyncMock import pytest @@ -582,7 +583,7 @@ async def test_all_checks_pass_healthy_system( # Should complete without exceptions for check in _fitness_checks: - if asyncio.iscoroutinefunction(check): + if inspect.iscoroutinefunction(check): await check() else: check()