Opened 11 years ago

Closed 11 years ago

#20145 closed Cleanup/optimization (wontfix)

Use cdecimal for DecimalField if available

Reported by: Dmitry Gladkov Owned by: nobody
Component: Database layer (models, ORM) Version: 1.5
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

cdecimal is a drop-in replacement for decimal.py offering far better performace and has been included into Python 3.3.

Attachments (2)

ticket20145.diff (444 bytes ) - added by Dmitry Gladkov 11 years ago.
ticket20145-2.diff (456 bytes ) - added by Dmitry Gladkov 11 years ago.
updated patch

Download all attachments as: .zip

Change History (3)

by Dmitry Gladkov, 11 years ago

Attachment: ticket20145.diff added

by Dmitry Gladkov, 11 years ago

Attachment: ticket20145-2.diff added

updated patch

comment:1 by Alex Gaynor, 11 years ago

Resolution: wontfix
Status: newclosed

This isn't backwards compatible. The C version is not interoperable with the pure python version, so if anywhere in your code you have something like model.some_decimal_field = Decimal("1.0") your code will silently break. If you upgrade to Python 3.3 you'll automatically get the benefit of this, so I think the backwards compatibility concern isn't worth it, therefore I'm marking as wontfix.

Note: See TracTickets for help on using tickets.
Back to Top