action_policy icon indicating copy to clipboard operation
action_policy copied to clipboard

Use kwargs in policy initializer API

Open hernanat opened this issue 4 years ago • 2 comments

From https://github.com/palkan/action_policy/issues/190

This commit changes the policy initializer API to take all kwargs instead of having an optional first record arg.

hernanat avatar Oct 02 '21 05:10 hernanat

@palkan not sure if any documentation updates are needed, also not sure what section in the changelog to put it under as I wasn't sure if the next release would be 0.6.1 or something else.

hernanat avatar Oct 02 '21 05:10 hernanat

not sure if any documentation updates are needed, also not sure what section in the changelog to put it under as I wasn't sure if the next release would be 0.6.1 or something else.

Please, add a change log under the ## master version.

This is a breaking change (it was planned for v1). I think, we can include it into v0.x iff:

  • There is a backward compatibility (i.e., we support both positional record and record:, the latter wins if defined)
  • There is a deprecation message saying that new(record) will be removed in v1, use new(record: record) instead.

All internals should use the new kwargs API.

palkan avatar Oct 20 '21 13:10 palkan