2020-05-09 21:09:38 |
Edward Vielmetti |
bug |
|
|
added bug |
2020-05-09 21:10:44 |
Edward Vielmetti |
bug task added |
|
ansible (Ubuntu) |
|
2020-05-13 17:41:02 |
Launchpad Janitor |
ansible (Ubuntu): status |
New |
Confirmed |
|
2020-05-13 17:41:02 |
Launchpad Janitor |
python-jmespath (Ubuntu): status |
New |
Confirmed |
|
2020-05-13 17:48:02 |
Antti Palsola |
bug |
|
|
added subscriber Antti Palsola |
2020-05-16 15:40:00 |
Kai Kasurinen |
bug |
|
|
added subscriber Kai Kasurinen |
2020-05-16 15:40:53 |
Kai Kasurinen |
bug watch added |
|
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=953534 |
|
2020-05-16 15:40:53 |
Kai Kasurinen |
bug task added |
|
python-jmespath (Debian) |
|
2020-05-16 15:41:06 |
Kai Kasurinen |
ansible (Ubuntu): status |
Confirmed |
Invalid |
|
2020-05-16 15:42:51 |
Kai Kasurinen |
python-jmespath (Ubuntu): status |
Confirmed |
Fix Released |
|
2020-05-16 17:48:31 |
Bug Watch Updater |
python-jmespath (Debian): status |
Unknown |
Fix Released |
|
2021-10-05 18:32:52 |
Eric Desrochers |
nominated for series |
|
Ubuntu Focal |
|
2021-10-05 18:32:52 |
Eric Desrochers |
bug task added |
|
ansible (Ubuntu Focal) |
|
2021-10-05 18:32:52 |
Eric Desrochers |
bug task added |
|
python-jmespath (Ubuntu Focal) |
|
2021-10-05 18:32:52 |
Eric Desrochers |
nominated for series |
|
Ubuntu Impish |
|
2021-10-05 18:32:52 |
Eric Desrochers |
bug task added |
|
ansible (Ubuntu Impish) |
|
2021-10-05 18:32:52 |
Eric Desrochers |
bug task added |
|
python-jmespath (Ubuntu Impish) |
|
2021-10-05 18:32:52 |
Eric Desrochers |
nominated for series |
|
Ubuntu Bionic |
|
2021-10-05 18:32:52 |
Eric Desrochers |
bug task added |
|
ansible (Ubuntu Bionic) |
|
2021-10-05 18:32:52 |
Eric Desrochers |
bug task added |
|
python-jmespath (Ubuntu Bionic) |
|
2021-10-05 18:32:52 |
Eric Desrochers |
nominated for series |
|
Ubuntu Hirsute |
|
2021-10-05 18:32:52 |
Eric Desrochers |
bug task added |
|
ansible (Ubuntu Hirsute) |
|
2021-10-05 18:32:52 |
Eric Desrochers |
bug task added |
|
python-jmespath (Ubuntu Hirsute) |
|
2021-10-05 18:33:05 |
Eric Desrochers |
python-jmespath (Ubuntu Hirsute): status |
New |
Fix Released |
|
2021-10-05 18:49:31 |
Eric Desrochers |
description |
As reported upstream
https://github.com/jmespath/jmespath.py/issues/201
Problems installing jmespath in Ubuntu 20.04 LTS
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
Fixed upstream in https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
Impact: this causes applications like Ansible that have dependencies on python-jmespath to send out warnings. Caused by language changes in Python 3.8.
System is Ubuntu 20.04 LTS on a Pi 4.
emv@pinnatus:~$ apt-cache policy python3-jmespath
python3-jmespath:
Installed: 0.9.4-2
Candidate: 0.9.4-2
Version table:
*** 0.9.4-2 500
500 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 Packages
100 /var/lib/dpkg/status |
[IMPACT]
[TEST CASE]
** Scenario #1 **
This could be reproduced outside python-jmespath as follows (a little script I have written to compare result between py2 and py3 :
# reproducer_test.py
----
def reproducer(x,y):
if x is 0 or x is 1:
return y is True or y is False
elif y is 0 or y is 1:
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
$ python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
False
False
With the fix in a small scale (Again, using my reproducer_test.py):
def reproducer(x,y):
# if x is 0 or x is 1:
if type(x) is int and (x == 0 or x == 1):
return y is True or y is False
# elif y is 0 or y is 1:
elif type(y) is int and (y == 0 or y == 1):
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
# python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
False
False
[WHERE PROBLEM COULD OCCURS]
[OTHER INFORMATIONS]
As reported upstream
https://github.com/jmespath/jmespath.py/issues/201
Problems installing jmespath in Ubuntu 20.04 LTS
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
Fixed upstream in https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
Impact: this causes applications like Ansible that have dependencies on python-jmespath to send out warnings. Caused by language changes in Python 3.8.
System is Ubuntu 20.04 LTS on a Pi 4.
emv@pinnatus:~$ apt-cache policy python3-jmespath
python3-jmespath:
Installed: 0.9.4-2
Candidate: 0.9.4-2
Version table:
*** 0.9.4-2 500
500 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 Packages
100 /var/lib/dpkg/status |
|
2021-10-05 18:50:24 |
Eric Desrochers |
description |
[IMPACT]
[TEST CASE]
** Scenario #1 **
This could be reproduced outside python-jmespath as follows (a little script I have written to compare result between py2 and py3 :
# reproducer_test.py
----
def reproducer(x,y):
if x is 0 or x is 1:
return y is True or y is False
elif y is 0 or y is 1:
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
$ python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
False
False
With the fix in a small scale (Again, using my reproducer_test.py):
def reproducer(x,y):
# if x is 0 or x is 1:
if type(x) is int and (x == 0 or x == 1):
return y is True or y is False
# elif y is 0 or y is 1:
elif type(y) is int and (y == 0 or y == 1):
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
# python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
False
False
[WHERE PROBLEM COULD OCCURS]
[OTHER INFORMATIONS]
As reported upstream
https://github.com/jmespath/jmespath.py/issues/201
Problems installing jmespath in Ubuntu 20.04 LTS
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
Fixed upstream in https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
Impact: this causes applications like Ansible that have dependencies on python-jmespath to send out warnings. Caused by language changes in Python 3.8.
System is Ubuntu 20.04 LTS on a Pi 4.
emv@pinnatus:~$ apt-cache policy python3-jmespath
python3-jmespath:
Installed: 0.9.4-2
Candidate: 0.9.4-2
Version table:
*** 0.9.4-2 500
500 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 Packages
100 /var/lib/dpkg/status |
[IMPACT]
[TEST CASE]
** Scenario #1 **
This could be reproduced outside python-jmespath as follows (a little script I have written to compare result between py2 and py3 :
# reproducer_test.py
----
def reproducer(x,y):
if x is 0 or x is 1:
return y is True or y is False
elif y is 0 or y is 1:
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
$ python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
False
False
With the fix in a small scale (Again, using my reproducer_test.py):
# reproducer_test.py
----
def reproducer(x,y):
# if x is 0 or x is 1:
if type(x) is int and (x == 0 or x == 1):
return y is True or y is False
# elif y is 0 or y is 1:
elif type(y) is int and (y == 0 or y == 1):
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
# python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
False
False
[WHERE PROBLEM COULD OCCURS]
[OTHER INFORMATIONS]
As reported upstream
https://github.com/jmespath/jmespath.py/issues/201
Problems installing jmespath in Ubuntu 20.04 LTS
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
Fixed upstream in https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
Impact: this causes applications like Ansible that have dependencies on python-jmespath to send out warnings. Caused by language changes in Python 3.8.
System is Ubuntu 20.04 LTS on a Pi 4.
emv@pinnatus:~$ apt-cache policy python3-jmespath
python3-jmespath:
Installed: 0.9.4-2
Candidate: 0.9.4-2
Version table:
*** 0.9.4-2 500
500 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 Packages
100 /var/lib/dpkg/status |
|
2021-10-05 18:52:25 |
Eric Desrochers |
description |
[IMPACT]
[TEST CASE]
** Scenario #1 **
This could be reproduced outside python-jmespath as follows (a little script I have written to compare result between py2 and py3 :
# reproducer_test.py
----
def reproducer(x,y):
if x is 0 or x is 1:
return y is True or y is False
elif y is 0 or y is 1:
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
$ python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
False
False
With the fix in a small scale (Again, using my reproducer_test.py):
# reproducer_test.py
----
def reproducer(x,y):
# if x is 0 or x is 1:
if type(x) is int and (x == 0 or x == 1):
return y is True or y is False
# elif y is 0 or y is 1:
elif type(y) is int and (y == 0 or y == 1):
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
# python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
False
False
[WHERE PROBLEM COULD OCCURS]
[OTHER INFORMATIONS]
As reported upstream
https://github.com/jmespath/jmespath.py/issues/201
Problems installing jmespath in Ubuntu 20.04 LTS
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
Fixed upstream in https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
Impact: this causes applications like Ansible that have dependencies on python-jmespath to send out warnings. Caused by language changes in Python 3.8.
System is Ubuntu 20.04 LTS on a Pi 4.
emv@pinnatus:~$ apt-cache policy python3-jmespath
python3-jmespath:
Installed: 0.9.4-2
Candidate: 0.9.4-2
Version table:
*** 0.9.4-2 500
500 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 Packages
100 /var/lib/dpkg/status |
[IMPACT]
[TEST CASE]
** Scenario #1 **
This could be reproduced outside python-jmespath as follows (a little script I have written to compare result between py2 and py3 :
# reproducer_test.py
----
def reproducer(x,y):
if x is 0 or x is 1:
return y is True or y is False
elif y is 0 or y is 1:
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
$ python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
False
False
With the fix in a small scale (Again, using my reproducer_test.py):
# reproducer_test.py
----
def reproducer(x,y):
# if x is 0 or x is 1:
if type(x) is int and (x == 0 or x == 1):
return y is True or y is False
# elif y is 0 or y is 1:
elif type(y) is int and (y == 0 or y == 1):
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
# python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
False
False
The above proves that it maintains compatibility in py2 while fixing the "SyntaxWarning "in py3.
[WHERE PROBLEM COULD OCCURS]
[OTHER INFORMATIONS]
As reported upstream
https://github.com/jmespath/jmespath.py/issues/201
Problems installing jmespath in Ubuntu 20.04 LTS
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
Fixed upstream in https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
Impact: this causes applications like Ansible that have dependencies on python-jmespath to send out warnings. Caused by language changes in Python 3.8.
System is Ubuntu 20.04 LTS on a Pi 4.
emv@pinnatus:~$ apt-cache policy python3-jmespath
python3-jmespath:
Installed: 0.9.4-2
Candidate: 0.9.4-2
Version table:
*** 0.9.4-2 500
500 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 Packages
100 /var/lib/dpkg/status |
|
2021-10-05 18:52:53 |
Eric Desrochers |
tags |
|
seg sts |
|
2021-10-05 18:53:13 |
Eric Desrochers |
python-jmespath (Ubuntu Focal): status |
New |
Confirmed |
|
2021-10-05 18:53:25 |
Eric Desrochers |
python-jmespath (Ubuntu Bionic): status |
New |
Confirmed |
|
2021-10-05 18:54:58 |
Eric Desrochers |
description |
[IMPACT]
[TEST CASE]
** Scenario #1 **
This could be reproduced outside python-jmespath as follows (a little script I have written to compare result between py2 and py3 :
# reproducer_test.py
----
def reproducer(x,y):
if x is 0 or x is 1:
return y is True or y is False
elif y is 0 or y is 1:
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
$ python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
False
False
With the fix in a small scale (Again, using my reproducer_test.py):
# reproducer_test.py
----
def reproducer(x,y):
# if x is 0 or x is 1:
if type(x) is int and (x == 0 or x == 1):
return y is True or y is False
# elif y is 0 or y is 1:
elif type(y) is int and (y == 0 or y == 1):
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
# python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
False
False
The above proves that it maintains compatibility in py2 while fixing the "SyntaxWarning "in py3.
[WHERE PROBLEM COULD OCCURS]
[OTHER INFORMATIONS]
As reported upstream
https://github.com/jmespath/jmespath.py/issues/201
Problems installing jmespath in Ubuntu 20.04 LTS
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
Fixed upstream in https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
Impact: this causes applications like Ansible that have dependencies on python-jmespath to send out warnings. Caused by language changes in Python 3.8.
System is Ubuntu 20.04 LTS on a Pi 4.
emv@pinnatus:~$ apt-cache policy python3-jmespath
python3-jmespath:
Installed: 0.9.4-2
Candidate: 0.9.4-2
Version table:
*** 0.9.4-2 500
500 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 Packages
100 /var/lib/dpkg/status |
[IMPACT]
[TEST CASE]
** Scenario #1 **
This could be reproduced outside python-jmespath as follows (a little script I have written to compare result between py2 and py3 :
# reproducer_test.py
----
def reproducer(x,y):
if x is 0 or x is 1:
return y is True or y is False
elif y is 0 or y is 1:
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
$ python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
False
False
With the fix in a small scale (Again, using my reproducer_test.py):
# reproducer_test.py
----
def reproducer(x,y):
# if x is 0 or x is 1:
if type(x) is int and (x == 0 or x == 1):
return y is True or y is False
# elif y is 0 or y is 1:
elif type(y) is int and (y == 0 or y == 1):
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
# python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
False
False
The above proves that it maintains compatibility in py2 while fixing the "SyntaxWarning "in py3.
[WHERE PROBLEM COULD OCCURS]
[OTHER INFORMATIONS]
Upstream issue:
https://github.com/jmespath/jmespath.py/issues/187
Upstream commit:
https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
[ORIGINAL DESCRIPTIONS]
As reported upstream
https://github.com/jmespath/jmespath.py/issues/201
Problems installing jmespath in Ubuntu 20.04 LTS
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
Fixed upstream in https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
Impact: this causes applications like Ansible that have dependencies on python-jmespath to send out warnings. Caused by language changes in Python 3.8.
System is Ubuntu 20.04 LTS on a Pi 4.
emv@pinnatus:~$ apt-cache policy python3-jmespath
python3-jmespath:
Installed: 0.9.4-2
Candidate: 0.9.4-2
Version table:
*** 0.9.4-2 500
500 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 Packages
100 /var/lib/dpkg/status |
|
2021-10-05 18:57:01 |
Eric Desrochers |
description |
[IMPACT]
[TEST CASE]
** Scenario #1 **
This could be reproduced outside python-jmespath as follows (a little script I have written to compare result between py2 and py3 :
# reproducer_test.py
----
def reproducer(x,y):
if x is 0 or x is 1:
return y is True or y is False
elif y is 0 or y is 1:
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
$ python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
False
False
With the fix in a small scale (Again, using my reproducer_test.py):
# reproducer_test.py
----
def reproducer(x,y):
# if x is 0 or x is 1:
if type(x) is int and (x == 0 or x == 1):
return y is True or y is False
# elif y is 0 or y is 1:
elif type(y) is int and (y == 0 or y == 1):
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
# python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
False
False
The above proves that it maintains compatibility in py2 while fixing the "SyntaxWarning "in py3.
[WHERE PROBLEM COULD OCCURS]
[OTHER INFORMATIONS]
Upstream issue:
https://github.com/jmespath/jmespath.py/issues/187
Upstream commit:
https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
[ORIGINAL DESCRIPTIONS]
As reported upstream
https://github.com/jmespath/jmespath.py/issues/201
Problems installing jmespath in Ubuntu 20.04 LTS
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
Fixed upstream in https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
Impact: this causes applications like Ansible that have dependencies on python-jmespath to send out warnings. Caused by language changes in Python 3.8.
System is Ubuntu 20.04 LTS on a Pi 4.
emv@pinnatus:~$ apt-cache policy python3-jmespath
python3-jmespath:
Installed: 0.9.4-2
Candidate: 0.9.4-2
Version table:
*** 0.9.4-2 500
500 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 Packages
100 /var/lib/dpkg/status |
[IMPACT]
Allow broader Ops/Eng team to consume Ansible from our packages instead of the upstream PyPi repositories in order to fix this warning.
[TEST CASE]
** Scenario #1 **
This could be reproduced outside python-jmespath as follows (a little script I have written to compare result between py2 and py3 :
# reproducer_test.py
----
def reproducer(x,y):
if x is 0 or x is 1:
return y is True or y is False
elif y is 0 or y is 1:
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
$ python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
False
False
With the fix in a small scale (Again, using my reproducer_test.py):
# reproducer_test.py
----
def reproducer(x,y):
# if x is 0 or x is 1:
if type(x) is int and (x == 0 or x == 1):
return y is True or y is False
# elif y is 0 or y is 1:
elif type(y) is int and (y == 0 or y == 1):
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
# python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
False
False
The above proves that it maintains compatibility in py2 while fixing the "SyntaxWarning "in py3.
[WHERE PROBLEM COULD OCCURS]
[OTHER INFORMATIONS]
Upstream issue:
https://github.com/jmespath/jmespath.py/issues/187
Upstream commit:
https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
[ORIGINAL DESCRIPTIONS]
As reported upstream
https://github.com/jmespath/jmespath.py/issues/201
Problems installing jmespath in Ubuntu 20.04 LTS
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
Fixed upstream in https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
Impact: this causes applications like Ansible that have dependencies on python-jmespath to send out warnings. Caused by language changes in Python 3.8.
System is Ubuntu 20.04 LTS on a Pi 4.
emv@pinnatus:~$ apt-cache policy python3-jmespath
python3-jmespath:
Installed: 0.9.4-2
Candidate: 0.9.4-2
Version table:
*** 0.9.4-2 500
500 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 Packages
100 /var/lib/dpkg/status |
|
2021-10-05 18:57:39 |
Eric Desrochers |
description |
[IMPACT]
Allow broader Ops/Eng team to consume Ansible from our packages instead of the upstream PyPi repositories in order to fix this warning.
[TEST CASE]
** Scenario #1 **
This could be reproduced outside python-jmespath as follows (a little script I have written to compare result between py2 and py3 :
# reproducer_test.py
----
def reproducer(x,y):
if x is 0 or x is 1:
return y is True or y is False
elif y is 0 or y is 1:
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
$ python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
False
False
With the fix in a small scale (Again, using my reproducer_test.py):
# reproducer_test.py
----
def reproducer(x,y):
# if x is 0 or x is 1:
if type(x) is int and (x == 0 or x == 1):
return y is True or y is False
# elif y is 0 or y is 1:
elif type(y) is int and (y == 0 or y == 1):
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
# python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
False
False
The above proves that it maintains compatibility in py2 while fixing the "SyntaxWarning "in py3.
[WHERE PROBLEM COULD OCCURS]
[OTHER INFORMATIONS]
Upstream issue:
https://github.com/jmespath/jmespath.py/issues/187
Upstream commit:
https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
[ORIGINAL DESCRIPTIONS]
As reported upstream
https://github.com/jmespath/jmespath.py/issues/201
Problems installing jmespath in Ubuntu 20.04 LTS
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
Fixed upstream in https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
Impact: this causes applications like Ansible that have dependencies on python-jmespath to send out warnings. Caused by language changes in Python 3.8.
System is Ubuntu 20.04 LTS on a Pi 4.
emv@pinnatus:~$ apt-cache policy python3-jmespath
python3-jmespath:
Installed: 0.9.4-2
Candidate: 0.9.4-2
Version table:
*** 0.9.4-2 500
500 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 Packages
100 /var/lib/dpkg/status |
[IMPACT]
Allow broader Ops/Eng team to consume Ansible from our packages instead of the upstream PyPi repositories in order to fix this warning.
And sanitize package installation:
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
[TEST CASE]
** Scenario #1 **
This could be reproduced outside python-jmespath as follows (a little script I have written to compare result between py2 and py3 :
# reproducer_test.py
----
def reproducer(x,y):
if x is 0 or x is 1:
return y is True or y is False
elif y is 0 or y is 1:
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
$ python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
False
False
With the fix in a small scale (Again, using my reproducer_test.py):
# reproducer_test.py
----
def reproducer(x,y):
# if x is 0 or x is 1:
if type(x) is int and (x == 0 or x == 1):
return y is True or y is False
# elif y is 0 or y is 1:
elif type(y) is int and (y == 0 or y == 1):
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
# python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
False
False
The above proves that it maintains compatibility in py2 while fixing the "SyntaxWarning "in py3.
[WHERE PROBLEM COULD OCCURS]
[OTHER INFORMATIONS]
Upstream issue:
https://github.com/jmespath/jmespath.py/issues/187
Upstream commit:
https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
[ORIGINAL DESCRIPTIONS]
As reported upstream
https://github.com/jmespath/jmespath.py/issues/201
Problems installing jmespath in Ubuntu 20.04 LTS
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
Fixed upstream in https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
Impact: this causes applications like Ansible that have dependencies on python-jmespath to send out warnings. Caused by language changes in Python 3.8.
System is Ubuntu 20.04 LTS on a Pi 4.
emv@pinnatus:~$ apt-cache policy python3-jmespath
python3-jmespath:
Installed: 0.9.4-2
Candidate: 0.9.4-2
Version table:
*** 0.9.4-2 500
500 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 Packages
100 /var/lib/dpkg/status |
|
2021-10-05 18:58:02 |
Eric Desrochers |
description |
[IMPACT]
Allow broader Ops/Eng team to consume Ansible from our packages instead of the upstream PyPi repositories in order to fix this warning.
And sanitize package installation:
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
[TEST CASE]
** Scenario #1 **
This could be reproduced outside python-jmespath as follows (a little script I have written to compare result between py2 and py3 :
# reproducer_test.py
----
def reproducer(x,y):
if x is 0 or x is 1:
return y is True or y is False
elif y is 0 or y is 1:
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
$ python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
False
False
With the fix in a small scale (Again, using my reproducer_test.py):
# reproducer_test.py
----
def reproducer(x,y):
# if x is 0 or x is 1:
if type(x) is int and (x == 0 or x == 1):
return y is True or y is False
# elif y is 0 or y is 1:
elif type(y) is int and (y == 0 or y == 1):
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
# python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
False
False
The above proves that it maintains compatibility in py2 while fixing the "SyntaxWarning "in py3.
[WHERE PROBLEM COULD OCCURS]
[OTHER INFORMATIONS]
Upstream issue:
https://github.com/jmespath/jmespath.py/issues/187
Upstream commit:
https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
[ORIGINAL DESCRIPTIONS]
As reported upstream
https://github.com/jmespath/jmespath.py/issues/201
Problems installing jmespath in Ubuntu 20.04 LTS
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
Fixed upstream in https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
Impact: this causes applications like Ansible that have dependencies on python-jmespath to send out warnings. Caused by language changes in Python 3.8.
System is Ubuntu 20.04 LTS on a Pi 4.
emv@pinnatus:~$ apt-cache policy python3-jmespath
python3-jmespath:
Installed: 0.9.4-2
Candidate: 0.9.4-2
Version table:
*** 0.9.4-2 500
500 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 Packages
100 /var/lib/dpkg/status |
[IMPACT]
* Allow broader Ops/Eng team to consume Ansible from our packages instead of the upstream PyPi repositories in order to fix this warning.
* Sanitize package installation:
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
[TEST CASE]
** Scenario #1 **
This could be reproduced outside python-jmespath as follows (a little script I have written to compare result between py2 and py3 :
# reproducer_test.py
----
def reproducer(x,y):
if x is 0 or x is 1:
return y is True or y is False
elif y is 0 or y is 1:
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
$ python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
False
False
With the fix in a small scale (Again, using my reproducer_test.py):
# reproducer_test.py
----
def reproducer(x,y):
# if x is 0 or x is 1:
if type(x) is int and (x == 0 or x == 1):
return y is True or y is False
# elif y is 0 or y is 1:
elif type(y) is int and (y == 0 or y == 1):
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
# python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
False
False
The above proves that it maintains compatibility in py2 while fixing the "SyntaxWarning "in py3.
[WHERE PROBLEM COULD OCCURS]
[OTHER INFORMATIONS]
Upstream issue:
https://github.com/jmespath/jmespath.py/issues/187
Upstream commit:
https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
[ORIGINAL DESCRIPTIONS]
As reported upstream
https://github.com/jmespath/jmespath.py/issues/201
Problems installing jmespath in Ubuntu 20.04 LTS
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
Fixed upstream in https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
Impact: this causes applications like Ansible that have dependencies on python-jmespath to send out warnings. Caused by language changes in Python 3.8.
System is Ubuntu 20.04 LTS on a Pi 4.
emv@pinnatus:~$ apt-cache policy python3-jmespath
python3-jmespath:
Installed: 0.9.4-2
Candidate: 0.9.4-2
Version table:
*** 0.9.4-2 500
500 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 Packages
100 /var/lib/dpkg/status |
|
2021-10-05 18:58:26 |
Eric Desrochers |
ansible (Ubuntu Bionic): status |
New |
Won't Fix |
|
2021-10-05 18:58:35 |
Eric Desrochers |
ansible (Ubuntu Focal): status |
New |
Won't Fix |
|
2021-10-05 18:58:48 |
Eric Desrochers |
ansible (Ubuntu Hirsute): status |
New |
Won't Fix |
|
2021-10-05 19:10:14 |
Eric Desrochers |
description |
[IMPACT]
* Allow broader Ops/Eng team to consume Ansible from our packages instead of the upstream PyPi repositories in order to fix this warning.
* Sanitize package installation:
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
[TEST CASE]
** Scenario #1 **
This could be reproduced outside python-jmespath as follows (a little script I have written to compare result between py2 and py3 :
# reproducer_test.py
----
def reproducer(x,y):
if x is 0 or x is 1:
return y is True or y is False
elif y is 0 or y is 1:
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
$ python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
False
False
With the fix in a small scale (Again, using my reproducer_test.py):
# reproducer_test.py
----
def reproducer(x,y):
# if x is 0 or x is 1:
if type(x) is int and (x == 0 or x == 1):
return y is True or y is False
# elif y is 0 or y is 1:
elif type(y) is int and (y == 0 or y == 1):
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
# python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
False
False
The above proves that it maintains compatibility in py2 while fixing the "SyntaxWarning "in py3.
[WHERE PROBLEM COULD OCCURS]
[OTHER INFORMATIONS]
Upstream issue:
https://github.com/jmespath/jmespath.py/issues/187
Upstream commit:
https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
[ORIGINAL DESCRIPTIONS]
As reported upstream
https://github.com/jmespath/jmespath.py/issues/201
Problems installing jmespath in Ubuntu 20.04 LTS
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
Fixed upstream in https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
Impact: this causes applications like Ansible that have dependencies on python-jmespath to send out warnings. Caused by language changes in Python 3.8.
System is Ubuntu 20.04 LTS on a Pi 4.
emv@pinnatus:~$ apt-cache policy python3-jmespath
python3-jmespath:
Installed: 0.9.4-2
Candidate: 0.9.4-2
Version table:
*** 0.9.4-2 500
500 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 Packages
100 /var/lib/dpkg/status |
[IMPACT]
* Allow broader Ops/Eng team to consume Ansible from our packages instead of the upstream PyPi repositories in order to fix this warning.
* Sanitize package installation:
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
[TEST CASE]
** Scenario #1 **
This could be reproduced outside python-jmespath as follows (a little script I have written to compare result between py2 and py3 :
# reproducer_test.py
----
def reproducer(x,y):
if x is 0 or x is 1:
return y is True or y is False
elif y is 0 or y is 1:
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
$ python2 reproducer_test.py
False
False
$ python3 -W ignore reproducer_test.py
False
False
$ python3 reproducer_test.py
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
False
False
With the fix in a small scale (Again, using my reproducer_test.py):
# reproducer_test.py
----
def reproducer(x,y):
# if x is 0 or x is 1:
if type(x) is int and (x == 0 or x == 1):
return y is True or y is False
# elif y is 0 or y is 1:
elif type(y) is int and (y == 0 or y == 1):
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
# python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
False
False
The above proves that it maintains compatibility in py2 while fixing the "SyntaxWarning "in py3.
[WHERE PROBLEM COULD OCCURS]
Only thing I could see is backward compatibility between py2 and py3 where both python releases are available in main (e.g. bionic).
But the backward compatibility has been tested already and it didn't exhibit any potential issue so far.
All I could think of atm.
[OTHER INFORMATIONS]
Upstream issue:
https://github.com/jmespath/jmespath.py/issues/187
Upstream commit:
https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
[ORIGINAL DESCRIPTIONS]
As reported upstream
https://github.com/jmespath/jmespath.py/issues/201
Problems installing jmespath in Ubuntu 20.04 LTS
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
Fixed upstream in https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
Impact: this causes applications like Ansible that have dependencies on python-jmespath to send out warnings. Caused by language changes in Python 3.8.
System is Ubuntu 20.04 LTS on a Pi 4.
emv@pinnatus:~$ apt-cache policy python3-jmespath
python3-jmespath:
Installed: 0.9.4-2
Candidate: 0.9.4-2
Version table:
*** 0.9.4-2 500
500 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 Packages
100 /var/lib/dpkg/status |
|
2021-10-05 19:50:15 |
Eric Desrochers |
description |
[IMPACT]
* Allow broader Ops/Eng team to consume Ansible from our packages instead of the upstream PyPi repositories in order to fix this warning.
* Sanitize package installation:
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
[TEST CASE]
** Scenario #1 **
This could be reproduced outside python-jmespath as follows (a little script I have written to compare result between py2 and py3 :
# reproducer_test.py
----
def reproducer(x,y):
if x is 0 or x is 1:
return y is True or y is False
elif y is 0 or y is 1:
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
$ python2 reproducer_test.py
False
False
$ python3 -W ignore reproducer_test.py
False
False
$ python3 reproducer_test.py
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
False
False
With the fix in a small scale (Again, using my reproducer_test.py):
# reproducer_test.py
----
def reproducer(x,y):
# if x is 0 or x is 1:
if type(x) is int and (x == 0 or x == 1):
return y is True or y is False
# elif y is 0 or y is 1:
elif type(y) is int and (y == 0 or y == 1):
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
# python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
False
False
The above proves that it maintains compatibility in py2 while fixing the "SyntaxWarning "in py3.
[WHERE PROBLEM COULD OCCURS]
Only thing I could see is backward compatibility between py2 and py3 where both python releases are available in main (e.g. bionic).
But the backward compatibility has been tested already and it didn't exhibit any potential issue so far.
All I could think of atm.
[OTHER INFORMATIONS]
Upstream issue:
https://github.com/jmespath/jmespath.py/issues/187
Upstream commit:
https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
[ORIGINAL DESCRIPTIONS]
As reported upstream
https://github.com/jmespath/jmespath.py/issues/201
Problems installing jmespath in Ubuntu 20.04 LTS
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
Fixed upstream in https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
Impact: this causes applications like Ansible that have dependencies on python-jmespath to send out warnings. Caused by language changes in Python 3.8.
System is Ubuntu 20.04 LTS on a Pi 4.
emv@pinnatus:~$ apt-cache policy python3-jmespath
python3-jmespath:
Installed: 0.9.4-2
Candidate: 0.9.4-2
Version table:
*** 0.9.4-2 500
500 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 Packages
100 /var/lib/dpkg/status |
[IMPACT]
* Allow broader Ops/Eng team to consume Ansible from our packages instead of the upstream PyPi repositories in order to fix this warning.
* Sanitize package installation:
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
[TEST CASE]
** Scenario #1 **
This could be reproduced outside python-jmespath as follows (a little script I have written to compare result between py2 and py3 :
# reproducer_test.py
----
def reproducer(x,y):
if x is 0 or x is 1:
return y is True or y is False
elif y is 0 or y is 1:
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
$ python2 reproducer_test.py
False
False
$ python3 -W ignore reproducer_test.py
False
False
$ python3 reproducer_test.py
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
False
False
With the fix in a small scale (Again, using my reproducer_test.py):
# reproducer_test.py
----
def reproducer(x,y):
# if x is 0 or x is 1:
if type(x) is int and (x == 0 or x == 1):
return y is True or y is False
# elif y is 0 or y is 1:
elif type(y) is int and (y == 0 or y == 1):
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
# python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
False
False
The above proves that it maintains compatibility in py2 while fixing the "SyntaxWarning "in py3.
[WHERE PROBLEM COULD OCCURS]
Risk: Low
* Only thing I could see is backward compatibility between py2 and py3 where both python releases are available in main (e.g. bionic).
But the backward compatibility has been tested already and it didn't exhibit any potential issue so far.
* No observed regression caused by this fix in upstream issues nor in the Ubuntu release where the fix has landed (Focal/Hirsute).
* No other py3.8 commits (either fix and/or regression fix) found in the project git log.
[OTHER INFORMATIONS]
Upstream issue:
https://github.com/jmespath/jmespath.py/issues/187
Upstream commit:
https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
[ORIGINAL DESCRIPTIONS]
As reported upstream
https://github.com/jmespath/jmespath.py/issues/201
Problems installing jmespath in Ubuntu 20.04 LTS
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
Fixed upstream in https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
Impact: this causes applications like Ansible that have dependencies on python-jmespath to send out warnings. Caused by language changes in Python 3.8.
System is Ubuntu 20.04 LTS on a Pi 4.
emv@pinnatus:~$ apt-cache policy python3-jmespath
python3-jmespath:
Installed: 0.9.4-2
Candidate: 0.9.4-2
Version table:
*** 0.9.4-2 500
500 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 Packages
100 /var/lib/dpkg/status |
|
2021-10-05 19:56:26 |
Eric Desrochers |
description |
[IMPACT]
* Allow broader Ops/Eng team to consume Ansible from our packages instead of the upstream PyPi repositories in order to fix this warning.
* Sanitize package installation:
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
[TEST CASE]
** Scenario #1 **
This could be reproduced outside python-jmespath as follows (a little script I have written to compare result between py2 and py3 :
# reproducer_test.py
----
def reproducer(x,y):
if x is 0 or x is 1:
return y is True or y is False
elif y is 0 or y is 1:
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
$ python2 reproducer_test.py
False
False
$ python3 -W ignore reproducer_test.py
False
False
$ python3 reproducer_test.py
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
False
False
With the fix in a small scale (Again, using my reproducer_test.py):
# reproducer_test.py
----
def reproducer(x,y):
# if x is 0 or x is 1:
if type(x) is int and (x == 0 or x == 1):
return y is True or y is False
# elif y is 0 or y is 1:
elif type(y) is int and (y == 0 or y == 1):
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
# python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
False
False
The above proves that it maintains compatibility in py2 while fixing the "SyntaxWarning "in py3.
[WHERE PROBLEM COULD OCCURS]
Risk: Low
* Only thing I could see is backward compatibility between py2 and py3 where both python releases are available in main (e.g. bionic).
But the backward compatibility has been tested already and it didn't exhibit any potential issue so far.
* No observed regression caused by this fix in upstream issues nor in the Ubuntu release where the fix has landed (Focal/Hirsute).
* No other py3.8 commits (either fix and/or regression fix) found in the project git log.
[OTHER INFORMATIONS]
Upstream issue:
https://github.com/jmespath/jmespath.py/issues/187
Upstream commit:
https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
[ORIGINAL DESCRIPTIONS]
As reported upstream
https://github.com/jmespath/jmespath.py/issues/201
Problems installing jmespath in Ubuntu 20.04 LTS
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
Fixed upstream in https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
Impact: this causes applications like Ansible that have dependencies on python-jmespath to send out warnings. Caused by language changes in Python 3.8.
System is Ubuntu 20.04 LTS on a Pi 4.
emv@pinnatus:~$ apt-cache policy python3-jmespath
python3-jmespath:
Installed: 0.9.4-2
Candidate: 0.9.4-2
Version table:
*** 0.9.4-2 500
500 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 Packages
100 /var/lib/dpkg/status |
[IMPACT]
* Allow broader Ops/Eng team to consume Ansible from our packages instead of the upstream PyPi repositories in order to fix this warning.
* Sanitize package installation:
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
[TEST CASE]
** Scenario #1 **
$ pull-lp-source python-jmespath
$ cd python-jmespath*
$ python3-coverage run jmespath/visitor.py
jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
jmespath/visitor.py:34: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
jmespath/visitor.py:34: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
jmespath/visitor.py:260: SyntaxWarning: "is" with a literal. Did you mean "=="?
if original_result is 0:
$ quilt push -a
Applying patch 0001-satisfy-python38-syntaxwarning.patch
patching file jmespath/visitor.py
$ python3-coverage run jmespath/visitor.py
** Scenario #2 **
This could be reproduced outside python-jmespath as follows (a little script I have written to compare result between py2 and py3 :
# reproducer_test.py
----
def reproducer(x,y):
if x is 0 or x is 1:
return y is True or y is False
elif y is 0 or y is 1:
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
$ python2 reproducer_test.py
False
False
$ python3 -W ignore reproducer_test.py
False
False
$ python3 reproducer_test.py
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
False
False
With the fix in a small scale (Again, using my reproducer_test.py):
# reproducer_test.py
----
def reproducer(x,y):
# if x is 0 or x is 1:
if type(x) is int and (x == 0 or x == 1):
return y is True or y is False
# elif y is 0 or y is 1:
elif type(y) is int and (y == 0 or y == 1):
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
# python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
False
False
The above proves that it maintains compatibility in py2 while fixing the "SyntaxWarning "in py3.
[WHERE PROBLEM COULD OCCURS]
Risk: Low
* Only thing I could see is backward compatibility between py2 and py3 where both python releases are available in main (e.g. bionic).
But the backward compatibility has been tested already and it didn't exhibit any potential issue so far.
* No observed regression caused by this fix in upstream issues nor in the Ubuntu release where the fix has landed (Focal/Hirsute).
* No other py3.8 commits (either fix and/or regression fix) found in the project git log.
[OTHER INFORMATIONS]
Upstream issue:
https://github.com/jmespath/jmespath.py/issues/187
Upstream commit:
https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
[ORIGINAL DESCRIPTIONS]
As reported upstream
https://github.com/jmespath/jmespath.py/issues/201
Problems installing jmespath in Ubuntu 20.04 LTS
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
Fixed upstream in https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
Impact: this causes applications like Ansible that have dependencies on python-jmespath to send out warnings. Caused by language changes in Python 3.8.
System is Ubuntu 20.04 LTS on a Pi 4.
emv@pinnatus:~$ apt-cache policy python3-jmespath
python3-jmespath:
Installed: 0.9.4-2
Candidate: 0.9.4-2
Version table:
*** 0.9.4-2 500
500 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 Packages
100 /var/lib/dpkg/status |
|
2021-10-05 20:03:15 |
Eric Desrochers |
description |
[IMPACT]
* Allow broader Ops/Eng team to consume Ansible from our packages instead of the upstream PyPi repositories in order to fix this warning.
* Sanitize package installation:
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
[TEST CASE]
** Scenario #1 **
$ pull-lp-source python-jmespath
$ cd python-jmespath*
$ python3-coverage run jmespath/visitor.py
jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
jmespath/visitor.py:34: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
jmespath/visitor.py:34: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
jmespath/visitor.py:260: SyntaxWarning: "is" with a literal. Did you mean "=="?
if original_result is 0:
$ quilt push -a
Applying patch 0001-satisfy-python38-syntaxwarning.patch
patching file jmespath/visitor.py
$ python3-coverage run jmespath/visitor.py
** Scenario #2 **
This could be reproduced outside python-jmespath as follows (a little script I have written to compare result between py2 and py3 :
# reproducer_test.py
----
def reproducer(x,y):
if x is 0 or x is 1:
return y is True or y is False
elif y is 0 or y is 1:
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
$ python2 reproducer_test.py
False
False
$ python3 -W ignore reproducer_test.py
False
False
$ python3 reproducer_test.py
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
False
False
With the fix in a small scale (Again, using my reproducer_test.py):
# reproducer_test.py
----
def reproducer(x,y):
# if x is 0 or x is 1:
if type(x) is int and (x == 0 or x == 1):
return y is True or y is False
# elif y is 0 or y is 1:
elif type(y) is int and (y == 0 or y == 1):
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
# python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
False
False
The above proves that it maintains compatibility in py2 while fixing the "SyntaxWarning "in py3.
[WHERE PROBLEM COULD OCCURS]
Risk: Low
* Only thing I could see is backward compatibility between py2 and py3 where both python releases are available in main (e.g. bionic).
But the backward compatibility has been tested already and it didn't exhibit any potential issue so far.
* No observed regression caused by this fix in upstream issues nor in the Ubuntu release where the fix has landed (Focal/Hirsute).
* No other py3.8 commits (either fix and/or regression fix) found in the project git log.
[OTHER INFORMATIONS]
Upstream issue:
https://github.com/jmespath/jmespath.py/issues/187
Upstream commit:
https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
[ORIGINAL DESCRIPTIONS]
As reported upstream
https://github.com/jmespath/jmespath.py/issues/201
Problems installing jmespath in Ubuntu 20.04 LTS
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
Fixed upstream in https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
Impact: this causes applications like Ansible that have dependencies on python-jmespath to send out warnings. Caused by language changes in Python 3.8.
System is Ubuntu 20.04 LTS on a Pi 4.
emv@pinnatus:~$ apt-cache policy python3-jmespath
python3-jmespath:
Installed: 0.9.4-2
Candidate: 0.9.4-2
Version table:
*** 0.9.4-2 500
500 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 Packages
100 /var/lib/dpkg/status |
[IMPACT]
* Allow broader Ops/Eng team to consume Ansible from our packages instead of the upstream PyPi repositories in order to fix this warning.
* Sanitize package installation:
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
[TEST CASE]
** Scenario #1 **
$ pull-lp-source python-jmespath
$ cd python-jmespath*
$ python3-coverage run jmespath/visitor.py
jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
jmespath/visitor.py:34: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
jmespath/visitor.py:34: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
jmespath/visitor.py:260: SyntaxWarning: "is" with a literal. Did you mean "=="?
if original_result is 0:
$ quilt push -a
Applying patch 0001-satisfy-python38-syntaxwarning.patch
patching file jmespath/visitor.py
$ python3-coverage run jmespath/visitor.py
** Scenario #2 **
This could be reproduced outside python-jmespath as follows (a little script I have written to compare result between py2 and py3 :
# reproducer_test.py
----
def reproducer(x,y):
if x is 0 or x is 1:
return y is True or y is False
elif y is 0 or y is 1:
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
$ python2 reproducer_test.py
False
False
$ python3 -W ignore reproducer_test.py
False
False
$ python3 reproducer_test.py
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
False
False
With the fix in a small scale (Again, using my reproducer_test.py):
# reproducer_test.py
----
def reproducer(x,y):
# if x is 0 or x is 1:
if type(x) is int and (x == 0 or x == 1):
return y is True or y is False
# elif y is 0 or y is 1:
elif type(y) is int and (y == 0 or y == 1):
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
# python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
False
False
The above proves that it maintains compatibility in py2 while fixing the "SyntaxWarning "in py3.
[WHERE PROBLEM COULD OCCURS]
Risk: Low
* The fix maintain backward compatibility tested with python-coverage, and other verifications.
This package lack of test suite and coverage for things that could have been easily avoided with proper test in place. There may or may not be other places in other code path generating syntax warning as this is not well tested I'm afraid.
In general, looking upstream:
* No observed regression caused by this fix in upstream issues nor in the Ubuntu release where the fix has landed (Focal/Hirsute).
* No other py3.8 commits (either fix and/or regression fix) found in the project git log.
[OTHER INFORMATIONS]
Upstream issue:
https://github.com/jmespath/jmespath.py/issues/187
Upstream commit:
https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
[ORIGINAL DESCRIPTIONS]
As reported upstream
https://github.com/jmespath/jmespath.py/issues/201
Problems installing jmespath in Ubuntu 20.04 LTS
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
Fixed upstream in https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
Impact: this causes applications like Ansible that have dependencies on python-jmespath to send out warnings. Caused by language changes in Python 3.8.
System is Ubuntu 20.04 LTS on a Pi 4.
emv@pinnatus:~$ apt-cache policy python3-jmespath
python3-jmespath:
Installed: 0.9.4-2
Candidate: 0.9.4-2
Version table:
*** 0.9.4-2 500
500 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 Packages
100 /var/lib/dpkg/status |
|
2021-10-05 20:07:08 |
Eric Desrochers |
description |
[IMPACT]
* Allow broader Ops/Eng team to consume Ansible from our packages instead of the upstream PyPi repositories in order to fix this warning.
* Sanitize package installation:
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
[TEST CASE]
** Scenario #1 **
$ pull-lp-source python-jmespath
$ cd python-jmespath*
$ python3-coverage run jmespath/visitor.py
jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
jmespath/visitor.py:34: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
jmespath/visitor.py:34: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
jmespath/visitor.py:260: SyntaxWarning: "is" with a literal. Did you mean "=="?
if original_result is 0:
$ quilt push -a
Applying patch 0001-satisfy-python38-syntaxwarning.patch
patching file jmespath/visitor.py
$ python3-coverage run jmespath/visitor.py
** Scenario #2 **
This could be reproduced outside python-jmespath as follows (a little script I have written to compare result between py2 and py3 :
# reproducer_test.py
----
def reproducer(x,y):
if x is 0 or x is 1:
return y is True or y is False
elif y is 0 or y is 1:
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
$ python2 reproducer_test.py
False
False
$ python3 -W ignore reproducer_test.py
False
False
$ python3 reproducer_test.py
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
False
False
With the fix in a small scale (Again, using my reproducer_test.py):
# reproducer_test.py
----
def reproducer(x,y):
# if x is 0 or x is 1:
if type(x) is int and (x == 0 or x == 1):
return y is True or y is False
# elif y is 0 or y is 1:
elif type(y) is int and (y == 0 or y == 1):
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
# python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
False
False
The above proves that it maintains compatibility in py2 while fixing the "SyntaxWarning "in py3.
[WHERE PROBLEM COULD OCCURS]
Risk: Low
* The fix maintain backward compatibility tested with python-coverage, and other verifications.
This package lack of test suite and coverage for things that could have been easily avoided with proper test in place. There may or may not be other places in other code path generating syntax warning as this is not well tested I'm afraid.
In general, looking upstream:
* No observed regression caused by this fix in upstream issues nor in the Ubuntu release where the fix has landed (Focal/Hirsute).
* No other py3.8 commits (either fix and/or regression fix) found in the project git log.
[OTHER INFORMATIONS]
Upstream issue:
https://github.com/jmespath/jmespath.py/issues/187
Upstream commit:
https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
[ORIGINAL DESCRIPTIONS]
As reported upstream
https://github.com/jmespath/jmespath.py/issues/201
Problems installing jmespath in Ubuntu 20.04 LTS
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
Fixed upstream in https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
Impact: this causes applications like Ansible that have dependencies on python-jmespath to send out warnings. Caused by language changes in Python 3.8.
System is Ubuntu 20.04 LTS on a Pi 4.
emv@pinnatus:~$ apt-cache policy python3-jmespath
python3-jmespath:
Installed: 0.9.4-2
Candidate: 0.9.4-2
Version table:
*** 0.9.4-2 500
500 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 Packages
100 /var/lib/dpkg/status |
[IMPACT]
* Allow broader Ops/Eng team to consume Ansible from our packages instead of the upstream PyPi repositories in order to fix this warning.
* Sanitize package installation:
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
[TEST CASE]
** Scenario #1 **
$ pull-lp-source python-jmespath
$ cd python-jmespath*
$ python3-coverage run jmespath/visitor.py
jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
jmespath/visitor.py:34: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
jmespath/visitor.py:34: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
jmespath/visitor.py:260: SyntaxWarning: "is" with a literal. Did you mean "=="?
if original_result is 0:
$ quilt push -a
Applying patch 0001-satisfy-python38-syntaxwarning.patch
patching file jmespath/visitor.py
$ python3-coverage run jmespath/visitor.py
** Scenario #2 **
$ pull-lp-source python-jmespath
$ cd python-jmespath*
$ nosetests3
/tmp/jmes/f/python-jmespath-0.9.4/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
/tmp/jmes/f/python-jmespath-0.9.4/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
/tmp/jmes/f/python-jmespath-0.9.4/jmespath/visitor.py:34: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
/tmp/jmes/f/python-jmespath-0.9.4/jmespath/visitor.py:34: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
/tmp/jmes/f/python-jmespath-0.9.4/jmespath/visitor.py:260: SyntaxWarning: "is" with a literal. Did you mean "=="?
if original_result is 0:
.........................................
----------------------------------------------------------------------
Ran 41 tests in 0.039s
OK
$ quilt push -a
Applying patch 0001-satisfy-python38-syntaxwarning.patch
patching file jmespath/visitor.py
Now at patch 0001-satisfy-python38-syntaxwarning.patch
$ nosetests3
.........................................
----------------------------------------------------------------------
Ran 41 tests in 0.021s
OK
$ nosetests
.........................................
----------------------------------------------------------------------
Ran 41 tests in 0.016s
OK
** Scenario #3 **
This could be reproduced outside python-jmespath as follows (a little script I have written to compare result between py2 and py3 :
# reproducer_test.py
----
def reproducer(x,y):
if x is 0 or x is 1:
return y is True or y is False
elif y is 0 or y is 1:
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
$ python2 reproducer_test.py
False
False
$ python3 -W ignore reproducer_test.py
False
False
$ python3 reproducer_test.py
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
False
False
With the fix in a small scale (Again, using my reproducer_test.py):
# reproducer_test.py
----
def reproducer(x,y):
# if x is 0 or x is 1:
if type(x) is int and (x == 0 or x == 1):
return y is True or y is False
# elif y is 0 or y is 1:
elif type(y) is int and (y == 0 or y == 1):
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
# python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
False
False
The above proves that it maintains compatibility in py2 while fixing the "SyntaxWarning "in py3.
[WHERE PROBLEM COULD OCCURS]
Risk: Low
* The fix maintain backward compatibility tested with python3-coverage/python-coverage, and python3-nose/python-nose manually and didn't report any problem.
This package lack of test suite and coverage for things that could have been easily avoided with proper test in place. There may or may not be other places in other code path generating syntax warning, as this is not well tested I'm afraid.
In general, looking upstream:
* No observed regression caused by this fix in upstream issues nor in the Ubuntu release where the fix has landed (Focal/Hirsute).
* No other py3.8 commits (either fix and/or regression fix) found in the project git log.
[OTHER INFORMATIONS]
Upstream issue:
https://github.com/jmespath/jmespath.py/issues/187
Upstream commit:
https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
[ORIGINAL DESCRIPTIONS]
As reported upstream
https://github.com/jmespath/jmespath.py/issues/201
Problems installing jmespath in Ubuntu 20.04 LTS
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
Fixed upstream in https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
Impact: this causes applications like Ansible that have dependencies on python-jmespath to send out warnings. Caused by language changes in Python 3.8.
System is Ubuntu 20.04 LTS on a Pi 4.
emv@pinnatus:~$ apt-cache policy python3-jmespath
python3-jmespath:
Installed: 0.9.4-2
Candidate: 0.9.4-2
Version table:
*** 0.9.4-2 500
500 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 Packages
100 /var/lib/dpkg/status |
|
2021-10-06 14:17:28 |
Heitor Alves de Siqueira |
bug |
|
|
added subscriber Heitor Alves de Siqueira |
2021-10-07 20:16:46 |
Eric Desrochers |
python-jmespath (Ubuntu Focal): status |
Confirmed |
In Progress |
|
2021-10-07 20:16:46 |
Eric Desrochers |
python-jmespath (Ubuntu Focal): assignee |
|
Eric Desrochers (slashd) |
|
2021-10-07 20:16:58 |
Eric Desrochers |
python-jmespath (Ubuntu Bionic): status |
Confirmed |
In Progress |
|
2021-10-07 20:16:58 |
Eric Desrochers |
python-jmespath (Ubuntu Bionic): assignee |
|
Eric Desrochers (slashd) |
|
2021-10-07 20:17:22 |
Eric Desrochers |
bug |
|
|
added subscriber STS Sponsors |
2021-10-07 20:17:32 |
Eric Desrochers |
tags |
seg sts |
seg sts sts-sponsors-halves |
|
2021-10-08 12:55:03 |
Eric Desrochers |
attachment added |
|
Bionic debdiff https://bugs.launchpad.net/ubuntu/+source/python-jmespath/+bug/1877792/+attachment/5531623/+files/b.debdiff |
|
2021-10-08 12:58:32 |
Eric Desrochers |
attachment added |
|
Focal debdiff https://bugs.launchpad.net/ubuntu/+source/python-jmespath/+bug/1877792/+attachment/5531626/+files/f.debdiff |
|
2021-10-08 12:59:07 |
Eric Desrochers |
bug |
|
|
added subscriber Eric Desrochers |
2021-10-15 01:37:15 |
Eric Desrochers |
removed subscriber STS Sponsors |
|
|
|
2021-10-18 14:39:05 |
Eric Desrochers |
bug watch added |
|
https://github.com/jmespath/jmespath.py/issues/201 |
|
2021-10-18 15:06:13 |
Eric Desrochers |
bug task added |
|
python-netaddr (Ubuntu) |
|
2021-10-18 15:06:34 |
Eric Desrochers |
python-netaddr (Ubuntu Focal): status |
New |
In Progress |
|
2021-10-18 15:06:34 |
Eric Desrochers |
python-netaddr (Ubuntu Focal): assignee |
|
Eric Desrochers (slashd) |
|
2021-10-18 15:06:47 |
Eric Desrochers |
python-netaddr (Ubuntu Bionic): status |
New |
In Progress |
|
2021-10-18 15:06:47 |
Eric Desrochers |
python-netaddr (Ubuntu Bionic): assignee |
|
Eric Desrochers (slashd) |
|
2021-10-18 15:08:14 |
Eric Desrochers |
summary |
jmespath SyntaxWarning: "is" with a literal. |
jmespath/netaddr SyntaxWarning: "is" with a literal when installing ansible. |
|
2021-10-18 15:14:44 |
Launchpad Janitor |
python-netaddr (Ubuntu): status |
New |
Confirmed |
|
2021-10-18 15:14:44 |
Launchpad Janitor |
python-netaddr (Ubuntu Hirsute): status |
New |
Confirmed |
|
2021-10-18 15:14:44 |
Launchpad Janitor |
python-netaddr (Ubuntu Impish): status |
New |
Confirmed |
|
2021-10-18 15:20:55 |
Eric Desrochers |
description |
[IMPACT]
* Allow broader Ops/Eng team to consume Ansible from our packages instead of the upstream PyPi repositories in order to fix this warning.
* Sanitize package installation:
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
[TEST CASE]
** Scenario #1 **
$ pull-lp-source python-jmespath
$ cd python-jmespath*
$ python3-coverage run jmespath/visitor.py
jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
jmespath/visitor.py:34: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
jmespath/visitor.py:34: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
jmespath/visitor.py:260: SyntaxWarning: "is" with a literal. Did you mean "=="?
if original_result is 0:
$ quilt push -a
Applying patch 0001-satisfy-python38-syntaxwarning.patch
patching file jmespath/visitor.py
$ python3-coverage run jmespath/visitor.py
** Scenario #2 **
$ pull-lp-source python-jmespath
$ cd python-jmespath*
$ nosetests3
/tmp/jmes/f/python-jmespath-0.9.4/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
/tmp/jmes/f/python-jmespath-0.9.4/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
/tmp/jmes/f/python-jmespath-0.9.4/jmespath/visitor.py:34: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
/tmp/jmes/f/python-jmespath-0.9.4/jmespath/visitor.py:34: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
/tmp/jmes/f/python-jmespath-0.9.4/jmespath/visitor.py:260: SyntaxWarning: "is" with a literal. Did you mean "=="?
if original_result is 0:
.........................................
----------------------------------------------------------------------
Ran 41 tests in 0.039s
OK
$ quilt push -a
Applying patch 0001-satisfy-python38-syntaxwarning.patch
patching file jmespath/visitor.py
Now at patch 0001-satisfy-python38-syntaxwarning.patch
$ nosetests3
.........................................
----------------------------------------------------------------------
Ran 41 tests in 0.021s
OK
$ nosetests
.........................................
----------------------------------------------------------------------
Ran 41 tests in 0.016s
OK
** Scenario #3 **
This could be reproduced outside python-jmespath as follows (a little script I have written to compare result between py2 and py3 :
# reproducer_test.py
----
def reproducer(x,y):
if x is 0 or x is 1:
return y is True or y is False
elif y is 0 or y is 1:
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
$ python2 reproducer_test.py
False
False
$ python3 -W ignore reproducer_test.py
False
False
$ python3 reproducer_test.py
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
False
False
With the fix in a small scale (Again, using my reproducer_test.py):
# reproducer_test.py
----
def reproducer(x,y):
# if x is 0 or x is 1:
if type(x) is int and (x == 0 or x == 1):
return y is True or y is False
# elif y is 0 or y is 1:
elif type(y) is int and (y == 0 or y == 1):
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
# python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
False
False
The above proves that it maintains compatibility in py2 while fixing the "SyntaxWarning "in py3.
[WHERE PROBLEM COULD OCCURS]
Risk: Low
* The fix maintain backward compatibility tested with python3-coverage/python-coverage, and python3-nose/python-nose manually and didn't report any problem.
This package lack of test suite and coverage for things that could have been easily avoided with proper test in place. There may or may not be other places in other code path generating syntax warning, as this is not well tested I'm afraid.
In general, looking upstream:
* No observed regression caused by this fix in upstream issues nor in the Ubuntu release where the fix has landed (Focal/Hirsute).
* No other py3.8 commits (either fix and/or regression fix) found in the project git log.
[OTHER INFORMATIONS]
Upstream issue:
https://github.com/jmespath/jmespath.py/issues/187
Upstream commit:
https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
[ORIGINAL DESCRIPTIONS]
As reported upstream
https://github.com/jmespath/jmespath.py/issues/201
Problems installing jmespath in Ubuntu 20.04 LTS
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
Fixed upstream in https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
Impact: this causes applications like Ansible that have dependencies on python-jmespath to send out warnings. Caused by language changes in Python 3.8.
System is Ubuntu 20.04 LTS on a Pi 4.
emv@pinnatus:~$ apt-cache policy python3-jmespath
python3-jmespath:
Installed: 0.9.4-2
Candidate: 0.9.4-2
Version table:
*** 0.9.4-2 500
500 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 Packages
100 /var/lib/dpkg/status |
[IMPACT]
* Allow broader Ops/Eng team to consume Ansible from our packages instead of the upstream PyPi repositories in order to fix this warning.
* Sanitize package installation:
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
Setting up python3-netaddr (0.7.19-3) ...
/usr/lib/python3/dist-packages/netaddr/strategy/__init__.py:189: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if word_sep is not '':
jmespath and netaddr are 2 runtime dependencies of ansible.
The syntaxwarning while purely cosmetic, may mislead user and their trust in using a sane and tested package.
[TEST CASE]
** Scenario #1 **
$ pull-lp-source python-jmespath
$ cd python-jmespath*
$ python3-coverage run jmespath/visitor.py
jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
jmespath/visitor.py:34: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
jmespath/visitor.py:34: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
jmespath/visitor.py:260: SyntaxWarning: "is" with a literal. Did you mean "=="?
if original_result is 0:
$ quilt push -a
Applying patch 0001-satisfy-python38-syntaxwarning.patch
patching file jmespath/visitor.py
$ python3-coverage run jmespath/visitor.py
** Scenario #2 **
$ pull-lp-source python-jmespath
$ cd python-jmespath*
$ nosetests3
/tmp/jmes/f/python-jmespath-0.9.4/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
/tmp/jmes/f/python-jmespath-0.9.4/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
/tmp/jmes/f/python-jmespath-0.9.4/jmespath/visitor.py:34: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
/tmp/jmes/f/python-jmespath-0.9.4/jmespath/visitor.py:34: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
/tmp/jmes/f/python-jmespath-0.9.4/jmespath/visitor.py:260: SyntaxWarning: "is" with a literal. Did you mean "=="?
if original_result is 0:
.........................................
----------------------------------------------------------------------
Ran 41 tests in 0.039s
OK
$ quilt push -a
Applying patch 0001-satisfy-python38-syntaxwarning.patch
patching file jmespath/visitor.py
Now at patch 0001-satisfy-python38-syntaxwarning.patch
$ nosetests3
.........................................
----------------------------------------------------------------------
Ran 41 tests in 0.021s
OK
$ nosetests
.........................................
----------------------------------------------------------------------
Ran 41 tests in 0.016s
OK
** Scenario #3 **
This could be reproduced outside python-jmespath as follows (a little script I have written to compare result between py2 and py3 :
# reproducer_test.py
----
def reproducer(x,y):
if x is 0 or x is 1:
return y is True or y is False
elif y is 0 or y is 1:
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
$ python2 reproducer_test.py
False
False
$ python3 -W ignore reproducer_test.py
False
False
$ python3 reproducer_test.py
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
False
False
With the fix in a small scale (Again, using my reproducer_test.py):
# reproducer_test.py
----
def reproducer(x,y):
# if x is 0 or x is 1:
if type(x) is int and (x == 0 or x == 1):
return y is True or y is False
# elif y is 0 or y is 1:
elif type(y) is int and (y == 0 or y == 1):
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
# python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
False
False
The above proves that it maintains compatibility in py2 while fixing the "SyntaxWarning "in py3.
[WHERE PROBLEM COULD OCCURS]
Risk: Low
* The fix maintain backward compatibility tested with python3-coverage/python-coverage, and python3-nose/python-nose manually and didn't report any problem.
This package lack of test suite and coverage for things that could have been easily avoided with proper test in place. There may or may not be other places in other code path generating syntax warning, as this is not well tested I'm afraid.
In general, looking upstream:
* No observed regression caused by this fix in upstream issues nor in the Ubuntu release where the fix has landed (Focal/Hirsute).
* No other py3.8 commits (either fix and/or regression fix) found in the project git log.
[OTHER INFORMATIONS]
Upstream issue:
https://github.com/jmespath/jmespath.py/issues/187
Upstream commit:
https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
[ORIGINAL DESCRIPTIONS]
As reported upstream
https://github.com/jmespath/jmespath.py/issues/201
Problems installing jmespath in Ubuntu 20.04 LTS
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
Fixed upstream in https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
Impact: this causes applications like Ansible that have dependencies on python-jmespath to send out warnings. Caused by language changes in Python 3.8.
System is Ubuntu 20.04 LTS on a Pi 4.
emv@pinnatus:~$ apt-cache policy python3-jmespath
python3-jmespath:
Installed: 0.9.4-2
Candidate: 0.9.4-2
Version table:
*** 0.9.4-2 500
500 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 Packages
100 /var/lib/dpkg/status |
|
2021-10-18 15:23:29 |
Eric Desrochers |
description |
[IMPACT]
* Allow broader Ops/Eng team to consume Ansible from our packages instead of the upstream PyPi repositories in order to fix this warning.
* Sanitize package installation:
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
Setting up python3-netaddr (0.7.19-3) ...
/usr/lib/python3/dist-packages/netaddr/strategy/__init__.py:189: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if word_sep is not '':
jmespath and netaddr are 2 runtime dependencies of ansible.
The syntaxwarning while purely cosmetic, may mislead user and their trust in using a sane and tested package.
[TEST CASE]
** Scenario #1 **
$ pull-lp-source python-jmespath
$ cd python-jmespath*
$ python3-coverage run jmespath/visitor.py
jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
jmespath/visitor.py:34: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
jmespath/visitor.py:34: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
jmespath/visitor.py:260: SyntaxWarning: "is" with a literal. Did you mean "=="?
if original_result is 0:
$ quilt push -a
Applying patch 0001-satisfy-python38-syntaxwarning.patch
patching file jmespath/visitor.py
$ python3-coverage run jmespath/visitor.py
** Scenario #2 **
$ pull-lp-source python-jmespath
$ cd python-jmespath*
$ nosetests3
/tmp/jmes/f/python-jmespath-0.9.4/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
/tmp/jmes/f/python-jmespath-0.9.4/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
/tmp/jmes/f/python-jmespath-0.9.4/jmespath/visitor.py:34: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
/tmp/jmes/f/python-jmespath-0.9.4/jmespath/visitor.py:34: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
/tmp/jmes/f/python-jmespath-0.9.4/jmespath/visitor.py:260: SyntaxWarning: "is" with a literal. Did you mean "=="?
if original_result is 0:
.........................................
----------------------------------------------------------------------
Ran 41 tests in 0.039s
OK
$ quilt push -a
Applying patch 0001-satisfy-python38-syntaxwarning.patch
patching file jmespath/visitor.py
Now at patch 0001-satisfy-python38-syntaxwarning.patch
$ nosetests3
.........................................
----------------------------------------------------------------------
Ran 41 tests in 0.021s
OK
$ nosetests
.........................................
----------------------------------------------------------------------
Ran 41 tests in 0.016s
OK
** Scenario #3 **
This could be reproduced outside python-jmespath as follows (a little script I have written to compare result between py2 and py3 :
# reproducer_test.py
----
def reproducer(x,y):
if x is 0 or x is 1:
return y is True or y is False
elif y is 0 or y is 1:
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
$ python2 reproducer_test.py
False
False
$ python3 -W ignore reproducer_test.py
False
False
$ python3 reproducer_test.py
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
False
False
With the fix in a small scale (Again, using my reproducer_test.py):
# reproducer_test.py
----
def reproducer(x,y):
# if x is 0 or x is 1:
if type(x) is int and (x == 0 or x == 1):
return y is True or y is False
# elif y is 0 or y is 1:
elif type(y) is int and (y == 0 or y == 1):
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
# python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
False
False
The above proves that it maintains compatibility in py2 while fixing the "SyntaxWarning "in py3.
[WHERE PROBLEM COULD OCCURS]
Risk: Low
* The fix maintain backward compatibility tested with python3-coverage/python-coverage, and python3-nose/python-nose manually and didn't report any problem.
This package lack of test suite and coverage for things that could have been easily avoided with proper test in place. There may or may not be other places in other code path generating syntax warning, as this is not well tested I'm afraid.
In general, looking upstream:
* No observed regression caused by this fix in upstream issues nor in the Ubuntu release where the fix has landed (Focal/Hirsute).
* No other py3.8 commits (either fix and/or regression fix) found in the project git log.
[OTHER INFORMATIONS]
Upstream issue:
https://github.com/jmespath/jmespath.py/issues/187
Upstream commit:
https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
[ORIGINAL DESCRIPTIONS]
As reported upstream
https://github.com/jmespath/jmespath.py/issues/201
Problems installing jmespath in Ubuntu 20.04 LTS
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
Fixed upstream in https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
Impact: this causes applications like Ansible that have dependencies on python-jmespath to send out warnings. Caused by language changes in Python 3.8.
System is Ubuntu 20.04 LTS on a Pi 4.
emv@pinnatus:~$ apt-cache policy python3-jmespath
python3-jmespath:
Installed: 0.9.4-2
Candidate: 0.9.4-2
Version table:
*** 0.9.4-2 500
500 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 Packages
100 /var/lib/dpkg/status |
[IMPACT]
* Allow broader Ops/Eng team to consume Ansible from our packages instead of the upstream PyPi repositories in order to fix this warning.
* Sanitize package installation:
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
Setting up python3-netaddr (0.7.19-3) ...
/usr/lib/python3/dist-packages/netaddr/strategy/__init__.py:189: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if word_sep is not '':
jmespath and netaddr are 2 runtime dependencies of ansible.
The syntaxwarning while purely cosmetic, may mislead user and their trust in using a sane and tested package.
[TEST CASE]
* Install ansible with syntax fixed of netaddr and jmespath with py3.8
* Install ansible with syntax fixed of netaddr and jmespath with py2
It shouldn't report any syntaxwarning after both fixes.
Extra test case:
** Scenario #1 **
$ pull-lp-source python-jmespath
$ cd python-jmespath*
$ python3-coverage run jmespath/visitor.py
jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
jmespath/visitor.py:34: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
jmespath/visitor.py:34: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
jmespath/visitor.py:260: SyntaxWarning: "is" with a literal. Did you mean "=="?
if original_result is 0:
$ quilt push -a
Applying patch 0001-satisfy-python38-syntaxwarning.patch
patching file jmespath/visitor.py
$ python3-coverage run jmespath/visitor.py
** Scenario #2 **
$ pull-lp-source python-jmespath
$ cd python-jmespath*
$ nosetests3
/tmp/jmes/f/python-jmespath-0.9.4/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
/tmp/jmes/f/python-jmespath-0.9.4/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
/tmp/jmes/f/python-jmespath-0.9.4/jmespath/visitor.py:34: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
/tmp/jmes/f/python-jmespath-0.9.4/jmespath/visitor.py:34: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
/tmp/jmes/f/python-jmespath-0.9.4/jmespath/visitor.py:260: SyntaxWarning: "is" with a literal. Did you mean "=="?
if original_result is 0:
.........................................
----------------------------------------------------------------------
Ran 41 tests in 0.039s
OK
$ quilt push -a
Applying patch 0001-satisfy-python38-syntaxwarning.patch
patching file jmespath/visitor.py
Now at patch 0001-satisfy-python38-syntaxwarning.patch
$ nosetests3
.........................................
----------------------------------------------------------------------
Ran 41 tests in 0.021s
OK
$ nosetests
.........................................
----------------------------------------------------------------------
Ran 41 tests in 0.016s
OK
** Scenario #3 **
This could be reproduced outside python-jmespath as follows (a little script I have written to compare result between py2 and py3 :
# reproducer_test.py
----
def reproducer(x,y):
if x is 0 or x is 1:
return y is True or y is False
elif y is 0 or y is 1:
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
$ python2 reproducer_test.py
False
False
$ python3 -W ignore reproducer_test.py
False
False
$ python3 reproducer_test.py
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
test.py:4: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
False
False
With the fix in a small scale (Again, using my reproducer_test.py):
# reproducer_test.py
----
def reproducer(x,y):
# if x is 0 or x is 1:
if type(x) is int and (x == 0 or x == 1):
return y is True or y is False
# elif y is 0 or y is 1:
elif type(y) is int and (y == 0 or y == 1):
return x is True or x is False
print(reproducer(1,0))
print(reproducer(0,1))
---
# python2 reproducer_test.py
False
False
$ python3 reproducer_test.py
False
False
The above proves that it maintains compatibility in py2 while fixing the "SyntaxWarning "in py3.
[WHERE PROBLEM COULD OCCURS]
Risk: Low
* The fix maintain backward compatibility tested with python3-coverage/python-coverage, and python3-nose/python-nose manually and didn't report any problem.
This package lack of test suite and coverage for things that could have been easily avoided with proper test in place. There may or may not be other places in other code path generating syntax warning, as this is not well tested I'm afraid.
In general, looking upstream:
* No observed regression caused by this fix in upstream issues nor in the Ubuntu release where the fix has landed (Focal/Hirsute).
* No other py3.8 commits (either fix and/or regression fix) found in the project git log.
[OTHER INFORMATIONS]
Upstream issue:
https://github.com/jmespath/jmespath.py/issues/187
Upstream commit:
https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
[ORIGINAL DESCRIPTIONS]
As reported upstream
https://github.com/jmespath/jmespath.py/issues/201
Problems installing jmespath in Ubuntu 20.04 LTS
Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
Fixed upstream in https://github.com/jmespath/jmespath.py/commit/56263b84cdb0feb7c8d54e426ec472f4dd0de44f
Impact: this causes applications like Ansible that have dependencies on python-jmespath to send out warnings. Caused by language changes in Python 3.8.
System is Ubuntu 20.04 LTS on a Pi 4.
emv@pinnatus:~$ apt-cache policy python3-jmespath
python3-jmespath:
Installed: 0.9.4-2
Candidate: 0.9.4-2
Version table:
*** 0.9.4-2 500
500 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 Packages
100 /var/lib/dpkg/status |
|
2021-10-18 16:24:03 |
Ubuntu Foundations Team Bug Bot |
tags |
seg sts sts-sponsors-halves |
patch seg sts sts-sponsors-halves |
|
2021-10-19 12:57:39 |
Łukasz Zemczak |
python-jmespath (Ubuntu Focal): status |
In Progress |
Fix Committed |
|
2021-10-19 12:57:44 |
Łukasz Zemczak |
bug |
|
|
added subscriber Ubuntu Stable Release Updates Team |
2021-10-19 12:57:46 |
Łukasz Zemczak |
bug |
|
|
added subscriber SRU Verification |
2021-10-19 12:57:51 |
Łukasz Zemczak |
tags |
patch seg sts sts-sponsors-halves |
patch seg sts sts-sponsors-halves verification-needed verification-needed-focal |
|
2021-10-19 12:59:01 |
Łukasz Zemczak |
python-jmespath (Ubuntu Bionic): status |
In Progress |
Fix Committed |
|
2021-10-19 12:59:12 |
Łukasz Zemczak |
tags |
patch seg sts sts-sponsors-halves verification-needed verification-needed-focal |
patch seg sts sts-sponsors-halves verification-needed verification-needed-bionic verification-needed-focal |
|
2021-10-19 14:22:33 |
Łukasz Zemczak |
python-netaddr (Ubuntu Focal): status |
In Progress |
Fix Committed |
|
2021-10-19 14:32:49 |
Eric Desrochers |
python-netaddr (Ubuntu Bionic): assignee |
Eric Desrochers (slashd) |
|
|
2021-10-28 13:13:52 |
Launchpad Janitor |
python-jmespath (Ubuntu Focal): status |
Fix Committed |
Fix Released |
|
2021-10-28 13:14:01 |
Launchpad Janitor |
python-jmespath (Ubuntu Bionic): status |
Fix Committed |
Fix Released |
|
2021-10-28 13:34:39 |
Launchpad Janitor |
python-netaddr (Ubuntu Focal): status |
Fix Committed |
Fix Released |
|
2021-10-28 13:35:32 |
Eric Desrochers |
tags |
patch seg sts sts-sponsors-halves verification-needed verification-needed-bionic verification-needed-focal |
patch seg sts sts-sponsors-halves verification-done-bionic verification-done-focal verification-needed |
|
2022-07-18 23:01:27 |
Brian Murray |
python-netaddr (Ubuntu Impish): status |
Confirmed |
Won't Fix |
|