Closed GoogleCodeExporter closed 9 years ago
Mmmm are you really sure the most used convention is __version__ and not
__ver__ (I seem to recall the contrary)?
Not that it really matters anyway because as you also point out it is too late
as the change would not be retro compatible (__ver__ has been there for years
now).
Original comment by g.rodola
on 19 Jan 2014 at 11:42
...also I don't think adding a __version__ alias would add any value. It would
only cause more confusion.
I'm going to close this out as rejected.
Original comment by g.rodola
on 19 Jan 2014 at 11:49
Ok. Let's check.
>>> import sphinx
>>> sphinx.__version__
'1.1.3'
>>> import pip
>>> pip.__version__
'1.4.1'
Your turn. =)
Original comment by techtonik@gmail.com
on 19 Jan 2014 at 12:29
Ok, but as I said, it's too late: checking for version at runtime only works if
both old and new versions of the module you depend from provide the same API.
I see little value in adding __version__ in 1.3.1 but not having it in <= 1.3.0.
Whoever wants to take decisions based on pyftpdlib version will likely grep for
"__ver", and eventually find it and use it, no matter what the recommended
convention is. I see your point though: I'm only talking about practical
reasons here.
Original comment by g.rodola
on 19 Jan 2014 at 12:43
There is a lot of value if your package requires pyftpdlib > 1.3.0, so I am for
adding __version__ field and provide __ver__ alias for backward compatibility.
__version__ is not in PEP probably, but I use it for automation. Here you can
see automated setup.py generation - https://bitbucket.org/techtonik/astdump/
and it is only a proof of concept, which can be extended to automatic package
generation not only for PyPI, but also for Ubuntu and other distributions.
Original comment by techtonik@gmail.com
on 19 Jan 2014 at 12:52
Closing this out as won't fix.
Original comment by g.rodola
on 11 Apr 2014 at 9:24
But why? It doesn't break anything and add consistency with other packages.
Original comment by techtonik@gmail.com
on 12 Apr 2014 at 2:00
I explained why in comment #4.
Original comment by g.rodola
on 12 Apr 2014 at 9:14
> it's too late: checking for version at runtime only works if both old and new
> versions of the module you depend from provide the same API.
Yes, my requirement.txt contains pyftpdlib > x.x.x, so it is never too late to
add new API that doesn't break anything existing.
> hoever wants to take decisions based on pyftpdlib version will likely grep
> for "__ver"
1% likely is a bad user experience design, and it is not practical at all for
tools that need to run checks on code that is compatible with common human
conventions.
Original comment by techtonik@gmail.com
on 14 Apr 2014 at 9:25
I don't have an opinion either way on this (I've not needed to read the version
number directly), but a quick google throws up
http://stackoverflow.com/questions/458550/standard-way-to-embed-version-into-pyt
hon-package which seems to confirm that there's common conventions of using
__version__, but no 'proper standard'.
6 of one, half a dozen of the other ;-)
Original comment by gc...@loowis.durge.org
on 14 Apr 2014 at 11:20
Upvoted SO. =)
Original comment by techtonik@gmail.com
on 14 Apr 2014 at 11:28
Original issue reported on code.google.com by
techtonik@gmail.com
on 19 Jan 2014 at 11:27