Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Python3.13 #104

Merged
merged 1 commit into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12']
python-version: ['3.10', '3.11', '3.12', '3.13']

steps:
- name: Checkout source
Expand All @@ -38,7 +38,7 @@ jobs:
needs: [tests-linux]
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
python-version: ['3.10', '3.11', '3.12', '3.13']

steps:
- name: Checkout source
Expand All @@ -63,7 +63,7 @@ jobs:
needs: [tests-linux]
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
python-version: ['3.10', '3.11', '3.12', '3.13']

steps:
- name: Checkout source
Expand Down
3 changes: 3 additions & 0 deletions docs/docs/release_notes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### 4.3.2
- Support `Python 3.13`

### 4.3.0
- Support `Jinja2 Template Engine`

Expand Down
2 changes: 1 addition & 1 deletion panther/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from panther.main import Panther # noqa: F401

__version__ = '4.3.1'
__version__ = '4.3.2'


def version():
Expand Down
2 changes: 1 addition & 1 deletion panther/db/queries/base_queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def _merge(cls, *args, is_mongo: bool = False) -> dict:
def _clean_error_message(cls, validation_error: ValidationError, is_updating: bool = False) -> str:
error = ', '.join(
'{field}="{error}"'.format(
field='.'.join(loc for loc in e['loc']),
field='.'.join(str(loc) for loc in e['loc']),
error=e['msg']
)
for e in validation_error.errors()
Expand Down
2 changes: 1 addition & 1 deletion panther/serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def __new__(

# 4. Create a serializer
return create_model(
__model_name=cls_name,
cls_name,
__module__=namespace['__module__'],
__validators__=namespace,
__base__=(cls.model_serializer, BaseModel),
Expand Down
25 changes: 15 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import re
import sys

from setuptools import setup

Expand All @@ -12,6 +13,17 @@ def panther_version() -> str:
with open('README.md', encoding='utf-8') as file:
DESCRIPTION = file.read()

INSTALL_REQUIRES = [
'pantherdb~=2.1.0',
'pydantic~=2.8.2',
'rich~=13.7.1',
'uvicorn~=0.27.1',
'pytz~=2024.1',
'Jinja2~=3.1',
]
if sys.version_info <= (3, 12):
INSTALL_REQUIRES.append('httptools~=0.6.1')

EXTRAS_REQUIRE = {
'full': [
'redis==5.0.1',
Expand All @@ -32,7 +44,7 @@ def panther_version() -> str:
author='Ali RajabNezhad',
author_email='[email protected]',
url='https://github.com/alirn76/panther',
description='Fast & Friendly, Web Framework For Building Async APIs',
description='Fast & Friendly, Web Framework For Building Async APIs',
long_description=DESCRIPTION,
long_description_content_type='text/markdown',
include_package_data=True,
Expand All @@ -42,21 +54,14 @@ def panther_version() -> str:
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
],
entry_points={
'console_scripts': ['panther=panther.cli.main:start'],
},
package_data={
'panther': ['cli/*'],
},
install_requires=[
'httptools~=0.6.1',
'pantherdb~=2.1.0',
'pydantic~=2.7.4',
'rich~=13.7.1',
'uvicorn~=0.27.1',
'pytz~=2024.1',
'Jinja2~=3.1',
],
install_requires=INSTALL_REQUIRES,
extras_require=EXTRAS_REQUIRE,
)
Loading