di / pip-api

An unofficial, importable pip API
https://pypi.org/p/pip-api
Apache License 2.0
110 stars 15 forks source link

Deprecation warning when using `pip_api` on Python 3.11 #195

Open jamesclark-Zapata opened 9 months ago

jamesclark-Zapata commented 9 months ago

Reproduction

python3.11 -Wall  -c "import pip_api"
<snip>/lib/python3.11/site-packages/pip_api/_vendor/pyparsing.py:108: DeprecationWarning: module 'sre_constants' is deprecated
  import sre_constants

Root cause sre_constants is imported by the vendored pyparsing module: https://github.com/di/pip-api/blob/5ac3ec840dd4eb0fd20ea69d5d2362472e0d4daf/pip_api/_vendor/pyparsing.py#L108

see: https://github.com/python/cpython/issues/91308

di commented 9 months ago

I took a shot at this in https://github.com/di/pip-api/pull/196 but ran up against some unexpected test failures and haven't had a chance to take a closer look yet.