-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update package versions and refactor response handling code
This commit includes an update of versions for the 'attrs' and 'pytest' packages in the `poetry.lock` file. The `pydantic_aiohttp` package has also been bumped from version 1.0.0 to 1.0.1. In addition, the code for handling responses in the `pydantic_aiohttp` module has been refactored for better clarity and separation of different types of responses. Unnecessary import statements have been removed to clean up the code.
- Loading branch information
Showing
6 changed files
with
173 additions
and
27 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,148 @@ | ||
__version__ = '1.0.0' | ||
__version__ = '1.0.1' | ||
__author__ = "pylakey <[email protected]>" | ||
|
||
from . import encoders | ||
from . import utils | ||
from . import errors | ||
from . import responses | ||
from . import types | ||
from .client import Client | ||
from .errors import * | ||
from .types import * | ||
from .errors import HTTPBadGateway | ||
from .errors import HTTPBadRequest | ||
from .errors import HTTPConflict | ||
from .errors import HTTPExpectationFailed | ||
from .errors import HTTPFailedDependency | ||
from .errors import HTTPForbidden | ||
from .errors import HTTPFound | ||
from .errors import HTTPGatewayTimeout | ||
from .errors import HTTPGone | ||
from .errors import HTTPHttpServerVersionNotSupported | ||
from .errors import HTTPImATeapot | ||
from .errors import HTTPInsufficientStorage | ||
from .errors import HTTPInternalServerError | ||
from .errors import HTTPLengthRequired | ||
from .errors import HTTPLocked | ||
from .errors import HTTPLoopDetected | ||
from .errors import HTTPMethodNotAllowed | ||
from .errors import HTTPMisdirectedRequest | ||
from .errors import HTTPMovedPermanently | ||
from .errors import HTTPMultipleChoices | ||
from .errors import HTTPNetworkAuthenticationRequired | ||
from .errors import HTTPNotAcceptable | ||
from .errors import HTTPNotExtended | ||
from .errors import HTTPNotFound | ||
from .errors import HTTPNotImplemented | ||
from .errors import HTTPNotModified | ||
from .errors import HTTPPaymentRequired | ||
from .errors import HTTPPermanentRedirect | ||
from .errors import HTTPPreconditionFailed | ||
from .errors import HTTPPreconditionRequired | ||
from .errors import HTTPProxyAuthenticationRequired | ||
from .errors import HTTPRequestEntityTooLarge | ||
from .errors import HTTPRequestHeaderFieldsTooLarge | ||
from .errors import HTTPRequestTimeout | ||
from .errors import HTTPRequestUriTooLong | ||
from .errors import HTTPRequestedRangeNotSatisfiable | ||
from .errors import HTTPSeeOther | ||
from .errors import HTTPServiceUnavailable | ||
from .errors import HTTPTemporaryRedirect | ||
from .errors import HTTPTooEarly | ||
from .errors import HTTPTooManyRequests | ||
from .errors import HTTPUnauthorized | ||
from .errors import HTTPUnavailableForLegalReasons | ||
from .errors import HTTPUnprocessableEntity | ||
from .errors import HTTPUnsupportedMediaType | ||
from .errors import HTTPUpgradeRequired | ||
from .errors import HTTPUseProxy | ||
from .errors import HTTPVariantAlsoNegotiates | ||
from .responses import JSONResponseClass | ||
from .responses import NoneResponseClass | ||
from .responses import PlainTextResponseClass | ||
from .responses import PydanticModelResponseClass | ||
from .responses import RawResponseClass | ||
from .responses import ResponseClass | ||
from .responses import StreamResponseClass | ||
from .types import Body | ||
from .types import Cookies | ||
from .types import EmptyResponse | ||
from .types import ErrorResponseModels | ||
from .types import Headers | ||
from .types import HttpEncodableMapping | ||
from .types import Params | ||
from .types import StrIntMapping | ||
|
||
__all__ = [ | ||
'Client', | ||
'encoders', | ||
'types', | ||
'responses', | ||
'errors', | ||
|
||
# Types | ||
'EmptyResponse', | ||
'StrIntMapping', | ||
'HttpEncodableMapping', | ||
'Params', | ||
'Cookies', | ||
'Headers', | ||
'Body', | ||
'ErrorResponseModels', | ||
|
||
# Errors | ||
'HTTPBadGateway', | ||
'HTTPBadRequest', | ||
'HTTPConflict', | ||
'HTTPExpectationFailed', | ||
'HTTPFailedDependency', | ||
'HTTPForbidden', | ||
'HTTPFound', | ||
'HTTPGatewayTimeout', | ||
'HTTPGone', | ||
'HTTPHttpServerVersionNotSupported', | ||
'HTTPImATeapot', | ||
'HTTPInsufficientStorage', | ||
'HTTPInternalServerError', | ||
'HTTPLengthRequired', | ||
'HTTPLocked', | ||
'HTTPLoopDetected', | ||
'HTTPMethodNotAllowed', | ||
'HTTPMisdirectedRequest', | ||
'HTTPMovedPermanently', | ||
'HTTPMultipleChoices', | ||
'HTTPNetworkAuthenticationRequired', | ||
'HTTPNotAcceptable', | ||
'HTTPNotExtended', | ||
'HTTPNotFound', | ||
'HTTPNotImplemented', | ||
'HTTPNotModified', | ||
'HTTPPaymentRequired', | ||
'HTTPPermanentRedirect', | ||
'HTTPPreconditionFailed', | ||
'HTTPPreconditionRequired', | ||
'HTTPProxyAuthenticationRequired', | ||
'HTTPRequestEntityTooLarge', | ||
'HTTPRequestHeaderFieldsTooLarge', | ||
'HTTPRequestTimeout', | ||
'HTTPRequestUriTooLong', | ||
'HTTPRequestedRangeNotSatisfiable', | ||
'HTTPSeeOther', | ||
'HTTPServiceUnavailable', | ||
'HTTPTemporaryRedirect', | ||
'HTTPTooEarly', | ||
'HTTPTooManyRequests', | ||
'HTTPUnauthorized', | ||
'HTTPUnavailableForLegalReasons', | ||
'HTTPUnprocessableEntity', | ||
'HTTPUnsupportedMediaType', | ||
'HTTPUpgradeRequired', | ||
'HTTPUseProxy', | ||
'HTTPVariantAlsoNegotiates', | ||
|
||
# Responses | ||
'ResponseClass', | ||
'RawResponseClass', | ||
'NoneResponseClass', | ||
'PlainTextResponseClass', | ||
'JSONResponseClass', | ||
'PydanticModelResponseClass', | ||
'StreamResponseClass', | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "pydantic_aiohttp" | ||
version = "1.0.0" | ||
version = "1.0.1" | ||
description = "Simple HTTP Client based on aiohttp with integration of pydantic" | ||
authors = ["pylakey <[email protected]>"] | ||
license = "MIT" | ||
|
@@ -25,7 +25,7 @@ classifiers = [ | |
[tool.poetry.dependencies] | ||
python = "^3.9" | ||
aiofiles = "^23.0.0" | ||
aiohttp = { extras = ["speedups"], version = "^3.8.1" } | ||
aiohttp = { version = "==3.*", extras = ["speedups"] } | ||
pydantic = ">=2" | ||
ujson = "^5.7.0" | ||
|
||
|