This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Deprecate the formatter module
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.4
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: brett.cannon Nosy List: Arfrever, Jim Fasarakis-Hilliard, brett.cannon, ezio.melotti, larry, python-dev, tshepang
Priority: deferred blocker Keywords: patch

Created on 2013-08-12 19:16 by brett.cannon, last changed 2022-04-11 14:57 by admin. This issue is now closed.

File name Uploaded Description Edit
deprecate_formatter.diff brett.cannon, 2013-08-12 19:16 review
Messages (11)
msg194989 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2013-08-12 19:16
Turns out the formatter module isn't really used by anyone. Pydoc uses it, but it could easily use textwrap. Searching on Github shows a usage by someone who simply re-exposes it as part of their own public API but has no actual usage themselves ( and . A Google search only turns up references in books ({google:acceptedSuggestion}oq=%22import+formatter%22&{google:instantFieldTrialGroupParameter}sourceid=chrome&ie=UTF-8&q=%22import+formatter%22&qscrl=1#bav=on.2,or.r_cp.r_qf.&fp=7bfd11bde90d01cb&q=%22import+formatter%22+OR+%22from+formatter%22&qscrl=1).

The attached patch deprecated formatter for removal in Python 3.6.
msg194995 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2013-08-12 19:35
msg197651 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2013-09-13 20:44
Making a deferred blocker to make sure I get around to deprecating before b1.
msg198956 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-10-04 15:39
New changeset 04ff1cc40d62 by Brett Cannon in branch 'default':
Issue #18716: Deprecate the formatter module
msg199312 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2013-10-09 16:54
Need to add a note to PEP 4.
msg200278 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2013-10-18 15:49
Documented in f1fde6ef92e2
msg204885 - (view) Author: Arfrever Frehtes Taifersar Arahesis (Arfrever) * (Python triager) Date: 2013-12-01 05:29
formatter module is used by (Python-3-compatible) Portage (package manager for Gentoo):;a=summary

Maybe deprecation should be reverted.
msg204886 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2013-12-01 05:36
They're not on Python 3.  I think we should keep the deprecation and let them roll their own when they upgrade.  It's not like the module provides much functionality in the first place.
msg204938 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2013-12-01 15:46
On Sun, Dec 1, 2013 at 12:36 AM, Larry Hastings <>wrote:

> Larry Hastings added the comment:
> They're not on Python 3.  I think we should keep the deprecation and let
> them roll their own when they upgrade.  It's not like the module provides
> much functionality in the first place.

What Larry said. =) Plus a single user in the world is not enough to
warrant keeping a module. The code is simple enough that if they want to
keep it they can simply copy it into their own code.
msg289661 - (view) Author: Jim Fasarakis-Hilliard (Jim Fasarakis-Hilliard) * Date: 2017-03-15 10:11
Just bumped into this. 

Is the removal for this module waiting for the end of Python 2.7 support as PEP 4 states for modules in Py2 and Py3? 

The first message calls for a removal in 3.6 so, I'm either missing some additional conversations on this or this might of just have been forgotten.
msg289686 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2017-03-15 18:22
Yes, the code won't be deleted until we're in a post-2.7 world.
Date User Action Args
2022-04-11 14:57:49adminsetgithub: 62916
2017-03-15 18:22:46brett.cannonsetmessages: + msg289686
2017-03-15 10:11:17Jim Fasarakis-Hilliardsetnosy: + Jim Fasarakis-Hilliard
messages: + msg289661
2013-12-06 15:19:05brett.cannonsetstatus: open -> closed
resolution: fixed
2013-12-01 15:46:29brett.cannonsetmessages: + msg204938
2013-12-01 05:36:11larrysetmessages: + msg204886
2013-12-01 05:29:03Arfreversetstatus: closed -> open

nosy: + Arfrever
messages: + msg204885

resolution: fixed -> (no value)
stage: resolved ->
2013-10-18 15:49:40brett.cannonsetstatus: open -> closed

messages: + msg200278
2013-10-09 16:54:41brett.cannonlinkissue19165 dependencies
2013-10-09 16:54:30brett.cannonsetstatus: closed -> open

messages: + msg199312
2013-10-04 15:39:45brett.cannonsetstatus: open -> closed
resolution: fixed
stage: test needed -> resolved
2013-10-04 15:39:10python-devsetnosy: + python-dev
messages: + msg198956
2013-09-13 20:44:28brett.cannonsetpriority: normal -> deferred blocker

messages: + msg197651
2013-08-16 19:44:01tshepangsetnosy: + tshepang
2013-08-12 19:35:06larrysetnosy: + larry
messages: + msg194995
2013-08-12 19:33:50ezio.melottisetnosy: + ezio.melotti
2013-08-12 19:23:36brett.cannonsetassignee: brett.cannon
2013-08-12 19:16:08brett.cannoncreate