Skip to content

Fix #210: Add classmethod VersionInfo.coerce #211

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

Closed

Conversation

tomschr
Copy link
Member

@tomschr tomschr commented Dec 9, 2019

This PR fixes #210 and contains the following changes:

  • Add VersionInfo.coerce(cls, version:str) -> tuple

Convert an incomplete version string into a semver-compatible VersionInfo object:

  • Tries to detect a "basic" version string (major.minor.patch).
  • If not enough components can be found, missing components are set to zero to obtain a valid semver version.

@tomschr tomschr added Question Unclear or open issue subject for debate Enhancement Not a bug, but increases or improves in value, quality, desirability, or attractiveness labels Dec 9, 2019
@tomschr tomschr requested a review from a team December 9, 2019 20:39
@tomschr tomschr self-assigned this Dec 9, 2019
@tomschr tomschr force-pushed the feature/210-versioninfo.coerce branch from bdf2c12 to 911bf83 Compare December 9, 2019 20:50
Signature:
* VersionInfo.coerce(cls, version:str) -> tuple
  Convert an incomplete version string into a semver-compatible VersionInfo
  object
  - Tries to detect a "basic" version string (``major.minor.patch``).
  - If not enough components can be found, missing components are
    set to zero to obtain a valid semver version.

* Update CHANGELOG.rst
@tomschr tomschr force-pushed the feature/210-versioninfo.coerce branch from 911bf83 to 94232b4 Compare December 12, 2019 08:23
@tomschr
Copy link
Member Author

tomschr commented Jan 19, 2020

Closing in favor of #215

@tomschr tomschr closed this Jan 19, 2020
@tomschr tomschr deleted the feature/210-versioninfo.coerce branch January 19, 2020 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Not a bug, but increases or improves in value, quality, desirability, or attractiveness Question Unclear or open issue subject for debate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use case: Introduce VersionInfo.coerce
1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy