django-nested-admin icon indicating copy to clipboard operation
django-nested-admin copied to clipboard

Drop support for Django < 2.2 (incl. Python < 3.5) and clean up afterwards

Open michael-k opened this issue 5 years ago • 13 comments

If you want to combine all the EOL drops in a single release, you should consider dropping support for Python 3.5 as well. It reaches its EOL on 2020-09-13 (in 3 weeks), see https://devguide.python.org/#status-of-python-branches. There won't be another EOL of Python or Django until Django 3.0 reaches its EOL in April 2021.

michael-k avatar Aug 24 '20 14:08 michael-k

Codecov Report

Merging #187 into master will decrease coverage by 3.63%. The diff coverage is 94.87%.

@@            Coverage Diff             @@
##           master     #187      +/-   ##
==========================================
- Coverage   83.39%   79.76%   -3.64%     
==========================================
  Files          20       20              
  Lines        2506     2481      -25     
==========================================
- Hits         2090     1979     -111     
- Misses        416      502      +86     
Flag Coverage Δ
#javascript 79.58% <ø> (ø)
#python 80.04% <94.87%> (-9.13%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
nested_admin/nested.py 95.86% <89.47%> (-0.89%) :arrow_down:
nested_admin/__init__.py 92.30% <100.00%> (-0.20%) :arrow_down:
nested_admin/forms.py 100.00% <100.00%> (ø)
nested_admin/formsets.py 89.91% <100.00%> (-1.45%) :arrow_down:
nested_admin/polymorphic.py 78.12% <100.00%> (-0.23%) :arrow_down:
nested_admin/views.py 81.25% <100.00%> (ø)
nested_admin/compat.py 20.45% <0.00%> (-59.85%) :arrow_down:
nested_admin/templatetags/nested_admin.py 80.90% <0.00%> (-1.82%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d40614b...cb17830. Read the comment docs.

codecov[bot] avatar Aug 24 '20 14:08 codecov[bot]

We're currently in the process of upgrading to python 3 and the latest django LTS release for all of our django installs. It should be completed soon (some time in the next few months) but until then we won't drop support from django-nested-admin.

fdintino avatar Aug 24 '20 14:08 fdintino

Ping me when you're done and I'll rebase.

michael-k avatar Aug 25 '20 09:08 michael-k

@fdintino Any update there?

ulgens avatar Feb 06 '21 12:02 ulgens

@ulgens All of our systems will be upgraded to python 3.7+ and django 2.2 by this summer, if not sooner. The reason it's taking a while is that the upgrade is happening in tandem with a change to our hosting infrastructure.

fdintino avatar Feb 12 '21 20:02 fdintino

@fdintino I'm missing who is "we" in your comments but why not create sth like "legacy" or "python2" branch and use it instead of stopping development of the whole tool?

ulgens avatar Feb 13 '21 05:02 ulgens

Sorry, by "we" I meant "The Atlantic." I take your point, but I'm not sure I agree that a few if django.VERSION < (X, Y) conditional blocks and six functions has stopped development of django-nested-admin.

fdintino avatar Feb 14 '21 17:02 fdintino

Are there any plans to get this merged, or are there some open issues which I am not aware of in that PR. thx.

ceelian avatar Jul 06 '21 07:07 ceelian

Suggestions:

  1. Support matrix:
  • add support for Python 3.6-3.10
  • add support for Django 2.2, 3.1 and 3.2
  • drop support for Python < 3.6
  • drop support for Django < 2.2 and 3.0
  • provide support only for green-green combinations of Python and Django (drop support for any combinations "supported Django version + unsupported Python version" or "unsupported Django version + supported Python version")
  1. Formatting:

There are many opinions about f-strings. For example, https://wemake-python-stylegui.de/en/latest/pages/usage/violations/consistency.html#wemake_python_styleguide.violations.consistency.FormattedStringViolation They forbid usage of f-strings at all.

I disagree with FormattedStringViolation and in same time I disagree with @ulgens about There are too many places that can be improved by the usage of f strings. too.

My opinion: use f-strings with caution.

lorddaedra avatar Nov 21 '21 15:11 lorddaedra

Django 4.0 is now out, any chance of adding support as part of this?

  1. The replacement of django.conf.urls.url (and recommendation to use django.urls.re_path() as it was just an alias) has been around since 2.0, so it should be safe to apply (see https://github.com/theatlantic/django-nested-admin/pull/205)
  2. Add support for 4.0 in the test matrix

gaige avatar Dec 10 '21 11:12 gaige

I update my suggestions:

  1. Support matrix: Django 2.2 LTS + Python 3.6, 3.7, 3.8 and 3.9 Django 3.2 LTS + Python 3.6, 3.7, 3.8, 3.9 and 3.10 Django 4.0 + Python 3.8, 3.9 and 3.10

So 12 combinations, 2 most wanted (I guess): Django 3.2 LTS + Python 3.10 and Django 4.0 + Python 3.10.

lorddaedra avatar Dec 12 '21 22:12 lorddaedra

I'll look into merging these pull requests sometime this week.

fdintino avatar Dec 13 '21 20:12 fdintino

@fdintino Any luck?

ulgens avatar Jan 03 '22 13:01 ulgens

Codecov Report

Merging #187 (4c62da2) into master (2554f51) will decrease coverage by 0.46%. The diff coverage is n/a.

:exclamation: Current head 4c62da2 differs from pull request most recent head 55a07ee. Consider uploading reports for the commit 55a07ee to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #187      +/-   ##
==========================================
- Coverage   79.18%   78.71%   -0.47%     
==========================================
  Files          19        9      -10     
  Lines        2488     1480    -1008     
==========================================
- Hits         1970     1165     -805     
+ Misses        518      315     -203     
Flag Coverage Δ
javascript 78.71% <ø> (-0.28%) :arrow_down:
python ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...admin/static/nested_admin/src/nested-admin/grp$.js 50.00% <0.00%> (-50.00%) :arrow_down:
nested_admin/__init__.py
nested_admin/forms.py
nested_admin/formsets.py
nested_admin/nested.py
nested_admin/polymorphic.py
nested_admin/views.py
nested_admin/templatetags/nested_admin.py
nested_admin/exceptions.py
nested_admin/urls.py
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2554f51...55a07ee. Read the comment docs.

codecov-commenter avatar Oct 12 '22 01:10 codecov-commenter