parserator icon indicating copy to clipboard operation
parserator copied to clipboard

Remove py2.7, 3.6, and related shims. Add support and tests for 3.10

Open mlissner opened this issue 2 years ago • 0 comments

This should be a pretty straightforward PR to remove deprecated versions of Python and add support for the latest versions. Mostly to do this I just removed compatibility shims and dependencies, updated the travis file, and added a few lines for Python 3.10.

This feels like a nice little improvement to get things a bit modernized, but unfortunately it doesn't actually add support for python 3.10 because to do that we need a version of python-crfsuite that's been compiled with the latest cpython.

There are a few ways that could go.

crfsuite devs could just do a release

According to this...

https://github.com/scrapinghub/python-crfsuite/issues/139

A new release is all it takes to fix python-crfsuite for python 3.10. But according to this...

https://github.com/scrapinghub/python-crfsuite/issues/130#issuecomment-1015830883

...the hold on doing a release is that they're supposed to be automatic from CI, but the CI is broken.

We could try to push that forward. Not sure how easy that'd be, but I think no official release of crfsuite is likely unless somebody unblocks this problem.

We could install from git

Instead of waiting for their release, we could just install the latest version of crfsuite from git. This could work, I guess, but it wouldn't have a wheel and would therefore be slow. Also means git has to be installed. Really not great.

Somebody could fork crfsuite and do a release

This would be a sad way to go, but it's an option.

We could switch to a different crfsuite wrapper

I think somebody did that here...

https://github.com/MicahLyle/usaddress/commit/9f25055b5adbe108e2ed6367552849d07d0e48ca

I guess that's an option too.


So I guess these are some of the options at least. Somehow we need a new version of crfsuite to be created. Then we can update here, and finally update usaddress to support Python 3.10.

Not sure how best to proceed, but hopefully this PR is a start and perhaps we can make a plan for getting crfsuite published somehow.

Thanks for taking the time to look and think about this.

mlissner avatar Mar 13 '22 06:03 mlissner