zope.event==5.1 installed without dist-info metadata, causing DistributionNotFound error
envgap__zopefoundation__zope.event-30
01 / FAILURE SIGNATURE
As reported upstream
As a result, when running Gunicorn with gevent, I consistently get this error:
Not a benchmark task.
- The project already builds and runs before the fix, so there is nothing to repair.
02 / ENVIRONMENT RECIPE
- Base commit
38b4c2ec88a261a218288cf6a949972063087b2a- Manifest
setup.py- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
zopefoundation/zope.event #30 · read the original issue
## BUG/PROBLEM REPORT / FEATURE REQUEST <!-- Please do not report security-related issues here. Report them by email to security@plone.org. The Security Team will contact the relevant maintainer if necessary. Include tracebacks, screenshots, code of debugging sessions or code that reproduces the issue if possible. The best reproductions are in plain Zope installations without addons or at least with minimal needed addons installed. --> ### What I did: I installed `zope.event==5.1` in a Docker environment based on `python:3.10`. After installing all dependencies, I started a Flask application using Gunicorn with the gevent worker: ```bash gunicorn -k gevent -w 1 -b 0.0.0.0:5000 run:app ``` During worker initialization, gevent calls `monkey.patch_all()` internally, which attempts to load entry points and requires the `zope.event` distribution. ### What I expect to happen: I expected `zope.event==5.1` to be installed with all necessary metadata (`dist-info`) and module files so that `pkg_resources` could recognize and load the distribution without any error. ### What actually happened: After installing `zope.event==5.1`, the package directory only contained a `.pth` file: ```plaintext /usr/local/lib/python3.10/site-packages/zope.event-5.1-py3.12-nspkg.pth ``` There was no `dist-info` directory and no actual `zope/event/__init__.py` module. As a result, when running Gunicorn with gevent, I consistently get this error: ```plaintext pkg_resources.DistributionNotFound: The 'zope.event' distribution was not found and is required by the application ``` Downgrading to `zope.event==5.0` immediately resolved this issue, and the proper metadata files were installed. ### What version of Python and Zope/Addons I am using: - Operating System: Debian (Docker python:3.10) - Python: 3.10.18 - zope.event: 5.1 (problematic), 5.0 (working) - gevent: 22.10.2 - gunicorn: 20.1.0 - Flask: 3.1.0
04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]