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

Remove __version__ in mmh3module.cpp #42

Closed
hajimes opened this issue Mar 26, 2023 · 1 comment
Closed

Remove __version__ in mmh3module.cpp #42

hajimes opened this issue Mar 26, 2023 · 1 comment
Assignees

Comments

@hajimes
Copy link
Owner

hajimes commented Mar 26, 2023

I plan to remove the line

PyModule_AddStringConstant(module, "__version__", "3.1.0");

in mmh3module.cpp in the next non-trivial update.

The __version__ constant was introduced in 2.1 (2013-02-25), since it was in vogue back then and the only (iirc) way to get the version number of a module from within a python script.

However, Python 3.8 officially introduced importlib.metadata, which is no longer provisional in Python 3.10. Python 3.7 still needs to pip install importlib-metadata, but it will be in EOL soon. Therefore, there is no need to keep the __version__ constant anymore. Plus, keeping the same info in multiple files is a bad (very bad indeed) engineering practice.

See also
https://stackoverflow.com/a/72168209

I will bump up the version to 4.0.0 then, because the removal breaks backward compatibility, however minor it is.

@hajimes hajimes self-assigned this Mar 26, 2023
@hajimes
Copy link
Owner Author

hajimes commented May 22, 2023

The removal of the constant has been done in version 4.0.0.

@hajimes hajimes closed this as completed May 22, 2023
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

1 participant