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

Incompatible with Pyramid 2.0 #32

Closed
msander opened this issue May 3, 2021 · 0 comments · Fixed by #33
Closed

Incompatible with Pyramid 2.0 #32

msander opened this issue May 3, 2021 · 0 comments · Fixed by #33

Comments

@msander
Copy link
Contributor

msander commented May 3, 2021

The module pyramid.compat has been removed in 2.0. pyramid_ldap has to be changed accordingly.

  File "/home/marcel/.pyenv/versions/3.9.2/envs/dash/lib/python3.9/site-packages/pyramid/config/__init__.py", line 632, in include
    c = self.maybe_dotted(callable)
  File "/home/marcel/.pyenv/versions/3.9.2/envs/dash/lib/python3.9/site-packages/pyramid/config/__init__.py", line 740, in maybe_dotted
    return self.name_resolver.maybe_resolve(dotted)
  File "/home/marcel/.pyenv/versions/3.9.2/envs/dash/lib/python3.9/site-packages/pyramid/path.py", line 327, in maybe_resolve
    return self._resolve(dotted, package)
  File "/home/marcel/.pyenv/versions/3.9.2/envs/dash/lib/python3.9/site-packages/pyramid/path.py", line 334, in _resolve
    return self._zope_dottedname_style(dotted, package)
  File "/home/marcel/.pyenv/versions/3.9.2/envs/dash/lib/python3.9/site-packages/pyramid/path.py", line 383, in _zope_dottedname_style
    found = __import__(used)
  File "/home/marcel/.pyenv/versions/3.9.2/envs/dash/lib/python3.9/site-packages/pyramid_ldap/__init__.py", line 19, in <module>
    from pyramid.compat import (
ModuleNotFoundError: No module named 'pyramid.compat'

Also, set_request_property is no longer available:

  File "/home/marcel/.pyenv/versions/3.9.2/envs/dash/lib/python3.9/site-packages/pyramid/config/actions.py", line 573, in wrapper
    result = wrapped(self, *arg, **kw)
  File "/home/marcel/.pyenv/versions/3.9.2/envs/dash/lib/python3.9/site-packages/pyramid_ldap/__init__.py", line 304, in ldap_setup
    config.set_request_property(get_connector, 'ldap_connector', reify=True)
  File "/home/marcel/.pyenv/versions/3.9.2/envs/dash/lib/python3.9/site-packages/pyramid/config/__init__.py", line 716, in __getattr__
    raise AttributeError(name)
AttributeError: set_request_property
msander pushed a commit to msander/pyramid_ldap that referenced this issue May 3, 2021
- replace pyramid.compat by six
- replace set_request_property by add_request_method

fixes Pylons#32 and Pylons#26
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

Successfully merging a pull request may close this issue.

1 participant