Skip to content

Commit 17e0020

Browse files
Adam Dobrawyclaude
andcommitted
Fix obsolete and invalid documentation across the project
Update outdated references (setup.py → pyproject.toml, TravisCI → GitHub Actions), fix broken example file links, correct typos and grammar in README and Sphinx docs, update copyright year range, fix geckodriver/chromedriver naming confusion in Makefile, update contact email in CODE_OF_CONDUCT.md, and add comprehensive changelog entries for all changes since 1.0.0. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 36fbb40 commit 17e0020

8 files changed

Lines changed: 69 additions & 36 deletions

File tree

CHANGELOG.rst

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,43 @@
11
Changelog
22
=========
33

4+
Unreleased
5+
----------
6+
7+
Added
8+
#####
9+
10+
- Add context manager support to ``AnticaptchaClient`` (``__enter__``, ``__exit__``, ``close``)
11+
- Add ``ANTICAPTCHA_API_KEY`` environment variable fallback for ``AnticaptchaClient``
12+
- Add ``Proxy`` frozen dataclass with ``parse_url()`` and ``to_kwargs()`` methods
13+
- Add snake_case aliases: ``create_task``, ``create_task_smee``, ``get_balance``, ``get_app_stats``
14+
- Add ``py.typed`` marker and complete type annotations (`#124 <https://github.com/ad-m/python-anticaptcha/pull/124>`_)
15+
- Add ``__repr__`` to ``Job``, ``AnticaptchaClient``, and ``BaseTask`` (`#123 <https://github.com/ad-m/python-anticaptcha/pull/123>`_)
16+
- Add optional ``on_check`` callback to ``Job.join()`` (`#125 <https://github.com/ad-m/python-anticaptcha/pull/125>`_)
17+
- ``ImageToTextTask`` now accepts file paths (``str``/``Path``), raw bytes, or file-like objects
18+
19+
Changed
20+
#######
21+
22+
- **Breaking:** Minimum Python version increased from 2.7+ to 3.9+
23+
- Migrate from ``setup.py`` / ``setup.cfg`` to ``pyproject.toml`` (PEP 621) (`#122 <https://github.com/ad-m/python-anticaptcha/pull/122>`_)
24+
- Switch README from RST to Markdown (`#126 <https://github.com/ad-m/python-anticaptcha/pull/126>`_)
25+
- Switch test runner from nose2 to pytest
26+
- Fix ``RecaptchaV2EnterpriseTask`` missing proxyless base class inheritance
27+
- Fix ``ImageToTextTask.serialize()`` sending ``None`` values
28+
- Fix ``GeeTestTask`` incorrect inheritance
29+
- Fix ``AntiGateTaskProxyless`` super() call
30+
- Remove redundant cookies serialization in ``ProxyMixin``
31+
- Use Python 3 ``super()`` without arguments throughout codebase
32+
33+
Removed
34+
#######
35+
36+
- Drop Python 2.7 and Python 3.4-3.8 support
37+
- Remove ``six`` dependency (replaced with stdlib ``urllib.parse``)
38+
- Remove ``compat.py`` module
39+
- Remove legacy ``setup.py`` and ``setup.cfg``
40+
441
1.0.0 - 2022-03-28
542
------------------
643

CODE_OF_CONDUCT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ This Code of Conduct applies both within project spaces and in public spaces whe
3434

3535
## Enforcement
3636

37-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at naczelnik@jawnosc.tk. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
37+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at naczelnik@jawne.info.pl. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
3838

3939
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
4040

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
CHROMEDRIVER_VERSION=99.0.4844.17
2-
CHROMEDRIVER_DIR=${PWD}/geckodriver
2+
CHROMEDRIVER_DIR=${PWD}/chromedriver
33

4-
.PHONY: lint fmt build docs install test test_e2e gecko
4+
.PHONY: lint fmt build docs install test test_e2e chromedriver
55

66
build:
7-
python setup.py sdist bdist_wheel
7+
python -m build
88

99
install: install_test install_docs install_pkg
1010

@@ -18,7 +18,7 @@ install_pkg:
1818
python -m pip install --upgrade pip wheel
1919
pip install .
2020

21-
gecko:
21+
chromedriver:
2222
mkdir -p ${CHROMEDRIVER_DIR}
2323
wget -q -P ${CHROMEDRIVER_DIR} "http://chromedriver.storage.googleapis.com/${CHROMEDRIVER_VERSION}/chromedriver_linux64.zip"
2424
unzip ${CHROMEDRIVER_DIR}/chromedriver* -d ${CHROMEDRIVER_DIR}
@@ -28,10 +28,10 @@ test:
2828
pytest
2929

3030
test_e2e:
31-
PATH=$$PWD/geckodriver:$$PATH pytest -m e2e --override-ini="addopts="
31+
PATH=$$PWD/chromedriver:$$PATH pytest -m e2e --override-ini="addopts="
3232

3333
clean:
34-
rm -r build geckodriver
34+
rm -r build chromedriver
3535

3636
lint:
3737
docker run --rm -v /$$(pwd):/apps alpine/flake8 ./

README.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
[![Build Status](https://github.com/ad-m/python-anticaptcha/workflows/Python%20package/badge.svg)](https://github.com/ad-m/python-anticaptcha/actions?workflow=Python+package)
44
[![PyPI](https://img.shields.io/pypi/v/python-anticaptcha.svg)](https://pypi.org/project/python-anticaptcha/)
55
[![Chat](https://badges.gitter.im/python-anticaptcha/Lobby.svg)](https://gitter.im/python-anticaptcha/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link)
6-
[![Python compatibility](https://img.shields.io/pypi/pyversions/python-anticaptcha.svg)](https://github.com/ad-m/python-anticaptcha/blob/master/setup.py)
6+
[![Python compatibility](https://img.shields.io/pypi/pyversions/python-anticaptcha.svg)](https://github.com/ad-m/python-anticaptcha/blob/master/pyproject.toml)
77

8-
Client library for solve captchas with [Anticaptcha.com support](http://getcaptchasolution.com/i1hvnzdymd).
8+
Client library for solving captchas with [Anticaptcha.com support](http://getcaptchasolution.com/i1hvnzdymd).
99
The library requires Python >= 3.9.
1010

1111
The library is cyclically and automatically tested for proper operation. We are constantly making the best efforts for its effective operation.
@@ -22,7 +22,7 @@ pip install python-anticaptcha
2222

2323
## Usage
2424

25-
To use this library do you need [Anticaptcha.com](http://getcaptchasolution.com/p9bwplkicx) API key.
25+
To use this library you need [Anticaptcha.com](http://getcaptchasolution.com/p9bwplkicx) API key.
2626

2727
You can pass the key explicitly or set the `ANTICAPTCHA_API_KEY` environment variable:
2828

@@ -52,12 +52,11 @@ job.join()
5252
print(job.get_solution_response())
5353
```
5454

55-
The full integration example is available in file `examples/recaptcha.py`.
55+
The full integration example is available in file `examples/recaptcha_request.py`.
5656

57-
If you only process few page many times to increase reliability, you can specify
58-
whether the captcha is visible or not. This parameter is not required, as is the
59-
system detects invisible sitekeys automatically, and needs several recursive
60-
measures for automated training and analysis. For provide that pass
57+
If you process the same page many times, to increase reliability you can specify
58+
whether the captcha is visible or not. This parameter is not required, as the
59+
system detects invisible sitekeys automatically. To provide that, pass
6160
`is_invisible` parameter to `NoCaptchaTaskProxylessTask` or `NoCaptchaTask` eg.:
6261

6362
```python
@@ -138,7 +137,7 @@ pip install mitmproxy
138137
mitmweb -p 9190 -b 0.0.0.0 --ignore '.' --socks
139138
```
140139

141-
Next to in your application use something like:
140+
Then in your application use something like:
142141

143142
```python
144143
proxy = Proxy.parse_url("socks5://123.123.123.123:9190")

docs/conf.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# This file does only contain a selection of the most common options. For a
66
# full list see the documentation:
7-
# http://www.sphinx-doc.org/en/stable/config
7+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
88

99
# -- Path setup --------------------------------------------------------------
1010

@@ -21,13 +21,12 @@
2121
# -- Project information -----------------------------------------------------
2222

2323
project = u"python-anticaptcha"
24-
copyright = u"2018, Adam Dobrawy"
24+
copyright = u"2018-2026, Adam Dobrawy"
2525
author = u"Adam Dobrawy"
2626

27-
# The short X.Y version
27+
# Version is managed by setuptools-scm; leave empty for Sphinx
2828
version = u""
29-
# The full version, including alpha/beta/rc tags
30-
release = u"0.2.0"
29+
release = u""
3130

3231

3332
# -- General configuration ---------------------------------------------------
@@ -84,10 +83,9 @@
8483
html_theme = "alabaster"
8584

8685
try:
87-
import sphinx_rtd_theme
86+
import sphinx_rtd_theme # noqa: F401
8887

8988
html_theme = "sphinx_rtd_theme"
90-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
9189
except ImportError:
9290
pass
9391

docs/development.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ The project is open-source.
55

66
Changes are managed through GitHub. Pull requests are particularly welcome.
77

8-
All changes are automatically tested using TravisCI.
8+
All changes are automatically tested using GitHub Actions.
99

1010
New release
1111
-----------
1212

1313
Follow these steps to publish the new release:
1414

1515
* update changelog - use any text editor
16-
* bump version - use ```bumpversion {major,minor,patch}```
17-
* build package - use ```python setup.py sdist bdist_wheel --universal```
18-
* upload release to PyPI - use ```twine upload dist/*```
19-
* push changes to GitHub - ```git push origin && git push --tags```
16+
* tag version - use ``git tag vX.Y.Z`` (versions are managed by ``setuptools-scm``)
17+
* build package - use ``python -m build``
18+
* upload release to PyPI - use ``twine upload dist/*``
19+
* push changes to GitHub - ``git push origin && git push --tags``

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Welcome to python-anticaptcha's documentation!
77
==============================================
88

9-
Client library for solve captchas with `Anticaptcha.com support`_.
9+
Client library for solving captchas with `Anticaptcha.com support`_.
1010
The library requires Python >= 3.9.
1111

1212
The library is cyclically and automatically tested for proper operation. We are constantly making the best efforts for its effective operation.

docs/usage.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Usage
22
=====
33

4-
To use this library do you need `Anticaptcha.com`_ API key.
4+
To use this library you need `Anticaptcha.com`_ API key.
55

66
You can pass the key explicitly or set the ``ANTICAPTCHA_API_KEY`` environment variable:
77

@@ -32,12 +32,11 @@ Example snippet for Recaptcha:
3232
job.join()
3333
print(job.get_solution_response())
3434
35-
The full integration example is available in file ``examples/recaptcha.py``.
35+
The full integration example is available in file ``examples/recaptcha_request.py``.
3636

37-
If you only process few page many times to increase reliability, you can specify
38-
whether the captcha is visible or not. This parameter is not required, as is the
39-
system detects invisible sitekeys automatically, and needs several recursive
40-
measures for automated training and analysis. For provide that pass
37+
If you process the same page many times, to increase reliability you can specify
38+
whether the captcha is visible or not. This parameter is not required, as the
39+
system detects invisible sitekeys automatically. To provide that, pass
4140
``is_invisible`` parameter to ``NoCaptchaTaskProxylessTask`` or ``NoCaptchaTask`` eg.:
4241

4342
.. code:: python
@@ -123,7 +122,7 @@ the possibility of simply launching such a server by:
123122
pip install mitmproxy
124123
mitmweb -p 9190 -b 0.0.0.0 --ignore '.' --socks
125124
126-
Next to in your application use something like:
125+
Then in your application use something like:
127126

128127
.. code:: python
129128

0 commit comments

Comments
 (0)