django-cms / djangocms-modules

Create plugins right from your content.
https://www.django-cms.org
Other
15 stars 8 forks source link

Release version 2 to PyPI #39

Closed greyhare closed 1 year ago

greyhare commented 1 year ago

In django.utils.encoding, force_text was deprecated in Django 3.0. It was replaced with force_str in Django 2.0.

I get this error when using this package with Django 4.2:

  File "/env/lib/python3.11/site-packages/djangocms_modules/cms_plugins.py", line 11, in <module>
    from django.utils.encoding import force_text
ImportError: cannot import name 'force_text' from 'django.utils.encoding' (/env/lib/python3.11/site-packages/django/utils/encoding.py)

It looks like this is only used in two files:

greyhare commented 1 year ago

Patch: force_str.patch

Applied with patch -p1 < force_str.patch in the module directory. Works for me.

fsbraun commented 1 year ago

@greyhare Thank you for the patch! Can I interest you in creating a pull request?

greyhare commented 1 year ago

What else do I need in the pull request?

E.g. change log, version bump, tests, other checks...

fsbraun commented 1 year ago

Extending the tests to current Django/Django CMS versions would be great!

greyhare commented 1 year ago

OK, this got weirder. This issue is fixed in commit 342c221 from last year. A chore for bumping version to 2.0.0.

Why is 1.0.0 the latest thing on PyPI?! That's what I'm getting:

$ ./venv/bin/pip index versions djangocms-modules
WARNING: pip index is currently an experimental command. It may be removed/changed in a future release without prior warning.
djangocms-modules (1.0.0)
Available versions: 1.0.0, 0.3.0, 0.2.0, 0.1.0
  INSTALLED: 1.0.0
  LATEST:    1.0.0
fsbraun commented 1 year ago

Hm. It seems like the 2.0.0 version was never actually released? (@marksweb : Do you remember why?).

So this might be the great point in time for djangocms-modules 2.0.0!

Things to update are:

greyhare commented 1 year ago

No idea what to change in CHANGELOG.rst. Everything else was straightforward and passed tox so I pushed.

marksweb commented 1 year ago

@fsbraun @greyhare so looks like I did a few update bits for v2 and don't didn't finish releasing it? I imagine wife/kids/life distracted me and I forgot that I'd not released it. 🤦‍♂️

greyhare commented 1 year ago

OK, so what's left to do?

fsbraun commented 1 year ago

I gues: Release it! 🎉. Thanks, @greyhare !