pusher / pusher-http-python

Pusher Channels HTTP API library for Python
https://pusher.com/docs/server_api_guide
MIT License
375 stars 112 forks source link

Updated pusher/pusher.py, pusher/pusher_client.py to allow setting of limits on maximum values of data length, event name length and number of channels. #143

Closed sxb427 closed 5 years ago

sxb427 commented 5 years ago

Added three new instance attributes for classes Pusher and PusherClient:

Note : Not specifying one or more of the limits will result in the original defaults being used i.e. 10240 for max_len_data, 200 for max_len_event_name and 100 for max_num_channels.

Also added functions in pusher_tests/test_pusher_client.py to test working of limits.

damdo commented 5 years ago

Hey @sxb427 thank you for your PR. These limits are a leftover from the past and they were meant to be an heads up for the SDK users. We now have them defined at a cluster level (on our side). Currently the limits hardcoded in the libraries and the ones in the clusters currently match but ideally we will remove the ones in client libraries in favour of the ones defined on our side.

So I unfortunatelly have to close this PR. You can always reach out to our support if you have any further question or special needs. Thank you.

musabhusaini commented 5 years ago

Thanks @damdo for the explanation. Would you accept a PR to remove these hardcoded limits? We're currently being forced to use our own fork to override them and will appreciate this change. Thanks!