2 ms·
I expend considerable effort that I am not obliged to expend to use Python 3 whenever possible. I'm sure that I'm not unique. Right now in my life the major th
by INTPenis 10y ago
I expend considerable effort that I am not obliged to expend to use Python 3 whenever possible. I'm sure that I'm not unique.
Right now in my life the major things stopping me from using python 3 for all the things are.
* Ansible
* Two large in-house developed apps taken over from previous devs
* Debian Wheezy
And as you can guess, at least one of those will hopefully disappear soon.
Other than that I try to use python 3 as much as possible. I know a lot of the workaround for getting pyvenv working on various distros for example.
I also know about a lot of alternative libs like ldap3, dnspython3 and more.
- taneq 10y ago> I expend considerable effort that I am not obliged to expend to use Python 3 whenever possible. Isn't that kind of a bad sign, though? Should it really require 'considerable effort' to use the latest release of a fairly widely adopted language?
- INTPenis 10y agoIt's a good sign in the sense that people want to move forward. But yes, it's a bad sign in the sense that more effort is required than with Python 2. It's getting better all the time though. Most of the effort is because of a local Mac OS development environment, legacy Debian Wheezy systems that are hard to replace, but also legacy Ubuntu systems that are hard to replace.
- cuu508 10y agoOn 1st point, yes, you need Python 2 for Ansible (and Fabric) but it lives nicely side by side with Python 3, so your apps–the not-legacy ones at least–can use Python 3 no problem. I think about Python 2 as Ansible's dependency, not something I have to use because it's there.
- AdamN 10y agoWe use Ansible (system 2.7) but our code is written in 3.5. I'm not sure what you're talking about since never the twain shall meet. It's BAD to use the system Python for any of your internal production code (use a virtualenv!).
- INTPenis 10y agoI do use venv, I have one for each version of ansible. 1.x, 2.x and dev. But what do you mean when you say your system uses 3.5? Yes of course the system python can be 3, or 2 simultaneously but ansible still requires python 2 to run. And I haven't tried this but I'd assume lib ansible can't be used by python 3. Maybe you can confirm.