#18022 closed Bug (fixed)
Django 1.4 never uses python's standard json module
Reported by: | Alex Ogier | Owned by: | nobody |
---|---|---|---|
Component: | Core (Serialization) | Version: | 1.4 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The problem is that an overly zealous except clause masks a NameError that always gets raised.
Attachments (1)
Change History (5)
by , 13 years ago
Attachment: | import_json.diff added |
---|
comment:1 by , 13 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 13 years ago
I may have been mistaken. The __version__ = json.__version__
line definitely used to cause a NameError and there's no way __version__
was set successfully, but that doesn't happen until after everything from json
is loaded and use_system_version
is set. It looks like __version__
never gets set, and the fix in #17018 never accomplished anything, but you do end up getting the rest of standard library json as expected.
Still worth merging to get the correct __version__
but it's not particularly critical.
comment:4 by , 13 years ago
IMHO, this fix is useful mainly for the 1.4.X branch, as in 1.5 this will probably get a much more serious refactoring (#18023).
Just waiting confirmation by another core dev before committing in 1.4.X branch.