Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-3151

Cannot create datagram endpoint with QAsyncioEventLoop

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 6.8.3
    • QtAsyncio
    • None
    • All

      Trying to create datagram endpoint when async application is running with QAsyncioEventLoop results in the following error:

      NotImplementedError: QAsyncioEventLoop.create_datagram_endpoint() is not implemented yet

      Minimal example to reproduce the issue:

       

      #! /usr/bin/env python3
      
      import sys
      import asyncio
      
      from PySide6 import QtAsyncio
      from PySide6 import QtWidgets
      
      async def main():
          loop = asyncio.get_running_loop()
          transport, protocol = await loop.create_datagram_endpoint(asyncio.DatagramProtocol, remote_addr=('127.0.0.1', 8000))
          await asyncio.get_running_loop().create_future()
      
      if __name__ == "__main__":
          app = QtWidgets.QApplication(sys.argv)
          asyncio.set_event_loop_policy(QtAsyncio.QAsyncioEventLoopPolicy())
          asyncio.run(main())
      

       

       

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            crmaurei Cristian Maureira-Fredes
            artfwo Artem Popov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes