Skip to content

Drop Python 2, require >= 3.9, modernize codebase#115

Merged
ad-m merged 1 commit intomasterfrom
modernize/drop-python2-update-ci
Mar 7, 2026
Merged

Drop Python 2, require >= 3.9, modernize codebase#115
ad-m merged 1 commit intomasterfrom
modernize/drop-python2-update-ci

Conversation

@ad-m
Copy link
Owner

@ad-m ad-m commented Mar 7, 2026

Summary

  • Drop Python 2 support: remove six dependency, delete compat.py, use stdlib urllib.parse and importlib.metadata directly
  • Fix bugs: RecaptchaV2EnterpriseTask now correctly inherits from its proxyless variant; ImageToTextTask.serialize no longer sends None values; dead CustomCaptchaTask code path removed
  • Modernize Python: super() without args, remove class Foo(object) style, add python_requires=">=3.9"
  • Update CI: actions/checkout@v4, setup-python@v5, Python 3.9–3.14 matrix, fix duplicate make docs step, update e2e to Python 3.12

Test plan

  • Verified import works on Python 3.9, 3.10, 3.11, 3.12, 3.13, 3.14
  • Verified GeeTestTaskProxyless, AntiGateTaskProxyless, RecaptchaV2EnterpriseTask serialize correctly
  • Verified ImageToTextTask omits None fields
  • CI should pass on all matrix versions

🤖 Generated with Claude Code

- Remove `six` dependency and `compat.py` (use stdlib `urllib.parse`)
- Remove `importlib_metadata` fallback (stdlib since 3.8)
- Use `super()` without args (Python 3 style) across all classes
- Remove `(object)` from class definitions
- Fix `RecaptchaV2EnterpriseTask` inheritance (was missing proxyless base)
- Fix `ImageToTextTask.serialize` sending None values instead of omitting
- Remove dead `CustomCaptchaTask` reference in `createTaskSmee`
- Update classifiers to Python 3.9-3.14
- Add `python_requires=">=3.9"` and `long_description_content_type`
- Remove `universal = 1` from bdist_wheel config
- Update CI: actions/checkout@v4, setup-python@v5, Python 3.9-3.14 matrix
- Fix duplicate `make docs` step in pythonpackage.yml
- Update e2e.yml to Python 3.12 and nanasess/setup-chromedriver@v2
- Update tox.ini environments and commands

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ad-m ad-m merged commit ac6f62d into master Mar 7, 2026
0 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant