Opened 4 years ago

Closed 4 years ago

#20145 closed Cleanup/optimization (wontfix)

Use cdecimal for DecimalField if available

Reported by: dgl 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 dgl 4 years ago.
ticket20145-2.diff (456 bytes) - added by dgl 4 years ago.
updated patch

Download all attachments as: .zip

Change History (3)

Changed 4 years ago by dgl

Attachment: ticket20145.diff added

Changed 4 years ago by dgl

Attachment: ticket20145-2.diff added

updated patch

comment:1 Changed 4 years ago by Alex Gaynor

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
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