Skip to content

Patch to rename HTMLParser module to lower_case #45343

Closed

Description

@paulsmith
mannequin
BPO 1002
Nosy @brettcannon, @orsenthil
Files
  • rename-html-parser.diff
  • rename-html-parser-fix-imports.diff
  • 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 = None
    closed_at = <Date 2008-05-16.04:42:28.105>
    created_at = <Date 2007-08-23.20:20:17.504>
    labels = ['expert-2to3', 'library']
    title = 'Patch to rename HTMLParser module to lower_case'
    updated_at = <Date 2008-05-16.04:42:28.104>
    user = 'https://bugs.python.org/paulsmith'

    bugs.python.org fields:

    activity = <Date 2008-05-16.04:42:28.104>
    actor = 'brett.cannon'
    assignee = 'collinwinter'
    closed = True
    closed_date = <Date 2008-05-16.04:42:28.105>
    closer = 'brett.cannon'
    components = ['Library (Lib)', '2to3 (2.x to 3.x conversion tool)']
    creation = <Date 2007-08-23.20:20:17.504>
    creator = 'paulsmith'
    dependencies = []
    files = ['8297', '8298']
    hgrepos = []
    issue_num = 1002
    keywords = ['patch']
    message_count = 11.0
    messages = ['55200', '55202', '55216', '55257', '55258', '55259', '55266', '55495', '56122', '66797', '66896']
    nosy_count = 5.0
    nosy_names = ['brett.cannon', 'dubois', 'collinwinter', 'orsenthil', 'paulsmith']
    pr_nums = []
    priority = 'normal'
    resolution = 'out of date'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue1002'
    versions = ['Python 3.0']

    Activity

    1. paulsmith commented on Aug 23, 2007

      paulsmithmannequin
      MannequinAuthor

      HTMLParser is renamed to html_parser.

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      on Aug 23, 2007
    3. paulsmith commented on Aug 23, 2007

      paulsmithmannequin
      MannequinAuthor

      Patch to 2to3 fix_imports.

    4. paulsmith commented on Aug 23, 2007

      paulsmithmannequin
      MannequinAuthor

      Note that patch doesn't include svn mv [Lib/HTMLParser.py](https://github.com/python/cpython/blob/main/Lib/HTMLParser.py) [Lib/html_parser.py](https://github.com/python/cpython/blob/main/Lib/html_parser.py).

    5. orsenthil commented on Aug 24, 2007

      @orsenthil
      Member

      what is this and other series of patches you have submitted, paulsmith?
      I fail to understand. Why is the need for changing Library? You are just
      adding up SPAM here.

    6. paulsmith commented on Aug 24, 2007

      paulsmithmannequin
      MannequinAuthor

      I am participating in the Python Sprint here at Google, and was just
      going through the Py3k Sprint Tasks spreadsheet, one of them being to
      rename standard library modules which use CamelCase to
      lower_and_underscore, the more modern naming.

    7. orsenthil commented on Aug 24, 2007

      @orsenthil
      Member

      But your "standalone diffs" will break things and dependencies with
      other modules, so I was worried about them. Are you taking care of them all?

    8. paulsmith commented on Aug 24, 2007

      paulsmithmannequin
      MannequinAuthor

      I grep'd for HTMLParser module imports in other standard library
      modules, renamed, and ran the unit tests. I also updated the mapping in
      2to3's fix_imports.py. The only thing I can't do is the actual svn mv
      to rename the module itself.

      Is part of the problem that this issue was initially flagged as Python
      2.6? It's supposed to be 3.0, but that flag wasn't available yesterday
      when I opened it.

    9. collinwinter commented on Aug 30, 2007

      collinwintermannequin
      Mannequin

      orsenthil: that this will break external modules is completely
      acceptable. Those modules won't work out-of-the-box with Python 3
      anyway, and hopefully Paul's patch to 2to3 will alleviate some of the
      burden.

    10. dubois commented on Sep 24, 2007

      duboismannequin
      Mannequin

      Hoping I have learned to spell, another test.

    11. brettcannon commented on May 13, 2008

      @brettcannon
      Member

      Do note that HTMLParse is slated to become html.parser in 3.0, so these
      patches are out-of-date. They can be used, though, to possibly help all
      references to HTMLParser (although 2to3 should handle that).

    12. brettcannon commented on May 16, 2008

      @brettcannon
      Member

      Closing as out of date to try to make the number of PEP-3108 issues more
      manageable. HTMLParser is becoming html.parser in 3.0.

    13. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      stdlibStandard Library Python modules in the Lib/ directorytopic-2to3

      Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions