Re: POST JSON vs. urlencoded
"John P. Rouillard" <[email protected]>
| Newsgroups | gmane.comp.bug-tracking.roundup.devel |
|---|---|
| Message-ID | <[email protected]> |
In message <[email protected]>, Ralf Schlatterbeck writes: >On Tue, Apr 02, 2019 at 11:52:01PM +0000, Joseph Myers wrote: >> On Tue, 2 Apr 2019, Ralf Schlatterbeck wrote: >> >> > At least in python2 roundup's database interface wants UTF-8 for all >> > strings. Can someone chime in and tell me if this has changed with >> > python3? I don't want to change this now and break py3 compatibility. >> >> The general rule is as described in roundup/anypy/strings.py: >> >> # Roundup represents text internally using the native Python str type. >> # In Python 3, these are Unicode strings. In Python 2, these are >> # encoded using UTF-8, and the Python 2 unicode type is only used in a >> # few places, generally for interacting with external modules >> # requiring that type to be used. > >Thanks Joseph, that was exactly what I was looking for, I remembered >something like this when you worked on the py3 compatibility. The code >in the REST API now works for me with python2 (with the modified patch >from John) and I suppose John will test again with Py3. We should have >tests that do an end-to-end test with various encodings of the REST >API... I added a simple POST test that failed under python 2 without the patch and succeeds with the patch. I did the checkin this moinring before I came to work and it looks like TravisCI is happy with the change on 2.7, 3.4, 3.5 and 3.6 pythons. -- -- rouilj John Rouillard =========================================================================== My employers don't acknowledge my existence much less my opinions.