Sohalt / pretix-ldap

LDAP authentication backend for pretix
Other
4 stars 6 forks source link

Breaks with current pretix/django #12

Closed blabug closed 12 months ago

blabug commented 1 year ago

Installed Pretix based on it's docs:

$ python3 -m venv /var/pretix/venv
$ source /var/pretix/venv/bin/activate
(venv)$ pip3 install -U pip setuptools wheel
(venv)$ pip3 install pretix gunicorn

Installed Pretix LDAP via pip3 install pretix-ldap

Now running Pretix creates an error:

$ python -m pretix --help
$ python -m pretix --help
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/var/pretix/venv/lib/python3.11/site-packages/pretix/__main__.py", line 30, in <module>
    execute_from_command_line(sys.argv)
  File "/var/pretix/venv/lib/python3.11/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/var/pretix/venv/lib/python3.11/site-packages/django/core/management/__init__.py", line 416, in execute
    django.setup()
  File "/var/pretix/venv/lib/python3.11/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/var/pretix/venv/lib/python3.11/site-packages/django/apps/registry.py", line 91, in populate
    app_config = AppConfig.create(entry)
                 ^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/pretix/venv/lib/python3.11/site-packages/django/apps/config.py", line 193, in create
    import_module(entry)
  File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/var/pretix/venv/lib/python3.11/site-packages/pretix_ldap/__init__.py", line 1, in <module>
    from .ldap_connector import LDAPAuthBackend  # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/pretix/venv/lib/python3.11/site-packages/pretix_ldap/ldap_connector.py", line 7, in <module>
    from django.utils.translation import ugettext_lazy as _
ImportError: cannot import name 'ugettext_lazy' from 'django.utils.translation' (/var/pretix/venv/lib/python3.11/site-packages/django/utils/translation/__init__.py)

Package versions:

$ pip3 freeze
aiohttp==3.8.6
aiosignal==1.3.1
amqp==5.1.1
arabic-reshaper==3.0.0
asgiref==3.7.2
async-timeout==4.0.3
attrs==23.1.0
Babel==2.13.0
beautifulsoup4==4.12.2
billiard==4.1.0
bleach==5.0.1
cbor2==5.4.6
celery==5.3.4
certifi==2023.7.22
cffi==1.16.0
chardet==5.1.0
charset-normalizer==3.3.0
click==8.1.7
click-didyoumean==0.3.0
click-plugins==1.1.1
click-repl==0.3.0
cryptography==41.0.4
css-inline==0.8.7
defusedcsv==2.0.0
Deprecated==1.2.14
dj-static==0.0.6
Django==4.2.6
django-appconf==1.0.5
django-bootstrap3==23.1
django-compressor==4.3.1
django-countries==7.5.1
django-filter==23.2
django-formset-js-improved==0.5.0.3
django-formtools==2.4.1
django-hierarkey==1.1.0
django-hijack==3.3.0
django-i18nfield==1.9.4
django-jquery-js==3.1.1
django-libsass==0.9
django-localflavor==4.0
django-markup==1.8.1
django-oauth-toolkit==2.2.0
django-otp==1.2.4
django-phonenumber-field==7.1.0
django-redis==5.2.0
django-scopes==2.0.0
django-statici18n==2.3.1
djangorestframework==3.14.0
dnspython==2.3.0
drf-ujson2==1.7.2
elementpath==4.1.5
et-xmlfile==1.1.0
frozenlist==1.4.0
future==0.18.3
geoip2==4.7.0
gunicorn==21.2.0
idna==3.4
importlib-metadata==6.8.0
isodate==0.6.1
isoweek==1.3.3
jsonschema==4.19.1
jsonschema-specifications==2023.7.1
jwcrypto==1.5.0
kombu==5.3.2
ldap3==2.9.1
libsass==0.22.0
lxml==4.9.3
Markdown==3.4.3
maxminddb==2.4.0
mt-940==4.30.0
multidict==6.0.4
oauthlib==3.2.2
openpyxl==3.1.2
packaging==23.2
paypal-checkout-serversdk==1.0.1
paypalhttp==1.0.1
paypalrestsdk==1.13.1
phonenumberslite==8.13.22
Pillow==9.5.0
platformdirs==3.11.0
ply==3.11
pretix==2023.8.0
pretix-ldap==0.1.2
pretix-plugin-build==1.0.1
prompt-toolkit==3.0.39
protobuf==4.23.4
psycopg2-binary==2.9.9
pyasn1==0.5.0
pycountry==22.3.5
pycparser==2.21
pycryptodome==3.18.0
PyJWT==2.7.0
pyOpenSSL==23.2.0
pypdf==3.9.1
pypng==0.20220715.0
python-bidi==0.4.2
python-dateutil==2.8.2
python-stdnum==1.19
python-u2flib-server==4.0.1
pytz==2023.3.post1
pytz-deprecation-shim==0.1.0.post0
pyuca==1.2
qrcode==7.4.2
rcssmin==1.1.1
redis==4.6.0
referencing==0.30.2
reportlab==4.0.6
requests==2.31.0
requests-file==1.5.1
requests-toolbelt==1.0.0
rjsmin==1.2.1
rpds-py==0.10.4
sentry-sdk==1.15.0
sepaxml==2.6.1
six==1.16.0
slimit==0.8.1
soupsieve==2.5
sqlparse==0.4.4
static3==0.7.0
stripe==5.4.0
text-unidecode==1.3
tlds==2023080900
tqdm==4.66.1
typing_extensions==4.8.0
tzdata==2023.3
ujson==5.8.0
urllib3==2.0.6
vat-moss-forked==2020.3.20.0.11.0
vine==5.0.0
vobject==0.9.6.1
wcwidth==0.2.8
webauthn==0.4.7
webencodings==0.5.1
wrapt==1.15.0
xmlschema==2.5.0
yarl==1.9.2
zeep==4.2.1
zipp==3.17.0
PeerD commented 10 months ago

Could you please also publish 0.2.0 to pip? Even though this issue is fixed here, trying to install it still throws the same error. Thank you very much!