Skip to content

Rename VersionInfo to Version #305

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
tlaferriere opened this issue Oct 29, 2020 · 1 comment
Closed

Rename VersionInfo to Version #305

tlaferriere opened this issue Oct 29, 2020 · 1 comment
Assignees

Comments

@tlaferriere
Copy link
Contributor

tlaferriere commented Oct 29, 2020

So there are my two suggestions for this issue:

  • Overload the constructor with __init__(self, version: str)
  • Rename VersionInfo to Version

Originally posted by @tlaferriere in #258 (comment)

Just addressing this explicitly

tlaferriere added a commit to tlaferriere/python-semver that referenced this issue Oct 29, 2020
Add documentation for Version rename
@tomschr
Copy link
Member

tomschr commented Oct 30, 2020

Thanks for opening this. 👍

I think, this issue is closely related to #303. In this issue, I present the idea of an (overloaded) semver.version function which acts as a wrapper for all different types. So I guess, we have a third option here which we should discuss. 😉

Regardless of the constructor/initializer or the semver.version function, renaming VersionInfo to Version is okay to me as long as we have an alias (something like VersionInfo = Version which also outputs a deprecation warning when used).

@tomschr tomschr closed this as completed in b0f854d Nov 1, 2020
@tomschr tomschr self-assigned this Dec 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants