You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bpo-14019 has a patch, unrelated to the issue, that adds test.test_formatter. There still is no such file, so I open this issue to move the patch here. It is the second version, responding to review by Ezio Melotti.
But formatter has been deprecated since 3.4. It was originally scheduled to be removed in 3.6, but we decided to delay such removals until after 2.7 EOL. That is now past. Do we add tests for a deprecated module? If so, the patch, aDo we still want to remove formatter? If so, when?
The patch is by Francisco Freire (francisco.freire) * (CLA signed). There is apparently no way to directly move a patch from one issue to another, so I download and upload.
I took a look at the module and its doc. It is based on a 1980s model of document processing that has been somewhat superseded by html, xml, and pdf. The module itself has been pretty well superseded by stdlib and external moudles. IDLE, for instance, displays idle.html in a tkinter Text widget about 160 lines by subclassing htmlparser.
One obsolescent 'feature' is that fonts are defined by (size, italic, bold, teletype), where 'teletype' is a bool of undefined meaning. There is no way I saw to designate a font family like 'Source Code Pro' or 'Monaco'.
Since the module is unmaintained and frozen, anyone importing it can incorporate whatever class code they need.
A coda on my 'obsolete and superseded' claim: text formatting events have 2 sources -- the text being displayed and user actions while reading. formatter somewhat mixes these together.
html.parser.HTMLParser generates events from the text in the form of calls to handle_xyz methods, where 'xyy is most commonly 'starttag', 'data', 'endtag'. HTMLPareser subclasses replace the default 'pass' implementations. So the idea is similar to formatter.NullFormatter. IDLE uses the tkinter Text widget as the writer instance for its HTMLParser subclass. Responses to events may depend on user settings, which may be changed by user events.
For a GUI app, user events are handled by the GUI framework and may or mayy not require user coding to handle.
hroncok commented on Jan 6, 2021
hroncokmannequin
Mannequin
More actions
I am confused. Why is this still online when the source was removed?
Issues relating to documentation build likely need to be looked at and addressed by Julien. If it does end up being an infra issue, feel free to read me to nosy.
Activity
terryjreedy commentedon Nov 9, 2020
bpo-14019 has a patch, unrelated to the issue, that adds test.test_formatter. There still is no such file, so I open this issue to move the patch here. It is the second version, responding to review by Ezio Melotti.
But formatter has been deprecated since 3.4. It was originally scheduled to be removed in 3.6, but we decided to delay such removals until after 2.7 EOL. That is now past. Do we add tests for a deprecated module? If so, the patch, aDo we still want to remove formatter? If so, when?
terryjreedy commentedon Nov 9, 2020
The patch is by Francisco Freire (francisco.freire) * (CLA signed). There is apparently no way to directly move a patch from one issue to another, so I download and upload.
corona10 commentedon Nov 23, 2020
IMHO, 3.10 is a good time to remove formatter
tiran commentedon Nov 24, 2020
The formatter has been deprecated for a long time. It's been issuing a DeprecationWarning on import since 3.5. Let's remove it.
[-]Add test_formatter (or remove deprecated formatter module?)[/-][+]Remove formatter module[/+][-]Add test_formatter (or remove deprecated formatter module?)[/-][+]Remove formatter module[/+]corona10 commentedon Nov 24, 2020
@christian.heimes
Thank you Christian
I also discuss this issue on python-dev and everybody agree with removing this module.
I will remove this module ;)
tirkarthi commentedon Nov 24, 2020
This was proposed earlier : https://bugs.python.org/issue39352
terryjreedy commentedon Nov 24, 2020
I took a look at the module and its doc. It is based on a 1980s model of document processing that has been somewhat superseded by html, xml, and pdf. The module itself has been pretty well superseded by stdlib and external moudles. IDLE, for instance, displays idle.html in a tkinter Text widget about 160 lines by subclassing htmlparser.
One obsolescent 'feature' is that fonts are defined by (size, italic, bold, teletype), where 'teletype' is a bool of undefined meaning. There is no way I saw to designate a font family like 'Source Code Pro' or 'Monaco'.
Since the module is unmaintained and frozen, anyone importing it can incorporate whatever class code they need.
corona10 commentedon Nov 25, 2020
New changeset be319c0 by Dong-hee Na in branch 'master':
bpo-42299: Remove formatter module (GH-23476)
be319c0
corona10 commentedon Nov 25, 2020
@terry.reedy @vstinner
Thank you, Terry and Victor, and goodbye formatter module!
vstinner commentedon Nov 25, 2020
Thread on python-dev:
https://mail.python.org/archives/list/python-dev@python.org/thread/ZEDIBBYCWI34GVOXDEUYXQY3LYXOFHA2/
Copy of Fred Drake's email:
"Oh, the memories! Looking at docs, I can vaguely recall using the
API, but... it definitely doesn't belong in the stdlib. -Fred"
terryjreedy commentedon Nov 26, 2020
A coda on my 'obsolete and superseded' claim: text formatting events have 2 sources -- the text being displayed and user actions while reading. formatter somewhat mixes these together.
html.parser.HTMLParser generates events from the text in the form of calls to handle_xyz methods, where 'xyy is most commonly 'starttag', 'data', 'endtag'. HTMLPareser subclasses replace the default 'pass' implementations. So the idea is similar to formatter.NullFormatter. IDLE uses the tkinter Text widget as the writer instance for its HTMLParser subclass. Responses to events may depend on user settings, which may be changed by user events.
For a GUI app, user events are handled by the GUI framework and may or mayy not require user coding to handle.
hroncok commentedon Jan 6, 2021
I am confused. Why is this still online when the source was removed?
https://docs.python.org/3.10/library/formatter.html
tiran commentedon Jan 6, 2021
https://docs.python.org/3.10/library/index.html no longer links to https://docs.python.org/3.10/library/misc.html but misc.html and formatter.html are still there. It looks like a bug in the build and update process. I bet it's not removing files.
Ee, could you take a look, please?
ewdurbin commentedon Jan 6, 2021
Issues relating to documentation build likely need to be looked at and addressed by Julien. If it does end up being an infra issue, feel free to read me to nosy.