[PR #827] [MERGED] Basic Support for Python 3 #12123

Closed
opened 2025-12-29 22:19:45 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/827
Author: @BeryJu
Created: 1/21/2017
Status: Merged
Merged: 1/23/2017
Merged by: @jeremystretch

Base: developHead: python3


📝 Commits (8)

  • 83a8d95 Rudimentary python3 support
  • cc475f8 update docs and trigger Travis
  • 9d4c83b fix some of the tests
  • db22ad9 Merge branch 'develop' into python3
  • 3fd04dc fix all python3 errors
  • 2673faa change env calls to just python
  • a612012 add @python_2_unicode_compatible decorator to models for python2 compatibility
  • d7f8ae1 switch netbox.configuration to from netbox import configuration

📊 Changes

17 files changed (+152 additions, -97 deletions)

View changed files

📝 .gitignore (+1 -0)
📝 .travis.yml (+3 -0)
📝 docs/installation/netbox.md (+2 -2)
📝 netbox/circuits/models.py (+9 -4)
📝 netbox/dcim/forms.py (+1 -1)
📝 netbox/dcim/models.py (+46 -23)
📝 netbox/dcim/tests/test_apis.py (+37 -37)
📝 netbox/extras/api/renderers.py (+1 -1)
📝 netbox/extras/models.py (+15 -7)
📝 netbox/generate_secret_key.py (+2 -2)
📝 netbox/ipam/models.py (+19 -9)
📝 netbox/netbox/settings.py (+2 -2)
📝 netbox/netbox/urls.py (+1 -1)
📝 netbox/secrets/models.py (+7 -4)
📝 netbox/secrets/tests/__init__.py (+0 -1)
📝 netbox/tenancy/models.py (+5 -2)
📝 netbox/tenancy/views.py (+1 -1)

📄 Description

Imports & everything else adjusted to python3, works with both python 2 and 3. Unit tests succeed for 2.7, 3.4, 3.5 and 3.6: https://travis-ci.org/BeryJu-org/netbox


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/827 **Author:** [@BeryJu](https://github.com/BeryJu) **Created:** 1/21/2017 **Status:** ✅ Merged **Merged:** 1/23/2017 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `python3` --- ### 📝 Commits (8) - [`83a8d95`](https://github.com/netbox-community/netbox/commit/83a8d954e023e283719c2227d7a458ffe5b08956) Rudimentary python3 support - [`cc475f8`](https://github.com/netbox-community/netbox/commit/cc475f8b980931a89ab82718f009e6ecbd09d656) update docs and trigger Travis - [`9d4c83b`](https://github.com/netbox-community/netbox/commit/9d4c83b0ef8e33df26dcca7f3ab2b123ff1e30a3) fix some of the tests - [`db22ad9`](https://github.com/netbox-community/netbox/commit/db22ad94c96f7b562584e99495ac94148e009a8f) Merge branch 'develop' into python3 - [`3fd04dc`](https://github.com/netbox-community/netbox/commit/3fd04dca1b46124d00d2727505bba009ad33abf7) fix all python3 errors - [`2673faa`](https://github.com/netbox-community/netbox/commit/2673faac9a6fa04c977b7d4fd2d406d7913bcd79) change env calls to just python - [`a612012`](https://github.com/netbox-community/netbox/commit/a61201217826ae7e94a96e9bf07e5ef21d672059) add @python_2_unicode_compatible decorator to models for python2 compatibility - [`d7f8ae1`](https://github.com/netbox-community/netbox/commit/d7f8ae1e88f03e4ea6478458688e8934003428b9) switch netbox.configuration to from netbox import configuration ### 📊 Changes **17 files changed** (+152 additions, -97 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+1 -0) 📝 `.travis.yml` (+3 -0) 📝 `docs/installation/netbox.md` (+2 -2) 📝 `netbox/circuits/models.py` (+9 -4) 📝 `netbox/dcim/forms.py` (+1 -1) 📝 `netbox/dcim/models.py` (+46 -23) 📝 `netbox/dcim/tests/test_apis.py` (+37 -37) 📝 `netbox/extras/api/renderers.py` (+1 -1) 📝 `netbox/extras/models.py` (+15 -7) 📝 `netbox/generate_secret_key.py` (+2 -2) 📝 `netbox/ipam/models.py` (+19 -9) 📝 `netbox/netbox/settings.py` (+2 -2) 📝 `netbox/netbox/urls.py` (+1 -1) 📝 `netbox/secrets/models.py` (+7 -4) 📝 `netbox/secrets/tests/__init__.py` (+0 -1) 📝 `netbox/tenancy/models.py` (+5 -2) 📝 `netbox/tenancy/views.py` (+1 -1) </details> ### 📄 Description Imports & everything else adjusted to python3, works with both python 2 and 3. Unit tests succeed for 2.7, 3.4, 3.5 and 3.6: https://travis-ci.org/BeryJu-org/netbox --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 22:19:45 +01:00
adam closed this issue 2025-12-29 22:19:45 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12123