Supervisor/supervisor

SetuptoolsDeprecationWarning: Installing 'supervisor.scripts' as data is deprecated, please list it in `packages`

sbraz opened this issue · 3 comments

sbraz commented

Hi,
There are multiple warnings with recent setuptools versions:

/usr/lib/python3.10/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning:     Installing 'supervisor.scripts' as data is deprecated, please list it in `packages`.                       
    !!                                                                                                                                                                                                             
                                                                                                                                                                                                                   
                                                                                                                                                                                                                   
    ############################                                                                                                                                                                                   
    # Package would be ignored #                                                                                                                                                                                   
    ############################                                                                                                                                                                                   
    Python recognizes 'supervisor.scripts' as an importable package,                                                                                                                                               
    but it is not listed in the `packages` configuration of setuptools.                                                                                                                                            
                                                                                                                                                                                                                   
    'supervisor.scripts' has been automatically added to the distribution only                                                                                                                                     
    because it may contain data files, but this behavior is likely to change                                                                                                                                       
    in future versions of setuptools (and therefore is considered deprecated).                                                                                                                                     
                                                                                                                                                                                                                   
    Please make sure that 'supervisor.scripts' is included as a package by using                                                                                                                                   
    the `packages` configuration field or the proper discovery methods                                                                                                                                             
    (for example by using `find_namespace_packages(...)`/`find_namespace:`                                                                                                                                         
    instead of `find_packages(...)`/`find:`).                                                                                                                                                                      
                                                                                                                                                                                                                   
    You can read more about "package discovery" and "data files" on setuptools                                                                                                                                     
    documentation page.                                                                                                                                                                                            
                                                                                                                                                                                                                   
                                                                                                                                                                                                                   
!!

All these have the same issue:

Installing 'supervisor.scripts' as data is deprecated, please list it in `packages`.                      
Installing 'supervisor.skel' as data is deprecated, please list it in `packages`.                         
Installing 'supervisor.tests.fixtures' as data is deprecated, please list it in `packages`.               
Installing 'supervisor.tests.fixtures.example' as data is deprecated, please list it in `packages`.       
Installing 'supervisor.ui' as data is deprecated, please list it in `packages`.                           
Installing 'supervisor.ui.images' as data is deprecated, please list it in `packages`.                    
Installing 'supervisor.ui.stylesheets' as data is deprecated, please list it in `packages`.               

It looks like this warning was added to setuptools in this commit and released in setuptools 62.3.0, which was uploaded to PyPI on May 16, 2022.

Supervisor has been distributing these files using pretty much the same setup.py and MANIFEST.in for at least 10 years now. The files are required for Supervisor to work correctly (e.g. the supervisor.ui files are needed by the web interface).

Hopefully a solution can be found where the package can be installed on newer setuptools without warnings while also still installing correctly on older setuptools, since Supervisor still supports a lot of old Python versions. I haven't investigated this issue yet, other than trying to find out when the warning started. Any help would be welcome.

Hello @mnaberez, there is now some additional documentation at https://setuptools.pypa.io/en/latest/userguide/package_discovery.html. Do you plan on dropping support for older Python versions or are we still facing the same problem?

there is now some additional documentation at https://setuptools.pypa.io/en/latest/userguide/package_discovery.html.

Thanks for the link.

Do you plan on dropping support for older Python versions or are we still facing the same problem?

There are not currently plans to drop any older Python versions unless they become a maintenance burden. We're still able to run all the versions we support on GitHub Actions, so they aren't currently.