Open tabebqena opened 2 years ago
I am hestitating to deprecate the parameter and finally to remove it, as that would cause a backwards imcompatibility.
Any more opinions on this?
I think that there is many drawbacks result ing from the backward compatibility. Also, You should hesitate :) because a lot of changes will make scope creeping.
In the default_dest
parameter, I may suggest removing it without throwing a special error. just the code will not work. Something like changing :
`def __init__( self, name: str = 'files', extensions: Iterable[str] = DEFAULTS, default_dest: Optional[Callable[[Flask], str]] = None) -> None:`
To
`def __init__( self, name: str = 'files', extensions: Iterable[str] = DEFAULTS, **kwargs) -> None:`
We should add warning in the function body.
This is better than removing it from the method signature:
`def __init__( self, name: str = 'files', extensions: Iterable[str] = DEFAULTS) -> None:`
As, this will throw error to all users, even those that write:
`uset = UploadSet(name='files', default_dest=None)`
This is just an idea on how to remove it without noisy.
The
UploadSet
accepts an optional parameterdefault_dest
. I think that this parameter has nothing to add in the presence ofUPLOADS_PHOTOS_DEST
andUPLOADS_DEFAULT_DEST
.Also, there is no special use case for it as far as I know.