stevearc / pypicloud

S3-backed pypi server implementation
MIT License
506 stars 141 forks source link

pypicloud does not start after upgrade to 1.2.2 #283

Closed tiandrey closed 3 years ago

tiandrey commented 3 years ago

Versions 1.2.0 and 1.2.1 worked fine. 1.2.2 does not start. uwsgi log:

Loading paste environment: config:/etc/pypicloud/config.ini
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/pyramid/path.py", line 403, in _zope_dottedname_style
    found = getattr(found, n)
AttributeError: module 'pypicloud' has no attribute 'auth'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/paste/deploy/loadwsgi.py", line 253, in loadapp
    return loadobj(APP, uri, name=name, **kw)
  File "/usr/local/lib/python3.5/dist-packages/paste/deploy/loadwsgi.py", line 278, in loadobj
    return context.create()
  File "/usr/local/lib/python3.5/dist-packages/paste/deploy/loadwsgi.py", line 715, in create
    return self.object_type.invoke(self)
  File "/usr/local/lib/python3.5/dist-packages/paste/deploy/loadwsgi.py", line 235, in invoke
    filtered = context.next_context.create()
  File "/usr/local/lib/python3.5/dist-packages/paste/deploy/loadwsgi.py", line 715, in create
    return self.object_type.invoke(self)
  File "/usr/local/lib/python3.5/dist-packages/paste/deploy/loadwsgi.py", line 152, in invoke
    return fix_call(context.object, context.global_conf, **context.local_conf)
  File "/usr/local/lib/python3.5/dist-packages/paste/deploy/util.py", line 55, in fix_call
    val = callable(*args, **kw)
  File "/usr/local/lib/python3.5/dist-packages/pypicloud/__init__.py", line 199, in main
    config.include("pypicloud")
  File "/usr/local/lib/python3.5/dist-packages/pyramid/config/__init__.py", line 676, in include
    c(configurator)
  File "/usr/local/lib/python3.5/dist-packages/pypicloud/__init__.py", line 80, in includeme
    config.include("pypicloud.auth")
  File "/usr/local/lib/python3.5/dist-packages/pyramid/config/__init__.py", line 642, in include
    c = self.maybe_dotted(callable)
  File "/usr/local/lib/python3.5/dist-packages/pyramid/config/__init__.py", line 749, in maybe_dotted
    return self.name_resolver.maybe_resolve(dotted)
  File "/usr/local/lib/python3.5/dist-packages/pyramid/path.py", line 343, in maybe_resolve
    return self._resolve(dotted, package)
  File "/usr/local/lib/python3.5/dist-packages/pyramid/path.py", line 350, in _resolve
    return self._zope_dottedname_style(dotted, package)
  File "/usr/local/lib/python3.5/dist-packages/pyramid/path.py", line 405, in _zope_dottedname_style
    __import__(used)
  File "/usr/local/lib/python3.5/dist-packages/pypicloud/auth.py", line 11, in <module>
    from pyramid.interfaces import ISecurityPolicy
ImportError: cannot import name 'ISecurityPolicy'

pip3 list:


boto3 (1.16.63)
botocore (1.19.63)
certifi (2021.5.30)
cffi (1.14.5)
chardet (4.0.0)
cryptography (3.2.1)
distlib (0.3.2)
docutils (0.15.2)
hupper (1.10.3)
idna (2.10)
Jinja2 (2.11.3)
jmespath (0.10.0)
MarkupSafe (1.1.1)
passlib (1.7.4)
Paste (3.5.0)
PasteDeploy (2.1.1)
PasteScript (3.2.0)
pip (9.0.1)
plaster (1.0)
plaster-pastedeploy (0.7)
pyasn1 (0.4.8)
pyasn1-modules (0.2.8)
pycparser (2.20)
pypicloud (1.2.2)
pyramid (1.10.8)
pyramid-beaker (0.8)
pyramid-duh (0.1.2)
pyramid-jinja2 (2.8)
pyramid-rpc (0.8)
pyramid-tm (2.4)
python-dateutil (2.8.1)
python-ldap (3.3.1)
redis (3.5.3)
requests (2.25.1)
s3transfer (0.3.7)
setuptools (50.3.2)
six (1.16.0)
SQLAlchemy (1.3.24)
transaction (3.0.1)
translationstring (1.4)
urllib3 (1.26.5)
uWSGI (2.0.19.1)
venusian (3.0.0)
virtualenv (15.1.0)
waitress (1.4.4)
WebOb (1.8.7)
wheel (0.34.2)
zope.deprecation (4.4.0)
zope.interface (5.4.0)
zope.sqlalchemy (1.4)```
stevearc commented 3 years ago

Ah, this is an oversight in the dependency list. When I updated it to support Pyramid 2.0, some of the changes I made are not backwards compatible with older versions of Pyramid. I forgot to express that requirement in the dependency list, so when you upgraded pypicloud it didn't force pyramid to upgrade as well.

The easy fix for you is pip install --upgrade pyramid. I'll also release a version shortly that has the proper version dependency.

aperuru commented 3 years ago

@stevearc are you going to make a new release or update the current release version since it was unstable ?

stevearc commented 3 years ago

New release. Updating a version in place is tricky and has some problems

stevearc commented 3 years ago

Released version 1.2.3 with the pyramid version dependency