Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meinheld 1.0.2 is incompatible with greenlet 1.0 #122

Open
bburtin opened this issue Mar 16, 2021 · 3 comments
Open

Meinheld 1.0.2 is incompatible with greenlet 1.0 #122

bburtin opened this issue Mar 16, 2021 · 3 comments

Comments

@bburtin
Copy link

bburtin commented Mar 16, 2021

A pip install of SQLAlchemy 1.4 causes greenlet 1.0 to be installed. As a result, we started getting the error below during Meinheld startup. We were able to avoid the problem in the short term by pinning SQLAlchemy to 1.3.x. It would be good if Meinheld supported later versions of greenlet. This will allow us to upgrade SQLAlchemy in the future.

Error: class uri 'egg:meinheld#gunicorn_worker' invalid or not found: [Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/gunicorn/util.py", line 72, in load_class
    return pkg_resources.load_entry_point(dist, section, name)
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 474, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2846, in load_entry_point
    return ep.load()
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2449, in load
    self.require(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2472, in require
    items = working_set.resolve(reqs, env, installer, extras=self.extras)
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 777, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (greenlet 1.0.0 (/usr/local/lib/python3.6/site-packages), Requirement.parse('greenlet<0.5,>=0.4.5'))
@idot
Copy link

idot commented Mar 31, 2021

created pull request:
#123

@mdantonio
Copy link

Hello,
sorry to urge this issue, but it's more then 1 year that it is open with a PR waiting for the merge... Is there any plan to fix this problem? I would like to upgrade my environment to python 3.10 but I can't because greenlet 0.4.17 is not compatible

@luckydonald
Copy link

luckydonald commented Oct 15, 2022

The easiest workaround seems to be to install greenlet in a correct version first, and then meinheld while ignoring it's dependencies (greenlet):

# python:3.10

pip install "greenlet>=0.4.5,<2.0.0"
pip install --no-dependencies meinheld

Edit 1: Never mind, that results in a pkg_resources.VersionConflict. Apparently it does check that version on runtime.

[Traceback (most recent call last):
  File "/env/lib/python3.10/site-packages/gunicorn/util.py", line 71, in load_class
    return pkg_resources.load_entry_point(dist, section, name)
  File "/env/lib/python3.10/site-packages/pkg_resources/__init__.py", line 474, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/env/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2846, in load_entry_point
    return ep.load()
  File "/env/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2449, in load
    self.require(*args, **kwargs)
  File "/env/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2472, in require
    items = working_set.resolve(reqs, env, installer, extras=self.extras)
  File "/env/lib/python3.10/site-packages/pkg_resources/__init__.py", line 777, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (greenlet 1.1.3.post0 (/env/lib/python3.10/site-packages), Requirement.parse('greenlet<0.5,>=0.4.5'))

Edit 2:
You can install the patch at:

pip3 install git+https://github.com/idot/meinheld.git@2bfe452d6608c92688d92337c87b1dd6448f4ccb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants