This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eddygeek
Recipients eddygeek
Date 2014-08-29.11:00:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
_make_iterencode in python2.7/json/ encodes custom enum types incorrectly (the label will be printed without '"') because of these lines (line 320 in 2.7.6):
    elif isinstance(value, (int, long)):
        yield buf + str(value)

in constract, _make_iterencode in python 3 explicitly supports the enum types:

    elif isinstance(value, int):
        # Subclasses of int/float may override __str__, but we still
        # want to encode them as integers/floats in JSON. One example
        # within the standard library is IntEnum.
        yield buf + str(int(value))
Date User Action Args
2014-08-29 11:00:34eddygeeksetrecipients: + eddygeek
2014-08-29 11:00:34eddygeeksetmessageid: <>
2014-08-29 11:00:34eddygeeklinkissue22297 messages
2014-08-29 11:00:34eddygeekcreate