Opened 18 years ago

Closed 18 years ago

Last modified 17 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: no UI/UX: no

Description

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@… 18 years ago.
tweak bundled simplejson

Download all attachments as: .zip

Change History (5)

by Tom Tobin <korpios@…, 18 years ago

Attachment: simplejson-tweak.diff added

tweak bundled simplejson

comment:1 by Tom Tobin <korpios@…, 18 years ago

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 by anonymous, 18 years ago

Summary: simplejson raises DeprecationWarning[patch] simplejson raises DeprecationWarning

comment:3 by Malcolm Tredinnick, 18 years ago

Resolution: fixed
Status: newclosed

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

comment:4 by korpios, 17 years ago

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