Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Allow call to Pubnub.publish() without a callback parameter#4

Closed
FrankBattaglia wants to merge 1 commit intopubnub:CL-9603pubnub/python:CL-9603from
FrankBattaglia:CL-9603-publish-without-callbackFrankBattaglia/python:CL-9603-publish-without-callbackCopy head branch name to clipboard
Closed

Allow call to Pubnub.publish() without a callback parameter#4
FrankBattaglia wants to merge 1 commit intopubnub:CL-9603pubnub/python:CL-9603from
FrankBattaglia:CL-9603-publish-without-callbackFrankBattaglia/python:CL-9603-publish-without-callbackCopy head branch name to clipboard

Conversation

@FrankBattaglia
Copy link

Currently, the _request method assumes a callable callback parameter. However, the Pubnub API (and general pub/sub semantics) allows calls to publish() without a callback (see e.g. common/PubnubBase.py:154-158). Thus _request can be invoked with callback=None. This raises a "TypeError: 'NoneType' object is not callable" exception at line 70

The proposed change will only invoke the callback when callback != None

@stephenlb
Copy link
Member

Geremy/Dev,

This looks like a good idea. WDYT?

On Tue, Jul 30, 2013 at 6:12 PM, FrankSomething notifications@github.comwrote:

Currently, the _request method assumes a callable callback parameter.
However, the Pubnub API (and general pub/sub semantics) allows calls to
publish() without a callback (see e.g. common/PubnubBase.py:154-158). Thus
_request can be invoked with callback=None. This raises a "TypeError:
'NoneType' object is not callable" exception at line 70

The proposed change will only invoke the callback when callback != None

You can merge this Pull Request by running

git pull https://github.com/FrankSomething/python CL-9603-publish-without-callback

Or view, comment on, or merge it at:

#4
Commit Summary

  • Don't try callback if None

File Changes

Patch Links:

Cheers!
Stephen Blum
http://twitter.com/PubNub
https://github.com/pubnub/pubnub-api - GitHub
https://help.pubnub.com/ - Help Desk
www.pubnub.com
+1-425-830-6711

@geremyCohen
Copy link

@stephenlb yes, we will accept it, but waiting to first discuss with @devendram to discuss being sure this goes into new python branch as well.

@stephenlb
Copy link
Member

awesome!

On Tue, Jul 30, 2013 at 6:48 PM, Geremy Cohen notifications@github.comwrote:

@stephenlb https://github.com/stephenlb yes, we will accept it, but
waiting to first discuss with @devendram https://github.com/devendramto discuss being sure this goes into new python branch as well.


Reply to this email directly or view it on GitHubhttps://github.com//pull/4#issuecomment-21835526
.

Cheers!
Stephen Blum
http://twitter.com/PubNub
https://github.com/pubnub/pubnub-api - GitHub
https://help.pubnub.com/ - Help Desk
www.pubnub.com
+1-425-830-6711

@FrankBattaglia
Copy link
Author

Hey, Pubnub people.

It's a little unclear which branch / repo I should be using and / or submitting patches against for a Python/Tornado environment. At the moment I've been looking at pubnub/python master and CL-9603 (the latter appears to be more actively developed). The master branch of that repo also appears to be reflected in pubnub/pubnub-api, but I couldn't easily find the analog to the CL-9603 branch in the big repo. In the future, if I find any more sore points with the Python/Tornado library, which repo / branch should I PR against to be the most helpful / useful?

-- Frank J. Battaglia

On Jul 30, 2013, at 9:48 PM, Geremy Cohen notifications@github.com wrote:

@stephenlb yes, we will accept it, but waiting to first discuss with @devendram to discuss being sure this goes into new python branch as well.


Reply to this email directly or view it on GitHub.

@stephenlb
Copy link
Member

Hi FrankSomething!

Thank you for the questions. Our PIP library is the standard python which
uses only pre-installed libs. The Twisted and Tornado require specific
dependencies on those platforms.

Please consider the https://github.com/pubnub/python repo as the dedicated
master repository going forward.

On Wed, Jul 31, 2013 at 8:37 AM, FrankSomething notifications@github.comwrote:

Hey, Pubnub people.

It's a little unclear which branch / repo I should be using and / or
submitting patches against for a Python/Tornado environment. At the moment
I've been looking at pubnub/python master and CL-9603 (the latter appears
to be more actively developed). The master branch of that repo also appears
to be reflected in pubnub/pubnub-api, but I couldn't easily find the analog
to the CL-9603 branch in the big repo. In the future, if I find any more
sore points with the Python/Tornado library, which repo / branch should I
PR against to be the most helpful / useful?

-- Frank J. Battaglia

On Jul 30, 2013, at 9:48 PM, Geremy Cohen notifications@github.com
wrote:

@stephenlb yes, we will accept it, but waiting to first discuss with
@devendram to discuss being sure this goes into new python branch as well.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//pull/4#issuecomment-21872089
.

Cheers!
Stephen Blum
http://twitter.com/PubNub
https://github.com/pubnub/pubnub-api - GitHub
https://help.pubnub.com/ - Help Desk
www.pubnub.com
+1-425-830-6711

@geremyCohen
Copy link

Frank-

We are working on creating a unified client as well to make this less
complicated.
geremy

On 7/31/13 8:37 AM, FrankSomething wrote:

Hey, Pubnub people.

It's a little unclear which branch / repo I should be using and / or
submitting patches against for a Python/Tornado environment. At the
moment I've been looking at pubnub/python master and CL-9603 (the
latter appears to be more actively developed). The master branch of
that repo also appears to be reflected in pubnub/pubnub-api, but I
couldn't easily find the analog to the CL-9603 branch in the big repo.
In the future, if I find any more sore points with the Python/Tornado
library, which repo / branch should I PR against to be the most
helpful / useful?

-- Frank J. Battaglia

On Jul 30, 2013, at 9:48 PM, Geremy Cohen notifications@github.com
wrote:

@stephenlb yes, we will accept it, but waiting to first discuss with
@devendram to discuss being sure this goes into new python branch as
well.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub
#4 (comment).

qsoftdevelopment pushed a commit that referenced this pull request Dec 27, 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.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.