Skip to content

Deprecate and remove Modest based parser in favor of Lexbor #194

@pygarap

Description

@pygarap

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

  1. Start a clear deprecation phase

    • Mark all public Modest based parser entry points as deprecated.
    • Use the new @warnings.deprecated decorator on Python 3.13 and newer.
    • For older Python versions, use @deprecated.deprecated as a fallback, so that users still get a clear warning.

    The deprecation message can explicitly recommend switching to the Lexbor based parser.

  2. 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.
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions