Opened 3 years ago

Closed 3 years ago

#32859 closed Cleanup/optimization (fixed)

Simplify django.utils.text.compress_string by using gzip.compress

Reported by: Illia Volochii Owned by: Illia Volochii
Component: Utilities Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

gzip.compress can replace the custom logic defined in django.utils.text.compress_string.
Actually, the function works in the same way under the hood.

Change History (3)

comment:1 by Carlton Gibson, 3 years ago

Has patch: set
Triage Stage: UnreviewedAccepted

OK, I didn't fully review yet, but this looks right at first glance. (The blame on our version is quite old — looks like this has been there since day one.)

comment:2 by Mariusz Felisiak, 3 years ago

Triage Stage: AcceptedReady for checkin

comment:3 by Mariusz Felisiak <felisiak.mariusz@…>, 3 years ago

Resolution: fixed
Status: assignedclosed

In 5a468b4c:

Fixed #32859 -- Simplified compress_string() by using gzip.compress().

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