Bug 1747895

Summary: Running ipa-server-install produces SyntaxWarning: "is not" with a literal. Did you mean "!="?
Product: [Fedora] Fedora Reporter: Jan Pazdziora (Red Hat) <jpazdziora>
Component: freeipaAssignee: IPA Maintainers <ipa-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 32CC: abokovoy, cheimes, contribs, fcami, frenaud, ipa-maint, jcholast, jhrozek, jpazdziora, lslebodn, pvoborni, rcritten, ssorce, twoerner
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-03-31 07:14:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Pazdziora (Red Hat) 2019-09-02 08:33:21 UTC
Description of problem:

Running ipa-server-install on Fedora rawhide with Python 3.8, I now see
SyntaxWarning: "is not" with a literal. Did you mean "!="?

Version-Release number of selected component (if applicable):

python3-ipaclient-4.8.1-2.fc32.noarch

How reproducible:

Deterministic in each new container but I only see it during the first invocation.

Steps to Reproduce:
1. ipa-server-install

Actual results:

# ipa-server-install
/usr/lib/python3.8/site-packages/SSSDConfig/ipachangeconf.py:399: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if len(sectopts) is not 0:
/usr/lib/python3.8/site-packages/ipaclient/install/ipachangeconf.py:478: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if len(sectopts) is not 0:

The log file for this installation can be found in /var/log/ipaserver-install.log
==============================================================================
This program will set up the FreeIPA Server.
Version 4.8.1

Expected results:

# ipa-server-install
The log file for this installation can be found in /var/log/ipaserver-install.log
==============================================================================
This program will set up the FreeIPA Server.
Version 4.8.1

Additional info:

Comment 1 Jan Pazdziora (Red Hat) 2019-09-02 08:34:07 UTC
The other warning was filed as 1747894 against sssd.

Comment 2 François Cami 2019-09-02 08:58:26 UTC
Upstream ticket:
https://pagure.io/freeipa/issue/8057

Comment 3 Florence Blanc-Renaud 2019-09-02 15:40:52 UTC
Fixed upstream
master:
https://pagure.io/freeipa/c/02262ac7cfa52926fd0c943ddf6e96269e90e218

Comment 4 Lukas Slebodnik 2019-09-02 23:42:26 UTC
There are few more:

/usr/lib/python3.8/site-packages/ipaserver/plugins/config.py:506: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if entry_attrs['ipasearchrecordslimit'] is 0:
/usr/lib/python3.8/site-packages/ipaserver/plugins/config.py:511: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if entry_attrs['ipasearchtimelimit'] is 0:

Comment 5 Florence Blanc-Renaud 2019-09-03 09:42:03 UTC
Fixed upstream
ipa-4-8:
https://pagure.io/freeipa/c/79b9d59674e08250e8dd060ed3f1e9e56dd3ae38

Comment 6 François Cami 2019-09-03 09:51:08 UTC
Hi Lukas, thanks, I'll fix them this afternoon.

Comment 7 François Cami 2019-09-03 10:06:58 UTC
Or, rather, Flo has already done it: https://github.com/freeipa/freeipa/pull/3614

Comment 8 Christian Heimes 2019-09-04 06:28:59 UTC
Fixed upstream
master:
https://pagure.io/freeipa/c/4a437a3c422ee8a7b3dfee9a90abc2d9cc9e7990

Comment 10 Florence Blanc-Renaud 2019-09-04 08:35:56 UTC
Fixed upstream
ipa-4-8:
https://pagure.io/freeipa/c/129adb40626a1b91269d71cc8f21d193f1e65c8c

Comment 11 Florence Blanc-Renaud 2019-09-04 12:43:20 UTC
Fixed upstream
ipa-4-8:
https://pagure.io/freeipa/c/576e2ce855e3cc8ae31752ecba0f3c5114e5bf7a

Comment 13 Ben Cotton 2020-02-11 17:57:24 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.