Skip to content

Commit

Permalink
Merge pull request #69 from aliev/bugfix/python-3.11-support
Browse files Browse the repository at this point in the history
fix: added Python 3.11 support
  • Loading branch information
aliev authored Jan 30, 2023
2 parents 5920d7c + badda45 commit c7512c8
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion aioauth/__version__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
__title__ = "aioauth"
__description__ = "Asynchronous OAuth 2.0 framework for Python 3."
__url__ = "https://github.com/aliev/aioauth"
__version__ = "1.5.0"
__version__ = "1.5.1"
__author__ = "Ali Aliyev"
__author_email__ = "[email protected]"
__license__ = "The MIT License (MIT)"
Expand Down
10 changes: 5 additions & 5 deletions aioauth/requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
----
"""
from dataclasses import dataclass
from dataclasses import dataclass, field
from typing import Any, Generic, Optional, TypeVar

from .collections import HTTPHeaderDict
Expand Down Expand Up @@ -64,10 +64,10 @@ class BaseRequest(Generic[TQuery, TPost, TUser]):
method: RequestMethod
query: TQuery
post: TPost
headers: HTTPHeaderDict = HTTPHeaderDict()
headers: HTTPHeaderDict = field(default_factory=HTTPHeaderDict)
url: str = ""
user: Optional[TUser] = None
settings: Settings = Settings()
settings: Settings = field(default_factory=Settings)


TRequest = TypeVar("TRequest", bound=BaseRequest)
Expand All @@ -77,6 +77,6 @@ class BaseRequest(Generic[TQuery, TPost, TUser]):
class Request(BaseRequest[Query, Post, Any]):
"""Object that contains a client's complete request."""

query: Query = Query()
post: Post = Post()
query: Query = field(default_factory=Query)
post: Post = field(default_factory=Post)
user: Optional[Any] = None
4 changes: 3 additions & 1 deletion aioauth/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,6 @@ class Response:

content: Dict = field(default_factory=dict)
status_code: HTTPStatus = HTTPStatus.OK
headers: HTTPHeaderDict = default_headers
headers: HTTPHeaderDict = field(
default_factory=lambda: default_headers
) # pragma: no cover
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.5.0
current_version = 1.5.1
commit = True
tag = True

Expand Down

0 comments on commit c7512c8

Please sign in to comment.