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

stop using deprecated HTMLParser.unescape #1788

Merged
merged 1 commit into from Jun 19, 2019

Conversation

@methane
Copy link
Contributor

commented Jun 18, 2019

Summary of changes

HTMLParser.unescape is deprecated since Python 3.4.

Pull Request Checklist

  • N/A Changes have tests
  • News fragment added in changelog.d. See documentation for details
@methane

This comment has been minimized.

Copy link
Contributor Author

commented Jun 18, 2019

Should this type of change require News fragment and test?

Note that this change is executed always when this module is imported...

@pganssle

This comment has been minimized.

Copy link
Member

commented Jun 18, 2019

It took me a second to realize how this was different from the current formulation, but it's because as is, HtmlParser().unescape is always executed, even if unused.

I think a changelog entry would be wise, because when people start using Python 3.9, they'll want to know the minimum version of setuptools to pin.

I don't think a separate test for this is necessary.

Thanks!

Stop using deprecated HTMLParser.unescape
HTMLParser.unescape is accessed even when unused - this will cause an
exception when `HTMLParser.unescape` is removed in Python 3.9.

@pganssle pganssle added the auto-merge label Jun 19, 2019

@pganssle

This comment has been minimized.

Copy link
Member

commented Jun 19, 2019

Thanks @methane, I've squashed the current commits and marked this for auto-merge, so it should merge as soon as the CI passes.

Glad to have people getting us ahead of the curve on avoiding deprecation warnings / breaking changes. Much better for the versions of setuptools that work with Python 3.9 to be released well in advance of 3.9.

@mergify mergify bot merged commit 62bd483 into pypa:master Jun 19, 2019

6 checks passed

Summary 1 potential rule
Details
codecov/patch 100% of diff hit (target 84.63%)
Details
codecov/project Absolute coverage decreased by -<.01% but relative coverage increased by +15.36% compared to 8aeff6b
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details

@methane methane deleted the methane:patch-1 branch Jul 24, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.