Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#17071 closed Bug (fixed)

django.utils.simplejson.__version__ always reports 2.0.7

Reported by: Ramiro Morales Owned by: nobody
Component: Core (Serialization) Version: master
Severity: Normal Keywords: simplejson
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Ramiro Morales)

We try to import a newer or faster version of 'simplejson' or Python 2.6's 'json', but the value of __version__ stays clamped to the value of the version of simplejson we bundle ('2.0.7') even when one of such imports is succesful.

Found this while working on #16850.

Change History (4)

comment:1 Changed 7 years ago by Ramiro Morales

Description: modified (diff)

comment:2 Changed 7 years ago by Alex Gaynor

Triage Stage: UnreviewedAccepted

The issue is __version__ isn't imported by the import * statements, because it has a leading underscore.

comment:3 Changed 7 years ago by Ramiro Morales

Resolution: fixed
Status: newclosed

In [17018]:

Fixed #17071 -- Made sure we report the right version of system-level {simple,}json module.

comment:4 Changed 7 years ago by Ramiro Morales

In [17865]:

Fixed #18022 -- Fixed import of standalone Python 'json' module.

Thanks Clueless for the report and initial patch.

Refs #17071, r17018.

Note: See TracTickets for help on using tickets.
Back to Top