Opened 19 months ago

Closed 19 months ago

Last modified 19 months ago

#21651 closed New feature (fixed)

Remove unused function: django.utils.text.recapitalize

Reported by: vajrasky Owned by: nobody
Component: Utilities Version: master
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

Description

>>> 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 19 months ago by vajrasky

  • Cc sky.kok@… added
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Here is the PR to make recapitalize smarter and more useful. https://github.com/django/django/pull/2100

comment:2 Changed 19 months ago by Marc Tamlyn <marc.tamlyn@…>

  • Resolution set to fixed
  • Status changed from new to closed

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 19 months ago by timo

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