Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#2677 closed defect (fixed)

[patch] simplejson raises DeprecationWarning

Reported by: Tom Tobin <korpios@…> Owned by: Adrian Holovaty
Component: Core (Other) Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


The simplejson module bundled with Django raises a DepreciationWarning when loaded, since it uses the sre module rather than re.

Since there is no reason not to use re (we're trying to be backwards compatible, but not that backwards compatible!), Django's simplejson should be patched to simply use re.

Attachments (1)

simplejson-tweak.diff (618 bytes) - added by Tom Tobin <korpios@… 12 years ago.
tweak bundled simplejson

Download all attachments as: .zip

Change History (5)

Changed 12 years ago by Tom Tobin <korpios@…

Attachment: simplejson-tweak.diff added

tweak bundled simplejson

comment:1 Changed 12 years ago by Tom Tobin <korpios@…

I've attached a patch that, while not removing dependence upon sre_parse, sre_compile, or sre_constants (since simplejson is working some lower-level regex magic with those), it does shut up the DepreciationWarning by importing some constants from re rather than sre (the latter merely being a wrapper around the former).

comment:2 Changed 12 years ago by anonymous

Summary: simplejson raises DeprecationWarning[patch] simplejson raises DeprecationWarning

comment:3 Changed 12 years ago by Malcolm Tredinnick

Resolution: fixed
Status: newclosed

(In [3814]) Fixed #2677 -- Removed the need to import sre and hence avoid a
DeprecationWarning. Thanks, Tom Tobin.

comment:4 Changed 11 years ago by korpios

Reporter: changed from Tom Tobin <korpios@…> to Tom Tobin <korpios@…>
Note: See TracTickets for help on using tickets.
Back to Top