Repository: palantir/python-jsonrpc-server

Issue:
Module name conflict
This project uses the same module name `jsonrpc` as another older project. This causes conflicts when packaging it up for distributions, and possibly with pip. I recommend changing the module name to `jsonrpc-server` if possible.

https://github.com/pavlov99/json-rpc
https://github.com/palantir/python-jsonrpc-server

Discussion:

Patch:
diff --git a/.coveragerc b/.coveragerc
index 9a8d922..3c72498 100644
--- a/.coveragerc
+++ b/.coveragerc
@@ -1,2 +1,2 @@
 [run]
-omit = jsonrpc/_version.py
+omit = pyls_jsonrpc/_version.py
diff --git a/MANIFEST.in b/MANIFEST.in
index eccfe3c..5d2f193 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,3 +1,3 @@
 include README.rst
 include versioneer.py
-include jsonrpc/_version.py
+include pyls_jsonrpc/_version.py
diff --git a/examples/langserver.py b/examples/langserver.py
index b510839..45a04a5 100644
--- a/examples/langserver.py
+++ b/examples/langserver.py
@@ -3,7 +3,7 @@ import logging
 
 from tornado import web, ioloop, websocket
 
-from jsonrpc import dispatchers, endpoint
+from pyls_jsonrpc import dispatchers, endpoint
 
 log = logging.getLogger(__name__)
 
diff --git a/examples/langserver_ext.py b/examples/langserver_ext.py
index 5989e26..99ff073 100644
--- a/examples/langserver_ext.py
+++ b/examples/langserver_ext.py
@@ -5,7 +5,7 @@ import threading
 
 from tornado import ioloop, process, web, websocket
 
-from jsonrpc import streams
+from pyls_jsonrpc import streams
 
 log = logging.getLogger(__name__)
 
diff --git a/jsonrpc/__init__.py b/pyls_jsonrpc/__init__.py
similarity index 100%
rename from jsonrpc/__init__.py
rename to pyls_jsonrpc/__init__.py
diff --git a/jsonrpc/_version.py b/pyls_jsonrpc/_version.py
similarity index 99%
rename from jsonrpc/_version.py
rename to pyls_jsonrpc/_version.py
index 15cdffa..63c42a0 100644
--- a/jsonrpc/_version.py
+++ b/pyls_jsonrpc/_version.py
@@ -43,7 +43,7 @@ def get_config():
     cfg.style = "pep440"
     cfg.tag_prefix = ""
     cfg.parentdir_prefix = ""
-    cfg.versionfile_source = "jsonrpc/_version.py"
+    cfg.versionfile_source = "pyls_jsonrpc/_version.py"
     cfg.verbose = False
     return cfg
 
diff --git a/jsonrpc/dispatchers.py b/pyls_jsonrpc/dispatchers.py
similarity index 100%
rename from jsonrpc/dispatchers.py
rename to pyls_jsonrpc/dispatchers.py
diff --git a/jsonrpc/endpoint.py b/pyls_jsonrpc/endpoint.py
similarity index 100%
rename from jsonrpc/endpoint.py
rename to pyls_jsonrpc/endpoint.py
diff --git a/jsonrpc/exceptions.py b/pyls_jsonrpc/exceptions.py
similarity index 100%
rename from jsonrpc/exceptions.py
rename to pyls_jsonrpc/exceptions.py
diff --git a/jsonrpc/streams.py b/pyls_jsonrpc/streams.py
similarity index 100%
rename from jsonrpc/streams.py
rename to pyls_jsonrpc/streams.py
diff --git a/setup.cfg b/setup.cfg
index 4d7d168..1fe4912 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,7 +1,7 @@
 [versioneer]
 VCS = git
 style = pep440
-versionfile_source = jsonrpc/_version.py
-versionfile_build = jsonrpc/_version.py
+versionfile_source = pyls_jsonrpc/_version.py
+versionfile_build = pyls_jsonrpc/_version.py
 tag_prefix =
 parentdir_prefix =
diff --git a/tox.ini b/tox.ini
index 5110b7b..ec07144 100644
--- a/tox.ini
+++ b/tox.ini
@@ -15,7 +15,7 @@ exclude = test/plugins/.ropeproject,test/.ropeproject
 testpaths = test
 addopts =
     --cov-report html --cov-report term --junitxml=pytest.xml
-    --cov jsonrpc --cov test
+    --cov pyls_jsonrpc --cov test
 
 [testenv]
 commands =
@@ -34,6 +34,6 @@ deps =
     pyflakes
     pylint
 commands =
-    pylint jsonrpc test
-    pycodestyle jsonrpc test
-    pyflakes jsonrpc test
+    pylint pyls_jsonrpc test
+    pycodestyle pyls_jsonrpc test
+    pyflakes pyls_jsonrpc test


Test patch:
diff --git a/test/test_endpoint.py b/test/test_endpoint.py
index 97620ec..658da0c 100644
--- a/test/test_endpoint.py
+++ b/test/test_endpoint.py
@@ -4,8 +4,8 @@ import time
 import mock
 import pytest
 
-from jsonrpc import exceptions
-from jsonrpc.endpoint import Endpoint
+from pyls_jsonrpc import exceptions
+from pyls_jsonrpc.endpoint import Endpoint
 
 MSG_ID = 'id'
 
diff --git a/test/test_streams.py b/test/test_streams.py
index 6f0830e..dc3d79e 100644
--- a/test/test_streams.py
+++ b/test/test_streams.py
@@ -4,7 +4,7 @@ from io import BytesIO
 import mock
 import pytest
 
-from jsonrpc.streams import JsonRpcStreamReader, JsonRpcStreamWriter
+from pyls_jsonrpc.streams import JsonRpcStreamReader, JsonRpcStreamWriter
 
 
 @pytest.fixture()