Skip to content
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

Allow modifying versions #698

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Jun 16, 2023

  1. Allow modifying versions

    Fixes pypa#659
    
    Let me know if something like this seems acceptable to you and I'll add
    tests and documentation.
    
    Some notes:
    - My use case was adding a local version to an existing version
    - I don't think it would make sense to allow replacing parts of the
      release, e.g. "major", since I don't really see a use case. Things
      like `v.replace(major=v.major+1)` are probably just mistakes.
    - This is why I don't allow replacing `epoch` either
    - `Version.__new__(Version)` is a little gross, as is the munging.
      The munging is designed to line up with the corresponding properties,
      so `v.replace(xyz=v.xyz)` always works.
    hauntsaninja committed Jun 16, 2023
    Configuration menu
    Copy the full SHA
    1fbd2d4 View commit details
    Browse the repository at this point in the history