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

ansible-lint 4.0.0 does not support py35 or py34 #449

Closed
ssbarnea opened this issue Dec 27, 2018 · 4 comments
Closed

ansible-lint 4.0.0 does not support py35 or py34 #449

ssbarnea opened this issue Dec 27, 2018 · 4 comments

Comments

@ssbarnea
Copy link
Member

Issue Type

  • Bug report

Ansible and Ansible Lint details

ansible --version
ansible-lint --version
  • ansible installation method: one of source, pip, OS package
  • ansible-lint installation method: one of source, pip, OS package

Desired Behaviour

ansible-lint should run with any Python version that is currently used on production systems, especially on the Red Hat distributions.

Today I had a big surprise to see that installation failed because current python was py35. CentOS 7 has an optional python34 and python35, python34 being the default python3 interpreter! (installable via epel repository).

Actual Behaviour (Bug report only)

ansible-lint requires Python '>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*' but the running Python is 3.5.2

Example: http://logs.openstack.org/45/627545/1/check/openstack-tox-linters/e290e9d/job-output.txt.gz

So as long CentOS 7 and RHEL 7 are under normal or extended support, ansible-lint should keep compatibility with them, which should not be a big deal.

@SimonHeimberg
Copy link

Support for 3.4 and 3.5 was removed in 03e3f19#diff-380c6a8ebbbce17d55d50ef17d3cf906R64
Maybe this was planned, but I see nothing about this in the release notes.

@awcrosby
Copy link
Contributor

awcrosby commented Jan 1, 2019

The supported versions of ansible allow python35 so ansible-lint should allow that. We don’t test ansible-lint with python34 since ansible doesn’t support it, but we could still allow ansible-lint to be installed. PR #452 allows ansible-lint installation with python35 and python34. It also adds tox testing for python35. @webknjaz any issues with adding this back in? We can do a bug fix release by the end of the week.

@webknjaz
Copy link
Member

webknjaz commented Jan 2, 2019

It's a linting tool. I think there's no reason to make it compatible with all kinds of weird setups, it's supposed to run in CIs after all, which are usually more flexible in terms of what envs one can bring there.

I've set this spec based on envs declared in various configs as tested. Other envs were never supported.
See:

envlist = py27-ansible{19,20,21},py{27,36}-ansible{22,23,24,25,devel},py{27,36}-flake8
&

ansible-lint/.travis.yml

Lines 49 to 71 in f92cc06

- language: python
python: "3.6"
env: TOXENV=py36-ansible22
- language: python
python: "3.6"
env: TOXENV=py36-ansible23
- language: python
python: "3.6"
env: TOXENV=py36-ansible24
- language: python
python: "3.6"
env: TOXENV=py36-ansible25
- language: python
python: "3.6"
env: TOXENV=py36-ansibledevel
- language: python
python: "3.6"
env: TOXENV=py36-flake8

Also, we do not run any testing against py34/py35. I think it would be misleading and wrong to mark something we don't test as supported.

Anyway, modern RHELs have Python 3.6+ available via Red Hat Software Collections: https://developers.redhat.com/blog/2018/08/13/install-python3-rhel/#how-to-use.

As for adding support, I think there shouldn't be anything blocking wrt syntax/features of python interpreters.

@awcrosby
Copy link
Contributor

awcrosby commented Jan 3, 2019

All good points. I will add py35 in our tox testing and allow it in the python_requires. I will hold off adding py34 since we cannot test with the supported ansible versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants