Bug 2327983

Summary: python-pyvlx fails to build with Python 3.14: RuntimeError: There is no current event loop in thread 'MainThread'.
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-pyvlxAssignee: Fabian Affolter <mail>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: fti-bugs, ksurma, mail, mhroncok
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: 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:
Bug Depends On:    
Bug Blocks: 2322407, 2339432, 2339435    

Description Karolina Surma 2024-11-22 10:10:44 UTC
python-pyvlx fails to build with Python 3.14.0a2.

_____________________________ TestScenes.test_len ______________________________

self = <scenes_test.TestScenes testMethod=test_len>

    def test_len(self):
        """Test len."""
>       pyvlx = PyVLX()

test/scenes_test.py:54: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../BUILDROOT/usr/lib/python3.14/site-packages/pyvlx/pyvlx.py:27: in __init__
    self.loop = loop or asyncio.get_event_loop()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <asyncio.unix_events._UnixDefaultEventLoopPolicy object at 0x7fcc83f1dfd0>

    def get_event_loop(self):
        """Get the event loop for the current context.
    
        Returns an instance of EventLoop or raises an exception.
        """
        if self._local._loop is None:
>           raise RuntimeError('There is no current event loop in thread %r.'
                               % threading.current_thread().name)
E           RuntimeError: There is no current event loop in thread 'MainThread'.

/usr/lib64/python3.14/asyncio/events.py:681: RuntimeError
=========================== short test summary info ============================
FAILED test/config_test.py::TestConfig::test_config_explicit - RuntimeError: ...
FAILED test/config_test.py::TestConfig::test_config_file - RuntimeError: Ther...
FAILED test/config_test.py::TestConfig::test_config_file_with_port - RuntimeE...
FAILED test/config_test.py::TestConfig::test_config_non_existent - RuntimeErr...
FAILED test/config_test.py::TestConfig::test_config_wrong1 - RuntimeError: Th...
FAILED test/config_test.py::TestConfig::test_config_wrong2 - RuntimeError: Th...
FAILED test/config_test.py::TestConfig::test_config_wrong3 - RuntimeError: Th...
FAILED test/get_limitation_test.py::TestGetLimitation::test_get_name - Runtim...
FAILED test/get_limitation_test.py::TestGetLimitation::test_handle_frame - Ru...
FAILED test/get_limitation_test.py::TestGetLimitation::test_max_value - Runti...
FAILED test/get_limitation_test.py::TestGetLimitation::test_min_value - Runti...
FAILED test/get_limitation_test.py::TestGetLimitation::test_request_frame - R...
FAILED test/lightening_device_test.py::TestLighteningDevice::test_eq - Runtim...
FAILED test/lightening_device_test.py::TestLighteningDevice::test_light_str
FAILED test/lightening_device_test.py::TestLighteningDevice::test_nq - Runtim...
FAILED test/node_helper_test.py::TestNodeHelper::test_blade - RuntimeError: T...
FAILED test/node_helper_test.py::TestNodeHelper::test_blind - RuntimeError: T...
FAILED test/node_helper_test.py::TestNodeHelper::test_garage_door - RuntimeEr...
FAILED test/node_helper_test.py::TestNodeHelper::test_gate - RuntimeError: Th...
FAILED test/node_helper_test.py::TestNodeHelper::test_gate_with_angular_position
FAILED test/node_helper_test.py::TestNodeHelper::test_light - RuntimeError: T...
FAILED test/node_helper_test.py::TestNodeHelper::test_light_on_off - RuntimeE...
FAILED test/node_helper_test.py::TestNodeHelper::test_linar_angular_position_of_garage_door
FAILED test/node_helper_test.py::TestNodeHelper::test_no_type - RuntimeError:...
FAILED test/node_helper_test.py::TestNodeHelper::test_roller_shutter - Runtim...
FAILED test/node_helper_test.py::TestNodeHelper::test_window - RuntimeError: ...
FAILED test/node_helper_test.py::TestNodeHelper::test_window_with_rain_sensor
FAILED test/nodes_test.py::TestNodes::test_add_item_failed - RuntimeError: Th...
FAILED test/nodes_test.py::TestNodes::test_add_same_object - RuntimeError: Th...
FAILED test/nodes_test.py::TestNodes::test_clear - RuntimeError: There is no ...
FAILED test/nodes_test.py::TestNodes::test_contains_item - RuntimeError: Ther...
FAILED test/nodes_test.py::TestNodes::test_get_item - RuntimeError: There is ...
FAILED test/nodes_test.py::TestNodes::test_get_item_failed - RuntimeError: Th...
FAILED test/nodes_test.py::TestNodes::test_iter - RuntimeError: There is no c...
FAILED test/nodes_test.py::TestNodes::test_len - RuntimeError: There is no cu...
FAILED test/nodes_test.py::TestNodes::test_node_str - RuntimeError: There is ...
FAILED test/opening_device_test.py::TestOpeningDevice::test_awning_str - Runt...
FAILED test/opening_device_test.py::TestOpeningDevice::test_blade_str - Runti...
FAILED test/opening_device_test.py::TestOpeningDevice::test_blind_str - Runti...
FAILED test/opening_device_test.py::TestOpeningDevice::test_eq - RuntimeError...
FAILED test/opening_device_test.py::TestOpeningDevice::test_nq - RuntimeError...
FAILED test/opening_device_test.py::TestOpeningDevice::test_roller_shutter_str
FAILED test/opening_device_test.py::TestOpeningDevice::test_window_str - Runt...
FAILED test/scene_test.py::TestScene::test_get_name - RuntimeError: There is ...
FAILED test/scene_test.py::TestScene::test_str - RuntimeError: There is no cu...
FAILED test/scenes_test.py::TestScenes::test_add_item_failed - RuntimeError: ...
FAILED test/scenes_test.py::TestScenes::test_add_same_object - RuntimeError: ...
FAILED test/scenes_test.py::TestScenes::test_clear - RuntimeError: There is n...
FAILED test/scenes_test.py::TestScenes::test_get_item - RuntimeError: There i...
FAILED test/scenes_test.py::TestScenes::test_get_item_failed - RuntimeError: ...
FAILED test/scenes_test.py::TestScenes::test_iter - RuntimeError: There is no...
FAILED test/scenes_test.py::TestScenes::test_len - RuntimeError: There is no ...
======================== 52 failed, 262 passed in 0.86s ========================

According to https://docs.python.org/dev/whatsnew/3.14.html#id3

Removed implicit creation of event loop by asyncio.get_event_loop(). It now raises a RuntimeError if there is no current event loop. (Contributed by Kumar Aditya in gh-126353.)

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.14/fedora-rawhide-x86_64/08292600-python-pyvlx/

For all our attempts to build python-pyvlx with Python 3.14, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/package/python-pyvlx/

Testing and mass rebuild of packages is happening in copr.
You can follow these instructions to test locally in mock if your package builds with Python 3.14:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/

Let us know here if you have any questions.

Python 3.14 is planned to be included in Fedora 43.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.14.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires),
so if this package is required a lot, it's important for us to get it fixed soon.

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Aoife Moloney 2025-02-26 13:17:36 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle.
Changing version to 42.

Comment 2 Karolina Surma 2025-06-11 16:03:26 UTC
*** Bug 2372088 has been marked as a duplicate of this bug. ***