Releases: mirumee/google-i18n-address
3.1.1
3.1.0
Recently it was brought to our attention that releases of google-i18n-address
are including extra files which cause issues for other projects.
3.1 release is functionally the same as 3.0, but it excludes those files.
3.0.0 - 3.11 support, package updates, PEP8 compliance, validation rules update
Backwards incompatible changes:
- PEP8: Exception names should use Error suffix: InvalidAddress -> InvalidAddressError
What's Changed
- Remove requires.io by @brylie-wolt in #71
- Update package by @michaljelonek in #74
New Contributors
- @brylie-wolt made their first contribution in #71
- @michaljelonek made their first contribution in #74
Full Changelog: 2.5.2...3.0.0
2.5.2 - Update validation rules for June 2022
Updated address validation rules to the most recent version
Change how validation works for non-required fields
Previously for countries where we had a list of possible country area values the validator would mark an empty field as invalid even if it was not required. This version only checks field values against a list of valid choices if the values are non-empty.
Make ValidationRules a regular object, add country_code and split postal_code_examples
ValidationRules
is no longer a namedtuple
as indexing it using integer keys did not make a lot of sense. This will allow us to add new fields without breaking compatibility in future.
The ValidationRules
instance now has a country_code
field along with the previously available country_name
.
ValidationRules.postal_code_examples
is now a list instead of a string. This is a backwards-incompatible change and if your code relies on the examples it needs to be adapted.
Fix normalization of city areas and make validation rules useful for display purposes
Previous releases had a bug that caused city name to be used when normalizing a city area name.
Validation rules now return a unique list of choices for country_area_choices
, city_choices
and city_area_choices
where previous version would return a list of all existing translations resulting in duplicate values where spelling was identical.
For example the province list for Canada will now result in the following country_area_choices
:
[('AB', 'Alberta'),
('BC', 'British Columbia'),
('BC', 'Colombie-Britannique'),
('MB', 'Manitoba'),
('NB', 'New Brunswick'),
('NB', 'Nouveau-Brunswick'),
('NL', 'Newfoundland and Labrador'),
('NL', 'Terre-Neuve-et-Labrador'),
('NT', 'Northwest Territories'),
('NT', 'Territoires du Nord-Ouest'),
('NS', 'Nouvelle-Écosse'),
('NS', 'Nova Scotia'),
('NU', 'Nunavut'),
('ON', 'Ontario'),
('PE', 'Prince Edward Island'),
('PE', 'Île-du-Prince-Édouard'),
('QC', 'Quebec'),
('QC', 'Québec'),
('SK', 'Saskatchewan'),
('YT', 'Yukon')]
Introduce new API
- address normalization,
- address latinization
Ignore case sensitive in postal codes
- Ignore case sensitive in postal codes,
- fix encoding issue in python 3.5,
- update validation data.
Fix city areas bug
Coverage 100% 🎊