Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#21651 closed New feature (fixed)

Remove unused function: django.utils.text.recapitalize

Reported by: Vajrasky Kok Owned by: nobody
Component: Utilities Version: dev
Severity: Normal Keywords:
Cc: sky.kok@… Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no


>>> from django.utils.text import recapitalize
>>> recapitalize("first sentence. second sentence? third sentence! FINAL SENTENCE.")
'First sentence. Second sentence? Third sentence! Final sentence.'

All is well, but... maybe not.

>>> recapitalize("first sentence.   second sentence?\nthird sentence!")
'First sentence.   second sentence?\nthird sentence!'

Change History (3)

comment:1 Changed 8 years ago by Vajrasky Kok

Cc: sky.kok@… added

Here is the PR to make recapitalize smarter and more useful.

comment:2 Changed 8 years ago by Marc Tamlyn <marc.tamlyn@…>

Resolution: fixed
Status: newclosed

In b4a11f2720fbbb47f7c03a5a00b3cfb334266a92:

Fixed #21651 -- Remove recapitalize.

It was not used inside Django, is not tested or documented. Consequently
remove without deprecation path.

Thanks to @vajrasky for bringing it to our attention.

comment:3 Changed 8 years ago by Tim Graham

Summary: django.utils.text.recapitalize is too dumb (can not handle more than one space, newlines, and tabs)Remove unused function: django.utils.text.recapitalize
Note: See TracTickets for help on using tickets.
Back to Top