GrahamDumpleton / wrapt

A Python module for decorators, wrappers and monkey patching.
BSD 2-Clause "Simplified" License
2.03k stars 231 forks source link

Install with Python 3.11 and pip 22.3.1 gives out deprecation warning #226

Closed aaltat closed 1 year ago

aaltat commented 1 year ago

When I install wrapt with pip I see:

DEPRECATION: wrapt 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

deprecation warning.

neutrinoceros commented 1 year ago

just to clarify, this has little to do with Python 3.11, it's just that the version of pip that is bundled with it is recent enough to raise this warning, but you'd get the same error message with any version of Python provided pip was upgraded first.

GrahamDumpleton commented 1 year ago

Sorry for slow reply, but been on holiday.

My guess is that if installing packages from PyPi it may in part be because there are no wheel files for Python 3.11 for wrapt.

Try running:

pip install wrapt==1.15.0rc1

and see if you get the same message.

Was working on updated package a few weeks back but was then travelling so no new release yet. The new version will have Python 3.11 wheels.

In other words, you will see the warning if install from source package (.tar.gz) since if relies on setup.py, but you shouldn't I think see message when installing from PyPi and wheels are available.

aaltat commented 1 year ago

The pip install wrapt==1.15.0rc1 seems to fix the problem, thank you for work.