Skip to content

Skip PEP 440 range specifications during rewrites #10

Description

@CasperKristiansson

Summary

Detect Python version ranges such as ^3.12, >=3.12,<3.13, or wildcards that are intentionally non-pinned, and skip mutating them.

Why

The action should avoid rewriting broad specifiers into a hard pin. These ranges show user intent (e.g. keeping compatibility across a track) and forcing a patch update could break workflows or requirements files.

What needs to happen

  • Extend discovery to classify PEP 440 range expressions vs. exact pins.
  • Ensure range specs are logged in the run summary but reported as skipped with a clear reason.
  • Document the behavior so users know when to expect a no-op.
  • Add regression tests covering common range syntax in requirements, pyproject, Pipfile, and tox contexts.

References

  • Roadmap item: "Skip non-pinned specs" under hardening.
  • PEP 440 for accepted version range syntax.

Acceptance criteria

  • Ranges remain untouched, while existing pinned detection still works.
  • Change matrix and run outputs explain why ranges were skipped.
  • README (or docs) include a short note describing the new logic.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions