From 4a20fe491b5ff0fc06dd919961d5fb030d29ddc4 Mon Sep 17 00:00:00 2001 From: hydrogen7797 Date: Tue, 23 Jun 2026 14:37:55 +0900 Subject: [PATCH 1/3] chore: update testing configuration and add type hints support --- pyproject.toml | 2 +- pytest.ini | 2 +- runpod/py.typed | 0 setup.py | 1 - 4 files changed, 2 insertions(+), 3 deletions(-) create mode 100644 runpod/py.typed diff --git a/pyproject.toml b/pyproject.toml index c88c8ec2..747c70ad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,6 +49,7 @@ include-package-data = true [tool.setuptools.package-data] runpod = [ + "py.typed", "serverless/binaries/gpu_test", "serverless/binaries/README.md", ] @@ -68,7 +69,6 @@ dev = [ "twine>=6.1.0", ] test = [ - "asynctest", "nest_asyncio", "faker", "pytest-asyncio", diff --git a/pytest.ini b/pytest.ini index 165c6b91..590b4dc1 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,5 +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 -W error -p no:cacheprovider -p no:unraisableexception +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 -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 ebd4c2d1..f427ccd2 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,6 @@ extras_require = { "test": [ - "asynctest", "faker", "nest_asyncio", "pytest", From c237dc737ef9b4d618714a093a7b0461bcdcb91a Mon Sep 17 00:00:00 2001 From: hydrogen7797 Date: Thu, 25 Jun 2026 11:36:55 +0900 Subject: [PATCH 2/3] chore: update pytest.ini to suppress specific deprecation warnings and modify coroutine check condition --- pytest.ini | 2 +- .../test_modules/test_fitness/test_system_checks.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pytest.ini b/pytest.ini index 590b4dc1..537e998b 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,5 +1,5 @@ [pytest] -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 -p no:cacheprovider -p no:unraisableexception +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/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() From d5a697147431dc0b6cc76072d0c82b62c355fe18 Mon Sep 17 00:00:00 2001 From: hydrogen7797 Date: Thu, 25 Jun 2026 23:49:14 +0900 Subject: [PATCH 3/3] chore: include py.typed in MANIFEST.in and setup.py for type hinting support --- MANIFEST.in | 1 + pytest.ini | 2 +- setup.py | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) 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/pytest.ini b/pytest.ini index 537e998b..653f15f0 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,5 +1,5 @@ [pytest] -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 +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/setup.py b/setup.py index 5bb7651d..41caebd3 100644 --- a/setup.py +++ b/setup.py @@ -59,6 +59,7 @@ include_package_data=True, package_data={ "runpod": [ + "py.typed", "serverless/binaries/gpu_test", "serverless/binaries/README.md", ]