This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20:57 <ionelmc> for #1: brittle parsing, could start failing if someone starts adding stuff without knowing what's in setup.py | |
20:58 <ionelmc> for #2: pretty robust, assuming you're always using a separate version.py file | |
20:58 <qwcode> Ivo might have an opinion on a winner | |
20:59 <Ivo> what what | |
20:59 <Ivo> oh god, yeah | |
20:59 <Ivo> there should be one way to do thihngs | |
20:59 <Ivo> not 7 | |
20:59 <qwcode> regarding the version section in the PUG offering too many solutions, but no winner | |
20:59 <ionelmc> for #3: regex could fail later, eg: someone changes from single to double quotes or thinks it's a great idea to create the string with % or .format() | |
20:59 <Ivo> or 6 | |
21:00 <ionelmc> for #4: pkg_resources not available, package not properly installed, all sorts of unpredictable failures | |
21:01 <ionelmc> for #5: additional unreliable process, someone forgets to bump versoin in both files - now you have a release on pypi with 2 versions | |
21:01 <ionelmc> for #6: people always import stuff in __init__.py. always. you can't tell them not to. | |
21:02 <ionelmc> it's just to convenient | |
21:02 <ionelmc> :) | |
21:02 <ionelmc> now | |
21:02 <ionelmc> which of those is worst ? | |
21:02 <Ivo> #6 isnt telling them not to, its telling them what happens when they do | |
21:03 <ionelmc> if you give people guns bullets you'll have bulletholes | |
21:03 <ionelmc> s/bullets// | |
21:03 <ionelmc> i think #6 is bad cause it requires too much discipline |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think #3 (regex thing) is the best option. Any other objections besides "it could fail later"? That's a pretty weak argument against it, considering it will fail during sdist, not installation.
Also, link for context https://python-packaging-user-guide.readthedocs.org/en/latest/tutorial.html#version