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.
This commit is contained in:
Christian Decker
2019-10-26 16:42:58 +02:00
parent de91eda36d
commit 81f7978cc8
10 changed files with 13 additions and 12 deletions

View File

@@ -263,7 +263,7 @@ ifeq ($(PYTEST),)
exit 1
else
# 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
# Keep includes in alpha order.
@@ -316,7 +316,7 @@ check-python:
@# W503: line break before binary operator
@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:
@tools/check-includes.sh

View File

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

View File

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

View File

@@ -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__ = [
"LightningRpc",

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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