salt icon indicating copy to clipboard operation
salt copied to clipboard

Python 3 Support

Open ryan-lane opened this issue 12 years ago • 54 comments

Salt is currently not compatible with python 3. Ubuntu trusty and above default to using python 3, so it would be really nice to be able to run salt in the default python version.

ryan-lane avatar Apr 14 '14 23:04 ryan-lane

I believe that the only show stopper towards Py3 is m2crypto which is still a hard dependency for Salt.

On April 15, 2014 12:29:00 AM GMT+01:00, ryan-lane [email protected] wrote:

Salt is currently not compatible with python 3. Ubuntu trusty and above default to using python 3, so it would be really nice to be able to run salt in the default python version.


Reply to this email directly or view it on GitHub: https://github.com/saltstack/salt/issues/11995

Pedro Algarvio @ Phone

s0undt3ch avatar Apr 14 '14 23:04 s0undt3ch

Any milestone associated with fixing this?

ryan-lane avatar Apr 15 '14 01:04 ryan-lane

Looking through pycrypto on RHEL6, what is keeping us from just using pycrypto and dropping m2crypto?

It looks like someone was trying to include python3 support in the SWIG stuff for m2crypto, but abandoned it about a year ago when he failed to gain any traction upstream.

gtmanfred avatar Apr 15 '14 03:04 gtmanfred

This is best answered by @thatch45

s0undt3ch avatar Apr 15 '14 07:04 s0undt3ch

Related to #7413

cachedout avatar Apr 15 '14 20:04 cachedout

That's the one I couldn't remember(and the phone did not help). Thanks @cachedout!

s0undt3ch avatar Apr 15 '14 22:04 s0undt3ch

We just merged some code that deprecates the need for m2crypto. So we can start on full py3 support

thatch45 avatar May 06 '15 03:05 thatch45

Any progress regarding this Issue? Python 3.5 was released yesterday and it will be the default in Ubuntu 16.04 LTS.

tebanep avatar Sep 14 '15 20:09 tebanep

Several progresses, including dropping m2crypto, however, there's still work to be done. This is a massive task.

s0undt3ch avatar Sep 14 '15 20:09 s0undt3ch

Please make Salt working with Python 3.5. Python 3 came out in 2008! C'moooon

kamikaze avatar Jan 12 '16 15:01 kamikaze

...And only a couple of months ago we were able to drop m2crypto...

Believe me, all of us want Salt fully running under Py3, but have you looked at the current size of Salt's source?

... Its an ongoing daunting task, but its not forgotten...

One just needs to keep believing and submitting PRs...

s0undt3ch avatar Jan 12 '16 16:01 s0undt3ch

@s0undt3ch Is there any list of tasks related to Python 3 support? I think that this effort would benefit from having an easy to find set of issues/updates that would move the progress forward toward a 3.x supported release.

blarghmatey avatar Feb 01 '16 14:02 blarghmatey

Full internal Unicode support, without breaking py2 compat. And I'm sure quite a few modules would need some syntax updates, ie, .iteritems() usage, for example.

But honestly, try to start a master in py3 and fix as you go along... Without breaking py2 compact....

Allowing the master to run in py3 will give us some milieage to this task. Then the minion, etc...

s0undt3ch avatar Feb 01 '16 15:02 s0undt3ch

+1. Ubuntu 16.04 LTS installs Python 3 by default.

deepakhj avatar Apr 26 '16 19:04 deepakhj

+1 python library cryptography #30287 OpenStack have developed a library, anyone "platform" support openstack will need to use this crypto library I suspect. e.g. It's standard with Solaris 11, when Solaris provided support for OpenStack & Solaris Zones.

It would be nice to see Jenkins do a Python 3 Lint as a starting place

damon-atkins avatar Apr 26 '16 19:04 damon-atkins

Just as an update here, we have made great progress, but this is complicated. Once we can get tests passing on #32366 then we will be able to run remote execution, pillar and states on python 3, this will signify enough to start trying to run the full test suite on python3

As for lint, our linting currently looks for python3 issues as well as python 2 issues and we test that salt will install on python3, hence verifying that there are not syntax errors on python3.

thatch45 avatar Apr 26 '16 19:04 thatch45

Ok, as an update here, I got the tests RUNNING on python3, we have a little over 300 tests out of well over 5000 that will need to be fixed based on our initial test runs, once #32929 is merged than we will post where the py3 jenkins tests are running

thatch45 avatar Apr 28 '16 21:04 thatch45

@thatch45 were are you going to post py3 jenkins tests ?

DanyC97 avatar Apr 29 '16 09:04 DanyC97

I will post them here as well as well as on salt-users

thatch45 avatar Apr 29 '16 15:04 thatch45

Sorry this took so long, but there was a lot that needed to get updated in the test suite to be able to handle it. The tests are ALMOST running, but we still have a few hicpus. You can watch as we get them closer and closer here: http://166.78.178.63:8080/job/branch_tests/job/develop/job/salt-linode-py3-arch/ http://166.78.178.63:8080/job/branch_tests/job/develop/job/salt-linode-py3-cent7/

We THINK they should be running later today, as we are down to what is just adding some deps to the test environment

thatch45 avatar May 12 '16 16:05 thatch45