Christian Tanzer added the comment:
Json keys *are strings*.
That‘s why json.dump stringifies all keys. If you want to argue that this
behavior is wrong I wouldn’t protest except for that it breaks extant code.
But arguing that sorting the stringified keys would violate user’s expectations
Christian Tanzer added the comment:
Paul Ganssle wrote at Fri, 07 Dec 2018 17:22:36 +:
> > Gregory P. Smith (gregory.p.smith) 2017-03-02 18:57
> > TL;DR - Just one more example of why nobody should *ever* use pickle
> > under any circumstances. It is useless fo
Christian Tanzer added the comment:
Aaron Hall wrote at Sun, 20 May 2018 16:49:06 +:
> Now that dicts are sortable, does that make the sort_keys argument redundant?
>
> Should this bug be changed to "won't fix"?
https://bugs.python.org/issue25457#msg317216 is as g
Christian Tanzer added the comment:
This issue is getting old. Is there any way to solve this for Python 3.6?
--
___
Python tracker
<http://bugs.python.org/issue22
Christian Tanzer added the comment:
Terry J. Reedy wrote at Fri, 06 Nov 2015 22:49:57 +:
> email parsing docs: clarify that only ASCII strings are supported
If that is the decision, `message_from_string` should raise an
exception if it gets a non-ASCII argum
Christian Tanzer added the comment:
> If you can suggest ways of improving the string support without
> breaking existing python3 code that may be using it (most likely
> wrongly, but working for them), then I will happily review them.
At the moment, I'm mainly interested in ha
Christian Tanzer added the comment:
> Yes, the port from python2 to python3 of the email package
> was...suboptimal.
> ...
> The whole concept of using unicode as a 7bit data channel only is
> just...weird.
+100 to both.
> But, we are now stuck with maintaining tha
Christian Tanzer added the comment:
R. David Murray wrote at Wed, 04 Nov 2015 15:36:27 +:
> There is no problem with supporting both 2.7 and python3 with the same
> email API as long as your input strings are ASCII only, which is what
> is required by the email RFCs (as I said, th
Christian Tanzer added the comment:
R. David Murray wrote at Tue, 03 Nov 2015 19:59:53 +:
> Your problem is that your input email is ia unicode string. A unicode
> string has no RFC defintion as an email, so things do not work right,
> as you observed. Whether or not email sho
New submission from Christian Tanzer:
For an email message with `Content-type: text/plain; charset=utf-8`, in Python
3.5, get_payload returns a bytes object encoded with `latin-1`. Python 2.7
returns a str object encoded with `utf-8` as expected.
Running the attached test script
Christian Tanzer added the comment:
Josh Rosenberg wrote at Fri, 23 Oct 2015 02:56:30 +:
> As a workaround (should you absolutely need to sort keys by some
> arbitrary criteria), you can initialize a collections.OrderedDict from
> the sorted items of your original dict (using wha
Christian Tanzer added the comment:
Josh Rosenberg wrote at Fri, 23 Oct 2015 02:45:51 +:
> The Python 2 sort order is a result of the "arbitrary but consistent
> fallback comparison" (omitting details, it's comparing the names of
> the types), thus the "strange
New submission from Christian Tanzer:
In Python 3, trying to json-dump a dict with keys of different types fails with
a TypeError when sort_keys is specified:
python2.7
===
Python 2.7.10 (default, May 29 2015, 10:02:30)
[GCC 4.8.4] on linux2
Type "help", "copyright
Christian Tanzer added the comment:
Alexander Belopolsky wrote at Thu, 15 Oct 2015 17:56:42 +:
> I don't think your solution will work for date/time/datetime pickles.
> There are many values for which pickle payload consists of bytes
> within 0-127 range.
H.
> IIU
Christian Tanzer added the comment:
IMNSHO, the problem lies in the Python 3 pickle.py and it is **not** restricted
to datetime instances
(for a detailed rambling see
http://c-tanzer.at/en/breaking_py2_pickles_in_py3.html) .
In Python 2, 8-bit strings are used for text and for binary data
Christian Tanzer added the comment:
> The code works when using encoding='bytes'. Thanks Tim for the suggestion.
> So this is not a bug, but is there any sense in having encoding='ASCII' by
> default in pickle ?
It is most definitely a bug. And it adds anothe
16 matches
Mail list logo