Code

Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#2677 closed defect (fixed)

[patch] simplejson raises DeprecationWarning

Reported by: Tom Tobin <korpios@…> Owned by: adrian
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:

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

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by Tom Tobin <korpios@…

tweak bundled simplejson

comment:1 Changed 8 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 8 years ago by anonymous

  • Summary changed from simplejson raises DeprecationWarning to [patch] simplejson raises DeprecationWarning

comment:3 Changed 8 years ago by mtredinnick

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

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

comment:4 Changed 7 years ago by korpios

  • Reporter changed from Tom Tobin <korpios@…> to Tom Tobin <korpios@…>

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.