3 ms·
I'd state it as "don't use external dependencies carelessly". It applies to more than just Python. Writing and deploying Python tools is easy if all your depen
by chousuke 5y ago
I'd state it as "don't use external dependencies carelessly". It applies to more than just Python.
Writing and deploying Python tools is easy if all your dependencies come in distro packages.
- p_l 5y agoAnd your code is carefully written to run perfectly fine on both 2.7 and anything between at least 3.4 and 3.10, but might be better to handle as early as 3.0 ... I might have somewhat similar scars to TFA author, I guess...
- disgruntledphd2 5y agoThe only big problems with such an approach are string formatting (f-strings are really, really nice) but also dictionary ordering is massively different between 3.5 and 3.7 Presumably this is known to all the people who've been doing Python for a long time, but it bit me in the ass relatively recently.
- p_l 5y agoPeople who regularly use python probably also have their local environment set up so that it's not a problem to have Python CLI. Problems start when going elsewhere :/
- chousuke 5y agoWell, that depends on what you need to support; even if RHEL7 is the oldest distribution that you need to support, you can still assume you have at least Python 3.6, or python 3.4 for RHEL6 (which is already EOL). There's no obligation to support every potential platform your script might ever need to run on until that need actually arises. You just need to define what platforms you want to support and work within their constraints. Unfortunately for lots of software that platform is essentially "whatever the developer managed to install on their system". Constraining yourself to support a particular platform might mean there will be libraries you will not be able to use even if they might be useful, but that's the tradeoff you make when building software against a stable platform.