diff --git a/.travis.yml b/.travis.yml index 66a11e4d214cd3769481e2edcbca9f54ee58eeec..24d79acca1bba998f2fe946183da598ea118477d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -58,7 +58,7 @@ before_install: - pip install --upgrade wheel # Set numpy version first, other packages link against it - pip install six nose coverage codecov pytest pytest-cov coveralls codacy-coverage parameterized secp256k1prp cryptography scrypt - - pip install pycryptodomex ruamel.yaml appdirs pylibscrypt tox asn1crypto + - pip install pycryptodomex ruamel.yaml appdirs pylibscrypt tox asn1crypto diff_match_patch - pip install ecdsa requests websocket-client pytz six Click prettytable click_shell script: diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 7583dfa7324a098b167cd42260359e6de734ec22..650eb08ba290692b71daa06ed88e603e80aa8ef0 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,5 +1,9 @@ Changelog ========= +0.24.15 +------- +* Add diff_match_patch dependency, as the difflib implementation do not work + 0.24.14 ------- * Add option add_tor to config storage, which allows it to use beempy in tails diff --git a/appveyor.yml b/appveyor.yml index e18f6d341854342f0ac0b4596c5cf61c115a541c..71825690f04840586bda220b1b5943b4b380977a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -52,7 +52,7 @@ install: - cmd: conda install --yes conda-build setuptools pip parameterized cryptography - cmd: conda install --yes pycryptodomex ruamel.yaml pytest pytest-mock coverage mock appdirs pylibscrypt pywin32 - cmd: pip install scrypt -U -- cmd: conda install --yes ecdsa requests websocket-client pytz six Click prettytable pyinstaller click-shell asn1crypto +- cmd: conda install --yes ecdsa requests websocket-client pytz six Click prettytable pyinstaller click-shell diff_match_patch asn1crypto build_script: diff --git a/beem/utils.py b/beem/utils.py index 48af3ecdb7bd86e616c16a9d875ffa4a24d3b008..af863475188842706265a914b63a329000a80473 100644 --- a/beem/utils.py +++ b/beem/utils.py @@ -294,12 +294,12 @@ def remove_from_dict(obj, keys=list(), keep_keys=True): return {k: v for k, v in items if k not in keys} -def make_patch(a, b, n=3): - diffs = difflib.unified_diff(a.splitlines(True),b.splitlines(True),n=0) - try: _,_ = next(diffs),next(diffs) - except StopIteration: pass - # diffs = list(diffs); print(diffs) - return ''.join([d if d[-1] == '\n' else d+'\n' for d in diffs]) +def make_patch(a, b): + import diff_match_patch as dmp_module + dmp = dmp_module.diff_match_patch() + patch = dmp.patch_make(a, b) + patch_text = dmp.patch_toText(patch) + return patch_text def findall_patch_hunks(body=None): diff --git a/beem/version.py b/beem/version.py index fb2fa8f984126e3e37a679d4fca7eb69eb0be463..8406d0b878f0240b75699bb80d8f523d003fddb4 100644 --- a/beem/version.py +++ b/beem/version.py @@ -1,2 +1,2 @@ """THIS FILE IS GENERATED FROM beem SETUP.PY.""" -version = '0.24.14' +version = '0.24.15' diff --git a/beemapi/version.py b/beemapi/version.py index fb2fa8f984126e3e37a679d4fca7eb69eb0be463..8406d0b878f0240b75699bb80d8f523d003fddb4 100644 --- a/beemapi/version.py +++ b/beemapi/version.py @@ -1,2 +1,2 @@ """THIS FILE IS GENERATED FROM beem SETUP.PY.""" -version = '0.24.14' +version = '0.24.15' diff --git a/beembase/version.py b/beembase/version.py index fb2fa8f984126e3e37a679d4fca7eb69eb0be463..8406d0b878f0240b75699bb80d8f523d003fddb4 100644 --- a/beembase/version.py +++ b/beembase/version.py @@ -1,2 +1,2 @@ """THIS FILE IS GENERATED FROM beem SETUP.PY.""" -version = '0.24.14' +version = '0.24.15' diff --git a/beemgraphenebase/version.py b/beemgraphenebase/version.py index fb2fa8f984126e3e37a679d4fca7eb69eb0be463..8406d0b878f0240b75699bb80d8f523d003fddb4 100644 --- a/beemgraphenebase/version.py +++ b/beemgraphenebase/version.py @@ -1,2 +1,2 @@ """THIS FILE IS GENERATED FROM beem SETUP.PY.""" -version = '0.24.14' +version = '0.24.15' diff --git a/docs/requirements.txt b/docs/requirements.txt index cb480b035525c070127410814c4befe337fd0918..f5ef49ff8880647e7554435fd6fb8bb6ae0a974e 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -7,6 +7,7 @@ pytz pycryptodomex>=3.4.6 scrypt>=0.7.1 ruamel.yaml +diff_match_patch pytest pytest-mock coverage diff --git a/requirements-test.txt b/requirements-test.txt index ce77d1b8aa8787cb1dd575a034f53c126091a088..c20b9428a742d9438f773a2064bdc3f90c3a9459 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -28,4 +28,5 @@ tox codacy-coverage virtualenv codecov +diff_match_patch asn1crypto \ No newline at end of file diff --git a/setup.py b/setup.py index d8ee7485064dade8108d1e6457b91f81d25a6914..1ee9de4ff6911612e8e2ac4835a53182ec806c3a 100755 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ except LookupError: ascii = codecs.lookup('ascii') codecs.register(lambda name, enc=ascii: {True: enc}.get(name == 'mbcs')) -VERSION = '0.24.14' +VERSION = '0.24.15' tests_require = ['mock >= 2.0.0', 'pytest', 'pytest-mock', 'parameterized'] @@ -32,6 +32,7 @@ requires = [ "click_shell", "prettytable", "ruamel.yaml", + "diff_match_patch", "asn1crypto" ]