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 - Intersect filter change in behavior (docs + code) #26494
Labels
affects_2.3
This issue/PR affects Ansible v2.3
bug
This issue/PR relates to a bug.
c:plugins/filter
python3
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
Comments
evrardjp
changed the title
Intersect filter documentation is confusing
Intersect filter documentation is confusing and the filter works differently under python3
Jul 6, 2017
evrardjp
changed the title
Intersect filter documentation is confusing and the filter works differently under python3
python3 - Intersect filter change in behavior (documentation is confusing and the filter works differently under python3)
Jul 6, 2017
evrardjp
changed the title
python3 - Intersect filter change in behavior (documentation is confusing and the filter works differently under python3)
python3 - Intersect filter change in behavior (docs + code)
Jul 6, 2017
ansibot
added
affects_2.3
This issue/PR affects Ansible v2.3
bug_report
c:plugins/filter
needs_triage
Needs a first human triage before being processed.
python3
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
labels
Jul 6, 2017
nitzmahone
removed
the
needs_triage
Needs a first human triage before being processed.
label
Jul 7, 2017
It appears to me that the same happens for the difference filter. |
Probably all math ones? |
abadger
added a commit
to abadger/ansible
that referenced
this issue
Sep 10, 2017
The set theory filters need to use lists rather than generators on python3. Also add unit tests for most of the mathstuff filters Fixes ansible#26494
abadger
added a commit
that referenced
this issue
Sep 10, 2017
The set theory filters need to use lists rather than generators on python3. Also add unit tests for most of the mathstuff filters Fixes #26494
Akasurde
pushed a commit
to Akasurde/ansible
that referenced
this issue
Sep 10, 2017
The set theory filters need to use lists rather than generators on python3. Also add unit tests for most of the mathstuff filters Fixes ansible#26494
prasadkatti
pushed a commit
to prasadkatti/ansible
that referenced
this issue
Oct 1, 2017
The set theory filters need to use lists rather than generators on python3. Also add unit tests for most of the mathstuff filters Fixes ansible#26494
BondAnthony
pushed a commit
to BondAnthony/ansible
that referenced
this issue
Oct 5, 2017
The set theory filters need to use lists rather than generators on python3. Also add unit tests for most of the mathstuff filters Fixes ansible#26494
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
affects_2.3
This issue/PR affects Ansible v2.3
bug
This issue/PR relates to a bug.
c:plugins/filter
python3
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
ISSUE TYPE
COMPONENT NAME
intersect filter
ANSIBLE VERSION
CONFIGURATION
Nothing special
OS / ENVIRONMENT
I am currently running ArchLinux, but same behavior caught with Ubuntu Xenial.
Different behavior with python3 and python2.
SUMMARY
First, the documentation about filters says (1)
All these functions return a unique set from sets or lists.
You can read, on the same page,
To get the intersection of 2 lists (unique list of all items in both)
.I don't know if I should expect a set or a list if I intersect with a set. There is an expectation issue here.
However, fun stuff happens when you realize it doesn't behave the same way under python2 and python3.
I get an intersection under python2 and a warning (it doesn't work) in python3.
STEPS TO REPRODUCE
Here is my inventory:
EXPECTED RESULTS
Output: "localhost"
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: