File tree Expand file tree Collapse file tree 7 files changed +64
-7
lines changed
fixtures/native_sync/publish Expand file tree Collapse file tree 7 files changed +64
-7
lines changed Original file line number Diff line number Diff line change 11name : python
2- version : 5.2.0
2+ version : 5.2.1
33schema : 1
44scm : github.com/pubnub/python
55sdks :
@@ -169,6 +169,12 @@ sdks:
169169 license-url : https://github.com/aio-libs/aiohttp/blob/master/LICENSE.txt
170170 is-required : Required
171171changelog :
172+ - version : v5.2.1
173+ date : 2021-09-06
174+ changes :
175+ -
176+ text : " Encoding of the double quote character fixed."
177+ type : bug
172178 - version : v5.2.0
173179 date : 2021-08-31
174180 changes :
Original file line number Diff line number Diff line change 1+ ## [ v5.2.1] ( https://github.com/pubnub/python/releases/tag/v5.2.1 )
2+
3+ [ Full Changelog] ( https://github.com/pubnub/python/compare/v5.2.0...v5.2.1 )
4+
5+ - 🐛 Encoding of the double quote character fixed.
6+
17## [ v5.2.0] ( https://github.com/pubnub/python/releases/tag/v5.2.0 )
28
39[ Full Changelog] ( https://github.com/pubnub/python/compare/v5.1.4...v5.2.0 )
Original file line number Diff line number Diff line change 6565
6666class PubNubCore :
6767 """A base class for PubNub Python API implementations"""
68- SDK_VERSION = "5.2.0 "
68+ SDK_VERSION = "5.2.1 "
6969 SDK_NAME = "PubNub-Python"
7070
7171 TIMESTAMP_DIVIDER = 1000
Original file line number Diff line number Diff line change @@ -24,10 +24,7 @@ def get_data_for_user(data):
2424
2525def write_value_as_string (data ):
2626 try :
27- if isinstance (data , str ):
28- return "\" %s\" " % data
29- else :
30- return json .dumps (data )
27+ return json .dumps (data )
3128 except TypeError :
3229 raise PubNubException (
3330 pn_error = PNERR_JSON_NOT_SERIALIZABLE
Original file line number Diff line number Diff line change 22
33setup (
44 name = 'pubnub' ,
5- version = '5.2.0 ' ,
5+ version = '5.2.1 ' ,
66 description = 'PubNub Real-time push service in the cloud' ,
77 author = 'PubNub' ,
88 author_email = 'support@pubnub.com' ,
Original file line number Diff line number Diff line change 1+ interactions :
2+ - request :
3+ body : null
4+ headers :
5+ Accept :
6+ - ' */*'
7+ Accept-Encoding :
8+ - gzip, deflate
9+ Connection :
10+ - keep-alive
11+ User-Agent :
12+ - PubNub-Python/5.1.4
13+ method : GET
14+ uri : https://ps.pndsn.com/publish/pub-c-739aa0fc-3ed5-472b-af26-aca1b333ec52/sub-c-33f55052-190b-11e6-bfbc-02ee2ddab7fe/0/ch1/0/%22%5C%22%22?seqn=1
15+ response :
16+ body :
17+ string : ' [1,"Sent","16297201438613366"]'
18+ headers :
19+ Access-Control-Allow-Methods :
20+ - GET
21+ Access-Control-Allow-Origin :
22+ - ' *'
23+ Cache-Control :
24+ - no-cache
25+ Connection :
26+ - keep-alive
27+ Content-Length :
28+ - ' 30'
29+ Content-Type :
30+ - text/javascript; charset="UTF-8"
31+ Date :
32+ - Mon, 23 Aug 2021 12:02:23 GMT
33+ status :
34+ code : 200
35+ message : OK
36+ version : 1
Original file line number Diff line number Diff line change @@ -332,3 +332,15 @@ def test_publish_with_ptto_and_replicate(self):
332332 assert isinstance (env .result , PNPublishResult )
333333 assert "ptto" in env .status .client_request .url
334334 assert "norep" in env .status .client_request .url
335+
336+ @pn_vcr .use_cassette (
337+ 'tests/integrational/fixtures/native_sync/publish/publish_with_single_quote_message.yaml' ,
338+ filter_query_parameters = ['uuid' , 'pnsdk' , 'l_pub' ]
339+ )
340+ def test_single_quote_character_message_encoded_ok (self ):
341+ envelope = PubNub (pnconf ).publish ()\
342+ .channel ("ch1" )\
343+ .message ('"' )\
344+ .sync ()
345+
346+ assert envelope
You can’t perform that action at this time.
0 commit comments