From f7dc5e6fd38d9fe336a476008a1bf620828854e8 Mon Sep 17 00:00:00 2001 From: Jan Krupa Date: Mon, 11 May 2026 11:16:27 +0200 Subject: [PATCH] Add NetBox 4.6.x support (widen compat range to 4.5.0 - 4.6.99) Bump max_version from 4.5.99 to 4.6.99 and release as 2.2.0. Source-level audit against the v4.6.0 upstream tag confirms every NetBox API this plugin imports is unchanged: ViewTab, register_model_view, htmx_partial, EnhancedPaginator, get_paginate_count, BaseTable, NetBoxModelFilterSetForm, SavedFiltersMixin, TagFilterField, CustomFieldTypeChoices, CustomFieldUIVisibleChoices, and the registry['views'] shape. The 4.6 deprecations of registry['models'] and legacy actions={} view dicts do not affect this plugin (we touch neither). Upstream netbox_custom_objects >= 0.5.0 is recommended on NetBox 4.6 (its max_version covers 4.6.99). The customobject.html template override remains required - v0.5.0 still hardcodes its tabs block without {% model_view_tabs object %}. Verified locally on NetBox 4.5.10: ruff check + format clean, all 53 tests in tests/ pass. End-to-end verification on a 4.6.0 install pending (no local 4.6 environment available). --- CHANGELOG.md | 18 ++++++++++++++++++ CLAUDE.md | 2 +- README.md | 19 ++++++++++--------- netbox_custom_objects_tab/__init__.py | 2 +- pyproject.toml | 2 +- 5 files changed, 31 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64c8751..7537bed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,24 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.2.0] - 2026-05-11 + +### Changed + +- Widen supported NetBox range to **4.5.0 – 4.6.99** (`max_version` bumped from + `4.5.99` to `4.6.99`). No code or template changes were required: every NetBox + API the plugin depends on — `ViewTab`, `register_model_view`, `htmx_partial`, + `EnhancedPaginator`, `get_paginate_count`, `BaseTable`, + `NetBoxModelFilterSetForm`, `SavedFiltersMixin`, `TagFilterField`, + `CustomFieldTypeChoices`, `CustomFieldUIVisibleChoices`, and the + `registry['views']` shape — is unchanged in NetBox 4.6 (verified against the + `v4.6.0` upstream tag). The 4.6 deprecations of `registry['models']` and + legacy `actions = {...}` view dicts do not affect this plugin. +- On NetBox 4.6, the upstream `netbox_custom_objects` plugin **≥ 0.5.0** is + recommended (its `max_version` covers 4.6.99). The CO detail-page template + override remains necessary — `customobject.html` in upstream v0.5.0 still + hardcodes its `{% block tabs %}` without `{% model_view_tabs object %}`. + ## [2.1.0] - 2026-03-16 ### Added diff --git a/CLAUDE.md b/CLAUDE.md index b9526bc..ada6a69 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -98,7 +98,7 @@ To find all custom objects referencing a Device (pk=42): Reference: `netbox_custom_objects/template_content.py::CustomObjectLink.left_page()` -## Key Import Paths (NetBox 4.5.x) +## Key Import Paths (NetBox 4.5.x / 4.6.x) ```python from utilities.views import ViewTab, register_model_view diff --git a/README.md b/README.md index 771be34..42f7593 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,10 @@ [![CI](https://github.com/CESNET/netbox-custom-objects-tab/actions/workflows/ci.yml/badge.svg)](https://github.com/CESNET/netbox-custom-objects-tab/actions/workflows/ci.yml) [![PyPI](https://img.shields.io/pypi/v/netbox-custom-objects-tab)](https://pypi.org/project/netbox-custom-objects-tab/) [![Python](https://img.shields.io/pypi/pyversions/netbox-custom-objects-tab)](https://pypi.org/project/netbox-custom-objects-tab/) -[![NetBox](https://img.shields.io/badge/NetBox-4.5.x-blue)](https://github.com/netbox-community/netbox) +[![NetBox](https://img.shields.io/badge/NetBox-4.5.x_|_4.6.x-blue)](https://github.com/netbox-community/netbox) [![License](https://img.shields.io/badge/license-Apache%202.0-blue)](LICENSE) -A NetBox 4.5.x plugin that adds **Custom Objects** tabs to object detail pages, +A NetBox 4.5.x / 4.6.x plugin that adds **Custom Objects** tabs to object detail pages, showing Custom Object instances from the `netbox_custom_objects` plugin that reference those objects via OBJECT or MULTIOBJECT fields. Works on standard NetBox models (Device, Site, Rack, …), third-party plugin models, and Custom Object detail pages themselves @@ -26,16 +26,17 @@ Two tab modes are available: ## Requirements -- NetBox 4.5.0 – 4.5.99 -- `netbox_custom_objects` plugin **≥ 0.4.6** installed and configured +- NetBox 4.5.0 – 4.6.99 +- `netbox_custom_objects` plugin **≥ 0.4.6** installed and configured (≥ 0.5.0 recommended on NetBox 4.6) ## Compatibility -| Plugin version | NetBox version | `netbox_custom_objects` version | -|----------------|----------------|---------------------------------| -| 2.1.x | 4.5.4+ | ≥ 0.4.6 | -| 2.0.x | 4.5.x | ≥ 0.4.6 | -| 1.0.x | 4.5.x | ≥ 0.4.4 | +| Plugin version | NetBox version | `netbox_custom_objects` version | +|----------------|----------------|---------------------------------------| +| 2.2.x | 4.5.4+ / 4.6.x | ≥ 0.4.6 (≥ 0.5.0 on 4.6) | +| 2.1.x | 4.5.4+ | ≥ 0.4.6 | +| 2.0.x | 4.5.x | ≥ 0.4.6 | +| 1.0.x | 4.5.x | ≥ 0.4.4 | ## Installation diff --git a/netbox_custom_objects_tab/__init__.py b/netbox_custom_objects_tab/__init__.py index 9ae7d8b..85a8ac1 100644 --- a/netbox_custom_objects_tab/__init__.py +++ b/netbox_custom_objects_tab/__init__.py @@ -12,7 +12,7 @@ class NetBoxCustomObjectsTabConfig(PluginConfig): author_email = "jan.krupa@cesnet.cz" base_url = "custom-objects-tab" min_version = "4.5.0" - max_version = "4.5.99" + max_version = "4.6.99" default_settings = { # Per-type tabs: each Custom Object Type gets its own tab (opt-in, empty by default). "typed_models": [], diff --git a/pyproject.toml b/pyproject.toml index 3b69d1e..af4bd41 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "netbox-custom-objects-tab" -version = "2.1.1" +version = "2.2.0" description = "NetBox plugin that adds a Custom Objects tab to object detail pages" readme = "README.md" requires-python = ">=3.12"