Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1747887

Summary: Running ipa-server-install produces SyntaxWarning: "is not" with a literal. Did you mean "!="?
Product: [Fedora] Fedora Reporter: Jan Pazdziora <jpazdziora>
Component: 389-ds-baseAssignee: mreynolds
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 32CC: mhonek, mreynolds, spichugi, tbordaz, vashirov
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: 2020-09-09 15:41: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 2019-09-02 08:16:16 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 "!="?

I did not see it on Fedora 30 but maybe it's just because Python there was less strict about warning.

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

python3-lib389-1.4.1.6-1.fc32.2.noarch

How reproducible:

Deterministic.

Steps to Reproduce:
1. Run ipa-server-install.

Actual results:

Configuring directory server (dirsrv). Estimated time: 30 seconds
  [1/44]: creating directory server instance

Starting installation...
Created symlink /etc/systemd/system/multi-user.target.wants/dirsrv → /usr/lib/systemd/system/dirsrv@.service.
/usr/lib/python3.8/site-packages/lib389/dirsrv_log.py:148: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if timedata['nanosecond'] is not '':
Opening SELinux policy "//etc/selinux/targeted/policy/policy.31"
Successfully opened SELinux policy "//etc/selinux/targeted/policy/policy.31"
Allocate local instance <class 'lib389.DirSrv'> with ldapi://%2fvar%2frun%2fslapd-EXAMPLE-TEST.socket
  [2/44]: configure autobind for root
  [3/44]: stopping directory server
  [4/44]: updating configuration in dse.ldif

Expected results:

Configuring directory server (dirsrv). Estimated time: 30 seconds
  [1/44]: creating directory server instance

Starting installation...
Created symlink /etc/systemd/system/multi-user.target.wants/dirsrv → /usr/lib/systemd/system/dirsrv@.service.
Opening SELinux policy "//etc/selinux/targeted/policy/policy.31"
Successfully opened SELinux policy "//etc/selinux/targeted/policy/policy.31"
Allocate local instance <class 'lib389.DirSrv'> with ldapi://%2fvar%2frun%2fslapd-EXAMPLE-TEST.socket
  [2/44]: configure autobind for root
  [3/44]: stopping directory server
  [4/44]: updating configuration in dse.ldif

Additional info:

Comment 1 Viktor Ashirov 2019-09-02 08:22:46 UTC
> Running ipa-server-install on Fedora rawhide with Python 3.8, I now see
> SyntaxWarning: "is not" with a literal. Did you mean "!="?
> 
> I did not see it on Fedora 30 but maybe it's just because Python there was
> less strict about warning.

Yes, this warning is new in 3.8:
https://docs.python.org/3.8/whatsnew/3.8.html#changes-in-python-behavior

Comment 2 Fedora Update System 2019-09-26 15:53:57 UTC
FEDORA-2019-ab85eef8cc has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-ab85eef8cc

Comment 3 Fedora Update System 2019-09-26 17:05:37 UTC
FEDORA-2019-d1edc3a2b8 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-d1edc3a2b8

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