forked from barryp/py-amqplib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CHANGES
161 lines (115 loc) · 5.8 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
CHANGES
--------
Version 0.6.2-devel
Big speedup for sending large messages. For example, sending
a single 100MB message on my machine goes from 90 seconds to
around 0.6 seconds.
Use setuptools if available, for enhanced functionality
for packagers.
Raise a ValueError if unserializable objects are present in
a Message's application_headers, instead of just quietly failing
and causing a connection to close.
Message objects can now be pickled/unpickled, previously unpickling
raised a RuntimeError: maximum recursion depth exceeded
PYTHON 3.x COMPATIBILITY
Code has been tweaked so that when 2to3 is run over the client
library and the unittests, the unittests will pass for Python
3.0, 3.1 and 3.2
There are some subtle behavioral changes to deal with how Python
3.x needs to encode/decode strings and they go/come over the
wire. Message bodies are encoded at transmission time, instead
of Message object creation time. Message application_header
strings are assumed to be encoded as UTF-8
Add support for queue_unbind, since RabbitMQ supports it as an extension
to the 0-8 protocol.
Add IPv6 support. The client uses socket.getaddrinfo(), so you can use
domain names with AAAA DNS records, or IPv6 literal addresses. If you
need to specify a port number along with a literal address, put the
address in square brackets (see RFC 2732), for example:
[::1]:5672
Version 0.6.1
One minor change to watch out for is that low-level errors
such as a closed connection now appear as IOExceptions
instead of
TypeError: 'NoneType' object is not iterable
which never really explained anything.
Fix potential problem with library getting stuck in a loop
if the peer closed the socket. Also, break a few more references
when closing Connections and Channels, to help garbage collection.
Thanks for majek04@... for pointing these out.
Add support for using Connection and Channel objects as context
managers for 'with' statements (available in Python >= 2.5), so you
can write code like:
with Connection() as conn:
with conn.channel() as ch:
# do stuff with ch and conn
and have the Channel and Connection objects closed automatically
when the blocks exit.
Version 0.6
Very large rearrangement of code, breaking the large client_0_8.py
module into submodules based on the various layers of the AMQP protocol.
The public API is unchanged however, so existing code that uses amqplib
should be unaffected.
----
nb_client_0_8.py and demos/nbdemo_receive.py were removed because of
the major changes to the main client to lay the groundwork for future
non-blocking behaviors (see http://hg.barryp.org/py-amqplib-devel/ )
----
More unittests added.
Version 0.5
Get rid of Python 2.5-style conditional expressions, for
compatibility with Python 2.4 Thanks to Alexey Timanovsky
for pointing this out.
Send debugging output through the standard Python 'logging' module
instead of directly printing to the console.
Reworked the guts of the Connection and Channel classes
to untangle the mess that controlled how frames were
waited for and queued up. Should fix problems seen with
basic_deliver messages coming when the client is expecting
responses to other synchronous calls.
Added non-blocking client and demo, from
Dmitriy Samovskiy <[email protected]>:
-----------------------
We put together an add-on for py-amqplib that implements AMQP client
with non-blocking sockets (see NonBlockingConnection class and
nbloop() function in nbclient_0_8.py). nbdemo_receive.py is a demo
script, and nbclient.zip includes both nbclient_0_8.py and
nbdemo_receive.py.
There are at least 2 scenarios where non-blocking sockets help, and
both are applicable to consumers:
1) when you want to be able to interrupt consumer's event loop
without waiting for a next incoming message;
2) when you want to consume messages from multiple brokers (or over
multiple connections) in a single event loop.
Did some profiling, found a big problem that caused a huge huge
number of unnecessary __getattr_ calls. Ran pylint and found some
bad coding style problems.
Version 0.3
Improved skeleton generating program to include much more
information in the Python docstrings that was present in the AMQP
spec file. Merged in the improved docstrings into the client module.
After having a better look now at the pydocs, it turns out that in
several methods, a default value of '' can be used for queue names
and exchange names, so update method signatures to take advantage of
that.
Channel.queue_bind() can also take '' as a queue parameter, but
unfortunately we can't set that as a default value because
the exchange parameter can't have a default value. In hindsight
those args should have been swapped, but it's too late now.
Deal with no callback being specified in basic_consume(), it
should now quietly discard messages.
Version 0.2
Changed the default value for the auto_delete parameter
in the Channel.exchange_declare and Channel.queue_declare
methods to True.
Added an 'insist' parameter to the Connection class
constructor, defaulting to False. Setting it to True
indicates to the AMQP server that you don't want to
be redirected (you're insisting to connect to the
specified server).
Added support for being redirected to another AMQP
server when a Connection is opened.
Added tests/fake_redirect_0_8.py to help with testing
redirect support.
Version 0.1
Initial version