Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#17071 closed Bug (fixed)

django.utils.simplejson.__version__ always reports 2.0.7

Reported by: ramiro 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)

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 3 years ago by ramiro

  • Description modified (diff)

comment:2 Changed 3 years ago by Alex

  • Triage Stage changed from Unreviewed to Accepted

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

comment:3 Changed 3 years ago by ramiro

  • Resolution set to fixed
  • Status changed from new to closed

In [17018]:

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

comment:4 Changed 3 years ago by ramiro

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