Skip to content

Commit

Permalink
Removed support for Pika < 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
epandurski committed Sep 6, 2019
1 parent 427d475 commit 7979bd9
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
8 changes: 8 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Changelog
=========

Version 0.3.7
-------------

- Removed support for `Pika` < 1.0.
- Fixd a connection timeout problem when using
`RabbitmqBroker.publish_message()`


Version 0.3.6
-------------

Expand Down
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@
# built documents.
#
# The short X.Y version.
version = '0.3.6'
version = '0.3.7'
# The full version, including alpha/beta/rc tags.
release = '0.3.6'
release = '0.3.7'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -138,7 +138,7 @@
# The name for this set of Sphinx documents.
# "<project> v<release> documentation" by default.
#
# html_title = 'Flask-Melodramatiq v0.3.6'
# html_title = 'Flask-Melodramatiq v0.3.7'

# A shorter title for the navigation bar. Default is the same as html_title.
#
Expand Down
10 changes: 1 addition & 9 deletions flask_melodramatiq/rabbitmq.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,9 @@ def publish_message(self, message, *, exchange='', routing_key=None):
)

attempts = 1
try:
# In pika 1.0 the legacy `basic_publish` method is
# removed, and `publish` renamed to `basic_publish`. So,
# to support pika versions before and after 1.0 we need an
# ugly hack.
publish = self.channel.publish
except AttributeError:
publish = self.channel.basic_publish
while True:
try:
publish(
self.channel.basic_publish(
exchange=exchange,
routing_key=routing_key,
body=message.encode(),
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def rel(*xs):

setup(
name='Flask-Melodramatiq',
version='0.3.6',
version='0.3.7',
url='https://github.com/epandurski/flask_melodramatiq',
license='MIT',
author='Evgeni Pandurski',
Expand Down

0 comments on commit 7979bd9

Please sign in to comment.