diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index 07662d3..6c5360b 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -14,8 +14,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v3 + - uses: actions/checkout@v4 + - name: Set up Python 3.11 + uses: actions/setup-python@v4 + with: + python-version: 3.11.6 - name: Build docs requirements run: pip install -r docs/requirements.txt diff --git a/docs/requirements.txt b/docs/requirements.txt index 2926897..0a305ba 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,3 +1,6 @@ -pallets_sphinx_themes==2.* -myst-parser==2.0.* -autodoc_pydantic==2.0.* +sphinx==7.2.6 +pallets_sphinx_themes==2.1.1 +myst-parser==2.0.0 +autodoc_pydantic==2.0.1 +pydantic==2.4.2 +pydantic-settings==2.0.3 diff --git a/src/python3_anticaptcha/FunCaptchaTaskProxyless.py b/src/python3_anticaptcha/FunCaptchaTaskProxyless.py index 3f384ec..722d1db 100644 --- a/src/python3_anticaptcha/FunCaptchaTaskProxyless.py +++ b/src/python3_anticaptcha/FunCaptchaTaskProxyless.py @@ -4,7 +4,7 @@ import aiohttp import requests -from python3_anticaptcha.core.config import APP_KEY, create_task_url, get_sync_result, get_async_result +from python3_anticaptcha.core.config import create_task_url, get_sync_result, get_async_result class FunCaptchaTaskProxyless: diff --git a/src/python3_anticaptcha/core/serializer.py b/src/python3_anticaptcha/core/serializer.py index ad190e0..ac1f1e9 100644 --- a/src/python3_anticaptcha/core/serializer.py +++ b/src/python3_anticaptcha/core/serializer.py @@ -1,4 +1,4 @@ -from typing import Dict +from typing import Dict, Literal from pydantic import Field, BaseModel, constr @@ -26,7 +26,7 @@ class CreateTaskRequestSer(BaseAPIRequestSer): task: Dict = Field(None, description="Task object.") languagePool: str = Field("en", description="Sets workers' pool language. Only applies to image captchas.") callbackUrl: str = Field(None, description="Web address where we can send the results of captcha task processing.") - softId: int = Field(APP_KEY, const=True) + softId: Literal[APP_KEY] = APP_KEY class CreateTaskRequestTaskSer(MyBaseModel): diff --git a/src/requirements.txt b/src/requirements.txt index 232cfd6..c85a781 100644 --- a/src/requirements.txt +++ b/src/requirements.txt @@ -1,4 +1,4 @@ requests>=2.21.0 -aiohttp==3.* +aiohttp>=3.7.4 tenacity==8.* -pydantic==1.* +pydantic>=2.4.0