From a007f860fc3ac270fbaccafb33e8c666fa51f77e Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 8 Mar 2026 10:30:35 +0000 Subject: [PATCH] Remove six dependency, use stdlib urllib.parse The project requires Python >=3.9, so six (a Python 2/3 compat library) is unnecessary. Replace all six.moves.urllib imports in examples with their stdlib equivalents and remove six from test dependencies. https://claude.ai/code/session_01Up7npYZdfHZ4A4fpzFTAo2 --- examples/sync_funcaptcha_request.py | 2 +- examples/sync_funcaptcha_selenium.py | 4 ++-- examples/sync_funcaptcha_selenium_callback.py | 2 +- examples/sync_hcaptcha_request_proxy.py | 2 +- examples/sync_recaptcha3_request.py | 2 +- pyproject.toml | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/sync_funcaptcha_request.py b/examples/sync_funcaptcha_request.py index 4ebf2b9..c106d89 100644 --- a/examples/sync_funcaptcha_request.py +++ b/examples/sync_funcaptcha_request.py @@ -2,7 +2,7 @@ from os import environ import requests -from six.moves.urllib import parse +from urllib import parse from python_anticaptcha import AnticaptchaClient, FunCaptchaTask diff --git a/examples/sync_funcaptcha_selenium.py b/examples/sync_funcaptcha_selenium.py index 606e827..2fb7524 100644 --- a/examples/sync_funcaptcha_selenium.py +++ b/examples/sync_funcaptcha_selenium.py @@ -3,8 +3,8 @@ from random import choice from selenium.webdriver.common.by import By -from six.moves.urllib import parse -from six.moves.urllib.parse import quote +from urllib import parse +from urllib.parse import quote from python_anticaptcha import AnticaptchaClient, FunCaptchaTask diff --git a/examples/sync_funcaptcha_selenium_callback.py b/examples/sync_funcaptcha_selenium_callback.py index a347d18..9531ce2 100644 --- a/examples/sync_funcaptcha_selenium_callback.py +++ b/examples/sync_funcaptcha_selenium_callback.py @@ -5,7 +5,7 @@ from os import environ from selenium.webdriver.common.by import By -from six.moves.urllib.parse import quote +from urllib.parse import quote from python_anticaptcha import AnticaptchaClient, FunCaptchaProxylessTask diff --git a/examples/sync_hcaptcha_request_proxy.py b/examples/sync_hcaptcha_request_proxy.py index 168146e..c60b992 100644 --- a/examples/sync_hcaptcha_request_proxy.py +++ b/examples/sync_hcaptcha_request_proxy.py @@ -2,7 +2,7 @@ from os import environ import requests -from six.moves.urllib import parse +from urllib import parse from python_anticaptcha import AnticaptchaClient, HCaptchaTask diff --git a/examples/sync_recaptcha3_request.py b/examples/sync_recaptcha3_request.py index a06cac4..e9e7f2d 100644 --- a/examples/sync_recaptcha3_request.py +++ b/examples/sync_recaptcha3_request.py @@ -2,7 +2,7 @@ from os import environ import requests -from six.moves.urllib_parse import urljoin +from urllib.parse import urljoin from python_anticaptcha import AnticaptchaClient, RecaptchaV3TaskProxyless diff --git a/pyproject.toml b/pyproject.toml index 6981df6..77a1775 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,7 @@ Homepage = "https://github.com/ad-m/python-anticaptcha" [project.optional-dependencies] async = ["httpx>=0.24"] -tests = ["pytest", "pytest-asyncio", "httpx>=0.24", "retry", "selenium", "six"] +tests = ["pytest", "pytest-asyncio", "httpx>=0.24", "retry", "selenium"] docs = ["sphinx", "sphinx-rtd-theme"] [tool.setuptools.package-data]