-
Notifications
You must be signed in to change notification settings - Fork 147
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
Fix deprecation: Change force_text to force_str #123
Conversation
How does this change work? I only see the import statement changed, not any use. |
Oh that was a mistake. Sorry. Fixed. |
The declaration of python 2 support should be removed if it's going to be knowingly broken. Or conditionally change the import/usage based on the python version |
I'm happy to update the PR to check Python version or remove claimed python 2 support. Just let me know. Personally I'm in favor of dropping Python 2, clearly Django itself is not interested in supporting even python 2 friendly aliases. |
I think it's reasonable to drop support for all Python versions that don't
have security support at this point. Folks can use old releases if they are
using old Python and do just fine.
…-Tim Abbott (mobile)
On Wed, Dec 8, 2021, 10:39 David Burke ***@***.***> wrote:
I'm happy to update the PR to check Python version or remove claimed
python 2 support. Just let me know. Personally I'm in favor of dropping
Python 2, clearly Django itself is not interested in supporting even python
2 friendly aliases.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#123 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAU6NWRL65ISFT6RW7SAMA3UP6Q6NANCNFSM5JRTVZ7Q>
.
|
Ok I removed python 2 from setup.py and tox.ini. Sadly it looks like travis ci is no longer running so I can't confirm this setup would pass CI (it should). Python 3 tests pass locally for me using a python:3.10 Docker image. I had to increment the psycopg2 version tox uses to get it to build. I would appreciate if a maintainer could give this a review and ensure tests still pass. |
For demonstration/convenience purposes, I submitted https://pypi.org/project/django-bitfield-4-0/ for anyone looking to use django-bitfield in django 4.0. This package will not be maintained so please only use it as a stop gap measure. |
Thanks, this is appreciated. I am very busy this month but expect to be able to review this carefully in April. |
Python 2 hasn't had security support for some time; anyone needing it can run an old version of django-bitfield. This allows us to use drop use of `force_text` in favor of `force_str`, fixing deprecation issues with Django 4. Fixes disqus#122.
This is not a breaking change for Python 3. force_str has existed at least as far back as Django 1.8.
If Python 2 support is needed, then this could break it. IMO it shouldn't be supported but if preferred I can wrap this in a try catch.