Skip to content

Remove six dependency and use Python 3 stdlib urllib#133

Merged
ad-m merged 1 commit intomasterfrom
claude/remove-six-moves-urllib-Spy0q
Mar 8, 2026
Merged

Remove six dependency and use Python 3 stdlib urllib#133
ad-m merged 1 commit intomasterfrom
claude/remove-six-moves-urllib-Spy0q

Conversation

@ad-m
Copy link
Owner

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

This PR removes the dependency on the six compatibility library by replacing all six.moves.urllib imports with their Python 3 standard library equivalents.

Summary

The six library was used to provide Python 2/3 compatibility for urllib imports. Since Python 2 is no longer supported, we can use the native Python 3 urllib module directly.

Changes Made

  • Replaced from six.moves.urllib import parse with from urllib import parse in multiple example files
  • Replaced from six.moves.urllib.parse import quote with from urllib.parse import quote
  • Replaced from six.moves.urllib_parse import urljoin with from urllib.parse import urljoin
  • Removed six from the test dependencies in pyproject.toml

Files Modified

  • examples/sync_funcaptcha_selenium.py
  • examples/sync_funcaptcha_request.py
  • examples/sync_funcaptcha_selenium_callback.py
  • examples/sync_hcaptcha_request_proxy.py
  • examples/sync_recaptcha3_request.py
  • pyproject.toml

This change simplifies the codebase and reduces external dependencies while maintaining full functionality.

https://claude.ai/code/session_01Up7npYZdfHZ4A4fpzFTAo2

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
@ad-m ad-m merged commit 5708d62 into master Mar 8, 2026
8 of 9 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.

2 participants