Changelog#
0.1.4 (2024-01-24)#
Changed#
Remove log message for declaring exchange.
Remove
yapw.clients.Base.__getsafe__
.
Fixed#
If the client attempts to close the connection while it is opening, do not retry opening the connection.
Reset the client’s state, before scheduling the reconnection, rather than immediately before reconnecting.
0.1.3 (2023-07-03)#
Changed#
yapw.clients.Async.connection_open_error_callback()
: Don’t retry on authentication (e.g. incorrect username or password) or access denied (e.g. non-existent virtual host) errors.yapw.clients.Async.connection_close_callback()
: Change log level fromERROR
toWARNING
.yapw.clients.Async()
log messages format errors with%r
instead of%s
, to include information like the exception class.
0.1.2 (2023-07-02)#
Added#
Restore Python 3.10 support.
0.1.1 (2023-07-02)#
Fixed#
Fix logging of exchange type.
0.1.0 (2023-07-02)#
Added#
Changed#
BREAKING CHANGES:
Use subclasses instead of mixins, to share logic between synchronous and asynchronous clients with less code.
Move
__init__
arguments from other classes to theBase
class.Move the
publish
method from theBlocking
class to theBase
class.Move and rename
install_signal_handlers
fromyapw.ossignal
toyapw.clients.Base.add_signal_handlers
class.Move the
default_decode
method from theyapw.decorators
module to theyapw.util
module.Rename the
callback
positional argument for the consumer callback toon_message_callback
, to avoid ambiguity.Rename the
yapw.methods.blocking
module to theyapw.methods
module.Merge the
Publisher
andThreaded
classes into theBlocking
class.Merge the
Durable
andTransient
classes into theBlocking
class, as adurable
keyword argument.
Non-breaking changes:
Pending futures are cancelled during graceful shutdown.
Use callbacks to communicate with the main thread from other threads, instead of sending SIGUSR1 or SIGUSR2 signals.
The signal handlers for the
Blocking
class are installed before the consumer starts, instead of during initialization.Don’t attempt to catch the
pika.exceptions.ConnectionClosedByBroker
exception in theyapw.clients.Blocking.consume()
method (can’t be caught).Drop Python 3.7, 3.8, 3.9, 3.10 support.
0.0.13 (2022-01-28)#
Fixed#
Make thread management thread-safe in
yapw.clients.Threaded
.
0.0.12 (2022-01-27)#
Fixed#
Eliminate a memory leak in
yapw.clients.Threaded
.
0.0.11 (2022-01-27)#
Added#
yapw.clients.Publisher.declare_queue
andyapw.clients.Threaded.consume()
accept anarguments
keyword argument.
0.0.10 (2022-01-24)#
Fixed#
yapw.clients.Threaded.consume()
cleans up threads and closes the connection (regression in 0.0.9).
0.0.9 (2022-01-24)#
Fixed#
yapw.clients.Threaded.consume()
no longer attempts to close a closed connection.
0.0.8 (2022-01-19)#
Added#
yapw.decorators.decorate()
passes the exception instance to theerrback
function via itsexception
argument.
0.0.7 (2022-01-18)#
Added#
yapw.decorators.decorate()
accepts afinalback
keyword argument.
0.0.6 (2022-01-17)#
Added#
yapw.clients.Publisher.declare_queue
andyapw.clients.Consumer.consume()
: Rename therouting_key
argument toqueue
, and add arouting_keys
optional argument.
Changed#
Log a debug message when consuming each message.
0.0.5 (2021-11-22)#
Added#
yapw.clients.Threaded
accepts adecode
keyword argument.All
yapw.decorators
functions pass decoded messages to consumer callbacks.
Changed#
Add
decode
as first argument toyapw.decorators
functions.yapw.clients.Publisher
: Renameencoder
keyword argument toencode
.yapw.clients.Publisher
’sencode
keyword argument defaults toyapw.util.default_encode()
.yapw.util.default_encode()
encodesstr
tobytes
and pickles non-str
tobytes
.
0.0.4 (2021-11-19)#
Added#
yapw.clients.Publisher
(and children) acceptsencoder
andcontent_type
keyword arguments.
Changed#
Use the
SIGUSR1
signal to kill the process from a thread.Add the channel number to the debug message for
publish()
.
0.0.3 (2021-11-19)#
Added#
Add and use
yapw.decorators.halt()
as the default decorator.
Changed#
Rename
yapw.decorators.rescue()
todiscard()
.
0.0.2 (2021-11-19)#
Added#
Add
yapw.methods.publish()
to publish messages from the context of a consumer callback.
Changed#
Pass a
state
object with aconnection
attribute to the consumer callback, instead of aconnection
object. Mixins can set a__safe__
class attribute to list attributes that can be used safely in the consumer callback. These attributes are added to thestate
object.Log debug messages when publishing, consuming and acknowledging messages.
0.0.1 (2021-11-19)#
First release.