When installing FreeIPA server on fedora 31 with the python library, the following message is displayed:
... [1/44]: creating directory server instance /usr/lib/python3.7/site-packages/lib389/instance/setup.py:786: BytesWarning: str() on a bytes instance self.log.debug(f"CMD: {' '.join(result.args)} ; STDOUT: {result.stdout} ; STDERR: {result.stderr}") [2/44]: configure autobind for root ...
Uninstallation also produces the same type of message:
... Unconfiguring directory server /usr/lib/python3.7/site-packages/lib389/instance/remove.py:105: BytesWarning: str() on a bytes instance _log.debug(f"CMD: {' '.join(result.args)} ; STDOUT: {result.stdout} ; STDERR: {result.stderr}") Unconfiguring ipa-custodia ...
389-ds-base-1.4.2.5-3.fc31.x86_64 freeipa-server-4.9.0.dev201912201432+git-0.fc31.x86_64 (from copr @freeipa/freeipa-master-nightly)
In the file lib389/instance/setup.py, the line 786:
lib389/instance/setup.py
self.log.debug(f"CMD: {' '.join(result.args)} ; STDOUT: {result.stdout} ; STDERR: {result.stderr}")
should use result.stdout.decode('utf-8') and result.stderr.decode('utf-8')
result.stdout.decode('utf-8')
result.stderr.decode('utf-8')
In the file lib389/instance/remove.py the line 105:
lib389/instance/remove.py
_log.debug(f"CMD: {' '.join(result.args)} ; STDOUT: {result.stdout.decode()} ; STDERR: {result.stderr.decode()}")
Indeed, this is correct @frenaud, good spotting. We have wrappers for the decoding that should have been used for the py2 <-> py3 interop. I'll put in a pr to resolve this shortly.
Metadata Update from @firstyear: - Custom field origin adjusted to None - Custom field reviewstatus adjusted to None
https://pagure.io/389-ds-base/pull-request/50801
Metadata Update from @mreynolds: - Issue set to the milestone: 1.4.2
commit c39c7bb
32c1505..cec2cb3 389-ds-base-1.4.2 -> 389-ds-base-1.4.2
Metadata Update from @mreynolds: - Issue close_status updated to: fixed - Issue status updated to: Closed (was: Open)
Metadata Update from @mreynolds: - Issue assigned to firstyear
Commit 828aad0 relates to this ticket
Setup.py and remove.py were missing the ensure_list_str() import.
e84bbce..ad4d3df 389-ds-base-1.4.2 -> 389-ds-base-1.4.2
Metadata Update from @mreynolds: - Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1791095
Issue linked to Bugzilla: Bug 1791095
389-ds-base is moving from Pagure to Github. This means that new issues and pull requests will be accepted only in 389-ds-base's github repository.
This issue has been cloned to Github and is available here: - https://github.com/389ds/389-ds-base/issues/3852
If you want to receive further updates on the issue, please navigate to the github issue and click on subscribe button.
subscribe
Thank you for understanding. We apologize for all inconvenience.
Metadata Update from @spichugi: - Issue close_status updated to: wontfix (was: fixed)
Login to comment on this ticket.