Refactor imports for extras.forms.mixins #8204

Closed
opened 2025-12-29 20:33:46 +01:00 by adam · 2 comments
Owner

Originally created by @arthanson on GitHub (Jun 16, 2023).

Proposed Changes

Refactor imports for extras.forms.mixins, specifically in netbox.forms.base.py it has an import of:

from extras.forms.mixins import CustomFieldsMixin, SavedFiltersMixin

if extras.admin.py doesn't have the following import:

from .forms import ConfigRevisionForm

There will be a circular import error.

Justification

items in netbox should not be calling into sub-packages if at all possible, any required forms and such should be factored out to utilities or netbox to prevent circular import issues.

Originally created by @arthanson on GitHub (Jun 16, 2023). ### Proposed Changes Refactor imports for extras.forms.mixins, specifically in netbox.forms.base.py it has an import of: ``` from extras.forms.mixins import CustomFieldsMixin, SavedFiltersMixin ``` if extras.admin.py doesn't have the following import: ``` from .forms import ConfigRevisionForm ``` There will be a circular import error. ### Justification items in netbox should not be calling into sub-packages if at all possible, any required forms and such should be factored out to utilities or netbox to prevent circular import issues.
adam added the status: acceptedtype: housekeeping labels 2025-12-29 20:33:46 +01:00
adam closed this issue 2025-12-29 20:33:47 +01:00
Author
Owner

@github-actions[bot] commented on GitHub (Sep 15, 2023):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

@github-actions[bot] commented on GitHub (Sep 15, 2023): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. **Do not** attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@jeremystretch commented on GitHub (Jan 5, 2024):

This appears to have been addressed under #14326.

@jeremystretch commented on GitHub (Jan 5, 2024): This appears to have been addressed under #14326.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8204