miracle2k / webassets

Asset management for Python web development.
BSD 2-Clause "Simplified" License
921 stars 258 forks source link

Bundles cannot be replaced/re-added #519

Closed smotornyuk closed 4 years ago

smotornyuk commented 5 years ago

Currently, attempt to register a bundle with a name that is already in _named_bundle will raise a RegisterError if a new bundle is not the same, as the previous one. Generally, it doesn't create any problem, but for rare cases of systems with the ability to replace themes/assets on-the-fly, it can be a grave thing. Maybe it has sense either to use warnings for such cases or provide an additional argument to register or add a flag to Environment with an explicit mark that re-registration is allowed/forbidden?