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

add __version__ #303

Closed
wants to merge 1 commit into from
Closed

Conversation

uncle-lv
Copy link
Contributor

Sometimes we need get the current version.

@uncle-lv
Copy link
Contributor Author

It's for myself. 😛

@greyli
Copy link
Contributor

greyli commented Mar 24, 2024

It is better to use importlib.metadata.version if this project doesn't provide a __version__ variable.

@uncle-lv
Copy link
Contributor Author

It is better to use importlib.metadata.version if this project doesn't provide a __version__ variable.

Yes! I have done it.

@uncle-lv
Copy link
Contributor Author

It's not necessary to merge this pr now.

@sloria
Copy link
Member

sloria commented Mar 25, 2024

__version__ was intentionally removed in #284 to be in line with the best practice of using importlib.metadata.version. the pallets projects have done the same. so closing this for now!

@sloria sloria closed this Mar 25, 2024
@uncle-lv uncle-lv deleted the add-version branch March 30, 2024 13:53
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

Successfully merging this pull request may close these issues.

3 participants