Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

html.parser.HTMLParser: convert_charrefs should become True by default #65246

Closed
Arfrever mannequin opened this issue Mar 24, 2014 · 6 comments
Closed

html.parser.HTMLParser: convert_charrefs should become True by default #65246

Arfrever mannequin opened this issue Mar 24, 2014 · 6 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@Arfrever
Copy link
Mannequin

Arfrever mannequin commented Mar 24, 2014

BPO 21047
Nosy @ezio-melotti, @merwok, @lilydjwg, @berkerpeksag, @serhiy-storchaka
Files
  • issue21047.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 = 'https://github.com/ezio-melotti'
    closed_at = <Date 2014-08-02.17:12:03.830>
    created_at = <Date 2014-03-24.05:17:18.681>
    labels = ['type-feature', 'library']
    title = 'html.parser.HTMLParser: convert_charrefs should become True by default'
    updated_at = <Date 2016-01-12.08:38:53.993>
    user = 'https://bugs.python.org/Arfrever'

    bugs.python.org fields:

    activity = <Date 2016-01-12.08:38:53.993>
    actor = 'ezio.melotti'
    assignee = 'ezio.melotti'
    closed = True
    closed_date = <Date 2014-08-02.17:12:03.830>
    closer = 'berker.peksag'
    components = ['Library (Lib)']
    creation = <Date 2014-03-24.05:17:18.681>
    creator = 'Arfrever'
    dependencies = []
    files = ['35265']
    hgrepos = []
    issue_num = 21047
    keywords = ['patch']
    message_count = 6.0
    messages = ['214668', '218662', '224574', '224576', '257905', '258077']
    nosy_count = 7.0
    nosy_names = ['ezio.melotti', 'eric.araujo', 'Arfrever', 'python-dev', 'lilydjwg', 'berker.peksag', 'serhiy.storchaka']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue21047'
    versions = ['Python 3.5']

    @Arfrever
    Copy link
    Mannequin Author

    Arfrever mannequin commented Mar 24, 2014

    Follow-up to issue bpo-13633.

    Lib/html/parser.py still has:

    if convert_charrefs is _default_sentinel:
        convert_charrefs = False  # default
        warnings.warn("The value of convert_charrefs will become True in "
                      "3.5. You are encouraged to set the value explicitly.",
                      DeprecationWarning, stacklevel=2)

    @Arfrever Arfrever mannequin added stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Mar 24, 2014
    @berkerpeksag
    Copy link
    Member

    berkerpeksag commented May 16, 2014

    Here's a patch to set the default "convert_charrefs" value to True (with documentation and whatsnew updates).

    @ezio-melotti ezio-melotti self-assigned this May 16, 2014
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Aug 2, 2014

    New changeset 4425024f2e01 by Ezio Melotti in branch 'default':
    bpo-21047: set the default value for the *convert_charrefs* argument of HTMLParser to True. Patch by Berker Peksag.
    http://hg.python.org/cpython/rev/4425024f2e01

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Aug 2, 2014

    New changeset 5b95f3fdcc0b by Ezio Melotti in branch 'default':
    bpo-15114, bpo-21047: update whatsnew in Python 3.5.
    http://hg.python.org/cpython/rev/5b95f3fdcc0b

    @lilydjwg
    Copy link
    Mannequin

    lilydjwg mannequin commented Jan 10, 2016

    FYI, this breaks one of my programs. I find it now because it only threw errors in rare cases, and I've never seen the deprecated warning because I don't check the logs unless something goes wrong.

    @ezio-melotti
    Copy link
    Member

    ezio-melotti commented Jan 12, 2016

    DeprecationWarnings are silenced by default. You can enable them by using the -W Python flag.
    They are also enabled while running tests with unittest, so you should have seen them there.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants