Skip to content

Add Python 3.12+ support with ensure_setuptools #2205

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ozanayrikan
Copy link

Changes:

  • Updated ensure_setuptools in patcher.py to handle the missing distutils.version.LooseVersion in Python 3.12+, where distutils is removed, requiring setuptools.
    • Added a logger.warning to alert users about the missing LooseVersion and Python 3.13’s lack of distutils.
    • Raised a single RuntimeError with clear instructions to run pip install setuptools and a note suggesting Python 3.11 for native distutils support.
    • Fixed NameError by making LooseVersion global with global LooseVersion.

Why:

  • Encountered errors in Python 3.13 due to distutils removal, breaking LooseVersion imports in undetected_chromedriver. Users needed clear guidance to install setuptools.

  • Fixes scrap_data.py (web scraper) using undetected_chromedriver on Python 3.13 (Windows, June 7, 2025, 9:11 PM +03).

Added Python 3.12+ support in ensure_setuptools with a warning and single RuntimeError for missing setuptools, prompting manual installation. Fixed LooseVersion NameError via global import.
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