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

remove six from dependencies #618

Closed
sevdog opened this issue Nov 11, 2021 · 6 comments · Fixed by #742
Closed

remove six from dependencies #618

sevdog opened this issue Nov 11, 2021 · 6 comments · Fixed by #742

Comments

@sevdog
Copy link

sevdog commented Nov 11, 2021

Since support for Python 2 was removed in version 2.0 the use of SIX library to handle compatibility between Python 3 and Python 2 has no more meaning (aka: it is a useless dependecy).

See remaining code using SIX.

@g-k
Copy link
Collaborator

g-k commented Nov 11, 2021

Happy to accept a PR for this and I'll leave this open to track the issue.

Keep in mind we don't want to edit the vendored html5lib since we'd effectively fork it. Last I checked this would require an upstream release of html5lib.

@g-k g-k changed the title remove six from dependecies remove six from dependencies Nov 11, 2021
@sevdog
Copy link
Author

sevdog commented Nov 11, 2021

Now that you mention it, this could be a problem since six is only used in vendored html5lib 🥲

Before rebasing that folder this PR should be merged by them.

@willkg willkg added this to the v5.0.0 milestone Feb 8, 2022
@willkg
Copy link
Member

willkg commented Feb 8, 2022

I put this in the 5.0.0 milestone because I thought we could do it, but we can't, yet. We're blocked on upstream dropping the need for six.

@willkg willkg removed this from the v5.0.0 milestone Feb 8, 2022
@g-k g-k added the html5lib label Apr 30, 2022
@willkg
Copy link
Member

willkg commented Oct 27, 2022

It seems like upstream is no longer maintained. The PR in question was closed. Issue #680 covers forking html5lib or finding an alternative.

@willkg
Copy link
Member

willkg commented Oct 25, 2024

I think we're waiting on some implementation of this issue and a release:

html5lib/html5lib-python#569

willkg added a commit that referenced this issue Oct 28, 2024
This way lies madness, but at least we don't have a six dependency
anymore.

The way this work is that we vendored html5lib 1.1, but then this
applies a 01_html5lib_six.patch to that which changes imports from six
to import from bleach.six_shim.

This updates the vendor management code and vendorverify to install
html5lib 1.1 and then apply the patch and then compare with what's in
the tree. If we end up applying further patches in the future, we can
use this model to do that.
@willkg
Copy link
Member

willkg commented Oct 28, 2024

I decided not to wait for it to get fixed in html5lib. We can fix it now and adjust when it's fixed in html5lib and there's a release.

willkg added a commit that referenced this issue Oct 28, 2024
This way lies madness, but at least we don't have a six dependency
anymore.

The way this work is that we vendored html5lib 1.1, but then this
applies a 01_html5lib_six.patch to that which changes imports from six
to import from bleach.six_shim.

This updates the vendor management code and vendorverify to install
html5lib 1.1 and then apply the patch and then compare with what's in
the tree. If we end up applying further patches in the future, we can
use this model to do that.
willkg added a commit that referenced this issue Oct 28, 2024
This way lies madness, but at least we don't have a six dependency
anymore.

The way this work is that we vendored html5lib 1.1, but then this
applies a 01_html5lib_six.patch to that which changes imports from six
to import from bleach.six_shim.

This updates the vendor management code and vendorverify to install
html5lib 1.1 and then apply the patch and then compare with what's in
the tree. If we end up applying further patches in the future, we can
use this model to do that.
willkg added a commit that referenced this issue Oct 28, 2024
This way lies madness, but at least we don't have a six dependency
anymore.

The way this work is that we vendored html5lib 1.1, but then this
applies a 01_html5lib_six.patch to that which changes imports from six
to import from bleach.six_shim.

This updates the vendor management code and vendorverify to install
html5lib 1.1 and then apply the patch and then compare with what's in
the tree. If we end up applying further patches in the future, we can
use this model to do that.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants