Skip to content

Commit

Permalink
pyln: Migrate implementation from pylightning to pyln-client
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cdecker committed Nov 12, 2019
1 parent de91eda commit 81f7978
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions contrib/pylightning/lightning/__init__.py
@@ -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
1 change: 1 addition & 0 deletions contrib/pylightning/requirements.txt
@@ -0,0 +1 @@
pyln-client==0.7.3
4 changes: 3 additions & 1 deletion 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__ = [
"LightningRpc",
Expand Down
Expand Up @@ -5,7 +5,7 @@
from decimal import Decimal
from math import floor, log10

__version__ = "0.0.7.4"
__version__ = "0.7.3"


class RpcError(ValueError):
Expand Down
@@ -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
Expand Down
1 change: 0 additions & 1 deletion contrib/pyln-client/requirements.txt
@@ -1 +0,0 @@
pylightning==0.0.7.3
@@ -1,4 +1,4 @@
from lightning import Millisatoshi
from pyln.client import Millisatoshi


def test_sum_radd():
Expand Down
@@ -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

Expand Down
@@ -1,4 +1,4 @@
from lightning import Millisatoshi
from pyln.client import Millisatoshi


def test_to_approx_str():
Expand Down

0 comments on commit 81f7978

Please sign in to comment.