Move to Django 3.0 #3121

Closed
opened 2025-12-29 18:25:54 +01:00 by adam · 6 comments
Owner

Originally created by @jeremystretch on GitHub (Jan 6, 2020).

Originally assigned to: @jeremystretch on GitHub.

Proposed Changes

Update NetBox to move from Django 2.2 to Django 3.0.

Note: This will drop support for Python 3.5.

Justification

General maintenance

Originally created by @jeremystretch on GitHub (Jan 6, 2020). Originally assigned to: @jeremystretch on GitHub. ### Proposed Changes Update NetBox to move from Django 2.2 to [Django 3.0](https://docs.djangoproject.com/en/3.0/releases/3.0/). **Note:** This will drop support for Python 3.5. ### Justification General maintenance
adam added the status: acceptedtype: housekeeping labels 2025-12-29 18:25:54 +01:00
adam closed this issue 2025-12-29 18:25:55 +01:00
Author
Owner

@gdmk commented on GitHub (Jan 22, 2020):

Are there any plans to bring in MariaDB as a new backend along with Django 3.0? Django 3.0 will no longer support PG 9.4 and this is the last version with free BDR ver 1 support, MariaDB has a very mature and free clustering builtin (Galera)

@gdmk commented on GitHub (Jan 22, 2020): Are there any plans to bring in MariaDB as a new backend along with Django 3.0? Django 3.0 will no longer support PG 9.4 and this is the last version with free BDR ver 1 support, MariaDB has a very mature and free clustering builtin (Galera)
Author
Owner

@igor-raits commented on GitHub (Jan 31, 2020):

It seems that problem mentioned here needs to be fixed for the transition.

Since we don't have django 2.x in Fedora anymore, I'd love to help with testing netbox under django 3.x

@igor-raits commented on GitHub (Jan 31, 2020): It seems that problem mentioned [here](https://groups.google.com/d/msg/netbox-discuss/gq4iPk_T2lw/8Nzc7-_wAAAJ) needs to be fixed for the transition. Since we don't have django 2.x in Fedora anymore, I'd love to help with testing netbox under django 3.x
Author
Owner

@tyler-8 commented on GitHub (Feb 17, 2020):

From a maintenance perspective, does it make more sense to wait to upgrade to the 3.2 LTS rather than 3.0? That would give the maintainer team a stable API (currently on 2.2 LTS and 3.2 LTS in 2021) to work with until 2022, rather than chasing the X.0 and x.1 releases. That also gives Django features plenty of time to bake and receive patches.

I know it's tempting to target the handful of things in the new releases that have use cases in Netbox - but from a longevity and sanity perspective, perhaps waiting for the next LTS is a win for the project. Food for thought.

@tyler-8 commented on GitHub (Feb 17, 2020): From a maintenance perspective, does it make more sense to wait to upgrade to the 3.2 LTS rather than 3.0? That would give the maintainer team a stable API (currently on 2.2 LTS and [3.2 LTS in 2021](https://www.djangoproject.com/download/)) to work with until 2022, rather than chasing the `X.0` and `x.1` releases. That also gives Django features plenty of time to bake and receive patches. I know it's tempting to target the handful of things in the new releases that have use cases in Netbox - but from a longevity and sanity perspective, perhaps waiting for the next LTS is a win for the project. Food for thought.
Author
Owner

@tyler-8 commented on GitHub (Feb 17, 2020):

Are there any plans to bring in MariaDB as a new backend along with Django 3.0? Django 3.0 will no longer support PG 9.4 and this is the last version with free BDR ver 1 support, MariaDB has a very mature and free clustering builtin (Galera)

@gdmk Netbox relies on specific data type handling in Postgresql so adding support for other database solutions isn't so easy without doing work on lots of core areas.

@tyler-8 commented on GitHub (Feb 17, 2020): > Are there any plans to bring in MariaDB as a new backend along with Django 3.0? Django 3.0 will no longer support PG 9.4 and this is the last version with free BDR ver 1 support, MariaDB has a very mature and free clustering builtin (Galera) @gdmk [Netbox relies on specific data type](https://netbox.readthedocs.io/en/stable/installation/1-postgresql/) handling in Postgresql so adding support for other database solutions isn't so easy without doing work on lots of core areas.
Author
Owner

@jeremystretch commented on GitHub (Feb 18, 2020):

It looks like Python 3.6 introduced a new standard library called secrets, which conflicts with our internal app secrets. This hasn't been a problem until now, but Django 3.0 employs the standard library for certain functions related to password generation (previously, random was used). This presents a problem, because Django is importing our local app instead of the standard library.

I'm not sure whether there is a clean way to work around this. We may need to rename the secrets app.

@jeremystretch commented on GitHub (Feb 18, 2020): It looks like Python 3.6 introduced a new standard library called `secrets`, which conflicts with our internal app `secrets`. This hasn't been a problem until now, but Django 3.0 employs the standard library for certain functions related to password generation (previously, `random` was used). This presents a problem, because Django is importing our local app instead of the standard library. I'm not sure whether there is a clean way to work around this. We may need to rename the secrets app.
Author
Owner

@jeremystretch commented on GitHub (Feb 19, 2020):

I've worked around the above temporarily, though we should still come up with a more permanent solution.

@jeremystretch commented on GitHub (Feb 19, 2020): I've [worked around the above](f1b042180536092fa99d67f55fe5d5ab280d0f69) temporarily, though we should still come up with a more permanent solution.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3121