Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

read_frame python3 compatible for large payloads #248

Merged
merged 1 commit into from
Jan 25, 2019

Conversation

aojea
Copy link
Contributor

@aojea aojea commented Jan 25, 2019

read_frame is using str.join to concatenate the payload if the received
frame is bigger than SIGNED_INT_MAX.

That's fine with python2, however in python3 documentation is stated

str.join Return a string which is the concatenation of the strings in the
iterable iterable. A TypeError will be raised if there are any
non-string values in iterable, including bytes objects. The separator
between elements is the string providing this method.

So we have to use the byte object join() method

Signed-off-by: aojeagarcia aojeagarcia@suse.com

read_frame is using str.join to concatenate the payload if the received
frame is bigger than SIGNED_INT_MAX.

That's fine with python2, however in python3 documentation is stated

str.joinReturn a string which is the concatenation of the strings in the
iterable iterable. A TypeError will be raised if there are any
non-string values in iterable, including bytes objects. The separator
between elements is the string providing this method.

So we have to use the byte object join() method

Signed-off-by: aojeagarcia <aojeagarcia@suse.com>
@codecov
Copy link

codecov bot commented Jan 25, 2019

Codecov Report

Merging #248 into master will increase coverage by 0.57%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #248      +/-   ##
==========================================
+ Coverage   94.72%   95.29%   +0.57%     
==========================================
  Files          14       14              
  Lines        1744     1744              
  Branches      255      255              
==========================================
+ Hits         1652     1662      +10     
+ Misses         67       56      -11     
- Partials       25       26       +1
Impacted Files Coverage Δ
amqp/transport.py 84.28% <100%> (+3.57%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 60acabc...d9540dc. Read the comment docs.

@auvipy auvipy merged commit e45ea3e into celery:master Jan 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants