[GRASS-git] [OSGeo/grass] 35ebcb: python: Add typing to RPC server and Messenger (#4...

Edouard Choinière noreply at github.com
Sun Nov 3 07:59:45 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/OSGeo/grass
  Commit: 35ebcb33a3275f335f6a86b283e8d5a65676a4e7
      https://github.com/OSGeo/grass/commit/35ebcb33a3275f335f6a86b283e8d5a65676a4e7
  Author: Edouard Choinière <27212526+echoix at users.noreply.github.com>
  Date:   2024-11-03 (Sun, 03 Nov 2024)

  Changed paths:
    M python/grass/pygrass/messages/__init__.py
    M python/grass/pygrass/messages/testsuite/test_pygrass_messages_doctests.py
    M python/grass/pygrass/rpc/__init__.py
    M python/grass/pygrass/rpc/base.py
    M python/grass/temporal/c_libraries_interface.py

  Log Message:
  -----------
  python: Add typing to RPC server and Messenger (#4639)

* grass.pygrass.rpc.base: Add typing annotations for lock and conn

* grass.pygrass.rpc.base: Use context manager for lock in dummy_server

* grass.pygrass.rpc.base: Use context manager for threadLock in RPCServerBase

* grass.pygrass.rpc.base: Remove release lock in context manager

* grass.pygrass.rpc.base: Add more typing annotations

* grass.pygrass.rpc.base: Check for None to satisfy mypy type checking

* grass.pygrass.rpc.base: Remove release lock in context managers, as they would be released when unlocked (RuntimeError: release unlocked lock)

* grass.pygrass.rpc.base: Sort imports

* grass.temporal.c_libraries_interface: Use context manager for lock in c_library_server

* grass.temporal.c_libraries_interface: Add typing annotations for lock and conn

* grass.pygrass.rpc.base: Change date of file header

* grass.pygrass.rpc.base: Update docs of conn argument to mention that it is a multiprocessing.Connection object obtained from multiprocessing.Pipe

* grass.temporal.c_libraries_interface: Change date of file header

* grass.pygrass.rpc: Sort imports

* grass.temporal.c_libraries_interface: Sort imports

* Update docs of conn argument to mention that it is a multiprocessing.Connection object obtained from multiprocessing.Pipe

* grass.pygrass.messages: Sort imports

* Update docs of conn argument to mention that it is a multiprocessing.connection.Connection object obtained from multiprocessing.Pipe

* grass.pygrass.rpc: Use context manager to acquire and release the lock

* Fix typo in python/grass/pygrass/messages/testsuite/test_pygrass_messages_doctests.py

* grass.pygrass.messages: Fix typo in message_server

* grass.pygrass.messages: Missing "IMPORTANT" message type in message_server

* grass.pygrass.messages: Add return type to get_msgr

* grass.pygrass.messages: Add types to signatures in Messenger class and rest of file

* grass.pygrass.messages: Use context manager for acquiring the lock in message_server()

* grass.pygrass.messages: Add types to message_types to track missing conditions

* grass.pygrass.messages: Extract message only for message_types where the variable is used

* grass.pygrass.messages: Add parameter descriptions to percent(self, n, d, s)

* grass.pygrass.messages: Initialize Messenger fields without setting them to None

* grass.pygrass.messages: Fix typo

* grass.pygrass.messages: Change date of file header



To unsubscribe from these emails, change your notification settings at https://github.com/OSGeo/grass/settings/notifications


More information about the grass-commit mailing list