Skip to content

Commit 26c25c2

Browse files
Merge pull request #172 from runpod/3.9-Backwards-Compatibility
3.9 backwards compatibility
2 parents eced917 + 2375f78 commit 26c25c2

File tree

6 files changed

+27
-9
lines changed

6 files changed

+27
-9
lines changed

.github/workflows/CI-pylint.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,27 @@ on:
55
branches-ignore:
66
- "main-ci"
77
- "release"
8-
# pull_request:
9-
# branches:
10-
# - main
8+
9+
pull_request:
10+
branches:
11+
- main
1112

1213
workflow_dispatch:
1314

1415
jobs:
1516
lint:
17+
strategy:
18+
matrix:
19+
python-version: [3.9, 3.10.12, 3.11.0]
1620
runs-on: ubuntu-latest
1721

1822
steps:
1923
- uses: actions/checkout@v4
2024

21-
- name: Set up Python 3.11
25+
- name: Set up Python ${{ matrix.python-version }}
2226
uses: actions/setup-python@v4
2327
with:
24-
python-version: 3.11.0
28+
python-version: ${{ matrix.python-version }}
2529

2630
- name: Install Dependencies
2731
run: |

.github/workflows/CI-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
run_tests:
1717
strategy:
1818
matrix:
19-
python-version: [3.10.12, 3.11.0]
19+
python-version: [3.9, 3.10.12, 3.11.0]
2020
runs-on: ubuntu-latest
2121

2222
steps:

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Change Log
22

3+
## Release 1.3.0 (TBD)
4+
5+
### Changes
6+
7+
- Backwards compatibility with Python >= 3.9
8+
9+
---
10+
311
## Release 1.2.6 (10/6/23)
412

513
### Changes

runpod/serverless/modules/rp_fastapi.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# pylint: disable=too-few-public-methods
33

44
import os
5+
from typing import Union
56

67
import uvicorn
78
from fastapi import FastAPI, APIRouter
@@ -37,15 +38,15 @@
3738
class Job(BaseModel):
3839
''' Represents a job. '''
3940
id: str
40-
input: dict | list | str | int | float | bool
41+
input: Union[dict, list, str, int, float, bool]
4142

4243

4344
class TestJob(BaseModel):
4445
''' Represents a test job.
4546
input can be any type of data.
4647
'''
4748
id: str = "test_job"
48-
input: dict | list | str | int | float | bool
49+
input: Union[dict, list, str, int, float, bool]
4950

5051

5152
class WorkerAPI:

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ classifiers =
2727
[options]
2828
include_package_data = true
2929
packages = find:
30-
python_requires = >= 3.10
30+
python_requires = >= 3.9
3131
install_requires =
3232
aiohttp >= 3.8.4
3333
aiohttp-retry >= 2.8.3

tests/test_serverless/test_utils/test_debugger.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@ def test_clear_debugger_output(self):
104104
'''
105105
self.checkpoints.add('checkpoint1')
106106
self.checkpoints.start('checkpoint1')
107+
108+
# Check that non-stopped checkpoints are not returned
109+
checkpoint_list = self.checkpoints.get_checkpoints()
110+
self.assertEqual(len(checkpoint_list), 0)
111+
107112
self.checkpoints.stop('checkpoint1')
108113

109114
checkpoint_list = self.checkpoints.get_checkpoints()

0 commit comments

Comments
 (0)