Skip to content

Commit

Permalink
Merge pull request #83 from AndreiDrang/main
Browse files Browse the repository at this point in the history
Release v0.9.3
  • Loading branch information
AndreiDrang committed Apr 16, 2024
2 parents 80eb405 + efc65c9 commit fcac56d
Show file tree
Hide file tree
Showing 16 changed files with 103 additions and 171 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
Expand All @@ -30,6 +30,4 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Local build checking
run: |
pip install twine wheel
cd src/ && python setup.py sdist bdist_wheel
run: make build
4 changes: 2 additions & 2 deletions .github/workflows/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
Expand All @@ -33,4 +33,4 @@ jobs:
run: make install

- name: PYPI install checking
run: pip install python3-capsolver
run: pip3 install python3-capsolver
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
Expand All @@ -35,8 +35,8 @@ jobs:

- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r requirements.style.txt
pip3 install --upgrade pip
pip3 install -r requirements.style.txt
- name: Lint
run: make lint
2 changes: 1 addition & 1 deletion .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
run: make doc

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@ jobs:

- name: Install dependencies
run: |
pip install --upgrade pip
pip install --upgrade pip build setuptools
pip install -r requirements.test.txt
pip install -r src/requirements.txt
pip install .
- name: Test
run: make tests

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: /home/runner/work/python3-capsolver/python3-capsolver/src/coverage/coverage.xml
files: ${{github.workspace}}/src/coverage/coverage.xml
fail_ci_if_error: true
verbose: true
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12.3
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
install:
cd src/ && pip install -e .
pip3 install -e .

remove:
pip uninstall python3_capsolver -y
Expand All @@ -22,9 +22,13 @@ lint:
black src/ --check
isort src/ --check-only

build:
pip3 install --upgrade build setuptools
python3 -m build

upload:
pip install twine wheel
cd src/ && python setup.py upload
pip3 install twine wheel setuptools build
twine upload dist/*

tests: install
coverage run --rcfile=.coveragerc -m pytest -vv --showlocals --pastebin=all \
Expand Down
6 changes: 3 additions & 3 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
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
autodoc_pydantic==2.1.0
pydantic==2.7.0
pydantic-settings==2.2.1
74 changes: 74 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,77 @@ testpaths = [
"tests",
]
addopts = "-vv --tb=short --durations=10"

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "python3-capsolver"
dynamic = ["version"]
authors = [
{name = "AndreiDrang", email = "python-captcha@pm.me"},
]
description = "Python 3.8+ Capsolver library with AIO module."
readme = "README.md"
requires-python = ">=3.8"
keywords = [ "captcha",
"recaptcha",
"geetest",
"hcaptcha",
"capypuzzle",
"rotatecaptcha",
"funcaptcha",
"keycaptcha",
"python3",
"python-library",
"capsolver",
"datadomeslider",
"datadome",
"mtcaptcha",
"turnstile",
"cloudflare",
"amazon",
"amazon_waf",
"akamai",
"imperva",
"binance"
]
license = {text = "MIT License"}
classifiers = [
"License :: OSI Approved :: MIT License",
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Framework :: AsyncIO",
"Operating System :: Unix",
"Operating System :: Microsoft :: Windows",
"Operating System :: MacOS",
]
dependencies = [
"requests>=2.21.0",
"aiohttp>=3.9.2",
"pydantic==2.7.0",
"tenacity==8.*"
]

[tool.setuptools.packages.find]
where = ["src"]
include = ["python3_capsolver*"]

[tool.setuptools.dynamic]
version = {attr = "python3_capsolver.__version__"}

[project.urls]
Homepage = "https://andreidrang.github.io/python3-capsolver/"
Documentation = "https://andreidrang.github.io/python3-capsolver/"
Repository = "https://github.com/AndreiDrang/python3-capsolver"
Issues = "https://github.com/AndreiDrang/python3-capsolver/issues"
Changelog = "https://github.com/AndreiDrang/python3-capsolver/releases"
2 changes: 1 addition & 1 deletion requirements.style.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# codestyle
isort==5.*
black==23.10.1
black==24.4.0
autoflake==2.*
2 changes: 1 addition & 1 deletion requirements.test.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pytest==7.*
pytest==8.*
coverage==7.*
pytest-asyncio==0.*
1 change: 1 addition & 0 deletions src/python3_capsolver/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from python3_capsolver.__version__ import __version__ # noqa
2 changes: 1 addition & 1 deletion src/python3_capsolver/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.9.2"
__version__ = "0.9.3"
5 changes: 2 additions & 3 deletions src/python3_capsolver/core/serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class CaptchaResponseSer(ResponseSer):
solution: Dict[str, Any] = Field(None, description="Task result data. Different for each type of task.")

class Config:
allow_population_by_field_name = True
populate_by_name = True


class ControlResponseSer(ResponseSer):
Expand Down Expand Up @@ -120,8 +120,7 @@ class DatadomeSliderSer(TaskSer):
userAgent: str = Field(..., description="Browser's User-Agent which is used in emulation")


class CloudflareTurnstileSer(WebsiteDataOptionsSer):
...
class CloudflareTurnstileSer(WebsiteDataOptionsSer): ...


class CyberSiAraSer(WebsiteDataOptionsSer):
Expand Down
4 changes: 0 additions & 4 deletions src/requirements.txt

This file was deleted.

141 changes: 0 additions & 141 deletions src/setup.py

This file was deleted.

0 comments on commit fcac56d

Please sign in to comment.