seleniumbase / SeleniumBase

📊 Blazing fast Python framework for web crawling, scraping, testing, and reporting. Supports pytest. Stealth abilities: UC Mode and CDP Mode.
https://seleniumbase.io
MIT License
5.44k stars 983 forks source link

Retrofit SeleniumBase with `pyproject.toml` structure #3155

Closed mdmintz closed 2 months ago

mdmintz commented 2 months ago

Retrofit SeleniumBase with pyproject.toml structure.

Lots of the "cool kids" have already switched over to using pyproject.toml. Now, I'm forced to switch over due to deprecation warnings when calling "pip install -e .":

DEPRECATION: Legacy editable install of <PACKAGE> from <PACKAGE_PATH> (setup.py develop) is deprecated. pip 25.0 will enforce this behaviour change. A possible replacement is to add a pyproject.toml or enable --use-pep517, and use setuptools >= 64. If the resulting installation is not behaving as expected, try using --config-settings editable_mode=compat. Please consult the setuptools documentation for more information. Discussion can be found at https://github.com/pypa/pip/issues/11457

Python.org has instructions: https://packaging.python.org/en/latest/guides/writing-pyproject-toml/

Thankfully, pyproject.toml has a [project.dynamic] field that can auto-populate data from setup.py for the following items: ['version', 'description', 'readme', 'requires-python', 'license', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']. This means that I can reuse a lot of my existing setup.py definitions when creating the pyproject.toml file.

mdmintz commented 2 months ago

This was resolved in 4.31.0 - https://github.com/seleniumbase/SeleniumBase/releases/tag/v4.31.0