zeroc-ice 3.8.0__cp313-cp313-win_amd64.whl → 3.8.0.post1__cp313-cp313-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. Ice/BTEndpointType.py +7 -0
  2. Ice/BTSEndpointType.py +7 -0
  3. Ice/Blobject.py +1 -1
  4. Ice/Communicator.py +130 -118
  5. Ice/CompressBatch.py +12 -12
  6. Ice/Current.py +5 -6
  7. Ice/EndpointSelectionType.py +8 -8
  8. Ice/EventLoopAdapter.py +4 -4
  9. Ice/Exception.py +6 -8
  10. Ice/FormatType.py +8 -1
  11. Ice/Future.py +78 -78
  12. Ice/IcePyTypes.py +2 -0
  13. Ice/ImplicitContext.py +28 -35
  14. Ice/InitializationData.py +23 -22
  15. Ice/InvocationFuture.py +31 -34
  16. Ice/LocalException.py +1 -1
  17. Ice/LocalExceptions.py +82 -94
  18. Ice/LogMessageType.py +16 -15
  19. Ice/Logger.py +10 -10
  20. Ice/Object.py +22 -17
  21. Ice/ObjectAdapter.py +200 -167
  22. Ice/ObjectPrx.py +196 -202
  23. Ice/OperationMode.py +19 -14
  24. Ice/ProcessLogger.py +18 -2
  25. Ice/Properties.py +63 -79
  26. Ice/Proxy.py +73 -10
  27. Ice/ReplyStatus.py +42 -35
  28. Ice/SSLEndpointType.py +7 -0
  29. Ice/ServantLocator.py +30 -35
  30. Ice/SliceInfo.py +3 -3
  31. Ice/SlicedData.py +1 -1
  32. Ice/TCPEndpointType.py +7 -0
  33. Ice/ToStringMode.py +19 -19
  34. Ice/UDPEndpointType.py +7 -0
  35. Ice/URIEndpointType.py +7 -0
  36. Ice/UnknownSlicedValue.py +11 -3
  37. Ice/UserException.py +1 -1
  38. Ice/Util.py +27 -26
  39. Ice/Value.py +7 -7
  40. Ice/WSEndpointType.py +7 -0
  41. Ice/WSSEndpointType.py +7 -0
  42. Ice/__init__.py +2 -0
  43. Ice/iAPEndpointType.py +7 -0
  44. Ice/iAPSEndpointType.py +7 -0
  45. IceGrid/LoadSample.py +12 -12
  46. IceGrid/ServerState.py +29 -25
  47. IcePy-stubs/__init__.pyi +151 -152
  48. IcePy.cp313-win_amd64.pdb +0 -0
  49. IcePy.cp313-win_amd64.pyd +0 -0
  50. {zeroc_ice-3.8.0.dist-info → zeroc_ice-3.8.0.post1.dist-info}/METADATA +1 -1
  51. {zeroc_ice-3.8.0.dist-info → zeroc_ice-3.8.0.post1.dist-info}/RECORD +54 -54
  52. {zeroc_ice-3.8.0.dist-info → zeroc_ice-3.8.0.post1.dist-info}/WHEEL +0 -0
  53. {zeroc_ice-3.8.0.dist-info → zeroc_ice-3.8.0.post1.dist-info}/entry_points.txt +0 -0
  54. {zeroc_ice-3.8.0.dist-info → zeroc_ice-3.8.0.post1.dist-info}/top_level.txt +0 -0
Ice/InitializationData.py CHANGED
@@ -8,9 +8,8 @@ from typing import TYPE_CHECKING
8
8
  if TYPE_CHECKING:
9
9
  from collections.abc import Callable
10
10
 
11
- from IcePy import BatchRequest, Connection
12
-
13
11
  from .EventLoopAdapter import EventLoopAdapter
12
+ from .IcePyTypes import BatchRequest, Connection
14
13
  from .Logger import Logger
15
14
  from .Properties import Properties
16
15
  from .UserException import UserException
@@ -20,35 +19,37 @@ if TYPE_CHECKING:
20
19
  @dataclass
21
20
  class InitializationData:
22
21
  """
23
- The attributes of this class are used to initialize a new communicator instance.
22
+ Represents a set of options that you can specify when initializing a communicator.
24
23
 
25
24
  Attributes
26
25
  ----------
27
26
  properties : Ice.Properties | None
28
- The properties to use for the communicator.
29
- logger : Logger | None
30
- The logger to use for the communicator.
27
+ The properties for the communicator.
28
+ If not ``None``, this corresponds to the object returned by the :func:`Communicator.getProperties` function.
29
+ logger : Ice.Logger | None
30
+ The logger for the communicator.
31
31
  threadStart : Callable[[], None] | None
32
- A callable that is invoked for each new Ice thread that is started.
32
+ A :class:`Callable` that is invoked whenever the communicator starts a new thread.
33
33
  threadStop : Callable[[], None] | None
34
- A callable that is invoked when an Ice thread is stopped.
34
+ A :class:`Callable` that is invoked whenever a thread created by the communicator is about to be destroyed.
35
35
  executor : Callable[[Callable[[], None], Connection], None] | None
36
- A callable that is invoked when Ice needs to execute an activity. The callable
37
- receives two arguments: a callable and an Ice.Connection object. The executor must
38
- eventually invoke the callable with no arguments.
39
- batchRequestInterceptor : Callable[[BatchRequest, int, int], None] | None
40
- A callable that will be invoked when a batch request is queued. The callable receives
41
- three arguments: a BatchRequest object, an integer representing the number of requests
42
- in the queue, and an integer representing the number of bytes consumed by the requests
43
- in the queue. The interceptor must eventually invoke the enqueue method on the BatchRequest object.
36
+ A :class:`Callable` that the communicator invokes to execute dispatches and async invocation callbacks.
37
+ The callable receives two arguments: a callable and an Ice.Connection object.
38
+ The executor must eventually invoke the callable with no arguments.
39
+ batchRequestInterceptor : Callable[[Ice.BatchRequest, int, int], None] | None
40
+ A :class:`Callable` that is invoked by the Ice runtime to enqueue a batch request.
41
+ The callable receives three arguments: a BatchRequest object, an integer representing the number of requests
42
+ currently in the queue, and an integer representing the number of bytes consumed by the requests in the queue.
43
+ The interceptor must eventually invoke the enqueue function on the BatchRequest object.
44
44
  eventLoopAdapter : Ice.EventLoopAdapter | None
45
- An event loop adapter used to run coroutines and wrap futures. If provided. This adapter is responsible for
46
- executing coroutines returned by Ice asynchronous dispatch methods and for wrapping Ice futures (from Ice
45
+ An event loop adapter used to run coroutines and wrap futures. If provided, this adapter is responsible for
46
+ executing coroutines returned by Ice asynchronous dispatch functions and for wrapping Ice futures (from Ice
47
47
  Async APIs) into futures that can be awaited in the application's event loop.
48
- sliceLoader : Callable[[str], Value | UserException | None] | None
49
- A callable that creates class and exception instances from Slice type IDs. The callable receives a type ID
50
- or compact type ID as a string argument and returns a new instance of the class or exception identified by this
51
- ID. The implementation returns None when it cannot find the corresponding class.
48
+ sliceLoader : Callable[[str], Ice.Value | Ice.UserException | None] | None
49
+ A :class:`Callable` used to create instances of Slice classes and user exceptions.
50
+ Applications can supply a custom slice loader that the Ice runtime will use during unmarshaling.
51
+ The callable receives one argument: a type ID or compact type ID (as a string) and returns a new instance of the
52
+ corresponding class or exception, or ``None`` if no such class or exception could be found.
52
53
  """
53
54
 
54
55
  properties: Properties | None = None
Ice/InvocationFuture.py CHANGED
@@ -13,12 +13,13 @@ class InvocationFuture(Future):
13
13
  """
14
14
  A Future object representing the result of an AMI (Asynchronous Method Invocation) request.
15
15
 
16
- InvocationFuture objects are returned by AMI requests. The application can use an InvocationFuture object to
17
- wait for the result of the AMI request or register a callback that will be invoked when the result becomes
18
- available.
16
+ Instances of ``InvocationFuture`` are returned by AMI requests, and applications can either wait for the result
17
+ of the request to become available, or register a callback which will be invoked when the result becomes available.
19
18
 
20
- This class provides the same functionality as `Future`, with the addition of "sent callbacks," which are invoked
21
- when the request is sent.
19
+ Notes
20
+ -----
21
+ This class provides the same functionality as :class:`Ice.Future` with the addition of "sent callbacks";
22
+ callbacks which are invoked when the request has been sent.
22
23
  """
23
24
 
24
25
  def __init__(self, asyncInvocationContext: IcePy.AsyncInvocationContext):
@@ -33,16 +34,18 @@ class InvocationFuture(Future):
33
34
  """
34
35
  Cancels the invocation.
35
36
 
36
- This method invokes :py:meth:`Future.cancel` to cancel the underlying future. If the cancellation is
37
- successful, the associated invocation is also cancelled.
37
+ This function invokes :func:`Future.cancel` to cancel the underlying future.
38
+ If the cancellation is successful, the associated invocation is also cancelled.
38
39
 
39
- Cancelling an invocation prevents a queued invocation from being sent. If the invocation has already been sent,
40
- cancellation ensures that any reply from the server is ignored.
40
+ Cancelling an invocation prevents a queued invocation from being sent.
41
+ If the invocation has already been sent, cancellation ensures that any reply from the server is ignored.
41
42
 
42
- Cancellation is a local operation with no effect on the server.
43
+ After cancellation, :func:`done` returns ``True``, and attempting to retrieve the result raises an
44
+ :class:`Ice.InvocationCanceledException`.
43
45
 
44
- After cancellation, :py:meth:`done` returns ``True``, and attempting to retrieve the result raises an
45
- :py:exc:`Ice.InvocationCanceledException`.
46
+ Notes
47
+ -----
48
+ Cancellation is a local operation with no effect on the server.
46
49
 
47
50
  Returns
48
51
  -------
@@ -56,40 +59,38 @@ class InvocationFuture(Future):
56
59
 
57
60
  def is_sent(self) -> bool:
58
61
  """
59
- Check if the request has been sent.
62
+ Checks if the request has been sent.
60
63
 
61
64
  Returns
62
65
  -------
63
66
  bool
64
- True if the request has been sent, otherwise False.
67
+ ``True`` if the request has been sent, otherwise ``False``.
65
68
  """
66
69
  with self._condition:
67
70
  return self._sent
68
71
 
69
72
  def is_sent_synchronously(self) -> bool:
70
73
  """
71
- Check if the request was sent synchronously.
74
+ Checks if the request was sent synchronously.
72
75
 
73
76
  Returns
74
77
  -------
75
78
  bool
76
- True if the request was sent synchronously, otherwise False.
79
+ ``True`` if the request was sent synchronously, otherwise ``False``.
77
80
  """
78
81
  with self._condition:
79
82
  return self._sentSynchronously
80
83
 
81
84
  def add_sent_callback(self, fn: Callable[[bool], None]) -> None:
82
85
  """
83
- Attach a callback to be executed when the invocation is sent.
84
-
85
- The callback `fn` is called with a boolean argument, indicating whether the invocation was sent synchronously.
86
-
87
- If the future has already been sent, `fn` is called immediately from the calling thread.
86
+ Attaches a callback function which will be called when the invocation is sent.
87
+ If the invocation has already been sent, ``fn`` is called immediately from the calling thread.
88
88
 
89
89
  Parameters
90
90
  ----------
91
- fn : Callable
91
+ fn : Callable[[bool], None]
92
92
  The function to execute when the invocation is sent.
93
+ It accepts a single boolean argument which is only ``True`` if the invocation was sent synchronously.
93
94
  """
94
95
  with self._condition:
95
96
  if not self._sent:
@@ -99,31 +100,27 @@ class InvocationFuture(Future):
99
100
 
100
101
  def sent(self, timeout: int | float | None = None) -> bool:
101
102
  """
102
- Wait for the operation to be sent.
103
-
104
- This method waits up to `timeout` seconds for the operation to be sent and then returns
105
- whether it was sent synchronously.
103
+ Waits until the invocation has been sent.
106
104
 
107
- If the operation has not been sent within the specified time, a `TimeoutException` is raised.
108
- If the future was cancelled before being sent, an `InvocationCanceledException` is raised.
105
+ If the invocation has not been sent, this function will wait up to ``timeout``-many seconds for it to send.
109
106
 
110
107
  Parameters
111
108
  ----------
112
- timeout : int | float, optional
113
- Maximum time (in seconds) to wait for the operation to be sent. If `None`, the method waits
114
- indefinitely.
109
+ timeout : int | float | None, optional
110
+ Maximum time (in seconds) to wait for the invocation to be sent.
111
+ If ``None`` (the default), this function waits indefinitely.
115
112
 
116
113
  Returns
117
114
  -------
118
115
  bool
119
- True if the operation was sent synchronously, otherwise False.
116
+ ``True`` if the invocation was sent synchronously, otherwise ``False``.
120
117
 
121
118
  Raises
122
119
  ------
123
120
  TimeoutException
124
- If the operation was not sent within the specified timeout.
121
+ If the invocation was not sent within the specified timeout.
125
122
  InvocationCanceledException
126
- If the operation was cancelled before it was sent.
123
+ If the invocation was cancelled before it was sent.
127
124
  """
128
125
  with self._condition:
129
126
  if not self._wait(timeout, lambda: not self._sent):
Ice/LocalException.py CHANGED
@@ -4,7 +4,7 @@ from .Exception import Exception as IceException
4
4
 
5
5
 
6
6
  class LocalException(IceException):
7
- """The base class for Ice run-time exceptions."""
7
+ """Base class for all Ice exceptions not defined in Slice."""
8
8
 
9
9
  pass
10
10