# SyntaxWarnings after System Update ansible 3.9.6, Python 3.8

**URL:** <https://forum.ansible.com/t/syntaxwarnings-after-system-update-ansible-3-9-6-python-3-8/35141>\
**Category:** Ansible Project\
**Created:** [May 10, 2021, 9:55am UTC](https://forum.ansible.com/t/syntaxwarnings-after-system-update-ansible-3-9-6-python-3-8/35141 "2021-05-10T09:55:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matthias\_Grahn](https://avatars.discourse-cdn.com/v4/letter/m/4491bb/32.png) [@Matthias\_Grahn](https://forum.ansible.com/u/Matthias_Grahn)\
**Post date:** [May 10, 2021, 9:55am UTC](https://forum.ansible.com/t/syntaxwarnings-after-system-update-ansible-3-9-6-python-3-8/35141/1 "2021-05-10T09:55:43Z")

</div>

Hi there,

I did an System update recently and now I get this Python warning:  
SyntaxWarning: “is” with a literal. Did you mean “==”?

when I run my playbook. I guess it has to do with conditions like in this task:

- name: Set users authorized keys  
authorized\_key:  
user: “{{item.0.username}}”  
key: “{{item.1}}”  
state: “{{state}}”  
with\_subelements:
- “{{users}}”
- ssh\_authorized\_keys  
when: item.ssh\_authorized\_keys is defined

Is there another way to set these conditions now or hao can I prevent this warnings. (The span the output)

Thanks and regards  
Matthias

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [May 10, 2021, 1:52pm UTC](https://forum.ansible.com/t/syntaxwarnings-after-system-update-ansible-3-9-6-python-3-8/35141/2 "2021-05-10T13:52:30Z")

</div>

It has nothing to do with your playbook. Those warnings come from Python, and indicate that some code in a python library has an incorrect comparison.

---

<div class="post-metadata">

**Author:** ![Lars\_Liedtke](https://avatars.discourse-cdn.com/v4/letter/l/c68b51/32.png) [@Lars\_Liedtke](https://forum.ansible.com/u/Lars_Liedtke)\
**Post date:** [May 10, 2021, 2:42pm UTC](https://forum.ansible.com/t/syntaxwarnings-after-system-update-ansible-3-9-6-python-3-8/35141/3 "2021-05-10T14:42:04Z")

</div>

Hey,

I use a python virtualenv and have the latest ansible 2.9 in my requirements.txt (ansible \>= 2.9, \<2.10); and I am on ansible 2.9.21 with this. I had some problems with older 2.9, which are still in repos like on or Ubuntu or FreeBSD. Maybe you would be able to resolve your problem with trying the same(?)

Cheers

Lars
