Skip to content

Commit c7bcde9

Browse files
committed
Add support for python 3.9
1 parent 23af730 commit c7bcde9

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.github/workflows/code.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
strategy:
1818
matrix:
19-
python-version: [ "3.10", "3.11", "3.12" ]
19+
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
2020
steps:
2121
- name: Checkout the repository
2222
uses: actions/checkout@v4

setup.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
url='https://github.com/kilobyteno/tunsberg',
2626
author='Kilobyte AS',
2727
license='MIT',
28-
python_requires='>=3.10',
28+
python_requires='>=3.9',
2929
packages=['tunsberg'],
3030
include_package_data=True,
3131
install_requires=requirements,
@@ -39,6 +39,7 @@
3939
classifiers=[
4040
'Programming Language :: Python',
4141
'Programming Language :: Python :: 3',
42+
'Programming Language :: Python :: 3.9',
4243
'Programming Language :: Python :: 3.10',
4344
'Programming Language :: Python :: 3.11',
4445
'Programming Language :: Python :: 3.12',

tunsberg/responses.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import json
2-
from typing import Any, Dict, List, Optional
2+
from typing import Any, Dict, List, Optional, Union
33

44
from fastapi import Query
55
from fastapi_pagination import Page, Params
@@ -22,7 +22,7 @@ class ResponseModel(BaseModel):
2222

2323
status_code: int
2424
message: str
25-
data: Optional[Dict[str, Any]] | Optional[List[Any]] | Optional[str] = None
25+
data: Optional[Union[Dict[str, Any], List[Any], str]] = None
2626
pagination: Optional[Pagination] = Field(None, exclude=True)
2727
background_tasks: Optional[Any] = Field(None, exclude=True)
2828

0 commit comments

Comments
 (0)