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

Unmet dependency on Paste #452

Closed
dwt opened this issue Jan 9, 2019 · 9 comments

Comments

@dwt
Copy link
Contributor

commented Jan 9, 2019

When installing the current master from source (via https://github.com/zopefoundation/Zope/blob/master/requirements-full.txt) , it doesn't come up, as it requires Paste to be installed - which isn't.

Stacktrace looks like this:

(venv:zope-zms-py3) dwt@nathan ~/Code/Projekte/zope4 % bin/local_run_zope.sh 
Traceback (most recent call last):
  File "/Users/dwt/.virtualenvs/zope-zms-py3/bin/runwsgi", line 11, in <module>
    load_entry_point('Zope', 'console_scripts', 'runwsgi')()
  File "/Users/dwt/.virtualenvs/zope-zms-py3/src/zope/src/Zope2/Startup/serve.py", line 216, in main
    return command.run()
  File "/Users/dwt/.virtualenvs/zope-zms-py3/src/zope/src/Zope2/Startup/serve.py", line 183, in run
    global_conf=vars)
  File "/Users/dwt/.virtualenvs/zope-zms-py3/src/zope/src/Zope2/Startup/serve.py", line 207, in loadapp
    return loadapp(app_spec, name=name, relative_to=relative_to, **kw)
  File "/Users/dwt/.virtualenvs/zope-zms-py3/lib/python3.7/site-packages/paste/deploy/loadwsgi.py", line 253, in loadapp
    return loadobj(APP, uri, name=name, **kw)
  File "/Users/dwt/.virtualenvs/zope-zms-py3/lib/python3.7/site-packages/paste/deploy/loadwsgi.py", line 277, in loadobj
    global_conf=global_conf)
  File "/Users/dwt/.virtualenvs/zope-zms-py3/lib/python3.7/site-packages/paste/deploy/loadwsgi.py", line 302, in loadcontext
    global_conf=global_conf)
  File "/Users/dwt/.virtualenvs/zope-zms-py3/lib/python3.7/site-packages/paste/deploy/loadwsgi.py", line 326, in _loadconfig
    return loader.get_context(object_type, name, global_conf)
  File "/Users/dwt/.virtualenvs/zope-zms-py3/lib/python3.7/site-packages/paste/deploy/loadwsgi.py", line 455, in get_context
    global_additions=global_additions)
  File "/Users/dwt/.virtualenvs/zope-zms-py3/lib/python3.7/site-packages/paste/deploy/loadwsgi.py", line 567, in _pipeline_app_context
    for name in pipeline[:-1]]
  File "/Users/dwt/.virtualenvs/zope-zms-py3/lib/python3.7/site-packages/paste/deploy/loadwsgi.py", line 567, in <listcomp>
    for name in pipeline[:-1]]
  File "/Users/dwt/.virtualenvs/zope-zms-py3/lib/python3.7/site-packages/paste/deploy/loadwsgi.py", line 459, in get_context
    section)
  File "/Users/dwt/.virtualenvs/zope-zms-py3/lib/python3.7/site-packages/paste/deploy/loadwsgi.py", line 481, in _context_from_use
    object_type, name=use, global_conf=global_conf)
  File "/Users/dwt/.virtualenvs/zope-zms-py3/lib/python3.7/site-packages/paste/deploy/loadwsgi.py", line 412, in get_context
    global_conf=global_conf)
  File "/Users/dwt/.virtualenvs/zope-zms-py3/lib/python3.7/site-packages/paste/deploy/loadwsgi.py", line 302, in loadcontext
    global_conf=global_conf)
  File "/Users/dwt/.virtualenvs/zope-zms-py3/lib/python3.7/site-packages/paste/deploy/loadwsgi.py", line 334, in _loadegg
    return loader.get_context(object_type, name, global_conf)
  File "/Users/dwt/.virtualenvs/zope-zms-py3/lib/python3.7/site-packages/paste/deploy/loadwsgi.py", line 625, in get_context
    object_type, name=name)
  File "/Users/dwt/.virtualenvs/zope-zms-py3/lib/python3.7/site-packages/paste/deploy/loadwsgi.py", line 645, in find_egg_entry_point
    pkg_resources.require(self.spec)
  File "/Users/dwt/.virtualenvs/zope-zms-py3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 898, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/Users/dwt/.virtualenvs/zope-zms-py3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 784, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'Paste' distribution was not found and is required by the application

It looks a bit like PasteDeploy might be the culprit here that is missing a dependency, but since their tests are all green and an overview inspection of their repo doesn't seem to suggest that they removed a dependency (I may be wrong on this though) made me report the bug first here.

Just running pip install paste seems to work around this.

@icemac icemac added this to To do in Zope 4 final release via automation Jan 11, 2019

@icemac icemac added this to the 4.0 final milestone Jan 11, 2019

@icemac icemac added question and removed question labels Jan 11, 2019

@icemac

This comment has been minimized.

Copy link
Member

commented Jan 11, 2019

@dwt Thank you for your report.

Can you paste the steps to create a Zope instance where the exception happens?
What are the contents of your bin/local_run_zope.sh script?

I did the following and was not able to reproduce the exception:

$ pyvenv-3.7 z4
WARNING: the pyenv script is deprecated in favour of `python3.7 -m venv`
$ cd z4
$ bin/pip install -r https://raw.githubusercontent.com/zopefoundation/Zope/master/requirements-full.txt
...
$  bin/mkwsgiinstance -d .
...
$ bin/runwsgi etc/zope.ini
Starting server in PID 56474.
Serving on http://localhost:8080

Using the shown URL in a browser works, too.

@dataflake

This comment has been minimized.

Copy link
Member

commented Feb 9, 2019

@icemac I recommend closing this as invalid. No one else has seen this issue and @dwt is not providing any more information.

@icemac icemac added invalid and removed feedback required labels Feb 9, 2019

@icemac

This comment has been minimized.

Copy link
Member

commented Feb 9, 2019

Closing as invalid as @dataflake suggested: It cannot be reproduced and there was no feedback from @dwt. Please reopen if the issue still persists and you have new details about it.

@icemac icemac closed this Feb 9, 2019

Zope 4 final release automation moved this from To do to Done Feb 9, 2019

@icemac icemac moved this from Done to Postponed or Rejected in Zope 4 final release Feb 9, 2019

@icemac icemac reopened this Jun 17, 2019

@icemac

This comment has been minimized.

Copy link
Member

commented Jun 17, 2019

This is reproducible now:

python3.6 -m venv zope4.0
cd zope4.0
bin/pip install -r https://zopefoundation.github.io/Zope/releases/4.0/requirements-full.txt
bin/mkwsgiinstance -d .
bin/runwsgi -v etc/zope.ini

leads to pkg_resources.DistributionNotFound: The 'Paste' distribution was not found and is required by the application.

Paste is needed because we use egg:Paste#translogger in etc/zope.ini. So I'd suggest to add Paste to versions-prod.cfg so it will appear in requirements-full.txt after running buildout.

@icemac icemac added bug RELEASE BLOCK and removed invalid labels Jun 17, 2019

@icemac icemac modified the milestones: 4.0 final, 4.0.1 Jun 17, 2019

@icemac icemac added this to To do in Zope 4 bugfix via automation Jun 17, 2019

icemac added a commit that referenced this issue Jun 17, 2019

@icemac icemac assigned icemac and unassigned dwt Jun 17, 2019

@icemac icemac closed this in #653 Jun 18, 2019

Zope 4 bugfix automation moved this from To do to Done Jun 18, 2019

@ghiodor

This comment has been minimized.

Copy link

commented Jun 25, 2019

This is still present in 4.1

@icemac

This comment has been minimized.

Copy link
Member

commented Jun 26, 2019

@ghiodor It should be fixed in 4.1 as the requirements-full.txt of 4.1 contains Paste, see https://zopefoundation.github.io/Zope/releases/4.1/requirements-full.txt

If it does not work for you please show the steps to reproduce the issue.

@ghiodor

This comment has been minimized.

Copy link

commented Jun 27, 2019

history:

 2161  python3.8 -m venv zope
 2162  cd zope 
 2163  cp ../buildout.cfg 
 2164  cp ../buildout.cfg .
 2165  bin/pip install -U pip zc.buildout
 2166  bin/buildout
 2167  bin/mkwsgiinstance 
 2168  vim etc/zope.ini
 2169  bin/runwsgi -v etc/zope.ini

and buildout.cfg:

[buildout]
extends = https://zopefoundation.github.io/Zope/releases/4.1/versions-prod.cfg
parts = zopescripts

[zopescripts]
recipe = zc.recipe.egg
interpreter = zopepy
eggs =
  Zope
#  Paste
  Products.TemporaryFolder
  Products.ExternalMethod
  Products.PythonScripts
  Products.Sessions
  Products.SiteErrorLog
  Products.MailHost
  Products.ZSQLMethods
  Products.ZMySQLDA

@ghiodor

This comment has been minimized.

Copy link

commented Jun 27, 2019

Listing Paste (currently commented out) in the eggs, works.

@icemac

This comment has been minimized.

Copy link
Member

commented Jun 28, 2019

@ghiodor I was able to reproduce the problem and created a new ticket for this issue: #664

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
4 participants
You can’t perform that action at this time.