Bug 1972165 - python-networkmanager examples does not work
Summary: python-networkmanager examples does not work
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-networkmanager
Version: 34
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Mairi Dulaney
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-15 11:28 UTC by Anders Blomdell
Modified: 2022-02-12 01:18 UTC (History)
2 users (show)

Fixed In Version: python-networkmanager-2.2-5.fc36 python-networkmanager-2.2-5.fc34 python-networkmanager-2.2-5.fc35
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-02-12 01:14:42 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Simple workaround (mimicking test in SignalDispatcher) (685 bytes, patch)
2021-06-15 11:28 UTC, Anders Blomdell
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Github seveas python-networkmanager issues 84 0 None open RuntimeError 2021-06-15 16:32:57 UTC

Description Anders Blomdell 2021-06-15 11:28:36 UTC
Created attachment 1791236 [details]
Simple workaround (mimicking test in SignalDispatcher)

Description of problem:



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

python3-networkmanager-2.2-1.fc34.noarch
python-networkmanager-doc-2.2-1.fc34.noarch

How reproducible:

Always

Steps to Reproduce:
1. run 'python3 /usr/share/doc/python-networkmanager-doc/examples/info.py'

Actual results:

Traceback (most recent call last):
  File "/usr/share/doc/python-networkmanager-doc/examples/info.py", line 9, in <module>
    print("%-30s %s" % ("Version:", NetworkManager.NetworkManager.Version))
  File "/usr/lib/python3.9/site-packages/NetworkManager.py", line 164, in get_func
    data = self.proxy.Get(interface, name, dbus_interface='org.freedesktop.DBus.Properties')
  File "/usr/lib/python3.9/site-packages/NetworkManager.py", line 263, in proxy
    self._proxy = dbus.SystemBus().get_object(self.dbus_service, self.object_path, follow_name_owner_changes=True)
  File "/usr/lib64/python3.9/site-packages/dbus/bus.py", line 225, in get_object
    self._require_main_loop()   # we don't get the signals otherwise
RuntimeError: To make asynchronous calls, receive signals or export objects, D-Bus connections must be attached to a main loop by passing mainloop=... to the constructor or calling dbus.set_default_main_loop(...)


Expected results:

Version:                       1.30.4
... rest of output deleted



Additional info:

Comment 2 Anders Blomdell 2021-06-15 16:47:33 UTC
Upstream pull request: https://github.com/seveas/python-networkmanager/pull/85

Comment 3 Fedora Update System 2022-02-03 14:21:32 UTC
FEDORA-2022-1f04b2fa4f has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-1f04b2fa4f

Comment 4 Fedora Update System 2022-02-03 14:22:15 UTC
FEDORA-2022-1f04b2fa4f has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 5 Fedora Update System 2022-02-03 14:23:32 UTC
FEDORA-2022-b380e1bff1 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-b380e1bff1

Comment 6 Fedora Update System 2022-02-03 14:23:33 UTC
FEDORA-2022-89c76c9db1 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2022-89c76c9db1

Comment 7 Fedora Update System 2022-02-04 02:14:56 UTC
FEDORA-2022-89c76c9db1 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-89c76c9db1`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-89c76c9db1

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2022-02-04 02:27:40 UTC
FEDORA-2022-b380e1bff1 has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-b380e1bff1`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-b380e1bff1

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2022-02-12 01:14:42 UTC
FEDORA-2022-89c76c9db1 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 10 Fedora Update System 2022-02-12 01:18:33 UTC
FEDORA-2022-b380e1bff1 has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.