mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-11 21:10:29 +01:00
Drop support for Python 3.6 #4402
Closed
opened 2025-12-29 18:35:40 +01:00 by adam
·
17 comments
No Branch/Tag Specified
main
update-changelog-comments-docs
feature-removal-issue-type
20911-dropdown
20239-plugin-menu-classes-mutable-state
21097-graphql-id-lookups
feature
fix_module_substitution
20923-dcim-templates
20044-elevation-stuck-lightmode
feature-ip-prefix-link
v4.5-beta1-release
20068-import-moduletype-attrs
20766-fix-german-translation-code-literals
20378-del-script
7604-filter-modifiers-v3
circuit-swap
12318-case-insensitive-uniqueness
20637-improve-device-q-filter
20660-script-load
19724-graphql
20614-update-ruff
14884-script
02496-max-page
19720-macaddress-interface-generic-relation
19408-circuit-terminations-export-templates
20203-openapi-check
fix-19669-api-image-download
7604-filter-modifiers
19275-fixes-interface-bulk-edit
fix-17794-get_field_value_return_list
11507-show-aggregate-and-rir-on-api
9583-add_column_specific_search_field_to_tables
v4.5.0
v4.4.10
v4.4.9
v4.5.0-beta1
v4.4.8
v4.4.7
v4.4.6
v4.4.5
v4.4.4
v4.4.3
v4.4.2
v4.4.1
v4.4.0
v4.3.7
v4.4.0-beta1
v4.3.6
v4.3.5
v4.3.4
v4.3.3
v4.3.2
v4.3.1
v4.3.0
v4.2.9
v4.3.0-beta2
v4.2.8
v4.3.0-beta1
v4.2.7
v4.2.6
v4.2.5
v4.2.4
v4.2.3
v4.2.2
v4.2.1
v4.2.0
v4.1.11
v4.1.10
v4.1.9
v4.1.8
v4.2-beta1
v4.1.7
v4.1.6
v4.1.5
v4.1.4
v4.1.3
v4.1.2
v4.1.1
v4.1.0
v4.0.11
v4.0.10
v4.0.9
v4.1-beta1
v4.0.8
v4.0.7
v4.0.6
v4.0.5
v4.0.3
v4.0.2
v4.0.1
v4.0.0
v3.7.8
v3.7.7
v4.0-beta2
v3.7.6
v3.7.5
v4.0-beta1
v3.7.4
v3.7.3
v3.7.2
v3.7.1
v3.7.0
v3.6.9
v3.6.8
v3.6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3
1.0.0
Labels
Clear labels
beta
breaking change
complexity: high
complexity: low
complexity: medium
needs milestone
netbox
pending closure
plugin candidate
pull-request
severity: high
severity: low
severity: medium
status: accepted
status: backlog
status: blocked
status: duplicate
status: needs owner
status: needs triage
status: revisions needed
status: under review
topic: GraphQL
topic: Internationalization
topic: OpenAPI
topic: UI/UX
topic: cabling
topic: event rules
topic: htmx navigation
topic: industrialization
topic: migrations
topic: plugins
topic: scripts
topic: templating
topic: testing
type: bug
type: deprecation
type: documentation
type: feature
type: housekeeping
type: translation
Mirrored from GitHub Pull Request
Milestone
No items
No Milestone
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: starred/netbox#4402
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jeremystretch on GitHub (Dec 23, 2020).
Originally assigned to: @jeremystretch on GitHub.
Proposed Changes
Drop support for Python 3.6 in the next major release.
Justification
Python 3.6 will become unsupported by PSF in December 2021, and dropping support for it will allow us to begin using Python 3.7 features.
@steffann commented on GitHub (Dec 27, 2020):
Python 3.6 is the default version shipped with Ubuntu 18.04.5 LTS. It has packages for 3.7 and 3.8, but the
upgrade.shscript only discovers/usr/bin/python3, which is 3.6. To avoid breaking on LTS releases it may be a good idea to test for specific version (for python in /usr/bin/python3.9 /usr/bin/python3.8 /usr/bin/python3.7; doetc).@bluikko commented on GitHub (Jan 4, 2021):
This would make Red Hat users' life very difficult. Red Hat 7 and derivatives have 3.6 supported until 2024 - and those users would be forced to compile Python 3.7 from source or move to 8. I have not seen 3.7 RPMs anywhere.
@candlerb commented on GitHub (Jan 4, 2021):
TL;DR: I propose that the Netbox doesn't drop support for python 3.6 until the first major release of Netbox which requires Django 4.0.
Long version:
Moving to python 3.7 is painful for users who are currently on Ubuntu 18.04 or RedHat, as already described.
I don't see any compelling python language features in 3.7 (*); ISTM the main driver is when Django drops 3.6 support.
The next LTS release of Django will be 3.2, due April 2021 and supported to April 2024. The FAQ says:
If I understand it correctly, this means that Django 3.2 will likely support python 3.6 until April 2024, which is a year past the EOL of Ubuntu 18.04.
What if Netbox wants to move to Django 4.0? That isn't due until December 2021, around the same time as python 3.6 officially ends support. But I don't expect adoption of 4.0 until well into 2022 after it's had time to stabilise.
That is - some time in mid to late 2022, there may be a major release of Netbox which depends on Django 4.0 features. I think that would be the time to drop python 3.6 support.
(*) apart from the insertion-order preserving nature of dicts, but AFAIK this is already the case in 3.6, it's just "official" in 3.7.
@steffann: if the venv already exists then it could deference the symlink
venv/bin/pythonto pick up the same version as was used previously.Of course, the logic you suggest would still be needed the first time that
upgrade.shis run. Another option is to runpython3 -Vand only go hunting if the version is too low - or prompt the user to pick the right version.@tyler-8 commented on GitHub (Jan 11, 2021):
I think it does make sense to stop supporting Python 3.6 - but I don't agree with the timing proposed in the OP.
At the earliest I think it should be done in step with the PSF dropping support (end of 2021).
Additionally, the announcement of the chosen timeframe should be added to all NetBox release notes up until that point. That will give the community plenty of opportunities to be informed of the coming change as well as give time to plan & make infrastructure changes on the user side.
@jeremystretch commented on GitHub (Feb 8, 2021):
I think there's some confusion regarding the default Python version and available versions. I've had Python 3.7 installed on Ubuntu for a while now; it's quite easy to do. NetBox runs in its own virtual environment, which can use Python 3.7 (or any other version) independently from the system default. If there's some limitation preventing you from installing a version of Python that was released over two years ago, that's something to take up with your distro.
We always adopt the latest stable Django release during each major NetBox release. This won't change with Django 4.0.
@candlerb commented on GitHub (Feb 8, 2021):
Sure, but even if Netbox adopts Django 4.0 at the earliest opportunity, this won't be until the first major Netbox release after December 2021.
I also note that if Netbox requires a non-default python3, there will be some housekeeping required - e.g. changing "python3" to "python3.7" at appropriate points in the documentation and in installation scripts.
I just don't see what the push is to drop 3.6 right now, rather than concurrently with adopting Django 4.0.
@jeremystretch commented on GitHub (Feb 8, 2021):
For context, "right now" is two and a half years after Python 3.7's release, and roughly ten months until EOL for Python 3.6. This change wouldn't take effect until the release of NetBox 2.11 anyway, which given the current state of things likely won't even come out until the second half of 2021.
@candlerb commented on GitHub (Feb 8, 2021):
Right now is also >2 years before EOL of Ubuntu 18.04. As you say, it's possible to install another python version, and I wouldn't have much difficulty doing this on my own instances; but it is going to complicate the upgrade process, and I would expect more support requests generated as a result. Leaving it later means that organically more people will be running on more recent OSes anyway.
Those running CentOS are in a worse situation, especially now that IBM have announced they will abandon CentOS 8 at the end of this year, so there will be a longer tail of people sticking to CentOS 7.
I have no issue with dropping 3.6 when Django, or any other key dependency, drops 3.6.
What's the plus side? Faster merge of pull requests because the CI pipeline can drop 3.6 for tests?
@jeremystretch commented on GitHub (Feb 8, 2021):
We can start using Python 3.7 features, as stated above. I understand that this probably isn't an appreciable difference unless you're actively engaged in the project's development, but that's how it goes. Plus, we can move testing up from 3.6-3.8 to 3.7-3.9, to better accommodate the portion of our user base that isn't restricted to a nearly-EOL Python version.
Users who for whatever reason are unwilling or unable to install Python 3.7 on their NetBox deployment have the option of sticking with NetBox 2.10 until an upgrade path becomes available to them.
@bluikko commented on GitHub (Feb 9, 2021):
Does this mean there will be security and other important updates for 2.10 even after 2.11 is released?
I tried to find release lifecycle policy but failed. A cursory look at releases since 1.9.x shows that after a new minor version is released there has been no more patch releases for the old minor version.
Edit: "after 2.11", not "after 2.9".
@jeremystretch commented on GitHub (Feb 9, 2021):
No, in keeping with established precedence there will be no further releases of 2.10 once 2.11 is released, much like Python 3.6 in December.
@candlerb commented on GitHub (Feb 9, 2021):
Any feature in particular that's desirable to incorporate?
I just think this needs to be balanced against the inconvenience this will cause to the user base.
@jeremystretch commented on GitHub (Feb 9, 2021):
I'm not going to keep going in circles with this. The question is not "why should we drop old software?" It's "why shouldn't we drop old software?"
The only argument provided in opposition is that it will be moderately inconvenient - though far from infeasible - for certain users on older distributions to install Python 3.7. This is not sufficient justification for delaying the move to 3.7. Further, these users are still going to have to migrate eventually anyway, whether we make the move in NetBox 2.11 or 2.12 or 2.13: It's still going to happen one way or the other, so might as well move forward now so we can at least start to reap the benefits.
@bluikko commented on GitHub (Feb 9, 2021):
inb4 locked
I don't think that was the question at all. It was "what is the benefit in 3.7".
@jeremystretch commented on GitHub (Feb 9, 2021):
Locking as this has been settled.
@jeremystretch commented on GitHub (Mar 8, 2021):
Bumping this to v2.12 as v2.11 will be released sooner than anticipated.
@yrro commented on GitHub (Apr 17, 2021):
FWIW, Red Hat Software Collections 3.5 introduced Python 3.8, which will be supported until May 2023.