[Python-modules-commits] [python-django-localflavor] 02/09: Import django-localflavor_1.2.orig.tar.gz

Orestis Ioannou oorestisime-guest at moszumanska.debian.org
Sat Nov 28 15:12:16 UTC 2015


This is an automated email from the git hooks/post-receive script.

oorestisime-guest pushed a commit to branch master
in repository python-django-localflavor.

commit a91bfb4ab0f4aba1c546a4d957910552f5c2fbb0
Author: Orestis Ioannou <orestis at oioannou.com>
Date:   Fri Nov 27 20:59:18 2015 +0100

    Import django-localflavor_1.2.orig.tar.gz
---
 PKG-INFO                                         |   10 +-
 README.rst                                       |    6 +-
 django_localflavor.egg-info/PKG-INFO             |   10 +-
 django_localflavor.egg-info/SOURCES.txt          |    6 +-
 docs/authors.rst                                 |    3 +-
 docs/changelog.rst                               |   45 +
 docs/conf.py                                     |    2 +-
 docs/extensions/promises.py                      |    8 +-
 localflavor/__init__.py                          |    2 +-
 localflavor/br/forms.py                          |   77 +-
 localflavor/ch/forms.py                          |   49 +-
 localflavor/cl/forms.py                          |    2 +-
 localflavor/ec/ec_provinces.py                   |    2 +-
 localflavor/ec/models.py                         |   19 +
 localflavor/ee/forms.py                          |   34 +-
 localflavor/es/forms.py                          |   16 +-
 localflavor/fr/forms.py                          |   22 +-
 localflavor/generic/checksums.py                 |   27 +-
 localflavor/generic/countries/iso_3166.py        |    1 +
 localflavor/generic/countries/sepa.py            |   14 +-
 localflavor/generic/forms.py                     |    4 +-
 localflavor/generic/validators.py                |   39 +-
 localflavor/gr/forms.py                          |    2 +
 localflavor/it/forms.py                          |    5 +-
 localflavor/locale/ar/LC_MESSAGES/django.mo      |  Bin 21038 -> 22727 bytes
 localflavor/locale/ar/LC_MESSAGES/django.po      |  117 +-
 localflavor/locale/az/LC_MESSAGES/django.mo      |  Bin 28011 -> 27908 bytes
 localflavor/locale/az/LC_MESSAGES/django.po      |   54 +-
 localflavor/locale/bg/LC_MESSAGES/django.mo      |  Bin 28233 -> 28079 bytes
 localflavor/locale/bg/LC_MESSAGES/django.po      |   54 +-
 localflavor/locale/bn/LC_MESSAGES/django.mo      |  Bin 703 -> 699 bytes
 localflavor/locale/bn/LC_MESSAGES/django.po      |  644 ++++--
 localflavor/locale/bs/LC_MESSAGES/django.mo      |  Bin 11064 -> 10967 bytes
 localflavor/locale/bs/LC_MESSAGES/django.po      |   54 +-
 localflavor/locale/ca/LC_MESSAGES/django.mo      |  Bin 23075 -> 22982 bytes
 localflavor/locale/ca/LC_MESSAGES/django.po      |   67 +-
 localflavor/locale/cs/LC_MESSAGES/django.mo      |  Bin 58570 -> 58483 bytes
 localflavor/locale/cs/LC_MESSAGES/django.po      |   54 +-
 localflavor/locale/cy/LC_MESSAGES/django.mo      |  Bin 3232 -> 3228 bytes
 localflavor/locale/cy/LC_MESSAGES/django.po      |   52 +-
 localflavor/locale/da/LC_MESSAGES/django.mo      |  Bin 16155 -> 16058 bytes
 localflavor/locale/da/LC_MESSAGES/django.po      |   54 +-
 localflavor/locale/de/LC_MESSAGES/django.mo      |  Bin 40787 -> 40673 bytes
 localflavor/locale/de/LC_MESSAGES/django.po      |   54 +-
 localflavor/locale/el/LC_MESSAGES/django.mo      |  Bin 25921 -> 25758 bytes
 localflavor/locale/el/LC_MESSAGES/django.po      |   54 +-
 localflavor/locale/en/LC_MESSAGES/django.mo      |  Bin 381 -> 381 bytes
 localflavor/locale/en/LC_MESSAGES/django.po      |  373 +++-
 localflavor/locale/en_GB/LC_MESSAGES/django.mo   |  Bin 515 -> 511 bytes
 localflavor/locale/en_GB/LC_MESSAGES/django.po   |  644 ++++--
 localflavor/locale/eo/LC_MESSAGES/django.mo      |  Bin 44931 -> 44835 bytes
 localflavor/locale/eo/LC_MESSAGES/django.po      |   54 +-
 localflavor/locale/es/LC_MESSAGES/django.mo      |  Bin 49464 -> 60784 bytes
 localflavor/locale/es/LC_MESSAGES/django.po      |  871 +++++---
 localflavor/locale/es_AR/LC_MESSAGES/django.mo   |  Bin 53475 -> 55196 bytes
 localflavor/locale/es_AR/LC_MESSAGES/django.po   |  112 +-
 localflavor/locale/es_MX/LC_MESSAGES/django.mo   |  Bin 22795 -> 22673 bytes
 localflavor/locale/es_MX/LC_MESSAGES/django.po   |   54 +-
 localflavor/locale/et/LC_MESSAGES/django.mo      |  Bin 29367 -> 29686 bytes
 localflavor/locale/et/LC_MESSAGES/django.po      |   71 +-
 localflavor/locale/eu/LC_MESSAGES/django.mo      |  Bin 23646 -> 23553 bytes
 localflavor/locale/eu/LC_MESSAGES/django.po      |   54 +-
 localflavor/locale/fa/LC_MESSAGES/django.mo      |  Bin 3790 -> 3786 bytes
 localflavor/locale/fa/LC_MESSAGES/django.po      |   52 +-
 localflavor/locale/fi/LC_MESSAGES/django.mo      |  Bin 13370 -> 13282 bytes
 localflavor/locale/fi/LC_MESSAGES/django.po      |   54 +-
 localflavor/locale/fr/LC_MESSAGES/django.mo      |  Bin 70765 -> 119692 bytes
 localflavor/locale/fr/LC_MESSAGES/django.po      | 2420 ++++++++++++----------
 localflavor/locale/ga/LC_MESSAGES/django.mo      |  Bin 21618 -> 21512 bytes
 localflavor/locale/ga/LC_MESSAGES/django.po      |   54 +-
 localflavor/locale/gl/LC_MESSAGES/django.mo      |  Bin 11287 -> 11181 bytes
 localflavor/locale/gl/LC_MESSAGES/django.po      |   54 +-
 localflavor/locale/he/LC_MESSAGES/django.mo      |  Bin 65987 -> 66191 bytes
 localflavor/locale/he/LC_MESSAGES/django.po      |   62 +-
 localflavor/locale/hi/LC_MESSAGES/django.mo      |  Bin 69194 -> 69040 bytes
 localflavor/locale/hi/LC_MESSAGES/django.po      |   54 +-
 localflavor/locale/hr/LC_MESSAGES/django.mo      |  Bin 12967 -> 12856 bytes
 localflavor/locale/hr/LC_MESSAGES/django.po      |   54 +-
 localflavor/locale/hu/LC_MESSAGES/django.mo      |  Bin 26075 -> 25958 bytes
 localflavor/locale/hu/LC_MESSAGES/django.po      |   54 +-
 localflavor/locale/id/LC_MESSAGES/django.mo      |  Bin 16924 -> 16816 bytes
 localflavor/locale/id/LC_MESSAGES/django.po      |   54 +-
 localflavor/locale/is/LC_MESSAGES/django.mo      |  Bin 5018 -> 5036 bytes
 localflavor/locale/is/LC_MESSAGES/django.po      |   54 +-
 localflavor/locale/it/LC_MESSAGES/django.mo      |  Bin 30275 -> 36387 bytes
 localflavor/locale/it/LC_MESSAGES/django.po      |  548 +++--
 localflavor/locale/ja/LC_MESSAGES/django.mo      |  Bin 21104 -> 20958 bytes
 localflavor/locale/ja/LC_MESSAGES/django.po      |   54 +-
 localflavor/locale/ka/LC_MESSAGES/django.mo      |  Bin 33932 -> 34186 bytes
 localflavor/locale/ka/LC_MESSAGES/django.po      |  394 +++-
 localflavor/locale/km/LC_MESSAGES/django.mo      |  Bin 708 -> 704 bytes
 localflavor/locale/km/LC_MESSAGES/django.po      |  644 ++++--
 localflavor/locale/kn/LC_MESSAGES/django.mo      |  Bin 777 -> 773 bytes
 localflavor/locale/kn/LC_MESSAGES/django.po      |  644 ++++--
 localflavor/locale/ko/LC_MESSAGES/django.mo      |  Bin 27597 -> 27482 bytes
 localflavor/locale/ko/LC_MESSAGES/django.po      |   54 +-
 localflavor/locale/lt/LC_MESSAGES/django.mo      |  Bin 40229 -> 40123 bytes
 localflavor/locale/lt/LC_MESSAGES/django.po      |   54 +-
 localflavor/locale/lv/LC_MESSAGES/django.mo      |  Bin 21071 -> 20965 bytes
 localflavor/locale/lv/LC_MESSAGES/django.po      |   54 +-
 localflavor/locale/mk/LC_MESSAGES/django.mo      |  Bin 52647 -> 52522 bytes
 localflavor/locale/mk/LC_MESSAGES/django.po      |   58 +-
 localflavor/locale/mn/LC_MESSAGES/django.mo      |  Bin 51391 -> 51929 bytes
 localflavor/locale/mn/LC_MESSAGES/django.po      |   82 +-
 localflavor/locale/nb/LC_MESSAGES/django.mo      |  Bin 57574 -> 57476 bytes
 localflavor/locale/nb/LC_MESSAGES/django.po      |   54 +-
 localflavor/locale/nl/LC_MESSAGES/django.mo      |  Bin 22930 -> 22837 bytes
 localflavor/locale/nl/LC_MESSAGES/django.po      |   54 +-
 localflavor/locale/nn/LC_MESSAGES/django.mo      |  Bin 12289 -> 12189 bytes
 localflavor/locale/nn/LC_MESSAGES/django.po      |   54 +-
 localflavor/locale/pa/LC_MESSAGES/django.mo      |  Bin 1860 -> 1856 bytes
 localflavor/locale/pa/LC_MESSAGES/django.po      |  646 ++++--
 localflavor/locale/pl/LC_MESSAGES/django.mo      |  Bin 23158 -> 23277 bytes
 localflavor/locale/pl/LC_MESSAGES/django.po      |  384 +++-
 localflavor/locale/pt/LC_MESSAGES/django.mo      |  Bin 12686 -> 12750 bytes
 localflavor/locale/pt/LC_MESSAGES/django.po      |   59 +-
 localflavor/locale/pt_BR/LC_MESSAGES/django.mo   |  Bin 34613 -> 34926 bytes
 localflavor/locale/pt_BR/LC_MESSAGES/django.po   |  393 +++-
 localflavor/locale/ro/LC_MESSAGES/django.mo      |  Bin 11631 -> 12746 bytes
 localflavor/locale/ro/LC_MESSAGES/django.po      |  420 +++-
 localflavor/locale/ru/LC_MESSAGES/django.mo      |  Bin 86306 -> 89331 bytes
 localflavor/locale/ru/LC_MESSAGES/django.po      |  167 +-
 localflavor/locale/sk/LC_MESSAGES/django.mo      |  Bin 33029 -> 32924 bytes
 localflavor/locale/sk/LC_MESSAGES/django.po      |   54 +-
 localflavor/locale/sl/LC_MESSAGES/django.mo      |  Bin 20518 -> 20409 bytes
 localflavor/locale/sl/LC_MESSAGES/django.po      |   54 +-
 localflavor/locale/sr/LC_MESSAGES/django.mo      |  Bin 2587 -> 2583 bytes
 localflavor/locale/sr/LC_MESSAGES/django.po      |  644 ++++--
 localflavor/locale/sr_Latn/LC_MESSAGES/django.mo |  Bin 2173 -> 2169 bytes
 localflavor/locale/sr_Latn/LC_MESSAGES/django.po |  644 ++++--
 localflavor/locale/sv/LC_MESSAGES/django.mo      |  Bin 25489 -> 29601 bytes
 localflavor/locale/sv/LC_MESSAGES/django.po      |  209 +-
 localflavor/locale/ta/LC_MESSAGES/django.mo      |  Bin 726 -> 722 bytes
 localflavor/locale/ta/LC_MESSAGES/django.po      |  644 ++++--
 localflavor/locale/te/LC_MESSAGES/django.mo      |  Bin 32222 -> 32046 bytes
 localflavor/locale/te/LC_MESSAGES/django.po      |   54 +-
 localflavor/locale/th/LC_MESSAGES/django.mo      |  Bin 37629 -> 37507 bytes
 localflavor/locale/th/LC_MESSAGES/django.po      |   54 +-
 localflavor/locale/tr/LC_MESSAGES/django.mo      |  Bin 71566 -> 75311 bytes
 localflavor/locale/tr/LC_MESSAGES/django.po      |  417 +++-
 localflavor/locale/uk/LC_MESSAGES/django.mo      |  Bin 43871 -> 43720 bytes
 localflavor/locale/uk/LC_MESSAGES/django.po      |   54 +-
 localflavor/locale/vi/LC_MESSAGES/django.mo      |  Bin 4886 -> 4776 bytes
 localflavor/locale/vi/LC_MESSAGES/django.po      |   54 +-
 localflavor/locale/zh_CN/LC_MESSAGES/django.mo   |  Bin 24670 -> 25080 bytes
 localflavor/locale/zh_CN/LC_MESSAGES/django.po   |   73 +-
 localflavor/locale/zh_TW/LC_MESSAGES/django.mo   |  Bin 32049 -> 31951 bytes
 localflavor/locale/zh_TW/LC_MESSAGES/django.po   |   54 +-
 localflavor/nz/nz_councils.py                    |    2 +-
 localflavor/pl/pl_administrativeunits.py         |    6 +-
 localflavor/pt/forms.py                          |   13 +-
 localflavor/ro/forms.py                          |   77 +-
 localflavor/ro/ro_counties.py                    |   34 +-
 localflavor/us/us_states.py                      |  232 ++-
 localflavor/za/forms.py                          |    2 +-
 setup.py                                         |    2 +
 tests/requirements.txt                           |    8 +-
 tests/settings.py                                |    3 +
 tests/test_br.py                                 |   33 +-
 tests/test_ch.py                                 |   24 +-
 tests/test_checksums.py                          |   24 +-
 tests/test_ec/__init__.py                        |    0
 tests/test_ec/forms.py                           |   11 +
 tests/test_ec/models.py                          |    7 +
 tests/{test_ec.py => test_ec/tests.py}           |   18 +-
 tests/test_ee.py                                 |   16 +-
 tests/test_fr.py                                 |   41 +-
 tests/test_generic.py                            |  103 +-
 tests/test_gr.py                                 |    4 +
 tests/test_it.py                                 |    4 +-
 tests/test_mk/tests.py                           |    4 +-
 tests/test_mx/tests.py                           |    4 +-
 tests/test_nl.py                                 |    3 +
 tests/test_pl.py                                 |    6 +-
 tests/test_ro.py                                 |   92 +-
 tests/test_tr.py                                 |    2 +-
 tests/test_us/tests.py                           |    4 +-
 tox.ini                                          |   11 +-
 178 files changed, 10777 insertions(+), 4701 deletions(-)

diff --git a/PKG-INFO b/PKG-INFO
index c972b91..1a08477 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: django-localflavor
-Version: 1.1
+Version: 1.2
 Summary: Country-specific Django helpers
 Home-page: http://django-localflavor.readthedocs.org/en/latest/
 Author: Django Software Foundation
@@ -10,14 +10,14 @@ Description: ==================
         django-localflavor
         ==================
         
-        .. image:: http://img.shields.io/pypi/v/django-localflavor.svg
+        .. image:: https://img.shields.io/pypi/v/django-localflavor.svg
            :target: https://pypi.python.org/pypi/django-localflavor
         
         .. image:: https://img.shields.io/travis/django/django-localflavor.svg
             :target: http://travis-ci.org/django/django-localflavor
         
-        .. image:: https://img.shields.io/coveralls/django/django-localflavor.svg
-           :target: https://coveralls.io/r/django/django-localflavor
+        .. image:: https://img.shields.io/codecov/c/github/django/django-localflavor/master.svg
+           :target: http://codecov.io/github/django/django-localflavor?branch=master
         
         .. image:: https://readthedocs.org/projects/django-localflavor/badge/?version=latest&style=plastic
            :target: http://django-localflavor.readthedocs.org/en/latest/
@@ -50,4 +50,6 @@ Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
 Classifier: Programming Language :: Python :: 3.2
 Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
 Classifier: Topic :: Internet :: WWW/HTTP
diff --git a/README.rst b/README.rst
index ac78835..9821db6 100644
--- a/README.rst
+++ b/README.rst
@@ -2,14 +2,14 @@
 django-localflavor
 ==================
 
-.. image:: http://img.shields.io/pypi/v/django-localflavor.svg
+.. image:: https://img.shields.io/pypi/v/django-localflavor.svg
    :target: https://pypi.python.org/pypi/django-localflavor
 
 .. image:: https://img.shields.io/travis/django/django-localflavor.svg
     :target: http://travis-ci.org/django/django-localflavor
 
-.. image:: https://img.shields.io/coveralls/django/django-localflavor.svg
-   :target: https://coveralls.io/r/django/django-localflavor
+.. image:: https://img.shields.io/codecov/c/github/django/django-localflavor/master.svg
+   :target: http://codecov.io/github/django/django-localflavor?branch=master
 
 .. image:: https://readthedocs.org/projects/django-localflavor/badge/?version=latest&style=plastic
    :target: http://django-localflavor.readthedocs.org/en/latest/
diff --git a/django_localflavor.egg-info/PKG-INFO b/django_localflavor.egg-info/PKG-INFO
index c972b91..1a08477 100644
--- a/django_localflavor.egg-info/PKG-INFO
+++ b/django_localflavor.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: django-localflavor
-Version: 1.1
+Version: 1.2
 Summary: Country-specific Django helpers
 Home-page: http://django-localflavor.readthedocs.org/en/latest/
 Author: Django Software Foundation
@@ -10,14 +10,14 @@ Description: ==================
         django-localflavor
         ==================
         
-        .. image:: http://img.shields.io/pypi/v/django-localflavor.svg
+        .. image:: https://img.shields.io/pypi/v/django-localflavor.svg
            :target: https://pypi.python.org/pypi/django-localflavor
         
         .. image:: https://img.shields.io/travis/django/django-localflavor.svg
             :target: http://travis-ci.org/django/django-localflavor
         
-        .. image:: https://img.shields.io/coveralls/django/django-localflavor.svg
-           :target: https://coveralls.io/r/django/django-localflavor
+        .. image:: https://img.shields.io/codecov/c/github/django/django-localflavor/master.svg
+           :target: http://codecov.io/github/django/django-localflavor?branch=master
         
         .. image:: https://readthedocs.org/projects/django-localflavor/badge/?version=latest&style=plastic
            :target: http://django-localflavor.readthedocs.org/en/latest/
@@ -50,4 +50,6 @@ Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
 Classifier: Programming Language :: Python :: 3.2
 Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
 Classifier: Topic :: Internet :: WWW/HTTP
diff --git a/django_localflavor.egg-info/SOURCES.txt b/django_localflavor.egg-info/SOURCES.txt
index 6cd2496..acecbba 100644
--- a/django_localflavor.egg-info/SOURCES.txt
+++ b/django_localflavor.egg-info/SOURCES.txt
@@ -124,6 +124,7 @@ localflavor/dk/forms.py
 localflavor/ec/__init__.py
 localflavor/ec/ec_provinces.py
 localflavor/ec/forms.py
+localflavor/ec/models.py
 localflavor/ee/__init__.py
 localflavor/ee/ee_counties.py
 localflavor/ee/forms.py
@@ -401,7 +402,6 @@ tests/test_co.py
 tests/test_cz.py
 tests/test_de.py
 tests/test_dk.py
-tests/test_ec.py
 tests/test_ee.py
 tests/test_es.py
 tests/test_fi.py
@@ -441,6 +441,10 @@ tests/test_au/__init__.py
 tests/test_au/forms.py
 tests/test_au/models.py
 tests/test_au/tests.py
+tests/test_ec/__init__.py
+tests/test_ec/forms.py
+tests/test_ec/models.py
+tests/test_ec/tests.py
 tests/test_mk/__init__.py
 tests/test_mk/forms.py
 tests/test_mk/models.py
diff --git a/docs/authors.rst b/docs/authors.rst
index 1aac711..8cdd410 100644
--- a/docs/authors.rst
+++ b/docs/authors.rst
@@ -3,6 +3,7 @@ Authors
 
 * Aaron Boman
 * Adrian Holovaty
+* Alex Butum
 * Alex Gaynor
 * Alex Hill
 * Alex Zhang
@@ -30,8 +31,8 @@ Authors
 * Jannis Leidel
 * Jérémie Ferry
 * Jocelyn Delalande
+* Johnny Lee Othon
 * Jonas Ghyllebert
-* Jocelyn Delalande
 * Joseph Kocherhans
 * Julien Phalip
 * Justin Bronn
diff --git a/docs/changelog.rst b/docs/changelog.rst
index 6e5cc9a..1497c60 100644
--- a/docs/changelog.rst
+++ b/docs/changelog.rst
@@ -1,6 +1,51 @@
 Changelog
 =========
 
+1.2   (2015-11-27)
+------------------
+
+New flavors:
+
+- None
+
+New fields for existing flavors:
+
+- Added form field for Estonian business registration codes
+  (`gh-135 <https://github.com/django/django-localflavor/pull/135>`_).
+- Added model field for Ecuadorian provinces
+  (`gh-138 <https://github.com/django/django-localflavor/pull/138>`_).
+- Added form field for Swiss Social Security numbers (
+  (`gh-155 <https://github.com/django/django-localflavor/pull/155>`_).
+- Added form field for Brazilian Legal Process numbers (Processo)
+  (`gh-163 <https://github.com/django/django-localflavor/pull/163>`_).
+
+Modifications to existing flavors:
+
+- Fixed misspelled Polish administrative unit names
+  (`gh-136 <https://github.com/django/django-localflavor/pull/136>`_).
+- Added Kosovo and Timor-Leste to list of IBAN countries
+  (`gh-139 <https://github.com/django/django-localflavor/pull/139>`_).
+- Fixed error in Romanian fiscal identity code (CIF) field when value has a trailing slash
+  (`gh-146 <https://github.com/django/django-localflavor/pull/146>`_).
+- Updated validation in Swiss postal code field to only accept values in the range 1000 - 9000
+  (`gh-154 <https://github.com/django/django-localflavor/pull/154>`_).
+- Added validator for International Article Number (EAN) to the generic module
+  (`gh-156 <https://github.com/django/django-localflavor/pull/156>`_).
+- Updated Italian social security number field to use 'tax code' in error message
+  (`gh-167 <https://github.com/django/django-localflavor/pull/167>`_).
+- Fixed error in Greek tax number code field when value has only alpha characters
+  (`gh-171 <https://github.com/django/django-localflavor/pull/171>`_).
+- Added stricter validation in the Brazilian Cadastro de Pessoas Físicas (CPF) field
+  (`gh-172 <https://github.com/django/django-localflavor/pull/172>`_).
+- Corrected Romanian counties choice names to use ș and ț (comma below)
+  (`gh-175 <https://github.com/django/django-localflavor/pull/175>`_).
+- Updated Brazilian postal code field to also accept values with XX.XXX-XXX and XXXXXXXX formats
+  (`gh-177 <https://github.com/django/django-localflavor/pull/177>`_).
+- Marked US state names for translation
+  (`gh-178 <https://github.com/django/django-localflavor/pull/178>`_).
+- Fixed French national identification number validation for people born before 1976 in Corsica
+  (`gh-186 <https://github.com/django/django-localflavor/pull/186>`_).
+
 1.1   (2014-12-10)
 ------------------
 
diff --git a/docs/conf.py b/docs/conf.py
index f54de1b..090166b 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -108,7 +108,7 @@ pygments_style = 'sphinx'
 
 # The theme to use for HTML and HTML Help pages.  See the documentation for
 # a list of builtin themes.
-html_theme = 'default'
+html_theme = 'classic'
 
 # Theme options are theme-specific and customize the look and feel of a theme
 # further.  For a list of options available for each theme, see the
diff --git a/docs/extensions/promises.py b/docs/extensions/promises.py
index f3e76fd..11cd995 100644
--- a/docs/extensions/promises.py
+++ b/docs/extensions/promises.py
@@ -6,7 +6,7 @@ except ImportError:
 
 from django.utils.functional import Promise
 
-from sphinx.util.inspect import safe_repr
+from sphinx.util.inspect import object_description
 
 list_or_tuple = lambda x: isinstance(x, (tuple, list))
 
@@ -33,7 +33,7 @@ def lazy_repr(obj):
 def setup(app):
     from sphinx.ext import autodoc
 
-    def lazy_safe_repr(object):
-        return safe_repr(lazy_repr(object))
+    def lazy_object_description(object):
+        return object_description(lazy_repr(object))
 
-    autodoc.safe_repr = lazy_safe_repr  # noqa
+    autodoc.object_description = lazy_object_description  # noqa
diff --git a/localflavor/__init__.py b/localflavor/__init__.py
index 439eb0c..64477cf 100644
--- a/localflavor/__init__.py
+++ b/localflavor/__init__.py
@@ -1 +1 @@
-__version__ = '1.1'
+__version__ = '1.2'
diff --git a/localflavor/br/forms.py b/localflavor/br/forms.py
index fa03dd7..c732a40 100644
--- a/localflavor/br/forms.py
+++ b/localflavor/br/forms.py
@@ -20,6 +20,13 @@ except ImportError:
 from .br_states import STATE_CHOICES
 
 phone_digits_re = re.compile(r'^(\d{2})[-\.]?(\d{4,5})[-\.]?(\d{4})$')
+cpf_digits_re = re.compile(r'^(\d{3})\.(\d{3})\.(\d{3})-(\d{2})$')
+cnpj_digits_re = re.compile(
+    r'^(\d{2})[.-]?(\d{3})[.-]?(\d{3})/(\d{4})-(\d{2})$'
+)
+process_digits_re = re.compile(
+    r'^(\d{7})-?(\d{2})\.?(\d{4})\.?(\d)\.?(\d{2})\.?(\d{4})$'
+)
 
 
 class BRZipCodeField(RegexField):
@@ -112,7 +119,6 @@ class BRCPFField(CharField):
     default_error_messages = {
         'invalid': _("Invalid CPF number."),
         'max_digits': _("This field requires at most 11 digits or 14 characters."),
-        'digits_only': _("This field requires only numbers."),
     }
 
     def __init__(self, max_length=14, min_length=11, *args, **kwargs):
@@ -128,11 +134,12 @@ class BRCPFField(CharField):
             return ''
         orig_value = value[:]
         if not value.isdigit():
-            value = re.sub("[-\. ]", "", value)
-        try:
-            int(value)
-        except ValueError:
-            raise ValidationError(self.error_messages['digits_only'])
+            cpf = cpf_digits_re.search(value)
+            if cpf:
+                value = ''.join(cpf.groups())
+            else:
+                raise ValidationError(self.error_messages['invalid'])
+
         if len(value) != 11:
             raise ValidationError(self.error_messages['max_digits'])
         orig_dv = value[-2:]
@@ -164,7 +171,6 @@ class BRCNPJField(Field):
     """
     default_error_messages = {
         'invalid': _("Invalid CNPJ number."),
-        'digits_only': _("This field requires only numbers."),
         'max_digits': _("This field requires at least 14 digits"),
     }
 
@@ -178,11 +184,12 @@ class BRCNPJField(Field):
             return ''
         orig_value = value[:]
         if not value.isdigit():
-            value = re.sub("[-/\.]", "", value)
-        try:
-            int(value)
-        except ValueError:
-            raise ValidationError(self.error_messages['digits_only'])
+            cnpj = cnpj_digits_re.search(value)
+            if cnpj:
+                value = ''.join(cnpj.groups())
+            else:
+                raise ValidationError(self.error_messages['invalid'])
+
         if len(value) != 14:
             raise ValidationError(self.error_messages['max_digits'])
         orig_dv = value[-2:]
@@ -197,3 +204,49 @@ class BRCNPJField(Field):
             raise ValidationError(self.error_messages['invalid'])
 
         return orig_value
+
+
+def mod_97_base10(value):
+    return 98 - ((value * 100 % 97) % 97)
+
+
+class BRProcessoField(CharField):
+    """
+    A form field that validates a Legal Process(Processo) number or a Legal Process string.
+    A Processo number is
+    compounded by NNNNNNN-DD.AAAA.J.TR.OOOO. The two DD digits are check digits.
+    More information:
+    http://www.cnj.jus.br/busca-atos-adm?documento=2748
+
+    .. versionadded:: 1.2
+    """
+    default_error_messages = {'invalid': _("Invalid Process number.")}
+
+    def __init__(self, max_length=25, min_length=20, *args, **kwargs):
+        super(BRProcessoField, self).__init__(max_length, min_length, *args, **kwargs)
+
+    def clean(self, value):
+        """
+        Value can be either a string in the format NNNNNNN-DD.AAAA.J.TR.OOOO or
+        an 20-digit number.
+        """
+        value = super(BRProcessoField, self).clean(value)
+        if value in EMPTY_VALUES:
+            return ''
+
+        orig_value = value[:]
+        if not value.isdigit():
+            process_number = process_digits_re.search(value)
+            if process_number:
+                value = ''.join(process_number.groups())
+            else:
+                raise ValidationError(self.error_messages['invalid'])
+
+        orig_dv = value[7:9]
+
+        value_without_digits = int(value[0:7] + value[9:])
+
+        if str(mod_97_base10(value_without_digits)).zfill(2) != orig_dv:
+            raise ValidationError(self.error_messages['invalid'])
+
+        return orig_value
diff --git a/localflavor/ch/forms.py b/localflavor/ch/forms.py
index 1fdcb08..81b8d73 100644
--- a/localflavor/ch/forms.py
+++ b/localflavor/ch/forms.py
@@ -6,32 +6,37 @@ from __future__ import absolute_import, unicode_literals
 
 import re
 
-from django.core.validators import EMPTY_VALUES
+from django.core.validators import EMPTY_VALUES, RegexValidator
 from django.forms import ValidationError
-from django.forms.fields import Field, RegexField, Select
+from django.forms.fields import CharField, Field, RegexField, Select
 from django.utils.encoding import smart_text
 from django.utils.translation import ugettext_lazy as _
 
 from .ch_states import STATE_CHOICES
+from ..generic import validators
 
-
+zip_re = re.compile(r'^[1-9]\d{3}$')
 id_re = re.compile(
     r"^(?P<idnumber>\w{8})(?P<pos9>(\d{1}|<))(?P<checksum>\d{1})$")
 phone_digits_re = re.compile(r'^0([1-9]{1})\d{8}$')
+ssn_re = re.compile(r'^756.\d{4}\.\d{4}\.\d{2}$')
 
 
 class CHZipCodeField(RegexField):
     """
     A form field that validates input as a Swiss zip code. Valid codes
-    consist of four digits.
+    consist of four digits ranging from 1XXX to 9XXX.
+
+    See:
+    http://en.wikipedia.org/wiki/Postal_codes_in_Switzerland_and_Liechtenstein
     """
+
     default_error_messages = {
-        'invalid': _('Enter a zip code in the format XXXX.'),
+        'invalid': _('Enter a valid postal code in the range and format 1XXX - 9XXX.'),
     }
 
     def __init__(self, max_length=None, min_length=None, *args, **kwargs):
-        super(CHZipCodeField, self).__init__(r'^\d{4}$',
-                                             max_length, min_length, *args, **kwargs)
+        super(CHZipCodeField, self).__init__(zip_re, max_length, min_length, *args, **kwargs)
 
 
 class CHPhoneNumberField(Field):
@@ -130,3 +135,33 @@ class CHIdentityCardNumberField(Field):
             raise ValidationError(self.error_messages['invalid'])
 
         return '%s%s%s' % (idnumber, pos9, checksum)
+
+
+class CHSocialSecurityNumberField(CharField):
+    """
+    A Swiss Social Security number (also known as the new AHV Number).
+
+    Checks the following rules to determine whether the number is valid:
+
+        * Conforms to the 756.XXXX.XXXX.XX
+        * Included checksums match calculated checksums
+
+    See:
+    http://de.wikipedia.org/wiki/Sozialversicherungsnummer#Versichertennummer
+
+    .. versionadded:: 1.2
+    """
+    default_error_messages = {
+        'invalid': _('Enter a valid Swiss Social Security number in 756.XXXX.XXXX.XX format.'),
+    }
+    default_validators = [
+        RegexValidator(regex=ssn_re),
+        validators.EANValidator(strip_nondigits=True),
+    ]
+
+    def run_validators(self, value):
+        try:
+            super(CHSocialSecurityNumberField, self).run_validators(value)
+        except ValidationError as errs:
+            # Deduplicate error messages, if any
+            raise ValidationError(list(set(errs.messages)))
diff --git a/localflavor/cl/forms.py b/localflavor/cl/forms.py
index 3a51ba4..011db5c 100644
--- a/localflavor/cl/forms.py
+++ b/localflavor/cl/forms.py
@@ -40,7 +40,7 @@ class CLRutField(RegexField):
         if 'strict' in kwargs:
             del kwargs['strict']
             super(CLRutField, self).__init__(r'^(\d{1,2}\.)?\d{3}\.\d{3}-[\dkK]$',
-                                             error_message=self.default_error_messages['strict'],
+                                             error_messages={'invalid': self.default_error_messages['strict']},
                                              *args, **kwargs)
         else:
             # In non-strict mode, accept RUTs that validate but do not exist in
diff --git a/localflavor/ec/ec_provinces.py b/localflavor/ec/ec_provinces.py
index 4bffe3a..bdcad90 100644
--- a/localflavor/ec/ec_provinces.py
+++ b/localflavor/ec/ec_provinces.py
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 from __future__ import unicode_literals
 
-#: A list of Ecuador departaments as `choices` in a formfield.
+#: A list of Ecuador provinces as `choices` in a formfield.
 PROVINCE_CHOICES = (
     ('A', 'Azuay'),
     ('B', 'Bolívar'),
diff --git a/localflavor/ec/models.py b/localflavor/ec/models.py
new file mode 100644
index 0000000..4ccea1a
--- /dev/null
+++ b/localflavor/ec/models.py
@@ -0,0 +1,19 @@
+from django.utils.translation import ugettext_lazy as _
+from django.db.models.fields import CharField
+
+from .ec_provinces import PROVINCE_CHOICES
+
+
+class ECProvinceField(CharField):
+    """
+    A model field that represents an Ecuadorian province and stores its
+    abbreviation.
+
+    .. versionadded:: 1.2
+    """
+    description = _("Ecuadorian province")
+
+    def __init__(self, *args, **kwargs):
+        kwargs['choices'] = PROVINCE_CHOICES
+        kwargs['max_length'] = 2
+        super(ECProvinceField, self).__init__(*args, **kwargs)
diff --git a/localflavor/ee/forms.py b/localflavor/ee/forms.py
index 4725764..b3d9c23 100644
--- a/localflavor/ee/forms.py
+++ b/localflavor/ee/forms.py
@@ -13,6 +13,7 @@ from .ee_counties import COUNTY_CHOICES
 
 idcode = re.compile(r'^([1-6])(\d\d)(\d\d)(\d\d)(?:\d{3})(\d)$')
 zipcode = re.compile(r'^[1-9]\d{4}$')
+bregcode = re.compile(r'^[1-9]\d{7}$')
 
 
 class EEZipCodeField(RegexField):
@@ -37,7 +38,7 @@ class EECountySelect(Select):
 
 
 class EEPersonalIdentificationCode(Field):
-    """A form field that validates input as a Estonian personal identification code.
+    """A form field that validates input as an Estonian personal identification code.
 
     See: https://www.riigiteataja.ee/akt/106032012004
     """
@@ -48,7 +49,7 @@ class EEPersonalIdentificationCode(Field):
 
     @staticmethod
     def ee_checksum(value):
-        """Takes a string of 10 digits as input, returns check digit."""
+        """Takes a string of digits as input, returns check digit."""
 
         for i in (1, 3):
             check = 0
@@ -88,3 +89,32 @@ class EEPersonalIdentificationCode(Field):
             raise ValidationError(self.error_messages['invalid'])
 
         return value
+
+
+class EEBusinessRegistryCode(Field):
+    """A form field that validates input as an
+    Estonian business registration code.
+
+    .. versionadded:: 1.2
+    """
+    default_error_messages = {
+        'invalid_format': _('Enter an 8-digit Estonian business registry code.'),
+        'invalid': _('Enter a valid Estonian business registry code.'),
+    }
+
+    def clean(self, value):
+        value = super(EEBusinessRegistryCode, self).clean(value)
+        if value in EMPTY_VALUES:
+            return ''
+        value = value.strip()
+
+        match = re.match(bregcode, value)
+        if not match:
+            raise ValidationError(self.error_messages['invalid_format'])
+
+        check = int(value[7])
+
+        if check != EEPersonalIdentificationCode.ee_checksum(value[:7]):
+            raise ValidationError(self.error_messages['invalid'])
+
+        return value
diff --git a/localflavor/es/forms.py b/localflavor/es/forms.py
index 131add7..54c78cd 100644
--- a/localflavor/es/forms.py
+++ b/localflavor/es/forms.py
@@ -106,7 +106,6 @@ class ESIdentityCardNumberField(RegexField):
         super(ESIdentityCardNumberField, self).clean(value)
         if value in EMPTY_VALUES:
             return ''
-        nif_get_checksum = lambda d: self.nif_control[int(d) % 23]
 
         value = value.upper().replace(' ', '').replace('-', '')
         m = re.match(self.id_card_pattern %
@@ -117,13 +116,13 @@ class ESIdentityCardNumberField(RegexField):
 
         if not letter1 and letter2:
             # NIF
-            if letter2 == nif_get_checksum(number):
+            if letter2 == self.nif_get_checksum(number):
                 return value
             else:
                 raise ValidationError(self.error_messages['invalid_nif'])
         elif letter1 in self.nie_types and letter2:
             # NIE
-            if letter2 == nif_get_checksum(number):
+            if letter2 == self.nif_get_checksum(number):
                 return value
             else:
                 raise ValidationError(self.error_messages['invalid_nie'])
@@ -139,6 +138,9 @@ class ESIdentityCardNumberField(RegexField):
         else:
             raise ValidationError(self.error_messages['invalid'])
 
+    def nif_get_checksum(self, d):
+        return self.nif_control[int(d) % 23]
+
 
 class ESCCCField(RegexField):
     """
@@ -176,16 +178,20 @@ class ESCCCField(RegexField):
         super(ESCCCField, self).clean(value)
         if value in EMPTY_VALUES:
             return ''
-        control_str = [1, 2, 4, 8, 5, 10, 9, 7, 3, 6]
         m = re.match(r'^(\d{4})[ -]?(\d{4})[ -]?(\d{2})[ -]?(\d{10})$', value)
         entity, office, checksum, account = m.groups()
-        get_checksum = lambda d: str(11 - sum([int(digit) * int(control) for digit, control in zip(d, control_str)]) % 11).replace('10', '1').replace('11', '0')
         if get_checksum('00' + entity + office) + get_checksum(account) == checksum:
             return value
         else:
             raise ValidationError(self.error_messages['checksum'])
 
 
+def get_checksum(d):
+    control_str = [1, 2, 4, 8, 5, 10, 9, 7, 3, 6]
+    digits = [int(digit) * int(control) for digit, control in zip(d, control_str)]
+    return str(11 - sum(digits) % 11).replace('10', '1').replace('11', '0')
+
+
 class ESRegionSelect(Select):
     """
     A Select widget that uses a list of spanish regions as its choices.
diff --git a/localflavor/fr/forms.py b/localflavor/fr/forms.py
index 8b0feb1..5d8bc2b 100644
--- a/localflavor/fr/forms.py
+++ b/localflavor/fr/forms.py
@@ -3,7 +3,6 @@
 FR-specific Form helpers
 """
 from __future__ import absolute_import, unicode_literals
-from django.utils.checksums import luhn
 
 import re
 
@@ -12,6 +11,7 @@ from django.forms import ValidationError
 from django.forms.fields import CharField, RegexField, Select
 from django.utils.encoding import smart_text
 from django.utils.translation import ugettext_lazy as _
+from localflavor.generic.checksums import luhn
 
 from .fr_department import DEPARTMENT_CHOICES_PER_REGION
 from .fr_region import REGION_CHOICES
@@ -134,7 +134,7 @@ class FRNationalIdentificationNumber(CharField):
     .. versionadded:: 1.1
     """
     default_error_messages = {
-        'invalid': _('Enter a valid French French National Identification number.'),
+        'invalid': _('Enter a valid French National Identification number.'),
     }
 
     def clean(self, value):
@@ -157,10 +157,20 @@ class FRNationalIdentificationNumber(CharField):
         person_unique_number = match.group('person_unique_number')
         control_key = int(match.group('control_key'))
 
-        # Department number 98 is for Monaco, 20 doesn't exist
-        if department_of_origin in ['98', '20']:
+        # Department number 98 is for Monaco
+        if department_of_origin == '98':
             raise ValidationError(self.error_messages['invalid'])
 
+        # Departments number 20, 2A and 2B represent Corsica
+        if department_of_origin in ['20', '2A', '2B']:
+            # For people born before 1976, Corsica number was 20
+            if int(year_of_birth) < 76 and department_of_origin != '20':
+                raise ValidationError(self.error_messages['invalid'])
+            # For people born from 1976, Corsica dep number is either 2A or 2B
+            if (int(year_of_birth) > 75 and
+                    department_of_origin not in ['2A', '2B']):
+                raise ValidationError(self.error_messages['invalid'])
+
         # Overseas department numbers starts with 97 and are 3 digits long
         if department_of_origin == '97':
             department_of_origin += commune_of_origin[:1]
@@ -179,8 +189,8 @@ class FRNationalIdentificationNumber(CharField):
             raise ValidationError(self.error_messages['invalid'])
 
         control_number = int(gender + year_of_birth + month_of_birth +
-                             department_of_origin.replace('A', '0').replace('B', '0')
-                             + commune_of_origin + person_unique_number)
+                             department_of_origin.replace('A', '0').replace('B', '0') +
+                             commune_of_origin + person_unique_number)
         if (97 - control_number % 97) == control_key:
             return value
         else:
diff --git a/localflavor/generic/checksums.py b/localflavor/generic/checksums.py
index 01c1e68..8c262d8 100644
--- a/localflavor/generic/checksums.py
+++ b/localflavor/generic/checksums.py
@@ -1,12 +1,12 @@
 """
 Common checksum routines.
 """
-
-__all__ = ['luhn']
-
 from django.utils import six
 
+__all__ = ['luhn', 'ean']
+
 LUHN_ODD_LOOKUP = (0, 2, 4, 6, 8, 1, 3, 5, 7, 9)  # sum_of_digits(index * 2)
+EAN_LOOKUP = (3, 1)
 
 
 def luhn(candidate):
@@ -23,3 +23,24 @@ def luhn(candidate):
         return ((evens + odds) % 10 == 0)
     except ValueError:  # Raised if an int conversion fails
         return False
+
+
+def ean(candidate):
+    """
+    Checks a candidate number for validity according to the EAN checksum calculation.
+    Note that this validator does not enforce any length checks (usually 13 or 8).
+
+    http://en.wikipedia.org/wiki/International_Article_Number_(EAN)
+    """
+    if not isinstance(candidate, six.string_types):
+        candidate = str(candidate)
+    if len(candidate) <= 1:
+        return False
+    given_number, given_checksum = candidate[:-1], candidate[-1]
+    try:
+        calculated_checksum = sum(
+            int(digit) * EAN_LOOKUP[i % 2] for i, digit in enumerate(reversed(given_number)))
+        calculated_checksum = 10 - (calculated_checksum % 10)
+        return str(calculated_checksum) == given_checksum
+    except ValueError:  # Raised if an int conversion fails
+        return False
diff --git a/localflavor/generic/countries/iso_3166.py b/localflavor/generic/countries/iso_3166.py
index e61f814..9bb4111 100644
--- a/localflavor/generic/countries/iso_3166.py
+++ b/localflavor/generic/countries/iso_3166.py
@@ -252,4 +252,5 @@ ISO_3166_1_ALPHA2_COUNTRY_CODES = (
     'ZA',  # South Africa
     'ZM',  # Zambia
     'ZW',  # Zimbabwe
+    'XK'   # Republic of Kosovo (user-assigned country code)
 )
diff --git a/localflavor/generic/countries/sepa.py b/localflavor/generic/countries/sepa.py
index 9f17849..4e4b4b3 100644
--- a/localflavor/generic/countries/sepa.py
+++ b/localflavor/generic/countries/sepa.py
@@ -1,35 +1,33 @@
 # -*- coding: utf-8 -*-
 
-#: European Payments Council list of SEPA scheme countries as of 23 Jan 2014.
+#: European Payments Council list of SEPA scheme countries as of 2 Sep 2015.
 #: http://www.europeanpaymentscouncil.eu/index.cfm/knowledge-bank/epc-documents/epc-list-of-sepa-scheme-countries/
 IBAN_SEPA_COUNTRIES = (
     'AT',  # Austria
     'BE',  # Belgium
     'BG',  # Bulgaria
-    'ES',  # Canary Islands
-    'HR',  # Croatia
     'CH',  # Switzerland
     'CY',  # Cyprus
     'CZ',  # Czech Republic
     'DE',  # Germany
     'DK',  # Denmark
     'EE',  # Estonia
-    'ES',  # Spain
+    'ES',  # Spain + Canary Islands
     'FI',  # Finland + Åland Islands
-    'FR',  # France +  French Guiana, Guadeloupe, Martinique, Mayotte, Réunion, Saint Barthélemy,
-           #           Saint Martin (French part), Saint Pierre and Miquelon
-           #
+    'FR',  # France + French Guiana, Guadeloupe, Martinique, Mayotte, Réunion, Saint Barthélemy,
+           #          Saint Martin (French part), Saint Pierre and Miquelon
     'GB',  # United Kingdom
     'GI',  # Gibraltar
     'GR',  # Greece
+    'HR',  # Croatia
     'HU',  # Hungary
     'IE',  # Ireland
     'IS',  # Iceland
     'IT',  # Italy
-    'LV',  # Latvia
     'LI',  # Liechtenstein
     'LT',  # Lithuania
     'LU',  # Luxembourg
+    'LV',  # Latvia
     'MC',  # Monaco
     'MT',  # Malta
     'NL',  # Netherlands
diff --git a/localflavor/generic/forms.py b/localflavor/generic/forms.py
index 0051a2d..831f1cb 100644
--- a/localflavor/generic/forms.py
+++ b/localflavor/generic/forms.py
@@ -92,9 +92,7 @@ class IBANFormField(forms.CharField):
 
     def to_python(self, value):
         value = super(IBANFormField, self).to_python(value)
-        if value is not None:
-            return value.upper().replace(' ', '').replace('-', '')
-        return value
+        return value.upper().replace(' ', '').replace('-', '')
 
     def prepare_value(self, value):
         """ The display format for IBAN has a space every 4 characters. """
diff --git a/localflavor/generic/validators.py b/localflavor/generic/validators.py
index 570681a..00ad654 100644
--- a/localflavor/generic/validators.py
+++ b/localflavor/generic/validators.py
@@ -1,19 +1,30 @@
 # -*- coding: utf-8 -*-
 from __future__ import unicode_literals
 
... 32443 lines suppressed ...

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-django-localflavor.git



More information about the Python-modules-commits mailing list