From 1e13a6b1e85aeadb5d2f3ffe46579605378c376f Mon Sep 17 00:00:00 2001 From: Farhan Attamimi Date: Thu, 1 Mar 2018 14:06:42 -0800 Subject: [PATCH 1/3] test: use sourcegraph/flask dependency to lock version of werkzeug in flask --- .gitmodules | 2 +- test/repos/flask | 2 +- test/test_flask.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index 11dde38..d823c39 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "test/repos/flask"] path = test/repos/flask - url = git@github.com:pallets/flask.git + url = git@github.com:sourcegraph/flask.git [submodule "test/repos/cpython"] path = test/repos/cpython url = git@github.com:python/cpython.git diff --git a/test/repos/flask b/test/repos/flask index 45c8fb3..7bd3ad2 160000 --- a/test/repos/flask +++ b/test/repos/flask @@ -1 +1 @@ -Subproject commit 45c8fb3f3fea9cc2599438e751906f509e19f0e2 +Subproject commit 7bd3ad270e255f21a88a376a631463bdb9901646 diff --git a/test/test_flask.py b/test/test_flask.py index 6e5559e..462be31 100644 --- a/test/test_flask.py +++ b/test/test_flask.py @@ -4,7 +4,7 @@ flask_workspace = Harness("repos/flask") flask_workspace.initialize( - "git://github.com/pallets/flask?" + str(uuid.uuid4())) + "git://github.com/sourcegraph/flask?" + str(uuid.uuid4())) def test_x_packages(): From fd76c4e651a33e1d743956e98a35b338fe111a16 Mon Sep 17 00:00:00 2001 From: Farhan Attamimi Date: Thu, 1 Mar 2018 14:40:53 -0800 Subject: [PATCH 2/3] Add .python-version file to set python version to 3.6.4 --- .python-version | 1 + 1 file changed, 1 insertion(+) create mode 100644 .python-version diff --git a/.python-version b/.python-version new file mode 100644 index 0000000..0f44168 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.6.4 From 03fe123ae6bbdc5195e19732661acd7e4bc922e6 Mon Sep 17 00:00:00 2001 From: Farhan Attamimi Date: Thu, 1 Mar 2018 14:57:30 -0800 Subject: [PATCH 3/3] Update README --- README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e83b79e..2d05447 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,8 @@ This is a language server for Python that adheres to the [Language Server Protoc You'll need Python version 3.6 or greater or [pyenv](https://github.com/pyenv/pyenv) installed. You will also need [pipenv](https://github.com/pypa/pipenv) installed: -1. `pipenv install` -2. `pipenv run python python-langserver.py --mode=tcp --addr=2087` +1. `pipenv install` +2. `pipenv run python python-langserver.py --mode=tcp --addr=2087` To try it in [Visual Studio Code](https://code.visualstudio.com), install the [vscode-client](https://github.com/sourcegraph/langserver/tree/master/vscode-client) extension and then open up a `.py` file. @@ -20,3 +20,11 @@ To try it in [Visual Studio Code](https://code.visualstudio.com), install the [v Run `make test`. The tests require `pytest`. Note that some tests may fail if you're using `virtualenv` instead of the system Python. + +Ensure you're using the correct Python version for this project (3.6.4). Using an incorrect version may cause local failures for tests related to the Python standard library. Use [`pyenv`](https://github.com/pyenv/pyenv) to easily switch to the correct version: + +``` +pyenv install +pyenv local # should show 3.6.4 +pyenv version # should show 3.6.4 - you're good to go! +```