GrahamDumpleton / wrapt

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

Update to setup.cfg potentially required #253

Closed mwgamble closed 10 months ago

mwgamble commented 10 months ago

I'm seeing this message when trying to install wrapt with Poetry:

********************************************************************************
The license_file parameter is deprecated, use license_files instead.

By 2023-Oct-30, you need to update your project and remove deprecated calls
or your builds will no longer be supported.

See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
********************************************************************************

That deadline is rapidly approaching, and I can see that wrapt does indeed use license_file:

https://github.com/GrahamDumpleton/wrapt/blob/bc3529c95ba9ade3876a25ca2c3280b799531eb2/setup.cfg#L13

GrahamDumpleton commented 10 months ago

How does this affect old release wheels on PyPi?

People using tensorflow are pinned to an older version of wrapt. Will this mean their installs will start failing if I don't go back and create a new patch release of older versions. That is going to be almost impossible as GitHub actions doesn't support some older Python versions anymore and creating a patch release which drops Python versions may not be appreciated.

mwgamble commented 10 months ago

I have no idea sorry. You'll probably need to reach out to the setuptools maintainers.

While it will probably be painful to support older versions, it would probably still be useful to some if there was a brand new latest version provided that is compatible with the upcoming changes.

Or perhaps this is good motivation to move away from setuptools and on to something like Poetry or Flit?

GrahamDumpleton commented 10 months ago

That warning also says "remove deprecated calls", which could be bad wording, but I don't think that part of the warning applies to the keyword arguments. I feel it may relate more to the actual removal of distutils in Python 3.12. So expectation is that don't use any functions or objects from distutils as mentioned in:

For the keywords, although docs mention as deprecated, I don't actually think they will remove the old ones and can't find anything that says they will. It has too big a risk of breaking old packages even when they use setuptools.

Anyway, suggest you try installing:

This has dropped distutils and requires setuptools. You may find that the warning above is different or disappears at normal log levels. If you do try, let me know what message you get with it so know if different.

BTW, this doesn't mean I will not change the keyword argument, just trying to understand what is really meant by the warning at this point and implications on older released packages. For now I don't think older released packages will be affected as they are Python 3.11 or older and any change is only going to relate to some possible version of Python 3.12.

GrahamDumpleton commented 10 months ago

Have changed to use license_files in 1.16.0.