scrapinghub / python-crfsuite

A python binding for crfsuite
MIT License
769 stars 223 forks source link

Python 3.11 support #151

Closed sztamas closed 1 year ago

sztamas commented 1 year ago

Not sure if this is all that is need to support Python 3.11, but it might help in getting python-crfsuite work on Python 3.11.

Fixes #150

$ tox
  ...
  py27: OK (17.06=setup[16.45]+cmd[0.61] seconds)
  py36: SKIP (0.80 seconds)
  py37: SKIP (0.68 seconds)
  py38: SKIP (0.69 seconds)
  py39: SKIP (0.74 seconds)
  py310: OK (14.60=setup[14.07]+cmd[0.53] seconds)
  py311: OK (12.84=setup[12.39]+cmd[0.45] seconds)
  congratulations :) (47.62 seconds)

Error reported in #150.

❯ python -V
Python 3.11.1
❯ pip install git+https://github.com/scrapinghub/python-crfsuite@master

Collecting git+https://github.com/scrapinghub/python-crfsuite@master
  Cloning https://github.com/scrapinghub/python-crfsuite (to revision master) to /tmp/pip-req-build-2s7b_odo
  Running command git clone --filter=blob:none --quiet https://github.com/scrapinghub/python-crfsuite /tmp/pip-req-build-2s7b_odo
  Resolved https://github.com/scrapinghub/python-crfsuite to commit 3617b05b9088cfb3d2b0ec6b50188e39f71f678f
  Running command git submodule update --init --recursive -q
  Preparing metadata (setup.py) ... done
Installing collected packages: python-crfsuite
  DEPRECATION: python-crfsuite is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for python-crfsuite ... error
  error: subprocess-exited-with-error

  × Running setup.py install for python-crfsuite did not run successfully.
  │ exit code: 1
  ╰─> [531 lines of output]
...

Forked version:

❯ python -V
Python 3.11.1

❯ pip install git+https://github.com/sztamas/python-crfsuite@master

Collecting git+https://github.com/sztamas/python-crfsuite@master
  Cloning https://github.com/sztamas/python-crfsuite (to revision master) to /tmp/pip-req-build-pp4w5zfy
  Running command git clone --filter=blob:none --quiet https://github.com/sztamas/python-crfsuite /tmp/pip-req-build-pp4w5zfy
  Resolved https://github.com/sztamas/python-crfsuite to commit 6046da8d2e70368b866aa798569dea10a6aa3013
  Running command git submodule update --init --recursive -q
  Preparing metadata (setup.py) ... done
Installing collected packages: python-crfsuite
  DEPRECATION: python-crfsuite is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for python-crfsuite ... done
Successfully installed python-crfsuite-0.9.8
cktang88 commented 1 year ago

@fgregg any thoughts on this?

fgregg commented 1 year ago

superseded by 0.9.9 release