forked from nameko/nameko
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CHANGES
648 lines (432 loc) · 17.4 KB
/
CHANGES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
Release Notes
=============
Here you can see the full list of changes between nameko versions. Versions
are in form of *headline.major.minor* numbers. Backwards-compatible changes
increment the minor version number only.
Version 2.11.0
-------------
Released: 2018-08-09
* Compatibility with kombu 4 and pyamqp 2+, minimum supported kombu version
is now 4.2 (#564)
Version 2.10.0
-------------
Released: 2018-08-06
* Bump the minimum supported eventlet version to 0.20.1 (#557)
Version 2.9.1
-------------
Released: 2018-07-20
* SSL connections now supported by all AMQP extensions, configurable using
the `AMQP_SSL` config key. (#524)
* Restore compatibility with eventlet 0.22+ (#556)
* Log unhandled worker exceptions at `ERROR` level instead of `INFO` (#547)
Version 2.9.0
-------------
Released: 2018-05-30
* RPC reply queues are now set to expire rather than auto-delete, and
are no longer exclusive, allowing clients reconnect. Fixes #359.
* It's now possible to accept messages in multiple serialization formats.
Adds config-based mechanism for specifying custom serializers. See #535.
* Enhanced environment variable substitution including recursive references.
See #515.
Version 2.8.5
-------------
Released: 2018-03-15
* Workaround for a Kombu bug causing new sockets to sometimes have short
timeouts. (#521)
Version 2.8.4
-------------
Released: 2018-02-18
* Fixes a bug where the container crashed if the connection to RabbitMQ
was lost while an AMQP entrypoint was running (#511)
* Correction to WorkerContext.immediate_call_id which actually referred
to the id of original call. Adds WorkerContext.origin_call_id to
replicate the previous behaviour.
Version 2.8.3
-------------
Released: 2018-01-12
* Restrict eventlet to `<0.22.0` until we're compatible.
Version 2.8.2
-------------
Released: 2017-12-11
* Remove the pytest `--log-level` argument added by the pytest plugin since
this conflicts with newer versions of `pytest` (`>= 3.3.0`). For older
versions this can be restored by installing the `pytest-catchlog` package.
Version 2.8.1
-------------
Released: 2017-11-29
* Added the 'show-config' command which will print the service configuration
to the console, after environment variable substitution.
Version 2.8.0
-------------
Released: 2017-10-31
* Environment variables substituted into config files are now interpreted
as YAML rather than bare values, allowing use of rich data types.
Version 2.7.0
-------------
Released: 2017-10-07
* Set stopped flag in register_provider() to allow PollingQueueConsumer
object reuse [fixes #462]
* Refactor of AMQP message publishing logic into `nameko.amqp.publish`
* Exposes delivery options and other messaging configuration to AMQP-based
DependencyProviders. [addresses #374]
* Class attributes for configuring `use_confirms`, `retry` and `retry_policy`
have been deprecated from the Publisher, EventDispatcher, and RPC MethodProxy
classes. If you were subclassing these classes to set these options, you
should now set them at class instantiation time.
Version 2.6.0
-------------
Released: 2017-04-30
* Environment variables are now interpreted as native YAML data types rather
than just strings
* The WSGI Server now uses an explicit logger so it can be controlled using a
logging config
* Drops several backwards-compatibility shims that were marked as being
maintained only until this release
Version 2.5.4
-------------
Released: 2017-04-20
* Don't block the QueueConsumer thread on the worker pool, which could cause
service deadlock and occasional dropped AMQP connections [fixes #428]
* Revert prefetch count change from 2.5.3 and ack messages outside of the
QueueConsumer thread. [fixes #417 more robustly]
Version 2.5.3
-------------
Released: 2017-03-16
* Bump the amqp `prefetch_count` by 1 to `max_workers + 1` to fix throughput
issue. [fixes 417]
Version 2.5.2
-------------
Released 2017-02-28
* Improves teardown speed of the `rabbit_config` pytest fixture
* Support for providing an alternative reply listener to the standalone
RPC proxy
Version 2.5.1
-------------
Released 2017-01-19
* Adds a DependencyProvider to give services access to the config object
* Internal refactor to make all worker lifecycle steps run in the same thread
Version 2.5.0
-------------
Released 2016-12-20
* Enables publish confirms by default for all AMQP message publishers
* Refactors common AMQP connection code into `nameko.amqp`
Version 2.4.4
-------------
Released 2016-11-28
* Adds AMQP heartbeats to Consumer connections
* Handles an uncaught exception caused by a fast-disconnecting client under
Python 3 [fixes #367]
Version 2.4.3
-------------
Released 2016-11-16
* Pins kombu back to a compatible release (<4) [fixes #378]
* Fixes compatibility with latest bpython and ipython shells
[fixes #355 and #375]
* Fixes socket cleanup bug in websocket hub [fixes #367]
Version 2.4.2
-------------
Released 2016-10-10
* Added support for environment variables in YAML config files
* Enhanced :func:`~nameko.testing.services.entrypoint_waiter`. The new
implementation is backwards compatible but additionally:
- Gives you access to the result returned (or exception raised)
- Adds the ability to wait for a specific result
- Doesn't fire until the worker is completely torn down
Version 2.4.1
-------------
Released 2016-09-14
* Enhanced :class: `~nameko.web.server.WebServer` with `get_wsgi_app` and
`get_wsgi_server` to allow easy usage of WSGI middleware and modifications
of the WSGI server.
* Enhanced :func:`~nameko.testing.services.replace_dependencies` to allow
specific replacement values to be provided with named arguments.
Version 2.4.0
-------------
Released 2016-08-30
* Add dictionary access to ``standalone.rpc.ClusterProxy`` to allow the proxy
to call services whose name is not a legal identifier in python
(e.g. name has a ``-`` in it).
* Add the ability to specify a custom `ServiceContainer` class via config key.
Deprecate the keyword arguments to `ServiceRunner` and `run_services` for
the same purpose.
* Deprecate the keyword arguments to `run_services`, `ServiceContainer` and
`ServiceRunner.add_service` for specifying a custom `WorkerContext` class.
Custom `WorkerContext` classes can now only be specified with a custom
`ServiceContainer` class that defines the `worker_ctx_cls` attribute.
* Remove the `context_keys` attribute of the `WorkerContext`, which was
previously used to "whitelist" worker context data passed from call to call.
It was a feature that leaked from a specific implementation into the main
framework, and not useful enough in its own right to continue to be
supported.
* Refactor `ServiceContainer` internals for better separation between "managed"
and "worker" threads. Improved logging when threads are killed.
Version 2.3.1
-------------
Released 2016-05-11
* Deprecate ``MethodProxy.async`` in favour of ``MethodProxy.call_async`` in
preparation for async becoming a keyword
* Add support for loading logging configuration from ``config.yaml``
Version 2.3.0
-------------
Released 2016-04-05
* Add support for loading configuration file in ``nameko shell`` via
``--config`` option
* Changed :class:`~nameko.web.handlers.HttpRequestHandler` to allow override
how web exceptions are handled
* Enabled reliable delivery on broadcast events when combined with a custom
:py:attr:`~nameko.events.EventHandler.broadcast_identity`. Reliable delivery
now defaults to enabled for all handler types. It must be explicitly turned
off with broadcast mode unless you override the default `broadcast_identity`.
* Update bundled pytest fixtures to use a random vhost in RabbitMQ by default
* Now requires eventlet>=0.16.1 because older versions were removed from PyPI
Version 2.2.0
-------------
Released 2015-10-04
* Add support for alternative serializers in AMQP messages
* Add pytest plugin with common fixtures
* Fix examples in documentation and add tests to prevent future breakage
* Fix bug handling non-ascii characters in exception messages
* Various documentation fixes
Version 2.1.2
-------------
Released 2015-05-26
* Refactor the standalone queue consumer for more extensibility
Version 2.1.1
-------------
Released 2015-05-11
* Nameko shell to use bpython or ipython interpreter if available
* Support for marking entrypoint arguments as sensitive (for later redaction)
Version 2.1.0
-------------
Released 2015-04-13
* Changed default AMQP URI so examples work with an unconfigured RabbitMQ.
* Heuristic messages for AMQP connection errors.
* Added six to requirements.
* Minor documentation fixes.
Version 2.0.0
-------------
Released 2015-03-31
* python 3 compatibility
* Added HTTP entrypoints and experimental websocket support (contributed by
Armin Ronacher)
* Added CLI and console script
* Introduction of nameko "extensions" and nomenclature clarification
* Removal of ``DependencyFactory`` in favour of prototype pattern
* Complete documentation rewrite
* Spun out ``nameko.contrib.sqlalchemy`` into
`nameko-sqlalchemy <https://pypi.python.org/pypi/nameko-sqlalchemy>`_
as a **community extension**.
* Spun out ``nameko.legacy`` package into
`nameko-nova-compat <https://pypi.python.org/pypi/nameko-nova-compat>`_
* Rename the standalone rpc proxy to
:class:`~nameko.standalone.rpc.ServiceRpcProxy` and add a
:class:`~nameko.standalone.rpc.ClusterRpcProxy`, using a single reply queue
for communicating with multiple remote services.
* Make the standalone event dispatcher more shell-friendly, connecting on
demand.
Version 1.14.0
--------------
Released 2014-12-19
* Remove parallel provider in favour of async RPC
* Update :func:`~nameko.testing.services.worker_factory` to raise if asked to
replace a non-existent injection.
* Add various ``__repr__`` methods for better logging
* Support for timeouts in the (non-legacy) standalone RPC proxy
* Add helper for manipulating an AMQP URI into a dict
Version 1.13.0
--------------
Released 2014-12-02
* RPC reply queues now auto-delete.
* Extra protection against badly-behaved dependencies during container kill
* Make legacy :class:`~nameko.legacy.nova.NovaRpcConsumer` more robust against
failures in the :class:`~nameko.legacy.nova.NovaRpc` provider.
Version 1.12.0
--------------
Released 2014-11-25
* Add ability to make asynchronous rpc calls using the rpc proxy.
* Add a new nameko context key ``user_agent`` to support including such info
in the rpc header.
Version 1.11.5
--------------
Released 2014-11-18
* Have the standalone rpc proxy mark its reply queues as auto-delete, to stop
them staying around after use.
Version 1.11.4
--------------
Released 2014-11-10
* Make :class:`~nameko.rpc.RpcConsumer` more robust against failures in the
:class:`~nameko.rpc.Rpc` provider.
* Add a new exception :class:`~nameko.exceptions.MalformedRequest` that RPC
providers can raise if they detect an invalid message. Raise this exception
in the default ``Rpc`` provider if ``args`` or ``kwargs`` keys are missing
from the message.
* Fix issues in queue consumer tests against non-localhost brokers.
* Upgrade to eventlet 0.15.2.
* Include pyrabbit in ``requirements.txt`` (no longer just for tests).
* Catch dying containers in the entrypoint_hook to avoid hangs.
* Add ``expected_exceptions`` kwarg to the rpc entrypoint to enable different
exception handling (in dependencies) for user vs system errors.
Version 1.11.3
--------------
Released 2014-10-10
* Add more logging for workers killed by
:meth:`~nameko.containers.ServiceContainer.kill`.
Version 1.11.2
--------------
Released 2014-09-18
* Add a default implementation for ``acquire_injection`` (returning ``None``)
for dependency providers that are used for side-effects rather than injecting
dependencies.
Version 1.11.1
--------------
Released 2014-09-15
* New test helper :func:`~nameko.testing.services.entrypoint_waiter` to wait
for entrypoints (e.g. event handlers) to complete.
Version 1.11.0
--------------
Released 2014-09-01
* Raise a specific ``RpcTimeout`` error in the RPC proxy rather than
``socket.timeout`` to avoid confusing kombu's ``Connection.ensure``
* Improve logging helpers
* Use ``inspect.getcallargs`` instead of shadow lambda for RPC argument
checking
* Add default retry policies to all publishers
* Stricter handling of connections between tests
* Workarounds for RabbitMQ bugs described at
https://groups.google.com/d/topic/rabbitmq-users/lrl0tYd1L38/discussion
Version 1.10.1
--------------
Released 2014-08-27
* Inspect the service class (instead of an instance) in
:func:`~nameko.testing.services.worker_factory`. Works better with
descriptors.
* Explicitly delete ``exc_info`` variable when not needed, to help the
garbage collector.
Version 1.10.0
--------------
Released 2014-08-14
* Entrypoint providers' handle_result is now able to manipulate and modify and
return the ``(result, exc_info)`` tuple. This enables default post-processing
(e.g. serialization, translations)
* Added serialization safety to legacy RPC entrypoint.
Version 1.9.1
-------------
Released 2014-08-12
* Bugfix to exception handling in ``nameko.legacy.dependencies``
Version 1.9.0
-------------
Released 2014-07-15
* No longer relying on eventlet for standalone RPC proxy timeouts.
* Introduced RPC entrypoints compatible with the 'legacy' proxy.
Version 1.8.2
-------------
Released 2014-07-07
* Documentation generator accepts a function listing event classes and adds
to output accordingly.
Version 1.8.1
-------------
Released 2014-06-23
* Adding ``wait_for_worker_idle`` test helper.
Version 1.8.0
-------------
Released 2014-06-13
* Now passing ``exc_info`` tuples instead of bare exceptions to
``worker_result`` and ``handle_result``, to enable exception processing in
non-worker greenthreads.
Version 1.7.2
-------------
Released 2014-06-10
* :meth:`~nameko.containers.ServiceContainer._run_worker` now calls any
``handle_result`` method before dependency teardown.
* Serialization errors now generate a specific error message rather
than bubbling into the container.
* Minor change to ``nameko_doc`` output.
Version 1.7.1
-------------
Released 2014-05-20
* Added ``language``, ``auth_token`` and ``user_id`` dependency providers to
make context data available to service workers.
* Refactored constants into their own module.
* Minor test changes to enable testing on shared rabbit brokers.
Version 1.7.0
-------------
Released 2014-05-07
* :meth:`~nameko.containers.ServiceContainer.spawn_worker` now throws
:class:`~nameko.exceptions.ContainerBeingKilled` if a ``kill`` is
in progress, since some providers may already be dead. Providers should catch
this and e.g. requeue rpc messages. There is a race condition between
completing the kill sequence and remaining entrypoints firing.
Version 1.6.1
-------------
Released 2014-04-03
* Revert changes to legacy exception serialization to maintain backwards
compatibility with old clients.
* Add forwards compatibility for future clients that wish to serialize
exceptions into more data
* Promote conftest rabbit manipulations to test helpers
Version 1.6.0
-------------
Released 2014-03-31
* Rename instance_factory to worker_factory
* Raise :class:`~nameko.exception.IncorrectSignature` instead of
``RemoteError: TypeError`` if an RPC method is called with invalid arguments.
* Raise :class:`~nameko.exception.MethodNotFound` instead of
``RemoteError: MethodNotFound`` if a non-existent RPC method is called.
* Let log handlers format warning messages so that aggregators group them
correctly.
* Expose the entire dependency provider (rather than just the method name) to
the worker context.
Version 1.5.0
-------------
Released 2014-03-27
* Improvements to :class:`~nameko.containers.ServiceContainer.kill()` enabling
better tracebacks and cleaner teardown:
- Using ``sys.exc_info`` to preserve tracebacks
- No longer passing exception into
:meth:`~nameko.extensions.DependencyProvider.kill()`, removing race
conditions.
- No longer requiring ``exc`` in
:class:`~nameko.containers.ServiceContainer.kill()`
Version 1.4.1
-------------
Released 2014-03-26
* Adds the ``nameko_doc`` package, for easing the creation of service-oriented
documentation.
Version 1.4.0
-------------
Released 2014-03-20
* RPC calls to non-existent services (no queues bound to the RPC exchange with
the appropriate routing key) now raise an exception instead of hanging
indefinitely. Note that calls to existing but non-running services (where the
queue exists but has no consumer) behave as before.
Version 1.3.5
-------------
Released 2014-03-05
* Increased test resilience. Force-closing existing connections on rabbit
reset
Version 1.3.4
-------------
Released 2014-03-05
* Use ``MagicMock`` for dependency replacement in test utilities
* Use ``autospec=True`` wherever possible when mocking
* Merge ``ServiceContainers`` into a single class
Version 1.3.3
-------------
Released 2014-02-25
* Bugfixes enabling reconnection to the broker if the connection is temporarily
lost.
Version 1.3.2
-------------
Released 2014-02-13
* Dropping headers with a ``None`` value because they can't be serialized by
AMQP
Version 1.3.1
-------------
Released 2014-01-28
* Add ``event_handler_cls`` kwarg to the ``event_handler`` entrypoint, for
using a custom subclass of the ``EventHandler`` provider
Version 1.3.0
-------------
Released 2014-01-23
* Standalone RPC proxy interface changed to class with contextmanager interface
and manual ``start()`` and ``stop()`` methods.