Yes, the use of sumtypes can be eliminated altogether. I have opened #1798, which removes the test dependency on the sumtypes library.
While I do not think this is a reason to refrain from applying that change, I am unclear on the exact nature of the problem this currently causes for downstream maintainers. If that could be clarified, then I might be able to use that information to avoid introducing related problems for downstream maintainers in the future. I think that might also clarify whether a new release needs to be done for this change.
My thinking on this is detailed below. But to be clear, it is not intended as an argument against fixing this issue by merging #1798 (which I advocate doing), nor against further steps such as publishing a new release if that is needed. I think it is very valuable for downstream maintainers to be able to run the full test suite, and to be able to automate doing so without unnecessary impediments.
In general it is often reasonable to use code and techniques in testing that would not be reasonable to use in the code under test. Although the latest version of the sumtypes library still has an "a" suffix, it is available from PyPI and installable with pip. It is also not the only test dependency that has no stable release, in the sense most relevant to code quality.
For packages that use semantic versioning and have not had a 1.0.0 release, I believe the distinction between a release named in such a way that PyPI presents it as a prerelease (as sumtypes is, with the version suffix a6), and other pre-1.0.0 releases stated by their developers not to be stable, is often insignificant and cannot be discerned from the version numbers. Going by the classifiers in the package metadata, sumtypes was the only "alpha" test dependency, but not the only test dependency classified as not stable: the direct test dependencies pytest-instafail and pytest-sugar, as well as the indirect test dependency pathspec (through black), are all specified as "beta" by their classifiers.
However, it happens to be that those test dependencies can be omitted and it is still possible to run the tests (just not as they are run on GitPython's own CI, and not with the same experience as the readme documents). Furthermore, while the classifiers represent those packages as being in beta, beta is still typically more stable than alpha. The version numbers have no suffix that causes PyPI to show them as prereleases, but it seems to me that this is the least significant factor; however, I recognize that this judgment is subjective.
One reason I can think of that it would be undesirable to require sumtypes to be installed in downstream testing is if a distribution has the goal for all test dependencies to be available using only downstream packages (i.e., without accessing pip), for example so that they can be declared as downstream-package build dependencies. In that case, it would be inconvenient to handle cases where something needed as a test dependency would not otherwise be eligible for packaging under the downstream distribution's guidelines. It seems to me that avoiding such test dependencies will not always be an achievable or reasonable goal. However, even if that is the only rationale, in this case I think it may be sufficient, since the abstractions expressed with sumtypes can be expressed in another way, as detailed in #1798.