Skip to content

UserWarnings due to pkg_resources #208

@dataflake

Description

@dataflake

Describe the bug

Running scripts with bin/zopeinstance emits warnings because pkg_resources is used:

/opt/zope/.eggs/v5/plone.recipe.zope2instance-8.0.1-py3.11-linux-x86_64.egg/plone/recipe/zope2instance/ctl.py:30:
  UserWarning: pkg_resources is deprecated as an API.
  See https://setuptools.pypa.io/en/latest/pkg_resources.html.
  The pkg_resources package is slated for removal as early as 2025-11-30.
  Refrain from using this package or pin to Setuptools<81.

This is very annoying for everyone who runs recurring scripts as cron jobs. The warnings output will trigger emails on every run.

To Reproduce

Create a virtual environment with setuptools<81 and zc.buildout>=5.1.1 and build an instance with plone.recipe.zope2instance. Use the instance control script.

Expected behavior

No warnings.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions