babel
babel copied to clipboard
Validate Locale parameter formats while constructing
This avoids being able to construct mongrel locales with language = 'en_US', territory = None.
Fixes #283
:warning: Warning :warning:
This might actually be a fairly disruptive change to the users of the library who have come to expect they can build locales with Locale("en_US").
Current coverage is 89.49%
Merging #309 into master will increase coverage by +0.09% as of
51fd1f3
@@ master #309 diff @@
======================================
Files 23 23
Stmts 3736 3752 +16
Branches 0 0
Methods 0 0
======================================
+ Hit 3340 3358 +18
Partial 0 0
+ Missed 396 394 -2
Review entire Coverage Diff as of
51fd1f3Powered by Codecov. Updated on successful CI builds.
Come to think of it, this paves the way nicely for https://github.com/python-babel/babel/issues/30; we can now derive a FuzzyLocale class or similar that doesn't validate as strictly. :)
akx: Come to think of it, this paves the way nicely for #30; we can now derive a FuzzyLocale class or similar > that doesn't validate as strictly. :)
Is there some kind of roadmap as to when fuzzy locales will be implemented? I have a requirement that needs the ability to define custom/fuzzy locales, so it would be great to know when I can implement this.
Moved this out of the next point release due to the warning above.