RSS feed

python-stdnum branch master updated. 1.7-2-g74c1721

[Date Prev][Date Next] [Thread Prev][Thread Next]

python-stdnum branch master updated. 1.7-2-g74c1721

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "python-stdnum".

The branch, master has been updated
       via  74c1721b5135ce4489d9585ea747200bbc3ad176 (commit)
       via  12cd072c599ac2fe34fc607a263368f29220e3ba (commit)
      from  4496ffe8d0d2e0b7767959af7f641bc949567995 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------

commit 74c1721b5135ce4489d9585ea747200bbc3ad176
Author: David Arnold <>
Date:   Fri Oct 13 20:27:45 2017 -0500

    Handle unicode arguments in get_cc_module()

diff --git a/stdnum/ b/stdnum/
index b04e2c0..7338557 100644
--- a/stdnum/
+++ b/stdnum/
@@ -23,11 +23,6 @@
 This module is meant for internal use by stdnum modules and is not
 guaranteed to remain stable and as such not part of the public API of
->>> get_cc_module('nl', 'vat').__name__
->>> get_cc_module('is', 'vat').__name__
 import pkgutil
@@ -164,7 +159,7 @@ def get_cc_module(cc, name):
     if cc in ('in', 'is', 'if'):
         cc += '_'
-        mod = __import__('stdnum.%s' % cc, globals(), locals(), [name])
+        mod = __import__('stdnum.%s' % cc, globals(), locals(), [str(name)])
         return getattr(mod, name, None)
     except ImportError:
diff --git a/tests/test_util.doctest b/tests/test_util.doctest
index 28674b7..c4dc072 100644
--- a/tests/test_util.doctest
+++ b/tests/test_util.doctest
@@ -48,3 +48,22 @@ The doctests should not be present in the descriptions.
 >>> any('>>>' in get_module_description(mod) for mod in get_number_modules())
+The get_cc_module() function can be used to find a country-specific
+validation module that can be used to validate the number format. It should
+handle aliases properly.
+>>> from stdnum.util import get_cc_module
+>>> get_cc_module('gb', 'vat').__name__
+>>> get_cc_module('nl', 'vat').__name__
+>>> get_cc_module('is', 'vat').__name__
+>>> get_cc_module(u'nl', u'vat').__name__
+>>> get_cc_module('unknown', 'vat') is None
+>>> get_cc_module('nl', 'unknown') is None

commit 12cd072c599ac2fe34fc607a263368f29220e3ba
Author: Arthur de Jong <>
Date:   Fri Sep 15 11:40:21 2017 +0200

    Fix spelling errors

diff --git a/stdnum/eu/ b/stdnum/eu/
index 8852cd1..8f1147b 100644
--- a/stdnum/eu/
+++ b/stdnum/eu/
@@ -23,10 +23,10 @@ This identifier is indicated in the ISO 20022 data element 
`Creditor Scheme
 Identification`. The creditor can be a legal entity, or an association that
 is not a legal entity, or a person.
-Ther first two digits contain the ISO country code, the nex two are check
+The first two digits contain the ISO country code, the next two are check
 digits for the ISO 7064 Mod 97, 10 checksum, the next tree contain the
-Creditor Bussines Code (or `ZZZ` if no bussness code used) and the remainder
-contain the country-specific identifier.
+Creditor Business Code (or `ZZZ` if no business code used) and the remainder
+contains the country-specific identifier.
 >>> validate('ES 23 ZZZ 47690558N')


Summary of changes:
 stdnum/eu/      |  6 +++---
 stdnum/          |  7 +------
 tests/test_util.doctest | 19 +++++++++++++++++++
 3 files changed, 23 insertions(+), 9 deletions(-)

To unsubscribe send an email to or see