| 1 |
ChangeLog |
| 2 |
========= |
| 3 |
|
| 4 |
.. note:: The aiorpcX API changes regularly and is still unstable. I hope to finalize it |
| 5 |
for a 1.0 release in the coming months. |
| 6 |
|
| 7 |
|
| 8 |
Version 0.24 (16 Jan 2024) |
| 9 |
---------------------------- |
| 10 |
|
| 11 |
* bump websockets library to >=14.0 and Python version to >=3.9 |
| 12 |
|
| 13 |
Version 0.23 (17 Mar 2024) |
| 14 |
---------------------------- |
| 15 |
|
| 16 |
* fix packaging problem with 0.23 |
| 17 |
|
| 18 |
Version 0.23 (17 Mar 2024) |
| 19 |
---------------------------- |
| 20 |
|
| 21 |
* TaskTimeout now derives from Exception not CancelledError |
| 22 |
* make several tests more robust |
| 23 |
* move to flake8 |
| 24 |
|
| 25 |
Version 0.22.1 (25 May 2021) |
| 26 |
---------------------------- |
| 27 |
|
| 28 |
* release tasks as they complete in the task group; this might appear as a memory-leak for |
| 29 |
long-standing sessions |
| 30 |
|
| 31 |
Version 0.22.0 (25 Apr 2021) |
| 32 |
---------------------------- |
| 33 |
|
| 34 |
* join() waits for all cancelled tasks to finish, including daemonic ones |
| 35 |
|
| 36 |
Version 0.21.1 (24 Apr 2021) |
| 37 |
---------------------------- |
| 38 |
|
| 39 |
* handle peername of None in network code |
| 40 |
* strip redundant whitespace from JSON (SomberNight) |
| 41 |
|
| 42 |
Version 0.21.0 (11 Mar 2021) |
| 43 |
---------------------------- |
| 44 |
|
| 45 |
* There have been significant semantic and API changes for TaskGroups. Their behaviour is |
| 46 |
now consistent, reliable and they have the same semantics as curio. As such I consider |
| 47 |
their API finalized and stable. In addition to the notes below for 0.20.x: |
| 48 |
|
| 49 |
* closed() became the attribute joined. |
| 50 |
* cancel_remaining() does not cancel daemonic tasks. As before it waits for the |
| 51 |
cancelled tasks to complete. |
| 52 |
* On return from join() all tasks including deamonic ones have been cancelled, but nothing |
| 53 |
is waited for. If leaving a TaskGroup context because of an exception, |
| 54 |
cancel_remaining() - which can block - is called before join(). |
| 55 |
|
| 56 |
Version 0.20.2 (10 Mar 2021) |
| 57 |
---------------------------- |
| 58 |
|
| 59 |
* result, exception, results and exceptions are now attributes. They raise a RuntimeError |
| 60 |
if called before a TaskGroup's join() operation has returned. |
| 61 |
|
| 62 |
|
| 63 |
Version 0.20.1 (06 Mar 2021) |
| 64 |
---------------------------- |
| 65 |
|
| 66 |
* this release contains some significant API changes which users will need to carefully check |
| 67 |
their code for. |
| 68 |
* the report_crash argument to spawn() is removed; instead a new one is named daemon. A |
| 69 |
daemon task's exception (if any) is ignored by a TaskGroup. |
| 70 |
* the join() method of TaskGroup (and so also when TaskGroup is used as a context manager) |
| 71 |
does not raise the exception of failed tasks. The full semantics are precisely |
| 72 |
described in the TaskGroup() docstring. Briefly: any task being cancelled or raising an |
| 73 |
exception causes join() to finish and all remaining tasks, including daemon tasks, to be |
| 74 |
cancelled. join() does not propagate task exceptions. |
| 75 |
* the cancel_remaining() method of TaskGroup does not propagate any task exceptions |
| 76 |
* TaskGroup supports the additional attributes 'tasks' and 'daemons'. Also, after join() |
| 77 |
has completed, result() returns the result (or raises the exception) of the first |
| 78 |
completed task. exception() returns the exception (if any) of the first completed task. |
| 79 |
results() returns the results of all tasks and exceptions() returns the exceptions |
| 80 |
raised by all tasks. daemon tasks are ignored. |
| 81 |
* The above changes bring the implementation in line with curio proper and the semantic |
| 82 |
changes it made over a year ago, and ensure that join() behaves consistently when called |
| 83 |
more than once. |
| 84 |
|
| 85 |
Version 0.18.4 (20 Nov 2019) |
| 86 |
---------------------------- |
| 87 |
|
| 88 |
* handle time.time() not making progress. fixing `#26`_ (SomberNight) |
| 89 |
* handle SOCKSError in _connect_one (SomberNight) |
| 90 |
* add SOCKSRandomAuth: Jeremy Rand |
| 91 |
|
| 92 |
Version 0.18.3 (19 May 2019) |
| 93 |
---------------------------- |
| 94 |
|
| 95 |
* minor bugfix release, fixing `#22`_ |
| 96 |
* make JSON IDs independent across sessions, make websockets dependency optional (SomberNight) |
| 97 |
|
| 98 |
Version 0.18.2 (19 May 2019) |
| 99 |
---------------------------- |
| 100 |
|
| 101 |
* minor bugfix release |
| 102 |
|
| 103 |
Version 0.18.1 (09 May 2019) |
| 104 |
---------------------------- |
| 105 |
|
| 106 |
* convert incoming websocket text frames to binary. Convert outgoing messages to text |
| 107 |
frames if possible. |
| 108 |
|
| 109 |
Version 0.18.0 (09 May 2019) |
| 110 |
---------------------------- |
| 111 |
|
| 112 |
* Add *websocket* support as client and server by using Aymeric Augustin's excellent |
| 113 |
`websockets <https://github.com/aaugustin/websockets/>`_ package. |
| 114 |
|
| 115 |
Unfortunately this required changing several APIs. The code now distinguishes the |
| 116 |
previous TCP and SSL based-connections as *raw sockets* from the new websockets. The |
| 117 |
old Connector and Server classes are gone. Use `connect_rs()` and `serve_rs()` to |
| 118 |
connect a client and start a server for raw sockets; and `connect_ws()` and `serve_ws()` |
| 119 |
to do the same for websockets. |
| 120 |
|
| 121 |
SessionBase no longer inherits `asyncio.Protocol` as it is now transport-independent. |
| 122 |
Sessions no longer take a framer in their constructor: websocket messages are already |
| 123 |
framed, so instead a framer is passed to `connect_rs()` and `serve_rs()` if the default |
| 124 |
`NewlineFramer` is not wanted. |
| 125 |
|
| 126 |
A session is only instantiated when a connection handshake is completed, so |
| 127 |
`connection_made()` is no longer a method. `connection_lost()` and `abort()` are now |
| 128 |
coroutines; if overriding either be sure to call the base class implementation. |
| 129 |
|
| 130 |
`is_send_buffer_full()` was removed. |
| 131 |
* Updated and added new examples |
| 132 |
* JSON RPC message handling was made more efficient by using futures instead of events |
| 133 |
internally |
| 134 |
|
| 135 |
Version 0.17.0 (22 Apr 2019) |
| 136 |
---------------------------- |
| 137 |
|
| 138 |
* Add some new APIs, update others |
| 139 |
* Add Service, NetAddress, ServicePart, validate_port, validate_protocol |
| 140 |
* SessionBase: new API proxy() and remote_address(). Remove peer_address() |
| 141 |
and peer_address_str() |
| 142 |
* SOCKSProxy: auto_detect_address(), auto_detect_host() renamed auto_detect_at_address() |
| 143 |
and auto_detect_at_host(). auto_detect_at_address() takes a NetAddress. |
| 144 |
|
| 145 |
Version 0.16.2 (21 Apr 2019) |
| 146 |
---------------------------- |
| 147 |
|
| 148 |
* fix force-close bug |
| 149 |
|
| 150 |
Version 0.16.1 (20 Apr 2019) |
| 151 |
---------------------------- |
| 152 |
|
| 153 |
* resolve socks proxy host using getaddrinfo. In particular, IPv6 is supported. |
| 154 |
* add two new APIs |
| 155 |
|
| 156 |
Version 0.16.0 (19 Apr 2019) |
| 157 |
---------------------------- |
| 158 |
|
| 159 |
* session closing is now robust; it is safe to await session.close() from anywhere |
| 160 |
* API change: FinalRPCError removed; raise ReplyAndDisconnect instead. This responds with |
| 161 |
a normal result, or an error, and then disconnects. e.g.:: |
| 162 |
|
| 163 |
raise ReplyAndDisconnect(23) |
| 164 |
raise ReplyAndDisconnect(RPCError(1, "message")) |
| 165 |
|
| 166 |
* the session base class' private method _close() is removed. Use await close() instead. |
| 167 |
* workaround uvloop bug `<https://github.com/MagicStack/uvloop/issues/246>`_ |
| 168 |
|
| 169 |
Version 0.15.0 (16 Apr 2019) |
| 170 |
---------------------------- |
| 171 |
|
| 172 |
* error handling improved to include costing |
| 173 |
|
| 174 |
Version 0.14.1 (16 Apr 2019) |
| 175 |
---------------------------- |
| 176 |
|
| 177 |
* fix a bad assertion |
| 178 |
|
| 179 |
Version 0.14.0 (15 Apr 2019) |
| 180 |
---------------------------- |
| 181 |
|
| 182 |
* timeout handling improvements |
| 183 |
* RPCSession: add log_me, send_request_timeout |
| 184 |
* Concurrency: respect semaphore queue ordering |
| 185 |
* cleaner protocol auto-detection |
| 186 |
|
| 187 |
Version 0.13.6 (14 Apr 2019) |
| 188 |
---------------------------- |
| 189 |
|
| 190 |
* RPCSession: concurrency control of outgoing requests to target a given response time |
| 191 |
* SessionBase: processing_timeout will time-out processing of incoming requests. This |
| 192 |
helps prevent ever-growing request backlogs. |
| 193 |
* SessionBase: add is_send_buffer_full() |
| 194 |
|
| 195 |
Version 0.13.5 (13 Apr 2019) |
| 196 |
---------------------------- |
| 197 |
|
| 198 |
* robustify concurrency handling |
| 199 |
|
| 200 |
Version 0.13.3 (13 Apr 2019) |
| 201 |
---------------------------- |
| 202 |
|
| 203 |
* export Concurrency class. Tweak some default constants. |
| 204 |
|
| 205 |
Version 0.13.2 (12 Apr 2019) |
| 206 |
---------------------------- |
| 207 |
|
| 208 |
* wait for task to complete on close. Concurrency improvements. |
| 209 |
|
| 210 |
Version 0.13.0 (12 Apr 2019) |
| 211 |
---------------------------- |
| 212 |
|
| 213 |
* fix concurrency handling; bump version as API changed |
| 214 |
|
| 215 |
Version 0.12.1 (09 Apr 2019) |
| 216 |
---------------------------- |
| 217 |
|
| 218 |
* improve concurrency handling; expose new API |
| 219 |
|
| 220 |
Version 0.12.0 (09 Apr 2019) |
| 221 |
---------------------------- |
| 222 |
|
| 223 |
* switch from bandwidth to a generic cost metric for sessions |
| 224 |
|
| 225 |
Version 0.11.0 (06 Apr 2019) |
| 226 |
---------------------------- |
| 227 |
|
| 228 |
* rename 'normalize_corofunc' to 'instantiate_coroutine' |
| 229 |
* remove spawn() member of SessionBase |
| 230 |
* add FinalRPCError (ghost43) |
| 231 |
* more reliable cancellation on connection closing |
| 232 |
|
| 233 |
Version 0.10.5 (16 Feb 2019) |
| 234 |
---------------------------- |
| 235 |
|
| 236 |
* export 'normalize_corofunc' |
| 237 |
* batches: fix handling of session loss; add test |
| 238 |
|
| 239 |
Version 0.10.4 (07 Feb 2019) |
| 240 |
---------------------------- |
| 241 |
|
| 242 |
* SessionBase: add closed_event, tweak closing process |
| 243 |
* testsuite cleanup |
| 244 |
|
| 245 |
Version 0.10.3 (07 Feb 2019) |
| 246 |
---------------------------- |
| 247 |
|
| 248 |
* NewlineFramer: max_size of 0 does not limit buffering (SomberNight) |
| 249 |
* trivial code / deprecation warning cleanups |
| 250 |
|
| 251 |
Version 0.10.2 (29 Dec 2018) |
| 252 |
---------------------------- |
| 253 |
|
| 254 |
* TaskGroup: faster cancellation (SomberNight) |
| 255 |
* as for curio, remove wait argument to TaskGroup.join() |
| 256 |
* setup.py: read the file to extract the version; see `#10`_ |
| 257 |
|
| 258 |
Version 0.10.1 (07 Nov 2018) |
| 259 |
---------------------------- |
| 260 |
|
| 261 |
* bugfixes for transport closing and session task spawning |
| 262 |
|
| 263 |
Version 0.10.0 (05 Nov 2018) |
| 264 |
---------------------------- |
| 265 |
|
| 266 |
* add session.spawn() method |
| 267 |
* make various member variables private |
| 268 |
|
| 269 |
Version 0.9.1 (04 Nov 2018) |
| 270 |
--------------------------- |
| 271 |
|
| 272 |
* abort sessions which wait too long to send a message |
| 273 |
|
| 274 |
Version 0.9.0 (25 Oct 2018) |
| 275 |
--------------------------- |
| 276 |
|
| 277 |
* support of binary messaging and framing |
| 278 |
* support of plain messaging protocols. Messages do not have an ID |
| 279 |
and do not expect a response; any response cannot reference the |
| 280 |
message causing it as it has no ID (e.g. the Bitcoin network |
| 281 |
protocol). |
| 282 |
* removed the client / server session distinction. As a result there |
| 283 |
is now only a single session class for JSONRPC-style messaging, |
| 284 |
namely RPCSession, and a single session class for plain messaging |
| 285 |
protocols, MessageSession. Client connections are initiated by the |
| 286 |
session-independent Connector class. |
| 287 |
|
| 288 |
Version 0.8.2 (25 Sep 2018) |
| 289 |
--------------------------- |
| 290 |
|
| 291 |
* bw_limit defaults to 0 for ClientSession, bandwidth limiting is mainly |
| 292 |
intended for servers |
| 293 |
* don't close proxy sockets on an exception during the initial SOCKS |
| 294 |
handshake; see `#8`_. This works around an asyncio bug still present |
| 295 |
in Python 3.7 |
| 296 |
* make CodeMessageError hashable. This works around a Python bug fixed |
| 297 |
somewhere between Python 3.6.4 and 3.6.6 |
| 298 |
|
| 299 |
Version 0.8.1 (12 Sep 2018) |
| 300 |
--------------------------- |
| 301 |
|
| 302 |
* remove report_crash arguments from TaskGroup methods |
| 303 |
* ignore bandwidth limits if set <= 0 |
| 304 |
|
| 305 |
Version 0.8.0 (12 Sep 2018) |
| 306 |
--------------------------- |
| 307 |
|
| 308 |
* change TaskGroup semantics: the first error of a member task is |
| 309 |
raised by the TaskGroup instead of TaskGroupError (which is now |
| 310 |
removed). Code wanting to query the status / results of member |
| 311 |
tasks should loop on group.next_done(). |
| 312 |
|
| 313 |
Version 0.7.3 (17 Aug 2018) |
| 314 |
--------------------------- |
| 315 |
|
| 316 |
* fix `#5`_; more tests added |
| 317 |
|
| 318 |
Version 0.7.2 (16 Aug 2018) |
| 319 |
--------------------------- |
| 320 |
|
| 321 |
* Restore batch functionality in Session class |
| 322 |
* Less verbose logging |
| 323 |
* Increment and test error count on protocol errors |
| 324 |
* fix `#4`_ |
| 325 |
|
| 326 |
Version 0.7.1 (09 Aug 2018) |
| 327 |
--------------------------- |
| 328 |
|
| 329 |
* TaskGroup.cancel_remaining() must wait for the tasks to complete |
| 330 |
* Fix some tests whose success / failure depended on time races |
| 331 |
* fix `#3`_ |
| 332 |
|
| 333 |
Version 0.7.0 (08 Aug 2018) |
| 334 |
--------------------------- |
| 335 |
|
| 336 |
* Fix wait=object and cancellation |
| 337 |
* Change Session and JSONRPCConnection APIs |
| 338 |
* Fix a test that would hang on some systems |
| 339 |
|
| 340 |
Version 0.6.2 (06 Aug 2018) |
| 341 |
--------------------------- |
| 342 |
|
| 343 |
* Fix a couple of issues shown up by use in ElectrumX; add testcases |
| 344 |
|
| 345 |
Version 0.6.0 (04 Aug 2018) |
| 346 |
--------------------------- |
| 347 |
|
| 348 |
* Rework the API; docs are not yet updated |
| 349 |
* New JSONRPCConnection object that manages the state of a connection, |
| 350 |
replacing the RPCProcessor class. It hides the concept of request |
| 351 |
IDs from higher layers; allowing simpler and more intuitive RPC |
| 352 |
datastructures |
| 353 |
* The API now prefers async interfaces. In particular, request handlers |
| 354 |
must be async |
| 355 |
* The API generally throws exceptions earlier for nonsense conditions |
| 356 |
* TimeOut and TaskSet classes removed; use the superior curio |
| 357 |
primitives that 0.5.7 introduced instead |
| 358 |
* SOCKS protocol implementation made i/o agnostic so the code can be |
| 359 |
used whatever your I/O framework (sync, async, threads etc). The |
| 360 |
Proxy class, like the session class, remains asyncio |
| 361 |
* Testsuite cleaned up and shrunk, now works in Python 3.7 and also |
| 362 |
tests uvloop |
| 363 |
|
| 364 |
Version 0.5.9 (29 Jul 2018) |
| 365 |
--------------------------- |
| 366 |
|
| 367 |
* Remove "async" from __aiter__ which apparently breaks Python 3.7 |
| 368 |
|
| 369 |
Version 0.5.8 (28 Jul 2018) |
| 370 |
--------------------------- |
| 371 |
|
| 372 |
* Fix __str__ in TaskGroupError |
| 373 |
|
| 374 |
Version 0.5.7 (27 Jul 2018) |
| 375 |
--------------------------- |
| 376 |
|
| 377 |
* Implement some handy abstractions from curio on top of asyncio |
| 378 |
|
| 379 |
Version 0.5.6 |
| 380 |
------------- |
| 381 |
|
| 382 |
* Define a ConnectionError exception, and set it on uncomplete |
| 383 |
requests when a connection is lost. Previously, those requests were |
| 384 |
cancelled, which does not give an informative error message. |
| 385 |
|
| 386 |
.. _#3: https://github.com/kyuupichan/aiorpcX/issues/3 |
| 387 |
.. _#4: https://github.com/kyuupichan/aiorpcX/issues/4 |
| 388 |
.. _#5: https://github.com/kyuupichan/aiorpcX/issues/5 |
| 389 |
.. _#8: https://github.com/kyuupichan/aiorpcX/issues/8 |
| 390 |
.. _#10: https://github.com/kyuupichan/aiorpcX/issues/10 |
| 391 |
.. _#22: https://github.com/kyuupichan/aiorpcX/issues/22 |
| 392 |
.. _#26: https://github.com/kyuupichan/aiorpcX/issues/26 |