Skip to content

Commit fcac56d

Browse files
authored
Merge pull request #83 from AndreiDrang/main
Release v0.9.3
2 parents 80eb405 + efc65c9 commit fcac56d

16 files changed

+103
-171
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
python-version: ["3.8", "3.9", "3.10", "3.11"]
23+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
2424

2525
steps:
2626
- uses: actions/checkout@v4
@@ -30,6 +30,4 @@ jobs:
3030
python-version: ${{ matrix.python-version }}
3131

3232
- name: Local build checking
33-
run: |
34-
pip install twine wheel
35-
cd src/ && python setup.py sdist bdist_wheel
33+
run: make build

.github/workflows/install.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
python-version: ["3.8", "3.9", "3.10", "3.11"]
23+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
2424

2525
steps:
2626
- uses: actions/checkout@v4
@@ -33,4 +33,4 @@ jobs:
3333
run: make install
3434

3535
- name: PYPI install checking
36-
run: pip install python3-capsolver
36+
run: pip3 install python3-capsolver

.github/workflows/lint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
strategy:
2525
fail-fast: false
2626
matrix:
27-
python-version: ["3.8", "3.9", "3.10", "3.11"]
27+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
2828

2929
steps:
3030
- uses: actions/checkout@v4
@@ -35,8 +35,8 @@ jobs:
3535

3636
- name: Install dependencies
3737
run: |
38-
pip install --upgrade pip
39-
pip install -r requirements.style.txt
38+
pip3 install --upgrade pip
39+
pip3 install -r requirements.style.txt
4040
4141
- name: Lint
4242
run: make lint

.github/workflows/sphinx.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
run: make doc
2828

2929
- name: Deploy
30-
uses: peaceiris/actions-gh-pages@v3
30+
uses: peaceiris/actions-gh-pages@v4
3131
with:
3232
publish_branch: gh-pages
3333
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,17 @@ jobs:
3838

3939
- name: Install dependencies
4040
run: |
41-
pip install --upgrade pip
41+
pip install --upgrade pip build setuptools
4242
pip install -r requirements.test.txt
43-
pip install -r src/requirements.txt
43+
pip install .
4444
4545
- name: Test
4646
run: make tests
4747

4848
- name: Upload coverage to Codecov
49-
uses: codecov/codecov-action@v3
49+
uses: codecov/codecov-action@v4
5050
with:
5151
token: ${{ secrets.CODECOV_TOKEN }}
52-
files: /home/runner/work/python3-capsolver/python3-capsolver/src/coverage/coverage.xml
52+
files: ${{github.workspace}}/src/coverage/coverage.xml
5353
fail_ci_if_error: true
5454
verbose: true

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.12.3

Makefile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
install:
2-
cd src/ && pip install -e .
2+
pip3 install -e .
33

44
remove:
55
pip uninstall python3_capsolver -y
@@ -22,9 +22,13 @@ lint:
2222
black src/ --check
2323
isort src/ --check-only
2424

25+
build:
26+
pip3 install --upgrade build setuptools
27+
python3 -m build
28+
2529
upload:
26-
pip install twine wheel
27-
cd src/ && python setup.py upload
30+
pip3 install twine wheel setuptools build
31+
twine upload dist/*
2832

2933
tests: install
3034
coverage run --rcfile=.coveragerc -m pytest -vv --showlocals --pastebin=all \

docs/requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
sphinx==7.2.6
22
pallets_sphinx_themes==2.1.1
33
myst-parser==2.0.0
4-
autodoc_pydantic==2.0.1
5-
pydantic==2.4.2
6-
pydantic-settings==2.0.3
4+
autodoc_pydantic==2.1.0
5+
pydantic==2.7.0
6+
pydantic-settings==2.2.1

pyproject.toml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,77 @@ testpaths = [
2828
"tests",
2929
]
3030
addopts = "-vv --tb=short --durations=10"
31+
32+
[build-system]
33+
requires = ["setuptools"]
34+
build-backend = "setuptools.build_meta"
35+
36+
[project]
37+
name = "python3-capsolver"
38+
dynamic = ["version"]
39+
authors = [
40+
{name = "AndreiDrang", email = "python-captcha@pm.me"},
41+
]
42+
description = "Python 3.8+ Capsolver library with AIO module."
43+
readme = "README.md"
44+
requires-python = ">=3.8"
45+
keywords = [ "captcha",
46+
"recaptcha",
47+
"geetest",
48+
"hcaptcha",
49+
"capypuzzle",
50+
"rotatecaptcha",
51+
"funcaptcha",
52+
"keycaptcha",
53+
"python3",
54+
"python-library",
55+
"capsolver",
56+
"datadomeslider",
57+
"datadome",
58+
"mtcaptcha",
59+
"turnstile",
60+
"cloudflare",
61+
"amazon",
62+
"amazon_waf",
63+
"akamai",
64+
"imperva",
65+
"binance"
66+
]
67+
license = {text = "MIT License"}
68+
classifiers = [
69+
"License :: OSI Approved :: MIT License",
70+
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
71+
"Development Status :: 5 - Production/Stable",
72+
"Programming Language :: Python",
73+
"Programming Language :: Python :: 3",
74+
"Programming Language :: Python :: 3 :: Only",
75+
"Programming Language :: Python :: 3.8",
76+
"Programming Language :: Python :: 3.9",
77+
"Programming Language :: Python :: 3.10",
78+
"Programming Language :: Python :: 3.11",
79+
"Programming Language :: Python :: 3.12",
80+
"Framework :: AsyncIO",
81+
"Operating System :: Unix",
82+
"Operating System :: Microsoft :: Windows",
83+
"Operating System :: MacOS",
84+
]
85+
dependencies = [
86+
"requests>=2.21.0",
87+
"aiohttp>=3.9.2",
88+
"pydantic==2.7.0",
89+
"tenacity==8.*"
90+
]
91+
92+
[tool.setuptools.packages.find]
93+
where = ["src"]
94+
include = ["python3_capsolver*"]
95+
96+
[tool.setuptools.dynamic]
97+
version = {attr = "python3_capsolver.__version__"}
98+
99+
[project.urls]
100+
Homepage = "https://andreidrang.github.io/python3-capsolver/"
101+
Documentation = "https://andreidrang.github.io/python3-capsolver/"
102+
Repository = "https://github.com/AndreiDrang/python3-capsolver"
103+
Issues = "https://github.com/AndreiDrang/python3-capsolver/issues"
104+
Changelog = "https://github.com/AndreiDrang/python3-capsolver/releases"

requirements.style.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# codestyle
22
isort==5.*
3-
black==23.10.1
3+
black==24.4.0
44
autoflake==2.*

requirements.test.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
pytest==7.*
1+
pytest==8.*
22
coverage==7.*
33
pytest-asyncio==0.*

src/python3_capsolver/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from python3_capsolver.__version__ import __version__ # noqa

src/python3_capsolver/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.9.2"
1+
__version__ = "0.9.3"

src/python3_capsolver/core/serializer.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class CaptchaResponseSer(ResponseSer):
4545
solution: Dict[str, Any] = Field(None, description="Task result data. Different for each type of task.")
4646

4747
class Config:
48-
allow_population_by_field_name = True
48+
populate_by_name = True
4949

5050

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

122122

123-
class CloudflareTurnstileSer(WebsiteDataOptionsSer):
124-
...
123+
class CloudflareTurnstileSer(WebsiteDataOptionsSer): ...
125124

126125

127126
class CyberSiAraSer(WebsiteDataOptionsSer):

src/requirements.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/setup.py

Lines changed: 0 additions & 141 deletions
This file was deleted.

0 commit comments

Comments
 (0)