Description of problem: "fedpkg build" fails with the following. I seem to have the latest available packages. I don't know if this is actually a python-fedora problem -- reporting against the command that failed. $ fedpkg build --nowait /usr/lib/python2.7/site-packages/fedora/client/bodhi.py:48: DeprecationWarning: fedora.client.bodhi has been deprecated. Please use bodhi.client.bindings instead. DeprecationWarning) Version-Release number of selected component (if applicable): $ rpm -qf `which fedpkg` fedpkg-1.28-1.fc25.noarch $ rpm -q bodhi-client bodhi-client-0.9.12.2-6.fc25.noarch $ rpm -q python-fedora python-fedora-0.9.0-3.fc25.noarch
This is just a harmless warning. What had been fedora.client.bodhi has been moved to bodhi.client.bindings and the warning is there to let authors of the various programs that still use the old version of the bindings to switch over before they get removed from python-fedora. bodhi-client-0.9 will not be fixed for this problem, but bodhi-2.6 (in Fedora 26+) is already converted to use the new location for the bindings. I wouldn't expect fedpkg build to use the Bodhi bindings, so it might be good to move this ticket to be for fedpkg so they can look into what they might be using fedora.client.bindings for.
I believe the problem is that python-fedora is importing BodhiClient in it's fedora.client __init__.py: from fedora.client.bodhi import BodhiClient, BodhiClientException This is done so users can say: from fedora.client import BodhiClient instead of: from fedora.client.bodhi import BodhiClient Unfortunately, it would not be feasible to remove this import because we can't know what third party software might be importing BodhiClient that way and thus it would be a backwards incompatible change. Thus the error will remain until we actually remove BodhiClient from python-fedora, which won't happen until Fedora 25 goes end of life.
Python DeprecationWarnings should not be shown to users by default: https://docs.python.org/2/library/warnings.html#warning-categories Perhaps you have PYTHONWARNINGS set in your environment to a non-defaul value?
(In reply to Randy Barlow from comment #3) > Python DeprecationWarnings should not be shown to users by default: > > https://docs.python.org/2/library/warnings.html#warning-categories > > Perhaps you have PYTHONWARNINGS set in your environment to a non-defaul > value? An environment variable PYTHONWARNINGS isn't set. $ env |grep PYTHONWARNINGS Therefore i will ignore the warning message for now and hope that it will be solved in f26.
Hmmm, I'm not sure why, but I don't see this on my F24 machine with the bodhi client (which has the same version of bodhi and python-fedora though obviously a different release since it's F24): $ bodhi | head -n 1 No handlers could be found for logger "fedora.client.bodhi" Usage: bodhi [options] [build...|package] If I set the PYTHONWARNINGS away from default, I do see the warning: $ PYTHONWARNINGS=once bodhi | head -n 1 /usr/lib/python2.7/site-packages/fedora/client/bodhi.py:48: DeprecationWarning: fedora.client.bodhi has been deprecated. Please use bodhi.client.bindings instead. DeprecationWarning) No handlers could be found for logger "fedora.client.bodhi" Usage: bodhi [options] [build...|package] However, I *do* see it when I use fedpkg: $ fedpkg | head -n 1 /usr/lib/python2.7/site-packages/fedora/client/bodhi.py:48: DeprecationWarning: fedora.client.bodhi has been deprecated. Please use bodhi.client.bindings instead. DeprecationWarning) usage: fedpkg [-h] [--config CONFIG] [--release RELEASE | --dist DIST] <snip> I wonder if fedpkg, python-fedora, or one of their dependencies might be altering the warning settings away from the default? In any case, the bodhi client does correctly hide the warning, so I don't believe it is an issue in Bodhi itself. I'm going to reassign the component to fedpkg for now since it occurs with it and not with the Bodhi CLI directly. Also to reiterate, it is just a warning and the library will remain supported as-is until Fedora 25 reaches end of life. Thus, there is no true harm here, just a scary sounding warning.
Apparently it's rpkg that is enabling the warnings. https://pagure.io/rpkg/blob/master/f/pyrpkg/utils.py#_32 It's using them to report deprecations to the the user though, so that piece of code should be modified to print the warning directly to stderr. That way we can be sure that only warnings we care about will be reported. This should fix it: https://pagure.io/rpkg/pull-request/221
The version drop doesn't make sense - this affects rawhide as well.
Hi Robbie, I agree and I'll set it back. Thanks!
*** Bug 1476820 has been marked as a duplicate of this bug. ***
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle. Changing version to '27'.
Is the version field supposed to contain the first or last release that this issue occurs in? (I'm using F25 and seeing this warning.)
Formally, the version where the bug was found. You might theoretically create a bug for each version it appears in. In practice there isn't any point in doing that except in a few special cases. It would just spam the system. Most maintainers will update in all affected versions in any case.
ATM in rawhide I don't see fedpkg warnings. I think that this bug can be closed or reassigned to exact Fedora version.