Skip to content

Modernize HTML output of difflib.HtmlDiff.make_file() #67852

Closed as duplicate

Description

@berkerpeksag
BPO 23664
Nosy @ezio-melotti, @berkerpeksag

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/berkerpeksag'
closed_at = None
created_at = <Date 2015-03-14.23:22:54.908>
labels = ['type-feature', 'library']
title = 'Modernize HTML output of difflib.HtmlDiff.make_file()'
updated_at = <Date 2016-01-03.09:54:58.444>
user = 'https://github.com/berkerpeksag'

bugs.python.org fields:

activity = <Date 2016-01-03.09:54:58.444>
actor = 'ezio.melotti'
assignee = 'berker.peksag'
closed = False
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2015-03-14.23:22:54.908>
creator = 'berker.peksag'
dependencies = []
files = []
hgrepos = []
issue_num = 23664
keywords = []
message_count = 1.0
messages = ['238106']
nosy_count = 2.0
nosy_names = ['ezio.melotti', 'berker.peksag']
pr_nums = []
priority = 'normal'
resolution = None
stage = 'needs patch'
status = 'open'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue23664'
versions = ['Python 3.6']

Activity

  1. berkerpeksag commented on Mar 14, 2015

    @berkerpeksag
    MemberAuthor

    This is a split off from bpo-2052. issue2052_html5_v2.diff (from bpo-2052) needs to be updated.

  2. self-assigned this
    on Mar 14, 2015
  3. added
    stdlibStandard Library Python modules in the Lib/ directory
    type-featureA feature request or enhancement
    on Mar 14, 2015
  4. transferred this issue fromon Apr 10, 2022
  5. iritkatriel commented on Nov 8, 2022

    @iritkatriel
    Member

    @berkerpeksag Do you remember what this was about?

  6. added
    pendingThe issue will be closed if no feedback is provided
    on Nov 8, 2022
  7. ezio-melotti commented on Nov 21, 2022

    @ezio-melotti
    Member

    IIRC it refers to this piece of code

    cpython/Lib/difflib.py

    Lines 1610 to 1619 in 2781ec9

    _file_template = """
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type"
    content="text/html; charset=%(charset)s" />
    <title></title>

    The generated documented uses XHTML 1.0 Transitional instead of HTML 5 and the template should therefore be updated (unless doing so break some tool that relies on it).

  8. removed
    pendingThe issue will be closed if no feedback is provided
    on Nov 21, 2022
  9. stefan6419846 commented on Sep 25, 2024

    @stefan6419846
    Contributor

    Does this cover the general outdated HTML syntax as well? At least in my case, PyCharm is complaining about the table output using the old cellspacing, cellpadding and rules attributes.

  10. Wulian233 commented on Jul 5, 2025

    @Wulian233
    Contributor

    IIRC it refers to this piece of code

    cpython/Lib/difflib.py

    Lines 1610 to 1619 in 2781ec9

    _file_template = """
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type"
    content="text/html; charset=%(charset)s" />
    <title></title>

    The generated documented uses XHTML 1.0 Transitional instead of HTML 5 and the template should therefore be updated (unless doing so break some tool that relies on it).

    I saw this issue a bit late. I implemented the modernized difflib HTML output 2 months ago, migrating it to the HTML5 standard and optimizing the style. Can this issue be closed as completed?

    See #67852

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

pendingThe issue will be closed if no feedback is providedstdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions