Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
coolamqp
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
public
coolamqp
Commits
302f743f
Commit
302f743f
authored
8 years ago
by
Piotr Maślanka
Browse files
Options
Downloads
Patches
Plain Diff
incorrect assertion
parent
dadb2f7e
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
coolamqp/uplink/connection/recv_framer.py
+7
-1
7 additions, 1 deletion
coolamqp/uplink/connection/recv_framer.py
coolamqp/uplink/handshake.py
+1
-1
1 addition, 1 deletion
coolamqp/uplink/handshake.py
setup.py
+2
-2
2 additions, 2 deletions
setup.py
with
10 additions
and
4 deletions
coolamqp/uplink/connection/recv_framer.py
+
7
−
1
View file @
302f743f
...
...
@@ -69,6 +69,8 @@ class ReceivingFramer(object):
self
.
chunks
[
0
]
=
self
.
chunks
[
0
][
up_to
:]
self
.
total_data_len
-=
len
(
q
)
assert
len
(
q
)
<=
up_to
,
'
extracted %s but %s was requested
'
%
(
len
(
q
),
up_to
)
print
(
'
Returning %s bytes - %s
'
%
(
len
(
q
),
repr
(
q
)))
return
q
def
_statemachine
(
self
):
...
...
@@ -82,6 +84,8 @@ class ReceivingFramer(object):
if
self
.
frame_type
not
in
(
FRAME_HEARTBEAT
,
FRAME_HEADER
,
FRAME_METHOD
,
FRAME_BODY
):
raise
ValueError
(
'
Invalid frame
'
)
print
(
'
Rolling with
'
,
self
.
frame_type
)
return
True
# state rule 2
...
...
@@ -107,6 +111,8 @@ class ReceivingFramer(object):
self
.
frame_channel
,
self
.
frame_size
=
struct
.
unpack
(
'
!HI
'
,
hdr
)
print
(
'
Regarding
'
,
self
.
frame_channel
,
'
size
'
,
self
.
frame_size
)
return
True
# state rule 4
...
...
@@ -121,7 +127,7 @@ class ReceivingFramer(object):
while
payload
.
tell
()
<
self
.
frame_size
:
payload
.
write
(
self
.
_extract
(
self
.
frame_size
-
payload
.
tell
()))
assert
payload
.
tell
()
<=
self
.
total_data_len
assert
payload
.
tell
()
<=
self
.
frame_size
payload
=
memoryview
(
payload
.
getvalue
())
...
...
This diff is collapsed.
Click to expand it.
coolamqp/uplink/handshake.py
+
1
−
1
View file @
302f743f
...
...
@@ -22,7 +22,7 @@ CLIENT_DATA = [
# because RabbitMQ is some kind of a fascist and does not allow
# these fields to be of type short-string
(
b
'
product
'
,
(
b
'
CoolAMQP
'
,
'
S
'
)),
(
b
'
version
'
,
(
b
'
0.8
4
'
,
'
S
'
)),
(
b
'
version
'
,
(
b
'
0.8
5
'
,
'
S
'
)),
(
b
'
copyright
'
,
(
b
'
Copyright (C) 2016-2017 DMS Serwis
'
,
'
S
'
)),
(
b
'
information
'
,
(
b
'
Licensed under the MIT License.
\n
See https://github.com/smok-serwis/coolamqp for details
'
,
'
S
'
)),
(
b
'
capabilities
'
,
([(
capa
,
(
True
,
'
t
'
))
for
capa
in
SUPPORTED_EXTENSIONS
],
'
F
'
)),
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
2
−
2
View file @
302f743f
...
...
@@ -4,12 +4,12 @@ from setuptools import setup
setup
(
name
=
u
'
CoolAMQP
'
,
version
=
'
0.8
4
'
,
version
=
'
0.8
5
'
,
description
=
u
'
The fastest AMQP client
'
,
author
=
u
'
DMS Serwis s.c.
'
,
author_email
=
u
'
piotrm@smok.co
'
,
url
=
u
'
https://github.com/smok-serwis/coolamqp
'
,
download_url
=
'
https://github.com/smok-serwis/coolamqp/archive/v0.8
4
.zip
'
,
download_url
=
'
https://github.com/smok-serwis/coolamqp/archive/v0.8
5
.zip
'
,
keywords
=
[
'
amqp
'
,
'
rabbitmq
'
,
'
client
'
,
'
network
'
,
'
ha
'
,
'
high availability
'
],
packages
=
[
'
coolamqp
'
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment