Closed maringuu closed 10 months ago
Since this is global state, other libraries that also depend on python-magic would pickup the change and may get unexpected behavior. I'd support an environment variable that sets the default, since that puts it under the users (rather than potentially a libraries) control.
Obviously a library can set the environment variable, but that's going to be clearly wrong while a function makes it inviting.
environment variable that sets the default
That will be the MAGIC
environment variable as defined by libmagic(3).
Since this is global state, other libraries that also depend on python-magic would pickup the change
Good point, I didn't think if that.
Closing.
This would be a solution to #305. I'm not happy with the name of the function and would like to discuss this change in general.
Any comments?