Skip to content

Update the version of bleach that gets vendored into our package and remove dependency on the six library #7010

@arcra

Description

@arcra

While working on #6964 , TB was still not working for me with python 3.12 or 3.13.

I believe this is mostly just an issue with "local builds" (which is how I was testing it) because we specify to bazel that a specific version of some libraries should be used, e.g. here.

It might be the case that this would not be an issue once the pip package is built, and a user can install and upgrade the six dependency freely in their system. However, bleach started vendoring html5lib from v3.0, and removed the six dependency altogether in v6.0.

So I think it would still be a good idea to update this vendored dependency and avoid any dependency constraints with the six library.

I had originally filed this issue with title Make TB work with python 3.12 and 3.13 and a different description. Below is the original description of this issue:


While fixing #6964 , I learned that TB still doesn't work with python 3.12 or 3.13 after the fix. This is because we "vendor" a couple old dependencies (bleach and html5lib), which (I'm guessing) themselves either vendor or are restricted to work with an old version of the six library, and this old version does not work with 3.12 or 3.13. (Or perhaps we are also vendoring an old version of the six dependency somehow within our package. It's not entirely clear to me.)

bleach started vendoring html5lib from v3.0, and removed the six dependency altogether in v6.0.

I think we should try to update this vendored bleach dependency, and remove any dependencies on html5lib or six packages, and see if it works correctly.

There might be other things that depend on six, or other dependencies that themselves vendor or depend on an old version of six, so we'll probably need to play a bit of whack-a-mole to get this to work.

Note that some newer versions of six do work with python 3.12 and 3.13, as reported in this stack overflow and this mozilla bug report. So, if for some reason we can't update bleach to v6.0, we can try to update the underlying dependencies to make this work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesPull requests that update a dependency filepythonPull requests that update Python code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions