diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 570c103..f4c61d4 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,3 +4,10 @@ updates: directory: "/" # Location of package manifests schedule: interval: "weekly" + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + commit-message: + prefix: "[github-actions] " diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b5a022f..dda24c6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,9 +23,9 @@ jobs: python-version: ["3.8", "3.9", "3.10", "3.11"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 8e864e4..90bf1f7 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -23,9 +23,9 @@ jobs: python-version: ["3.8", "3.9", "3.10", "3.11"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ee6328b..82b15e1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -27,9 +27,9 @@ jobs: python-version: ["3.8", "3.9", "3.10", "3.11"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index 07662d3..8cabeea 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -14,8 +14,8 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 - name: Build docs requirements run: pip install -r docs/requirements.txt diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0ff2dba..f27bea8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,9 +30,9 @@ jobs: python-version: ["3.11", ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} diff --git a/docs/conf.py b/docs/conf.py index 1f45652..b101090 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -54,7 +54,8 @@ "Capsolver", "https://dashboard.capsolver.com/passport/register?inviteCode=kQTn-tG07Jb1", ), - ] + ProjectLink("RedPandaDev", "https://red-panda-dev.xyz/"), + ], } html_sidebars = { "index": ["project.html", "localtoc.html", "searchbox.html", "ethicalads.html"], diff --git a/docs/modules/other-libs/info.md b/docs/modules/other-libs/info.md index 29d48fd..75385a8 100644 --- a/docs/modules/other-libs/info.md +++ b/docs/modules/other-libs/info.md @@ -4,3 +4,4 @@ 1. [RuCaptcha / 2Captcha](https://github.com/AndreiDrang/python-rucaptcha) 2. [AntiCaptcha](https://github.com/AndreiDrang/python3-anticaptcha) 3. [Capsolver](https://github.com/AndreiDrang/python3-capsolver) +4. [RedPandaDev group](https://red-panda-dev.xyz/) diff --git a/docs/requirements.txt b/docs/requirements.txt index 1da77a4..79875dd 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,3 +1,4 @@ pallets_sphinx_themes==2.* myst-parser==2.0.* autodoc_pydantic==1.9.0 +pydantic>=2.4.0 # not directly required, pinned by Snyk to avoid a vulnerability diff --git a/requirements.style.txt b/requirements.style.txt index a2f0707..c6f5d3f 100644 --- a/requirements.style.txt +++ b/requirements.style.txt @@ -1,4 +1,4 @@ # codestyle isort==5.* -black==23.9.1 +black==23.10.1 autoflake==2.* diff --git a/src/python3_capsolver/core/serializer.py b/src/python3_capsolver/core/serializer.py index 11d211e..2931489 100644 --- a/src/python3_capsolver/core/serializer.py +++ b/src/python3_capsolver/core/serializer.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Optional +from typing import Any, Dict, List, Literal, Optional from pydantic import Field, BaseModel, conint @@ -20,7 +20,7 @@ class TaskSer(BaseModel): class RequestCreateTaskSer(PostRequestSer): - appId: str = Field(APP_ID, description="AppID", const=True) + appId: Literal[APP_ID] = APP_ID class RequestGetTaskResultSer(PostRequestSer): diff --git a/src/requirements.txt b/src/requirements.txt index 8f33df9..7b5e585 100644 --- a/src/requirements.txt +++ b/src/requirements.txt @@ -1,4 +1,4 @@ requests>=2.21.0 aiohttp>=3.7.4 -pydantic==1.10.* +pydantic==2.4.2 tenacity==8.*