-
Notifications
You must be signed in to change notification settings - Fork 91
Description
This issue proposes to remove the Modest based parser from selectolax, and to keep only the Lexbor based parser as the recommended and supported option.
The project already supports the Lexbor parser (https://github.com/lexbor/lexbor), and the documentation and examples guide users to use the Lexbor based parser as the default choice.
In addition, the Modest project (https://github.com/lexborisov/Modest) clearly suggests that users should move to Lexbor. Its README says that Lexbor is stable, has more features, and is very fast. Because of this, Modest looks like a legacy choice now.
Given all of the above, it seems like a good time to start deprecating Modest support in selectolax, and later to remove it completely.
Proposed plan
-
Start a clear deprecation phase
- Mark all public Modest based parser entry points as deprecated.
- Use the new
@warnings.deprecateddecorator on Python 3.13 and newer. - For older Python versions, use
@deprecated.deprecatedas a fallback, so that users still get a clear warning.
The deprecation message can explicitly recommend switching to the Lexbor based parser.
-
Update documentation and examples
- Remove Modest based examples from the README and docs.
- Clearly state that Lexbor is the only recommended HTML parser backend.
- Mention that Modest support is deprecated and will be removed in a future release.
-
Plan final removal
- After at least one full release with deprecation warnings, remove the Modest based parser code and any related configuration or tests.
- Clean up any remaining references to Modest in the codebase and documentation.
This change would simplify the codebase, reduce maintenance, and align selectolax with the guidance from the Modest project itself, while giving users a clear and gradual path to migrate to the Lexbor based parser.