Require 'commit' argument in custom script run() method #3934

Closed
opened 2025-12-29 18:32:09 +01:00 by adam · 0 comments
Owner

Originally created by @jeremystretch on GitHub (Aug 3, 2020).

Proposed Changes

#4262 introduced support for an optional commit argument in a custom script's run() method. This issue serves to document the deprecation of this as an optional argument: Beginning with v2.10, a custom script's run() method must accept a commit argument.

Justification

Removes superfluous backward-compatibility logic from core. A custom script doesn't necessarily need to do anything with the commit argument; it just needs to accept it when called via run_script().

Originally created by @jeremystretch on GitHub (Aug 3, 2020). ### Proposed Changes #4262 introduced support for an optional `commit` argument in a custom script's `run()` method. This issue serves to document the deprecation of this as an optional argument: Beginning with v2.10, a custom script's `run()` method **must** accept a `commit` argument. ### Justification Removes superfluous backward-compatibility logic from core. A custom script doesn't necessarily need to _do_ anything with the `commit` argument; it just needs to accept it when called via `run_script()`.
adam added the status: acceptedtype: deprecation labels 2025-12-29 18:32:09 +01:00
adam closed this issue 2025-12-29 18:32:10 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3934