diff --git a/.github/workflows/CI-pylint.yml b/.github/workflows/CI-pylint.yml index 127f74b8..58e2276a 100644 --- a/.github/workflows/CI-pylint.yml +++ b/.github/workflows/CI-pylint.yml @@ -5,23 +5,27 @@ on: branches-ignore: - "main-ci" - "release" - # pull_request: - # branches: - # - main + + pull_request: + branches: + - main workflow_dispatch: jobs: lint: + strategy: + matrix: + python-version: [3.9, 3.10.12, 3.11.0] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Set up Python 3.11 + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: - python-version: 3.11.0 + python-version: ${{ matrix.python-version }} - name: Install Dependencies run: | diff --git a/.github/workflows/CI-tests.yml b/.github/workflows/CI-tests.yml index 84c91357..8675c049 100644 --- a/.github/workflows/CI-tests.yml +++ b/.github/workflows/CI-tests.yml @@ -16,7 +16,7 @@ jobs: run_tests: strategy: matrix: - python-version: [3.10.12, 3.11.0] + python-version: [3.9, 3.10.12, 3.11.0] runs-on: ubuntu-latest steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index 88c9b11c..5cc92728 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Change Log +## Release 1.3.0 (TBD) + +### Changes + +- Backwards compatibility with Python >= 3.9 + +--- + ## Release 1.2.6 (10/6/23) ### Changes diff --git a/runpod/serverless/modules/rp_fastapi.py b/runpod/serverless/modules/rp_fastapi.py index 3ead9150..b6a4c32c 100644 --- a/runpod/serverless/modules/rp_fastapi.py +++ b/runpod/serverless/modules/rp_fastapi.py @@ -2,6 +2,7 @@ # pylint: disable=too-few-public-methods import os +from typing import Union import uvicorn from fastapi import FastAPI, APIRouter @@ -37,7 +38,7 @@ class Job(BaseModel): ''' Represents a job. ''' id: str - input: dict | list | str | int | float | bool + input: Union[dict, list, str, int, float, bool] class TestJob(BaseModel): @@ -45,7 +46,7 @@ class TestJob(BaseModel): input can be any type of data. ''' id: str = "test_job" - input: dict | list | str | int | float | bool + input: Union[dict, list, str, int, float, bool] class WorkerAPI: diff --git a/setup.cfg b/setup.cfg index 08245287..c32c3f3e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -27,7 +27,7 @@ classifiers = [options] include_package_data = true packages = find: -python_requires = >= 3.10 +python_requires = >= 3.9 install_requires = aiohttp >= 3.8.4 aiohttp-retry >= 2.8.3 diff --git a/tests/test_serverless/test_utils/test_debugger.py b/tests/test_serverless/test_utils/test_debugger.py index 808a429a..2073757a 100644 --- a/tests/test_serverless/test_utils/test_debugger.py +++ b/tests/test_serverless/test_utils/test_debugger.py @@ -104,6 +104,11 @@ def test_clear_debugger_output(self): ''' self.checkpoints.add('checkpoint1') self.checkpoints.start('checkpoint1') + + # Check that non-stopped checkpoints are not returned + checkpoint_list = self.checkpoints.get_checkpoints() + self.assertEqual(len(checkpoint_list), 0) + self.checkpoints.stop('checkpoint1') checkpoint_list = self.checkpoints.get_checkpoints()