Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python3 support #1031

Merged
merged 6 commits into from Dec 2, 2018

Conversation

Projects
None yet
2 participants
@swalkinshaw
Copy link
Member

commented Nov 25, 2018

This makes Trellis compatible with both Python 2 and 3. To use Python 3 though, Ansible >= 2.5 is required. However, since we already tell people to avoid 2.5.0, let's just say use 2.5.3 at minimum.

@swalkinshaw swalkinshaw referenced this pull request Nov 25, 2018

Merged

Ubuntu 18.04 #992

@fullyint

This comment has been minimized.

Copy link
Member

commented Nov 25, 2018

I haven't reviewed yet. There may be some ideas in the old python-3-compat branch, e.g., in 9e83883

Here are some hastily pasted related notes I had from months ago...

I'll try to make time to review my old PY3 to-do notes and add them here.

@swalkinshaw

This comment has been minimized.

Copy link
Member Author

commented Nov 25, 2018

Oh thanks, either I never knew about or forgot 😳

Looks like those changes are basically split 50/50 between Python on local and remote. This PR is definitely only for Python 3 on local machine.

Most of the changes are similar in concept, but my branch didn't seem to need a lot of them? Keep in mind I didn't test deploys yet.

@swalkinshaw

This comment has been minimized.

Copy link
Member Author

commented Dec 2, 2018

Going to merge this as is. We'll finish Ubuntu 18.04 separately this is useful on its own.

@fullyint feel free to post any other notes you may have.

swalkinshaw added some commits Nov 24, 2018

Update python version requirement
Support both 2 and 3 but check for Ansible version
Update iteritems usage
It no longer exists in Python 3. We can use `items()` which both have
and pipe to `list` in Jinja.
Update logrotate
Old version was using `iteritems()` which doesnt work in Python 3

@swalkinshaw swalkinshaw force-pushed the python3-support branch from 29fbad3 to c67d78b Dec 2, 2018

@swalkinshaw swalkinshaw merged commit d71840a into master Dec 2, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@swalkinshaw swalkinshaw deleted the python3-support branch Dec 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.