Browse Source

pyln: Migrate implementation from pylightning to pyln-client

This should not affect any consumer of the API since we just shift the actual
implementation from one side to the other, and keep aliases in place so
scripts don't break.

We also bump the version number from 0.0.7.3 to 0.7.4 which allows us to be in
sync with c-lightning itself, and remove the superfluous `0` in front.
travis-debug
Christian Decker 5 years ago
parent
commit
81f7978cc8
  1. 4
      Makefile
  2. 3
      contrib/pylightning/lightning/__init__.py
  3. 1
      contrib/pylightning/requirements.txt
  4. 4
      contrib/pyln-client/pyln/client/__init__.py
  5. 2
      contrib/pyln-client/pyln/client/lightning.py
  6. 2
      contrib/pyln-client/pyln/client/plugin.py
  7. 1
      contrib/pyln-client/requirements.txt
  8. 2
      contrib/pyln-client/tests/test_millisatoshi.py
  9. 4
      contrib/pyln-client/tests/test_plugin.py
  10. 2
      contrib/pyln-client/tests/test_units.py

4
Makefile

@ -263,7 +263,7 @@ ifeq ($(PYTEST),)
exit 1 exit 1
else else
# Explicitly hand DEVELOPER and VALGRIND so you can override on make cmd line. # Explicitly hand DEVELOPER and VALGRIND so you can override on make cmd line.
PYTHONPATH=`pwd`/contrib/pylightning:$$PYTHONPATH TEST_DEBUG=1 DEVELOPER=$(DEVELOPER) VALGRIND=$(VALGRIND) $(PYTEST) tests/ $(PYTEST_OPTS) PYTHONPATH=`pwd`/contrib/pyln-client:$$PYTHONPATH TEST_DEBUG=1 DEVELOPER=$(DEVELOPER) VALGRIND=$(VALGRIND) $(PYTEST) tests/ $(PYTEST_OPTS)
endif endif
# Keep includes in alpha order. # Keep includes in alpha order.
@ -316,7 +316,7 @@ check-python:
@# W503: line break before binary operator @# W503: line break before binary operator
@flake8 --ignore=E501,E731,W503 --exclude=contrib/pylightning/lightning/__init__.py ${PYSRC} @flake8 --ignore=E501,E731,W503 --exclude=contrib/pylightning/lightning/__init__.py ${PYSRC}
PYTHONPATH=contrib/pylightning:$$PYTHONPATH $(PYTEST) contrib/pylightning/ PYTHONPATH=contrib/pyln-client:$$PYTHONPATH $(PYTEST) contrib/pyln-client/
check-includes: check-includes:
@tools/check-includes.sh @tools/check-includes.sh

3
contrib/pylightning/lightning/__init__.py

@ -1,2 +1 @@
from .lightning import LightningRpc, RpcError, Millisatoshi, __version__ from pyln.client import LightningRpc, RpcError, Millisatoshi, __version__, Plugin, monkey_patch
from .plugin import Plugin, monkey_patch

1
contrib/pylightning/requirements.txt

@ -0,0 +1 @@
pyln-client==0.7.3

4
contrib/pyln-client/pyln/client/__init__.py

@ -1,4 +1,6 @@
from lightning import LightningRpc, Plugin, RpcError, Millisatoshi, __version__, monkey_patch from .lightning import LightningRpc, RpcError, Millisatoshi, __version__
from .plugin import Plugin, monkey_patch
__all__ = [ __all__ = [
"LightningRpc", "LightningRpc",

2
contrib/pylightning/lightning/lightning.py → contrib/pyln-client/pyln/client/lightning.py

@ -5,7 +5,7 @@ import warnings
from decimal import Decimal from decimal import Decimal
from math import floor, log10 from math import floor, log10
__version__ = "0.0.7.4" __version__ = "0.7.3"
class RpcError(ValueError): class RpcError(ValueError):

2
contrib/pylightning/lightning/plugin.py → contrib/pyln-client/pyln/client/plugin.py

@ -1,6 +1,6 @@
from collections import OrderedDict from collections import OrderedDict
from enum import Enum from enum import Enum
from lightning import LightningRpc, Millisatoshi from .lightning import LightningRpc, Millisatoshi
from threading import RLock from threading import RLock
import inspect import inspect

1
contrib/pyln-client/requirements.txt

@ -1 +0,0 @@
pylightning==0.0.7.3

2
contrib/pylightning/tests/test_millisatoshi.py → contrib/pyln-client/tests/test_millisatoshi.py

@ -1,4 +1,4 @@
from lightning import Millisatoshi from pyln.client import Millisatoshi
def test_sum_radd(): def test_sum_radd():

4
contrib/pylightning/tests/test_plugin.py → contrib/pyln-client/tests/test_plugin.py

@ -1,5 +1,5 @@
from lightning import Plugin from pyln.client import Plugin
from lightning.plugin import Request, Millisatoshi from pyln.client.plugin import Request, Millisatoshi
import itertools import itertools
import pytest import pytest

2
contrib/pylightning/tests/test_units.py → contrib/pyln-client/tests/test_units.py

@ -1,4 +1,4 @@
from lightning import Millisatoshi from pyln.client import Millisatoshi
def test_to_approx_str(): def test_to_approx_str():
Loading…
Cancel
Save