django-appsettings icon indicating copy to clipboard operation
django-appsettings copied to clipboard

Deprecate transform_default

Open ziima opened this issue 5 years ago • 6 comments

I don't really see the point in the transform_default argument. It seems quite straightforward to provide the default value the same way it should be set up in settings. I'm in favor of deprecating the transform_default and eventually removing it and transform the default in all cases.

ziima avatar Aug 23 '19 07:08 ziima

Any comments on this? Otherwise, I'd start with first steps to deprecate it.

ziima avatar Mar 30 '20 10:03 ziima

It was useful when providing a callable as default, and actually calling it to get the default value at runtime, though if nobody's using I'm OK to deprecate it.

pawamoy avatar Mar 30 '20 11:03 pawamoy

The idea is to transform the default always, unless the call_default is True. I intent to keep the possibility of a callable default.

ziima avatar Mar 30 '20 11:03 ziima

Ah yes, I forgot that. Then it was useful when you wanted to transform the value returned by the callable as well haha. But then the callable could indeed directly return the final value, so it's not that useful.

pawamoy avatar Mar 30 '20 11:03 pawamoy

I'm okay with that, but it should be noted that transform_default is currently False by default and you are proposing to change it to True, which means it's a breaking change and it should be noted in the changelog and preferably even in release notes.

stinovlas avatar Mar 30 '20 14:03 stinovlas

Seems I will need to solve #37 first.

ziima avatar Apr 06 '20 07:04 ziima