SETI / rms-opus

PDS OPUS - Outer Planets Data Search Tool
Apache License 2.0
9 stars 7 forks source link

Look into upgrading to Django 4.x and Python 3.10 #1084

Closed rfrenchseti closed 2 years ago

rfrenchseti commented 4 years ago

https://docs.djangoproject.com/en/3.0/releases/3.0/

juzen2003 commented 3 years ago
rfrenchseti commented 3 years ago

Dave says:

I think it's ok for us to stay on Django 2.2 since it's still releasing new update (the latest 2.2.17 is expected to release on Nov). And at the same time we can wait for django_nose to release its new support on 3.1.x for the sql_flush, once it supports 3.1.x, we can upgrade to Django 3.1.x right away.

Note: To make django_nose sql_flush call work with Django 3.1.x, we can modify line 405 in runner.py (under site-pacakges/django_nose) by changing from: flush_statements = connection.ops.sql_flush(style, tables, connection.introspection.sequence_list()) to: flush_statements = connection.ops.sql_flush(style, tables) With above modification, python manage.py test will run and pass, runserver will work fine too.

rfrenchseti commented 3 years ago

Deferring until django_nose is updated.

rfrenchseti commented 2 years ago

This is actually for Django 4.x now, as 3.x is starting its end-of-life journey soon.

dstopp commented 2 years ago

Note that nose is not supported in Python 3.10 and should be replaced by pytest, see notes in this link: https://ipython.readthedocs.io/en/stable/whatsnew/version7.html

rfrenchseti commented 2 years ago

Upgrading to Django 4.x should be done at the same time as supporting Python 3.10. Currently OPUS doesn't work with 3.10 because some part of the Collections module was deprecated that was used by Django nose. Thus as part of fixing the tests for Django 4.x we should fix support for Python 3.10 as well.