<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/py-amqp.git/amqp/method_framing.py, branch codeql</title>
<subtitle>github.com: celery/py-amqp.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/py-amqp.git/'/>
<entry>
<title>pyupgrade.</title>
<updated>2020-09-03T11:56:00+00:00</updated>
<author>
<name>Omer Katz</name>
<email>omer.drow@gmail.com</email>
</author>
<published>2020-09-03T07:24:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/py-amqp.git/commit/?id=f5bca3d670b65c04aa2bfcfd3b64905d1237047b'/>
<id>f5bca3d670b65c04aa2bfcfd3b64905d1237047b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Happify linters.</title>
<updated>2020-08-31T08:05:09+00:00</updated>
<author>
<name>Omer Katz</name>
<email>omer.drow@gmail.com</email>
</author>
<published>2020-08-30T17:19:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/py-amqp.git/commit/?id=b82a2d56fe110bd2699301288f3202fd3c17258b'/>
<id>b82a2d56fe110bd2699301288f3202fd3c17258b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Make __all__ immutable.</title>
<updated>2020-08-19T06:04:32+00:00</updated>
<author>
<name>Omer Katz</name>
<email>omer.drow@gmail.com</email>
</author>
<published>2019-04-01T12:37:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/py-amqp.git/commit/?id=726cd7e33bdacacdef012e68c65c338b3d4952ad'/>
<id>726cd7e33bdacacdef012e68c65c338b3d4952ad</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Drop Python 2.7 and 3.4 support.</title>
<updated>2020-08-19T06:04:32+00:00</updated>
<author>
<name>Omer Katz</name>
<email>omer.drow@gmail.com</email>
</author>
<published>2019-04-01T12:28:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/py-amqp.git/commit/?id=6e300de918abbd0081d6d172bdeffae9c1911ce3'/>
<id>6e300de918abbd0081d6d172bdeffae9c1911ce3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove unused comment (#329)</title>
<updated>2020-07-28T09:29:53+00:00</updated>
<author>
<name>Dan Fuller</name>
<email>dfuller@sentry.io</email>
</author>
<published>2020-07-28T09:29:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/py-amqp.git/commit/?id=33761bc1806374b1b762b235bfd186c5f995d525'/>
<id>33761bc1806374b1b762b235bfd186c5f995d525</id>
<content type='text'>
Follow-up to https://github.com/celery/py-amqp/pull/328/, this removes an out of date comment.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Follow-up to https://github.com/celery/py-amqp/pull/328/, this removes an out of date comment.</pre>
</div>
</content>
</entry>
<entry>
<title>Fix buffer overflow in frame_writer after frame_max is increased</title>
<updated>2020-07-25T05:41:59+00:00</updated>
<author>
<name>Dan Fuller</name>
<email>dfuller@sentry.io</email>
</author>
<published>2020-07-23T23:18:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/py-amqp.git/commit/?id=9e9f4c0b97ef6d4fbb3243f1511939d132810236'/>
<id>9e9f4c0b97ef6d4fbb3243f1511939d132810236</id>
<content type='text'>
`frame_writer` allocates a `bytearray` on intialization with a length based on the
`connection.frame_max` value. If `connection.frame_max` is changed to a larger value, this causes an
error like `pack_into requires a buffer of at least 408736 bytes`.

From what I can tell, `connection._on_tune` can arbitrarily change this value, although I'm not
totally sure in what cases it actually occurs.

For context, we're upgrading from Celery 3.1.25 -&gt; Celery 4.1, librabbitmq 1.6.1 -&gt; amqp 2.6.0,
kombo 3.0.37 -&gt; 4.2.2.post1. This has worked fine in a small production environment, but fails on
our main deployment. The main culprit we see are lots of errors with `pack_into requires a buffer
of at least &lt;x&gt; bytes`, where x is always larger than our default `frame_max` of 131072. Despite
this, `bigbody` is False, which ends up with us attempting to write a frame that is too large into
the existing buffer. The only way I can see this happening is if `frame_max` increases.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`frame_writer` allocates a `bytearray` on intialization with a length based on the
`connection.frame_max` value. If `connection.frame_max` is changed to a larger value, this causes an
error like `pack_into requires a buffer of at least 408736 bytes`.

From what I can tell, `connection._on_tune` can arbitrarily change this value, although I'm not
totally sure in what cases it actually occurs.

For context, we're upgrading from Celery 3.1.25 -&gt; Celery 4.1, librabbitmq 1.6.1 -&gt; amqp 2.6.0,
kombo 3.0.37 -&gt; 4.2.2.post1. This has worked fine in a small production environment, but fails on
our main deployment. The main culprit we see are lots of errors with `pack_into requires a buffer
of at least &lt;x&gt; bytes`, where x is always larger than our default `frame_max` of 131072. Despite
this, `bigbody` is False, which ends up with us attempting to write a frame that is too large into
the existing buffer. The only way I can see this happening is if `frame_max` increases.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix encoding errors (#198)</title>
<updated>2018-08-13T16:25:52+00:00</updated>
<author>
<name>Evan</name>
<email>evanunderscore@gmail.com</email>
</author>
<published>2018-08-13T16:25:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/py-amqp.git/commit/?id=d879de2b96ca4a992afd9e529241e97e9bb2f55b'/>
<id>d879de2b96ca4a992afd9e529241e97e9bb2f55b</id>
<content type='text'>
* Don't default content_encoding to utf-8 for bytes

This is not an acceptable default as the content may not be
valid utf-8, and even if it is, the producer likely does not
expect the message to be decoded by the consumer.

* Fix encoding of messages with multibyte characters

Body length was previously calculated using string length,
which may be less than the length of the encoded body when
it contains multibyte sequences. This caused the body of
the frame to be truncated.

* Respect content_encoding when encoding messages

Previously the content_encoding was ignored and messages
were always encoded as utf-8. This caused messages to be
incorrectly decoded if content_encoding is properly respected
when decoding.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Don't default content_encoding to utf-8 for bytes

This is not an acceptable default as the content may not be
valid utf-8, and even if it is, the producer likely does not
expect the message to be decoded by the consumer.

* Fix encoding of messages with multibyte characters

Body length was previously calculated using string length,
which may be less than the length of the encoded body when
it contains multibyte sequences. This caused the body of
the frame to be truncated.

* Respect content_encoding when encoding messages

Previously the content_encoding was ignored and messages
were always encoded as utf-8. This caused messages to be
incorrectly decoded if content_encoding is properly respected
when decoding.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix inconsistent frame_handler return value (#199)</title>
<updated>2018-08-13T16:24:46+00:00</updated>
<author>
<name>Evan</name>
<email>evanunderscore@gmail.com</email>
</author>
<published>2018-08-13T16:24:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/py-amqp.git/commit/?id=868e5d335621ecf0d70e626f51c2d8837a199c12'/>
<id>868e5d335621ecf0d70e626f51c2d8837a199c12</id>
<content type='text'>
The function returned by frame_handler is meant to return True
once the complete message is received and the callback is called,
False otherwise.

This fixes the return value for messages with a body split across
multiple frames, and heartbeat frames.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The function returned by frame_handler is meant to return True
once the complete message is received and the callback is called,
False otherwise.

This fixes the return value for messages with a body split across
multiple frames, and heartbeat frames.</pre>
</div>
</content>
</entry>
<entry>
<title>isort.</title>
<updated>2017-10-28T08:52:01+00:00</updated>
<author>
<name>Omer Katz</name>
<email>omer.drow@gmail.com</email>
</author>
<published>2017-10-28T08:52:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/py-amqp.git/commit/?id=03fb08379dd8aad9dccae157efcb484be4650b73'/>
<id>03fb08379dd8aad9dccae157efcb484be4650b73</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove LGPL headers from source files as project has since changed to BSD (#163)</title>
<updated>2017-08-24T07:03:13+00:00</updated>
<author>
<name>Adam Smith</name>
<email>FatalEnigma@users.noreply.github.com</email>
</author>
<published>2017-08-24T07:03:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/py-amqp.git/commit/?id=f4a54faca8174fb1e99e00792af25914d5d4bc41'/>
<id>f4a54faca8174fb1e99e00792af25914d5d4bc41</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
