-
Describe the bug
But after upgrading the package to version 5.1.1 this attribute has disappeared:
Expected behavior Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
This attribute was never documented as a public attribute that applications can use. I have made some refactorings lately in the package and I don't really need it anymore. |
Beta Was this translation helpful? Give feedback.
-
Thank you for your answer. Reading the PEP I have realized that this way of specifying the version became obsolete a few months ago (https://www.python.org/dev/peps/pep-0396/#pep-rejection). And that a good way to check the version is using for example the For Python versions >=3.8:
And for previous Python versions:
|
Beta Was this translation helpful? Give feedback.
-
Oh, I didn't know that one! I have always used pkg_resources as follows: >>> import pkg_resources
>>> pkg_resources.get_distribution("flask_socketio").version
'5.1.1' |
Beta Was this translation helpful? Give feedback.
Thank you for your answer. Reading the PEP I have realized that this way of specifying the version became obsolete a few months ago (https://www.python.org/dev/peps/pep-0396/#pep-rejection).
And that a good way to check the version is using for example the
importlib
library. I write here the way to check the version, for future users:For Python versions >=3.8:
And for previous Python versions: