lists.arthurdejong.org
RSS feed

python-stdnum branch master updated. 1.7-27-g6d7ba46

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

python-stdnum branch master updated. 1.7-27-g6d7ba46



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  6d7ba46f9e15d19a5519a9960f90904b0bbcac0f (commit)
       via  db7be063b9867428f15de558adc28eecef8a919e (commit)
      from  8107f08f9cc0b0aba2329e9bd874d37abc760499 (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 -----------------------------------------------------------------
https://arthurdejong.org/git/python-stdnum/commit/?id=6d7ba46f9e15d19a5519a9960f90904b0bbcac0f

commit 6d7ba46f9e15d19a5519a9960f90904b0bbcac0f
Author: Arthur de Jong <arthur@arthurdejong.org>
Date:   Mon Jan 1 16:29:19 2018 +0100

    Add a Travis configuration file

diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..a3c3ad2
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,18 @@
+language: python
+cache: pip
+sudo: false
+python:
+  - 2.6
+  - 2.7
+  - 3.4
+  - 3.5
+  - 3.6
+  - pypy
+matrix:
+  include:
+  - python: 3.5
+    env: TOXENV=flake8
+  - python: 3.5
+    env: TOXENV=docs
+install: pip install tox
+script: tox -e "${TOXENV:-$(echo py$TRAVIS_PYTHON_VERSION | tr -d . | sed -e 
's/pypypy/pypy/')}"

https://arthurdejong.org/git/python-stdnum/commit/?id=db7be063b9867428f15de558adc28eecef8a919e

commit db7be063b9867428f15de558adc28eecef8a919e
Author: Arthur de Jong <arthur@arthurdejong.org>
Date:   Mon Jan 1 15:57:55 2018 +0100

    Fix Python 2.6 compatibility

diff --git a/stdnum/do/ncf.py b/stdnum/do/ncf.py
index 9f37a4c..cfdb890 100644
--- a/stdnum/do/ncf.py
+++ b/stdnum/do/ncf.py
@@ -94,9 +94,9 @@ def _convert_result(result):  # pragma: no cover
         'RNC': 'rnc',
         'NCF': 'ncf',
     }
-    return {
-        translation.get(key, key): value
-        for key, value in json.loads(result.replace('\t', '\\t')).items()}
+    return dict(
+        (translation.get(key, key), value)
+        for key, value in json.loads(result.replace('\t', '\\t')).items())
 
 
 def check_dgii(rnc, ncf):  # pragma: no cover
diff --git a/stdnum/do/rnc.py b/stdnum/do/rnc.py
index 0e0fde9..140bc2d 100644
--- a/stdnum/do/rnc.py
+++ b/stdnum/do/rnc.py
@@ -110,9 +110,9 @@ def _convert_result(result):  # pragma: no cover
         'ESTATUS': 'status',
         'RNUM': 'result_number',
     }
-    return {
-        translation.get(key, key): value
-        for key, value in json.loads(result.replace('\t', '\\t')).items()}
+    return dict(
+        (translation.get(key, key), value)
+        for key, value in json.loads(result.replace('\t', '\\t')).items())
 
 
 def check_dgii(number):  # pragma: no cover
diff --git a/tox.ini b/tox.ini
index 4529ddf..43dbd96 100644
--- a/tox.ini
+++ b/tox.ini
@@ -9,6 +9,10 @@ commands = nosetests
 setenv=
     PYTHONWARNINGS=all
 
+[testenv:py26]
+usedevelop = True
+commands = nosetests --ignore-file="test_.*.py"
+
 [testenv:flake8]
 skip_install = true
 deps = flake8

-----------------------------------------------------------------------

Summary of changes:
 .travis.yml      | 18 ++++++++++++++++++
 stdnum/do/ncf.py |  6 +++---
 stdnum/do/rnc.py |  6 +++---
 tox.ini          |  4 ++++
 4 files changed, 28 insertions(+), 6 deletions(-)
 create mode 100644 .travis.yml


hooks/post-receive
-- 
python-stdnum
-- 
To unsubscribe send an email to
python-stdnum-commits-unsubscribe@lists.arthurdejong.org or see
https://lists.arthurdejong.org/python-stdnum-commits/