fix: Wrong version in __init__#55
fix: Wrong version in __init__#55smacker merged 3 commits intosrc-d:masterfrom smacker:wrong_version_in_init
Conversation
| @@ -2,4 +2,3 @@ | |||
| # DO NOT CHANGE OR ADD ANYTHING HERE | |||
There was a problem hiding this comment.
I think the changes need to be done in https://github.com/src-d/lookout-sdk/blob/master/_tools/protogen_python.sh#L23
There was a problem hiding this comment.
ohhhh. thanks!
I don't think we should change anything besides generated code from proto when we run protogen.
| @@ -0,0 +1 @@ | |||
| __version__ = "0.2.0" | |||
There was a problem hiding this comment.
It is more common to specify this as a tuple:
__version__ = 0, 2, 0There was a problem hiding this comment.
I also thought that but apparently, it's not true.
Here is example of 4 different VERY common libs all of them use string version:
https://github.com/urllib3/urllib3/blob/1.24.1/src/urllib3/__init__.py#L30
https://github.com/requests/requests/blob/master/requests/__version__.py#L8
https://github.com/chardet/chardet/blob/master/chardet/version.py#L8
https://github.com/zzzeek/sqlalchemy/blob/master/lib/sqlalchemy/__init__.py#L133
Though we can add VERSION variable also as chardet
There was a problem hiding this comment.
LOL you are right https://www.python.org/dev/peps/pep-0396
A good example of poor design... I have to live with it
There was a problem hiding this comment.
For reference, another example of string version can be found in the docs here: https://packaging.python.org/tutorials/packaging-projects/#creating-setup-py
There was a problem hiding this comment.
Wow! The PEP is from 2011! But I have never heard of it!
carlosms
left a comment
There was a problem hiding this comment.
Oh wait, this change needs to be reflected here: https://github.com/src-d/lookout-sdk/blob/master/docs/CONTRIBUTING.md#release-process
|
🤦♂️ I learn something new about this repository every day. Thanks, fixed! |
Use only one source of truth for the version same as any other major library does. Signed-off-by: Maxim Sukharev <max@smacker.ru>
Signed-off-by: Maxim Sukharev <max@smacker.ru>
Signed-off-by: Maxim Sukharev <max@smacker.ru>
Use only one source of truth for the version same as any other major
library does.
As examples of such libs: urllib3, requests, chardet, SQLAlchemy.
Signed-off-by: Maxim Sukharev max@smacker.ru