Skip to content

Commit

Permalink
Remove force_binary
Browse files Browse the repository at this point in the history
  • Loading branch information
gmr committed May 13, 2014
1 parent a42dd90 commit 9b97956
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions pika/connection.py
Expand Up @@ -651,7 +651,7 @@ def add_timeout(self, deadline, callback_method):
"""
raise NotImplementedError

def channel(self, on_open_callback, channel_number=None, force_binary=False):
def channel(self, on_open_callback, channel_number=None):
"""Create a new channel with the next available channel number or pass
in a channel number to use. Must be non-zero if you would like to
specify but it is recommended that you let Pika manage the channel
Expand All @@ -660,15 +660,13 @@ def channel(self, on_open_callback, channel_number=None, force_binary=False):
:param method on_open_callback: The callback when the channel is opened
:param int channel_number: The channel number to use, defaults to the
next available.
:param bool force_binary: Prevents channel from autodetecting unicode
:rtype: pika.channel.Channel
"""
if not channel_number:
channel_number = self._next_channel_number()
self._channels[channel_number] = self._create_channel(channel_number,
on_open_callback,
force_binary)
on_open_callback)
self._add_channel_callbacks(channel_number)
self._channels[channel_number].open()
return self._channels[channel_number]
Expand Down Expand Up @@ -937,16 +935,15 @@ def _connect(self):
warnings.warn('This method is deprecated, use Connection.connect',
DeprecationWarning)

def _create_channel(self, channel_number, on_open_callback, force_binary):
def _create_channel(self, channel_number, on_open_callback):
"""Create a new channel using the specified channel number and calling
back the method specified by on_open_callback
:param int channel_number: The channel number to use
:param method on_open_callback: The callback when the channel is opened
:param bool force_binary: Prevents channel from autodetecting unicode
"""
return channel.Channel(self, channel_number, on_open_callback, force_binary)
return channel.Channel(self, channel_number, on_open_callback)

def _create_heartbeat_checker(self):
"""Create a heartbeat checker instance if there is a heartbeat interval
Expand Down

0 comments on commit 9b97956

Please sign in to comment.