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

Deprecate SgmlLinkExtractor #777

Merged
merged 4 commits into from Jul 2, 2014
Merged

Deprecate SgmlLinkExtractor #777

merged 4 commits into from Jul 2, 2014

Conversation

@kmike
Copy link
Member

@kmike kmike commented Jul 2, 2014

As discussed in #756

kmike added 2 commits Jul 2, 2014
SGML link extractor that uses it is also going to be deprecated;
sgmllib module is not available in Python 3.
return
return self.convert_codepoint(n)

if six.PY2:

This comment has been minimized.

@pablohoffman

pablohoffman Jul 2, 2014
Member

This may be no longer needed now that we require Python 2.7+. I think the convert_charref bug was fixed in 2.6 (but worth confirming), which was the whole purpose of the FixedSGMLParser class.

This comment has been minimized.

@kmike

kmike Jul 2, 2014
Author Member

Right, in Python 2.7 source code convert_charref method is exactly the same as in FixedSGMLParser, and Python bugtracker says it was commited in 2009 - good catch!

releases. Please use standard `sgmllib.SGMLParser`.
"""
def __init__(self, *args, **kwargs):
warnings.warn(

This comment has been minimized.

@pablohoffman

pablohoffman Jul 2, 2014
Member

Is this really needed?. I doubt anyone would be using FixedSGMLParser directly, a single deprecation warning on SgmlLinkExtactor should suffice and be less noisy.

This comment has been minimized.

@kmike

kmike Jul 2, 2014
Author Member

FixedSGMLParser was a part of public interface (class and module names without _, a docstring), so I added a deprecation warning instead of removing it. SgmlLinkExtactor shows a single warning in this PR (because it is no longer using FixedSGMLParser).

But neither github search nor our internal search shows any FixedSGMLParser usages indeed. Let's remove it!

pablohoffman added a commit that referenced this pull request Jul 2, 2014
Deprecate SgmlLinkExtractor
@pablohoffman pablohoffman merged commit 36d99a0 into master Jul 2, 2014
1 check was pending
1 check was pending
continuous-integration/travis-ci The Travis CI build is in progress
Details
@kmike kmike deleted the deprecate-sgml branch Sep 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.