From dacf4c3c5db2a356a67532a706f2ffe505d5c06f Mon Sep 17 00:00:00 2001 From: Andrew Seier Date: Fri, 13 Mar 2015 01:50:34 -0700 Subject: [PATCH 01/32] Use `pyenv global` to set version. --- circle.yml | 8 ++++---- circle/setup.sh | 2 +- circle/test.sh | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/circle.yml b/circle.yml index 74a2f68584a..80124e4b51d 100644 --- a/circle.yml +++ b/circle.yml @@ -11,10 +11,10 @@ dependencies: # run all the pre-written installers (this will take a *while*) - bash circle/setup.sh # install testing tools for circle's version of things - - PYENV_VERSION=2.7 && pip install nose coverage + - pyenv global 2.7 && pip install nose coverage override: - - PYENV_VERSION=2.7 && pip install -I . - - PYENV_VERSION=2.7 && cd ~ && python -c "import plotly" + - pyenv global 2.7 && pip install -I . + - pyenv global 2.7 && cd ~ && python -c "import plotly" test: override: @@ -28,6 +28,6 @@ test: # - sudo chmod 600 ${PLOTLY_CONFIG_DIR} && python -c "import plotly" # test core things in the general 2.7 version that circle has - - PYENV_VERSION=2.7 && nosetests -xv plotly/tests --with-coverage --cover-package=plotly + - pyenv global 2.7 && nosetests -xv plotly/tests --with-coverage --cover-package=plotly - mkdir "${CIRCLE_ARTIFACTS}/2.7" || true - coverage html -d "${CIRCLE_ARTIFACTS}/2.7" --title=2.7 diff --git a/circle/setup.sh b/circle/setup.sh index d5e715dc95b..f7912674746 100644 --- a/circle/setup.sh +++ b/circle/setup.sh @@ -17,7 +17,7 @@ for version in ${PLOTLY_PYTHON_VERSIONS[@]}; do echo Setting up Python ${version} # exporting this variable (in this scope) chooses the python version - export PYENV_VERSION=${version} + pyenv global ${version} echo "Using pyenv version $(pyenv version)" # install core requirements all versions need diff --git a/circle/test.sh b/circle/test.sh index 11dd86c60d1..ed1947bc97e 100644 --- a/circle/test.sh +++ b/circle/test.sh @@ -17,7 +17,7 @@ for version in ${PLOTLY_PYTHON_VERSIONS[@]}; do echo Testing Python ${version} # exporting this variable (in this scope) chooses the python version - export PYENV_VERSION=${version} + pyenv global ${version} echo "Using pyenv version $(pyenv version)" echo "install plotly (ignoring possibly cached versions)" From f8af6da7a9c3e025cae6d85113e56e62ddff2bb4 Mon Sep 17 00:00:00 2001 From: Andrew Seier Date: Fri, 13 Mar 2015 02:11:21 -0700 Subject: [PATCH 02/32] explicitly use current python to show version --- circle/test.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/circle/test.sh b/circle/test.sh index ed1947bc97e..f367768cbb6 100644 --- a/circle/test.sh +++ b/circle/test.sh @@ -20,6 +20,9 @@ for version in ${PLOTLY_PYTHON_VERSIONS[@]}; do pyenv global ${version} echo "Using pyenv version $(pyenv version)" + echo "python -c 'import sys; print(sys.version_info)' yields:" + python -c 'import sys; print(sys.version_info)' + echo "install plotly (ignoring possibly cached versions)" pip install -I ${PLOTLY_PACKAGE_ROOT} || error_exit "${LINENO}: can't install plotly package from project root" From 4c4575702b094a957f565b7cf5e7bbcd49a79b26 Mon Sep 17 00:00:00 2001 From: Andrew Seier Date: Fri, 13 Mar 2015 02:16:02 -0700 Subject: [PATCH 03/32] =?UTF-8?q?attempt=20to=20set=20pyenv=20locally=20as?= =?UTF-8?q?=20well=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- circle/setup.sh | 1 + circle/test.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/circle/setup.sh b/circle/setup.sh index f7912674746..f92e38107c6 100644 --- a/circle/setup.sh +++ b/circle/setup.sh @@ -18,6 +18,7 @@ for version in ${PLOTLY_PYTHON_VERSIONS[@]}; do # exporting this variable (in this scope) chooses the python version pyenv global ${version} + pyenv local ${version} echo "Using pyenv version $(pyenv version)" # install core requirements all versions need diff --git a/circle/test.sh b/circle/test.sh index f367768cbb6..79ecc31a365 100644 --- a/circle/test.sh +++ b/circle/test.sh @@ -18,6 +18,7 @@ for version in ${PLOTLY_PYTHON_VERSIONS[@]}; do # exporting this variable (in this scope) chooses the python version pyenv global ${version} + pyenv local ${version} echo "Using pyenv version $(pyenv version)" echo "python -c 'import sys; print(sys.version_info)' yields:" From 4abfbe39a86c8d94ab27a6641cb57a4c207c6133 Mon Sep 17 00:00:00 2001 From: Andrew Seier Date: Fri, 13 Mar 2015 02:20:38 -0700 Subject: [PATCH 04/32] attempt to use pyenv shell to set version. --- circle/setup.sh | 1 + circle/test.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/circle/setup.sh b/circle/setup.sh index f92e38107c6..1ac53e67d25 100644 --- a/circle/setup.sh +++ b/circle/setup.sh @@ -19,6 +19,7 @@ for version in ${PLOTLY_PYTHON_VERSIONS[@]}; do # exporting this variable (in this scope) chooses the python version pyenv global ${version} pyenv local ${version} + pyenv shell ${version} echo "Using pyenv version $(pyenv version)" # install core requirements all versions need diff --git a/circle/test.sh b/circle/test.sh index 79ecc31a365..27fdd186b01 100644 --- a/circle/test.sh +++ b/circle/test.sh @@ -19,6 +19,7 @@ for version in ${PLOTLY_PYTHON_VERSIONS[@]}; do # exporting this variable (in this scope) chooses the python version pyenv global ${version} pyenv local ${version} + pyenv shell ${version} echo "Using pyenv version $(pyenv version)" echo "python -c 'import sys; print(sys.version_info)' yields:" From af527abe100303834cc989d92b2520f3e4886409 Mon Sep 17 00:00:00 2001 From: Andrew Seier Date: Fri, 13 Mar 2015 02:34:52 -0700 Subject: [PATCH 05/32] =?UTF-8?q?ok,=20all=20levels=20of=20pyenv=20are=20n?= =?UTF-8?q?ow=20set=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- circle/setup.sh | 1 + circle/test.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/circle/setup.sh b/circle/setup.sh index 1ac53e67d25..4d5787829c6 100644 --- a/circle/setup.sh +++ b/circle/setup.sh @@ -20,6 +20,7 @@ for version in ${PLOTLY_PYTHON_VERSIONS[@]}; do pyenv global ${version} pyenv local ${version} pyenv shell ${version} + export PYENV_VERSION=${version} echo "Using pyenv version $(pyenv version)" # install core requirements all versions need diff --git a/circle/test.sh b/circle/test.sh index 27fdd186b01..2ab9e7397fc 100644 --- a/circle/test.sh +++ b/circle/test.sh @@ -20,6 +20,7 @@ for version in ${PLOTLY_PYTHON_VERSIONS[@]}; do pyenv global ${version} pyenv local ${version} pyenv shell ${version} + export PYENV_VERSION=${version} echo "Using pyenv version $(pyenv version)" echo "python -c 'import sys; print(sys.version_info)' yields:" From 382cf6cff2be0705b5f609f4f61acb7a2b78d293 Mon Sep 17 00:00:00 2001 From: Andrew Seier Date: Fri, 13 Mar 2015 02:45:45 -0700 Subject: [PATCH 06/32] =?UTF-8?q?Revert=20"ok,=20all=20levels=20of=20pyenv?= =?UTF-8?q?=20are=20now=20set=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit af527abe100303834cc989d92b2520f3e4886409. --- circle/setup.sh | 1 - circle/test.sh | 1 - 2 files changed, 2 deletions(-) diff --git a/circle/setup.sh b/circle/setup.sh index 4d5787829c6..1ac53e67d25 100644 --- a/circle/setup.sh +++ b/circle/setup.sh @@ -20,7 +20,6 @@ for version in ${PLOTLY_PYTHON_VERSIONS[@]}; do pyenv global ${version} pyenv local ${version} pyenv shell ${version} - export PYENV_VERSION=${version} echo "Using pyenv version $(pyenv version)" # install core requirements all versions need diff --git a/circle/test.sh b/circle/test.sh index 2ab9e7397fc..27fdd186b01 100644 --- a/circle/test.sh +++ b/circle/test.sh @@ -20,7 +20,6 @@ for version in ${PLOTLY_PYTHON_VERSIONS[@]}; do pyenv global ${version} pyenv local ${version} pyenv shell ${version} - export PYENV_VERSION=${version} echo "Using pyenv version $(pyenv version)" echo "python -c 'import sys; print(sys.version_info)' yields:" From 4d22b0f2ce22fcda4a093fa5dcf36d95df0521e2 Mon Sep 17 00:00:00 2001 From: Andrew Seier Date: Fri, 13 Mar 2015 02:46:00 -0700 Subject: [PATCH 07/32] Revert "attempt to use pyenv shell to set version." This reverts commit 4abfbe39a86c8d94ab27a6641cb57a4c207c6133. --- circle/setup.sh | 1 - circle/test.sh | 1 - 2 files changed, 2 deletions(-) diff --git a/circle/setup.sh b/circle/setup.sh index 1ac53e67d25..f92e38107c6 100644 --- a/circle/setup.sh +++ b/circle/setup.sh @@ -19,7 +19,6 @@ for version in ${PLOTLY_PYTHON_VERSIONS[@]}; do # exporting this variable (in this scope) chooses the python version pyenv global ${version} pyenv local ${version} - pyenv shell ${version} echo "Using pyenv version $(pyenv version)" # install core requirements all versions need diff --git a/circle/test.sh b/circle/test.sh index 27fdd186b01..79ecc31a365 100644 --- a/circle/test.sh +++ b/circle/test.sh @@ -19,7 +19,6 @@ for version in ${PLOTLY_PYTHON_VERSIONS[@]}; do # exporting this variable (in this scope) chooses the python version pyenv global ${version} pyenv local ${version} - pyenv shell ${version} echo "Using pyenv version $(pyenv version)" echo "python -c 'import sys; print(sys.version_info)' yields:" From 087ee62b8d903b9c089606d4d1af9364aaa1d637 Mon Sep 17 00:00:00 2001 From: Andrew Seier Date: Fri, 13 Mar 2015 02:46:19 -0700 Subject: [PATCH 08/32] =?UTF-8?q?Revert=20"attempt=20to=20set=20pyenv=20lo?= =?UTF-8?q?cally=20as=20well=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 4c4575702b094a957f565b7cf5e7bbcd49a79b26. --- circle/setup.sh | 1 - circle/test.sh | 1 - 2 files changed, 2 deletions(-) diff --git a/circle/setup.sh b/circle/setup.sh index f92e38107c6..f7912674746 100644 --- a/circle/setup.sh +++ b/circle/setup.sh @@ -18,7 +18,6 @@ for version in ${PLOTLY_PYTHON_VERSIONS[@]}; do # exporting this variable (in this scope) chooses the python version pyenv global ${version} - pyenv local ${version} echo "Using pyenv version $(pyenv version)" # install core requirements all versions need diff --git a/circle/test.sh b/circle/test.sh index 79ecc31a365..f367768cbb6 100644 --- a/circle/test.sh +++ b/circle/test.sh @@ -18,7 +18,6 @@ for version in ${PLOTLY_PYTHON_VERSIONS[@]}; do # exporting this variable (in this scope) chooses the python version pyenv global ${version} - pyenv local ${version} echo "Using pyenv version $(pyenv version)" echo "python -c 'import sys; print(sys.version_info)' yields:" From f25a603772f1eeb1dc3bad90f2695120669b2d0c Mon Sep 17 00:00:00 2001 From: Andrew Seier Date: Fri, 13 Mar 2015 02:46:36 -0700 Subject: [PATCH 09/32] Revert "Use `pyenv global` to set version." This reverts commit dacf4c3c5db2a356a67532a706f2ffe505d5c06f. --- circle.yml | 8 ++++---- circle/setup.sh | 2 +- circle/test.sh | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/circle.yml b/circle.yml index 80124e4b51d..74a2f68584a 100644 --- a/circle.yml +++ b/circle.yml @@ -11,10 +11,10 @@ dependencies: # run all the pre-written installers (this will take a *while*) - bash circle/setup.sh # install testing tools for circle's version of things - - pyenv global 2.7 && pip install nose coverage + - PYENV_VERSION=2.7 && pip install nose coverage override: - - pyenv global 2.7 && pip install -I . - - pyenv global 2.7 && cd ~ && python -c "import plotly" + - PYENV_VERSION=2.7 && pip install -I . + - PYENV_VERSION=2.7 && cd ~ && python -c "import plotly" test: override: @@ -28,6 +28,6 @@ test: # - sudo chmod 600 ${PLOTLY_CONFIG_DIR} && python -c "import plotly" # test core things in the general 2.7 version that circle has - - pyenv global 2.7 && nosetests -xv plotly/tests --with-coverage --cover-package=plotly + - PYENV_VERSION=2.7 && nosetests -xv plotly/tests --with-coverage --cover-package=plotly - mkdir "${CIRCLE_ARTIFACTS}/2.7" || true - coverage html -d "${CIRCLE_ARTIFACTS}/2.7" --title=2.7 diff --git a/circle/setup.sh b/circle/setup.sh index f7912674746..d5e715dc95b 100644 --- a/circle/setup.sh +++ b/circle/setup.sh @@ -17,7 +17,7 @@ for version in ${PLOTLY_PYTHON_VERSIONS[@]}; do echo Setting up Python ${version} # exporting this variable (in this scope) chooses the python version - pyenv global ${version} + export PYENV_VERSION=${version} echo "Using pyenv version $(pyenv version)" # install core requirements all versions need diff --git a/circle/test.sh b/circle/test.sh index f367768cbb6..3fb4d16ac9a 100644 --- a/circle/test.sh +++ b/circle/test.sh @@ -17,7 +17,7 @@ for version in ${PLOTLY_PYTHON_VERSIONS[@]}; do echo Testing Python ${version} # exporting this variable (in this scope) chooses the python version - pyenv global ${version} + export PYENV_VERSION=${version} echo "Using pyenv version $(pyenv version)" echo "python -c 'import sys; print(sys.version_info)' yields:" From ed6860badda78362ef2a13efba5f4ba9ac7eedd8 Mon Sep 17 00:00:00 2001 From: Andrew Seier Date: Fri, 13 Mar 2015 03:36:09 -0700 Subject: [PATCH 10/32] serve up some additional info in circle --- circle/test.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/circle/test.sh b/circle/test.sh index 3fb4d16ac9a..92ee5ab2799 100644 --- a/circle/test.sh +++ b/circle/test.sh @@ -23,6 +23,12 @@ for version in ${PLOTLY_PYTHON_VERSIONS[@]}; do echo "python -c 'import sys; print(sys.version_info)' yields:" python -c 'import sys; print(sys.version_info)' + echo "python -c 'import os; print(os.getenv('\''PYENV_VERSION'\''))'" + python -c 'import os; print(os.getenv('\''PYENV_VERSION'\''))' + + echo "current env" + env + echo "install plotly (ignoring possibly cached versions)" pip install -I ${PLOTLY_PACKAGE_ROOT} || error_exit "${LINENO}: can't install plotly package from project root" From 8bba7d3bc55fe90aab8d8c2da0cdcd14aae1d54a Mon Sep 17 00:00:00 2001 From: Andrew Seier Date: Fri, 13 Mar 2015 03:49:04 -0700 Subject: [PATCH 11/32] Ensure that shims for PYENV are first in path! --- circle/setup.sh | 3 +++ circle/test.sh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/circle/setup.sh b/circle/setup.sh index d5e715dc95b..979370a33c1 100644 --- a/circle/setup.sh +++ b/circle/setup.sh @@ -12,6 +12,9 @@ function error_exit exit 1 } +# PYENV shims need to be infront of the rest of the path to work! +export PATH="/home/ubuntu/.pyenv/shims:$PATH" + # for each version we want, setup a functional virtual environment for version in ${PLOTLY_PYTHON_VERSIONS[@]}; do echo Setting up Python ${version} diff --git a/circle/test.sh b/circle/test.sh index 92ee5ab2799..eb65c1ae75f 100644 --- a/circle/test.sh +++ b/circle/test.sh @@ -12,6 +12,9 @@ function error_exit exit 1 } +# PYENV shims need to be infront of the rest of the path to work! +export PATH="/home/ubuntu/.pyenv/shims:$PATH" + # for each version we want, setup a functional virtual environment for version in ${PLOTLY_PYTHON_VERSIONS[@]}; do echo Testing Python ${version} From cf8048adf08ef6cf87d2afe6226b329852788aba Mon Sep 17 00:00:00 2001 From: Andrew Seier Date: Fri, 13 Mar 2015 04:00:06 -0700 Subject: [PATCH 12/32] No need to set PYENV_VERSION for `system`. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since each command runs in a new shell, and the path looks for system Python *first*, setting PYENV_VERSION here doesn’t even do anything. It was looking at the system Python 2.7 because that’s the default `python` bin. --- circle.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/circle.yml b/circle.yml index 74a2f68584a..486ee6bbb40 100644 --- a/circle.yml +++ b/circle.yml @@ -11,10 +11,11 @@ dependencies: # run all the pre-written installers (this will take a *while*) - bash circle/setup.sh # install testing tools for circle's version of things - - PYENV_VERSION=2.7 && pip install nose coverage + - pip install nose coverage override: - - PYENV_VERSION=2.7 && pip install -I . - - PYENV_VERSION=2.7 && cd ~ && python -c "import plotly" + - pip install -I . + # we need to cd out of the project root to ensure the install worked + - cd ~ && python -c "import plotly" test: override: @@ -28,6 +29,6 @@ test: # - sudo chmod 600 ${PLOTLY_CONFIG_DIR} && python -c "import plotly" # test core things in the general 2.7 version that circle has - - PYENV_VERSION=2.7 && nosetests -xv plotly/tests --with-coverage --cover-package=plotly + - nosetests -xv plotly/tests --with-coverage --cover-package=plotly - mkdir "${CIRCLE_ARTIFACTS}/2.7" || true - coverage html -d "${CIRCLE_ARTIFACTS}/2.7" --title=2.7 From 7c3bac6e26eed5503be05d709960d0782ddf9ddf Mon Sep 17 00:00:00 2001 From: Andrew Seier Date: Fri, 13 Mar 2015 04:42:47 -0700 Subject: [PATCH 13/32] =?UTF-8?q?just=20override=20dependencies,=20don?= =?UTF-8?q?=E2=80=99t=20bother=20with=20pre?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- circle.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/circle.yml b/circle.yml index 486ee6bbb40..eb027a66956 100644 --- a/circle.yml +++ b/circle.yml @@ -7,13 +7,15 @@ machine: PLOTLY_OPTIONAL_REQUIREMENTS_FILE: ${PLOTLY_PACKAGE_ROOT}/optional-requirements.txt PLOTLY_OPTIONAL_REQUIREMENTS_FILE_2_6: ${PLOTLY_PACKAGE_ROOT}/optional-requirements-2-6.txt dependencies: - pre: + override: + # run all the pre-written installers (this will take a *while*) - bash circle/setup.sh + # install testing tools for circle's version of things - pip install nose coverage - override: - pip install -I . + # we need to cd out of the project root to ensure the install worked - cd ~ && python -c "import plotly" test: From 26b1b5113fbe5e70a020f485e67c2b8c8b5a974d Mon Sep 17 00:00:00 2001 From: Andrew Seier Date: Fri, 13 Mar 2015 04:47:38 -0700 Subject: [PATCH 14/32] fix skipIf python 2.6 test failure. --- .../test_get_figure/test_get_figure.py | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/plotly/tests/test_core/test_get_figure/test_get_figure.py b/plotly/tests/test_core/test_get_figure/test_get_figure.py index 0fc86f49241..80f28d656d1 100644 --- a/plotly/tests/test_core/test_get_figure/test_get_figure.py +++ b/plotly/tests/test_core/test_get_figure/test_get_figure.py @@ -13,7 +13,8 @@ import json from unittest import TestCase -from unittest import skipIf + +version = six.sys.version_info[:2] # need this for conditional testing # username for tests: 'plotlyimagetest' @@ -198,12 +199,18 @@ def test_all(): class TestBytesVStrings(TestCase): - @skipIf(not six.PY3, 'Decoding and missing escapes is only seen in PY3') - def test_proper_escaping(self): - un = 'PlotlyImageTest' - ak = '786r5mecv0' - url = "https://plot.ly/~PlotlyImageTest/91/" - py.sign_in(un, ak) - print("getting: https://plot.ly/~PlotlyImageTest/91/") - print("###########################################\n\n") - fig = py.get_figure(url) + # unittest `skipIf` not supported in 2.6 + if version < (2, 7) or (2, 7) < version < (3, 3): + pass + else: + from unittest import skipIf + + @skipIf(not six.PY3, 'Decoding and missing escapes only seen in PY3') + def test_proper_escaping(self): + un = 'PlotlyImageTest' + ak = '786r5mecv0' + url = "https://plot.ly/~PlotlyImageTest/91/" + py.sign_in(un, ak) + print("getting: https://plot.ly/~PlotlyImageTest/91/") + print("###########################################\n\n") + fig = py.get_figure(url) From 64b8abba09de82dea73c7deb7d8b18c310025464 Mon Sep 17 00:00:00 2001 From: Andrew Seier Date: Fri, 13 Mar 2015 06:11:09 -0700 Subject: [PATCH 15/32] Introduce more flexible strict JSON implementation The previous version was impossible to maintain across different json versions. --- plotly/utils.py | 87 ++++++++++++++++++++----------------------------- 1 file changed, 35 insertions(+), 52 deletions(-) diff --git a/plotly/utils.py b/plotly/utils.py index e948a07507f..c8a38aceabc 100644 --- a/plotly/utils.py +++ b/plotly/utils.py @@ -6,7 +6,6 @@ """ -import json import os.path import sys import threading @@ -32,6 +31,11 @@ except ImportError: _sage_imported = False +if sys.version[:3] == '2.6': + import simplejson as json +else: + import json + ### incase people are using threading, we lock file reads lock = threading.Lock() @@ -124,66 +128,45 @@ class PlotlyJSONEncoder(json.JSONEncoder): version. """ + def coerce_to_strict(self, const): + """ + This is used to ultimately *encode* into strict JSON, see `encode` - # we want stricter JSON, so convert NaN, Inf, -Inf --> 'null' - nan_str = inf_str = neg_inf_str = 'null' - - # uses code from official python json.encoder module. Same licence applies. - def iterencode(self, o, _one_shot=False): """ - Encode the given object and yield each string - representation as available. + # before python 2.7, 'true', 'false', 'null', were include here. + if const in ('Infinity', '-Infinity', 'NaN'): + return None + else: + return const - For example:: + def encode(self, o): + """ + Load and then dump the result using parse_constant kwarg - for chunk in JSONEncoder().iterencode(bigobject): - mysocket.write(chunk) + Note that setting invalid separators will cause a failure at this step. """ - if self.check_circular: - markers = {} - else: - markers = None - if self.ensure_ascii: - _encoder = json.encoder.encode_basestring_ascii - else: - _encoder = json.encoder.encode_basestring - if self.encoding != 'utf-8': - def _encoder(o, _orig_encoder=_encoder, _encoding=self.encoding): - if isinstance(o, str): - o = o.decode(_encoding) - return _orig_encoder(o) - - def floatstr(o, allow_nan=self.allow_nan, - _repr=json.encoder.FLOAT_REPR, _inf=json.encoder.INFINITY, - _neginf=-json.encoder.INFINITY): - # Check for specials. Note that this type of test is processor - # and/or platform-specific, so do tests which don't depend on the - # internals. - - # *any* two NaNs are not equivalent (even to itself) try: - # float('NaN') == float('NaN') - if o != o: - text = self.nan_str - elif o == _inf: - text = self.inf_str - elif o == _neginf: - text = self.neg_inf_str - else: - return _repr(o) - if not allow_nan: - raise ValueError( - "Out of range float values are not JSON compliant: " + - repr(o)) + # this will raise errors in a normal-expected way + encoded_o = super(PlotlyJSONEncoder, self).encode(o) - return text + # now: + # 1. `loads` to switch Infinity, -Infinity, NaN to None + # 2. `dumps` again so you get 'null' instead of extended JSON + try: + new_o = json.loads(encoded_o, parse_constant=self.coerce_to_strict) + except ValueError: - _iterencode = json.encoder._make_iterencode( - markers, self.default, _encoder, self.indent, floatstr, - self.key_separator, self.item_separator, self.sort_keys, - self.skipkeys, _one_shot) - return _iterencode(o, 0) + # invalid separators will fail here. raise a helpful exception + raise ValueError( + "Encoding into strict JSON failed. Did you set the separators " + "valid JSON separators?" + ) + else: + return json.dumps(new_o, sort_keys=self.sort_keys, + indent=self.indent, + separators=(self.item_separator, + self.key_separator)) def default(self, obj): """ From a912e2aff49b56763176cfffe26a9b159f0e373e Mon Sep 17 00:00:00 2001 From: Andrew Seier Date: Fri, 13 Mar 2015 06:12:33 -0700 Subject: [PATCH 16/32] safely import simplejson for python 2.6 --- plotly/exceptions.py | 7 ++++++- plotly/grid_objs/grid_objs.py | 8 ++++++-- plotly/plotly/plotly.py | 6 +++++- plotly/tests/test_core/test_get_figure/test_get_figure.py | 1 - .../test_core/test_get_requests/test_get_requests.py | 7 ++++++- plotly/tests/test_core/test_utils/test_utils.py | 7 ++++++- plotly/widgets/graph_widget.py | 8 +++++++- 7 files changed, 36 insertions(+), 8 deletions(-) diff --git a/plotly/exceptions.py b/plotly/exceptions.py index c98e630fc58..c57599a30a8 100644 --- a/plotly/exceptions.py +++ b/plotly/exceptions.py @@ -15,9 +15,14 @@ """ -import json +import sys import six +if sys.version[:3] == '2.6': + import simplejson as json +else: + import json + ## Base Plotly Error ## class PlotlyError(Exception): diff --git a/plotly/grid_objs/grid_objs.py b/plotly/grid_objs/grid_objs.py index fcba45d4df9..8dc8faaab90 100644 --- a/plotly/grid_objs/grid_objs.py +++ b/plotly/grid_objs/grid_objs.py @@ -5,12 +5,16 @@ """ from __future__ import absolute_import - -import json +import sys from collections import MutableSequence from plotly import exceptions from plotly import utils +if sys.version[:3] == '2.6': + import simplejson as json +else: + import json + __all__ = None diff --git a/plotly/plotly/plotly.py b/plotly/plotly/plotly.py index b2e44e19ce0..72b5ee42644 100644 --- a/plotly/plotly/plotly.py +++ b/plotly/plotly/plotly.py @@ -17,7 +17,6 @@ from __future__ import absolute_import import sys -import json import warnings import copy import os @@ -30,6 +29,11 @@ else: from urllib.parse import urlparse +if sys.version[:3] == '2.6': + import simplejson as json +else: + import json + from plotly.plotly import chunked_requests from plotly import utils from plotly import tools diff --git a/plotly/tests/test_core/test_get_figure/test_get_figure.py b/plotly/tests/test_core/test_get_figure/test_get_figure.py index 80f28d656d1..85a92d264a4 100644 --- a/plotly/tests/test_core/test_get_figure/test_get_figure.py +++ b/plotly/tests/test_core/test_get_figure/test_get_figure.py @@ -10,7 +10,6 @@ from plotly import exceptions from nose.tools import raises import six -import json from unittest import TestCase diff --git a/plotly/tests/test_core/test_get_requests/test_get_requests.py b/plotly/tests/test_core/test_get_requests/test_get_requests.py index c40f15a951d..473fcd15ceb 100644 --- a/plotly/tests/test_core/test_get_requests/test_get_requests.py +++ b/plotly/tests/test_core/test_get_requests/test_get_requests.py @@ -8,8 +8,13 @@ import requests import copy -import json import six +import sys + +if sys.version[:3] == '2.6': + import simplejson as json +else: + import json default_headers = {'plotly-username': '', 'plotly-apikey': '', diff --git a/plotly/tests/test_core/test_utils/test_utils.py b/plotly/tests/test_core/test_utils/test_utils.py index 5f0a62d88ed..94be40b3949 100644 --- a/plotly/tests/test_core/test_utils/test_utils.py +++ b/plotly/tests/test_core/test_utils/test_utils.py @@ -1,8 +1,13 @@ -import json +import sys from unittest import TestCase from plotly.utils import PlotlyJSONEncoder +if sys.version[:3] == '2.6': + import simplejson as json +else: + import json + class TestJSONEncoder(TestCase): diff --git a/plotly/widgets/graph_widget.py b/plotly/widgets/graph_widget.py index 22c5c28434f..89e22769170 100644 --- a/plotly/widgets/graph_widget.py +++ b/plotly/widgets/graph_widget.py @@ -1,6 +1,6 @@ from collections import deque -import json import uuid +import sys # TODO: protected imports? from IPython.html import widgets @@ -11,6 +11,12 @@ from plotly.graph_objs import Figure from pkg_resources import resource_string +# even though python 2.6 wouldn't be able to run *any* of this... +if sys.version[:3] == '2.6': + import simplejson as json +else: + import json + # Load JS widget code # No officially recommended way to do this in any other way # http://mail.scipy.org/pipermail/ipython-dev/2014-April/013835.html From 785c72368089a354b663e60aa4847da47bcbf9b6 Mon Sep 17 00:00:00 2001 From: Andrew Seier Date: Fri, 13 Mar 2015 06:20:34 -0700 Subject: [PATCH 17/32] Try to cache all the hard work done in deps. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Circle seems to trash the things installed in the pyenv environments… --- circle.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/circle.yml b/circle.yml index eb027a66956..f4909428b1d 100644 --- a/circle.yml +++ b/circle.yml @@ -18,6 +18,9 @@ dependencies: # we need to cd out of the project root to ensure the install worked - cd ~ && python -c "import plotly" + + cache_directories: + - "~/.pyenv/versions" # attempt to just cache installed pyenv things test: override: From a7aa45f64499207390f9f75007d8d03613e4540a Mon Sep 17 00:00:00 2001 From: Andrew Seier Date: Fri, 13 Mar 2015 06:34:08 -0700 Subject: [PATCH 18/32] Fix Python 3 attribute error in test. --- plotly/exceptions.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plotly/exceptions.py b/plotly/exceptions.py index c57599a30a8..ff25df04427 100644 --- a/plotly/exceptions.py +++ b/plotly/exceptions.py @@ -54,7 +54,10 @@ def __init__(self, requests_exception): elif content_type == 'text/plain': self.message = requests_exception.response.content else: - self.message = requests_exception.message + try: + self.message = requests_exception.message + except AttributeError: + self.message = 'unknown error' def __str__(self): return self.message From 42a7dd8cd3effa414d54752d8eb3131c72daf3d6 Mon Sep 17 00:00:00 2001 From: Andrew Seier Date: Fri, 13 Mar 2015 06:46:31 -0700 Subject: [PATCH 19/32] print(x) vs print x fix for python 3. --- plotly/tests/test_optional/test_utils/test_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plotly/tests/test_optional/test_utils/test_utils.py b/plotly/tests/test_optional/test_utils/test_utils.py index a1450913860..d46231f85f8 100644 --- a/plotly/tests/test_optional/test_utils/test_utils.py +++ b/plotly/tests/test_optional/test_utils/test_utils.py @@ -248,7 +248,7 @@ def test_pandas_json_encoding(): def test_numpy_masked_json_encoding(): l = [1, 2, np.ma.core.masked] j1 = json.dumps(l, cls=utils.PlotlyJSONEncoder) - print j1 + print(j1) assert(j1 == '[1, 2, null]') assert(set(l) == set([1, 2, np.ma.core.masked])) From 68999fea1a35faff9deba132b0bb53629475187a Mon Sep 17 00:00:00 2001 From: Andrew Seier Date: Fri, 13 Mar 2015 06:46:58 -0700 Subject: [PATCH 20/32] Removed confusing (unnecessary?) test assertion. --- plotly/tests/test_optional/test_utils/test_utils.py | 1 - 1 file changed, 1 deletion(-) diff --git a/plotly/tests/test_optional/test_utils/test_utils.py b/plotly/tests/test_optional/test_utils/test_utils.py index d46231f85f8..a0a440061dc 100644 --- a/plotly/tests/test_optional/test_utils/test_utils.py +++ b/plotly/tests/test_optional/test_utils/test_utils.py @@ -250,7 +250,6 @@ def test_numpy_masked_json_encoding(): j1 = json.dumps(l, cls=utils.PlotlyJSONEncoder) print(j1) assert(j1 == '[1, 2, null]') - assert(set(l) == set([1, 2, np.ma.core.masked])) def test_masked_constants_example(): From 0f2777b51bcd2c1d1e06dd739067ee055bd4f1ca Mon Sep 17 00:00:00 2001 From: Andrew Seier Date: Fri, 13 Mar 2015 06:47:16 -0700 Subject: [PATCH 21/32] `0` prefix not allowed in python 3 apparently. --- plotly/tests/test_optional/test_utils/test_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plotly/tests/test_optional/test_utils/test_utils.py b/plotly/tests/test_optional/test_utils/test_utils.py index a0a440061dc..7f93a629d89 100644 --- a/plotly/tests/test_optional/test_utils/test_utils.py +++ b/plotly/tests/test_optional/test_utils/test_utils.py @@ -132,7 +132,7 @@ def test_encode_as_date(self): utils.PlotlyJSONEncoder.encode_as_date, obj) # should work with a date - a_date = datetime.date(2013, 10, 01) + a_date = datetime.date(2013, 10, 1) res = utils.PlotlyJSONEncoder.encode_as_date(a_date) self.assertEqual(res, '2013-10-01') From 8734384b3a3b9d3942b3c881243126333bf731b8 Mon Sep 17 00:00:00 2001 From: Andrew Seier Date: Fri, 13 Mar 2015 06:47:39 -0700 Subject: [PATCH 22/32] floats serialize to a different precision in py3 --- plotly/tests/test_optional/test_utils/test_utils.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plotly/tests/test_optional/test_utils/test_utils.py b/plotly/tests/test_optional/test_utils/test_utils.py index 7f93a629d89..d3e99588219 100644 --- a/plotly/tests/test_optional/test_utils/test_utils.py +++ b/plotly/tests/test_optional/test_utils/test_utils.py @@ -11,6 +11,7 @@ import numpy as np import json import pandas as pd +import six from pandas.util.testing import assert_series_equal import matplotlib.pyplot as plt @@ -274,8 +275,11 @@ def test_masked_constants_example(): jy = json.dumps(renderer.plotly_fig['data'][1]['y'], cls=utils.PlotlyJSONEncoder) - assert(jy == '[-398.11793026999999, -398.11792966000002, ' - '-398.11786308000001, null]') + if six.PY3: + assert(jy == '[-398.11793027, -398.11792966, -398.11786308, null]') + else: + assert(jy == '[-398.11793026999999, -398.11792966000002, ' + '-398.11786308000001, null]') def test_numpy_dates(): From dee8d27a8c0051da59f4f353841d1074868059aa Mon Sep 17 00:00:00 2001 From: Andrew Seier Date: Fri, 13 Mar 2015 06:54:08 -0700 Subject: [PATCH 23/32] number of significant digits seems to have changed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit the only thing i can imagine is that python treats an iterable differently when it’s not homogenous (now that we don’t have `NaN`) anymore for example in otherwise float-y arrays. --- plotly/tests/test_optional/test_utils/test_utils.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/plotly/tests/test_optional/test_utils/test_utils.py b/plotly/tests/test_optional/test_utils/test_utils.py index d3e99588219..33d45a37f2c 100644 --- a/plotly/tests/test_optional/test_utils/test_utils.py +++ b/plotly/tests/test_optional/test_utils/test_utils.py @@ -275,11 +275,7 @@ def test_masked_constants_example(): jy = json.dumps(renderer.plotly_fig['data'][1]['y'], cls=utils.PlotlyJSONEncoder) - if six.PY3: - assert(jy == '[-398.11793027, -398.11792966, -398.11786308, null]') - else: - assert(jy == '[-398.11793026999999, -398.11792966000002, ' - '-398.11786308000001, null]') + assert(jy == '[-398.11793027, -398.11792966, -398.11786308, null]') def test_numpy_dates(): From 2b73659ceea436517262d6b4d6e32f9e27881d90 Mon Sep 17 00:00:00 2001 From: Andrew Seier Date: Fri, 13 Mar 2015 07:07:39 -0700 Subject: [PATCH 24/32] compare python obj, not serialization. --- plotly/tests/test_optional/test_utils/test_utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plotly/tests/test_optional/test_utils/test_utils.py b/plotly/tests/test_optional/test_utils/test_utils.py index 33d45a37f2c..b7382db4b48 100644 --- a/plotly/tests/test_optional/test_utils/test_utils.py +++ b/plotly/tests/test_optional/test_utils/test_utils.py @@ -275,7 +275,9 @@ def test_masked_constants_example(): jy = json.dumps(renderer.plotly_fig['data'][1]['y'], cls=utils.PlotlyJSONEncoder) - assert(jy == '[-398.11793027, -398.11792966, -398.11786308, null]') + print(jy) + array = json.loads(jy) + assert(array == [-398.11793027, -398.11792966, -398.11786308, None]) def test_numpy_dates(): From 7345c141b0375c2031d1f9e53156eecd0109173a Mon Sep 17 00:00:00 2001 From: Andrew Seier Date: Fri, 13 Mar 2015 07:07:59 -0700 Subject: [PATCH 25/32] protect skip import --- plotly/tests/test_optional/test_ipython/test_embed.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plotly/tests/test_optional/test_ipython/test_embed.py b/plotly/tests/test_optional/test_ipython/test_embed.py index 587b3f20a8e..f9a69527828 100644 --- a/plotly/tests/test_optional/test_ipython/test_embed.py +++ b/plotly/tests/test_optional/test_ipython/test_embed.py @@ -5,13 +5,14 @@ import threading import six import unittest -from unittest import skip version = six.sys.version_info[:2] # need this for conditional testing # unittest `skipIf` not supported in 2.6 and IPython not supported in 2.6/3.2 if version < (2, 7) or (2, 7) < version < (3, 3): pass else: + from unittest import skip + @skip class TestPlotlyDisplay(unittest.TestCase): From 37ac31a1a7add49d64b3de9fdc329af68f983094 Mon Sep 17 00:00:00 2001 From: Andrew Seier Date: Fri, 13 Mar 2015 07:08:15 -0700 Subject: [PATCH 26/32] protect widgets import in test (python 2.6) --- .../test_optional/test_ipython/test_widgets.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/plotly/tests/test_optional/test_ipython/test_widgets.py b/plotly/tests/test_optional/test_ipython/test_widgets.py index 6d54403065b..e3b45761da0 100644 --- a/plotly/tests/test_optional/test_ipython/test_widgets.py +++ b/plotly/tests/test_optional/test_ipython/test_widgets.py @@ -1,9 +1,16 @@ +import six from unittest import TestCase -from plotly.widgets import GraphWidget +version = six.sys.version_info[:2] # need this for conditional testing +# unittest `skip` not supported in 2.6 and IPython not supported in 2.6/3.2 +if version < (2, 7) or (2, 7) < version < (3, 3): + pass +else: + from plotly.widgets import GraphWidget -class TestWidgets(TestCase): - def test_instantiate_graph_widget(self): - widget = GraphWidget + class TestWidgets(TestCase): + + def test_instantiate_graph_widget(self): + widget = GraphWidget From 4792e62eac53fcd0e98ae764d7e266221e917978 Mon Sep 17 00:00:00 2001 From: Andrew Seier Date: Fri, 13 Mar 2015 07:08:40 -0700 Subject: [PATCH 27/32] assertListEqual DNE in python 2.6 TestCase --- plotly/tests/test_optional/test_matplotlylib/test_date_times.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plotly/tests/test_optional/test_matplotlylib/test_date_times.py b/plotly/tests/test_optional/test_matplotlylib/test_date_times.py index 75ff1605d26..5e05f3ba4fc 100644 --- a/plotly/tests/test_optional/test_matplotlylib/test_date_times.py +++ b/plotly/tests/test_optional/test_matplotlylib/test_date_times.py @@ -64,4 +64,4 @@ def test_pandas_time_series_date_formatter(self): x0 = fig.axes[0].lines[0].get_xydata()[0][0] self.assertEqual(x0, expected_x0) - self.assertListEqual(pfig['data'][0]['x'], expected_x) + self.assertEqual(pfig['data'][0]['x'], expected_x) From f020ae9150de6147786a86db3c814b6d79cf25c9 Mon Sep 17 00:00:00 2001 From: Andrew Seier Date: Fri, 13 Mar 2015 07:08:59 -0700 Subject: [PATCH 28/32] no set literals : ( --- plotly/tests/test_optional/test_utils/test_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plotly/tests/test_optional/test_utils/test_utils.py b/plotly/tests/test_optional/test_utils/test_utils.py index b7382db4b48..22796d2490e 100644 --- a/plotly/tests/test_optional/test_utils/test_utils.py +++ b/plotly/tests/test_optional/test_utils/test_utils.py @@ -28,7 +28,7 @@ def test_encode_as_plotly(self): # should *fail* when object doesn't have `to_plotly_json` attribute objs_without_attr = [ - 1, 'one', {'a', 'set'}, {'a': 'dict'}, ['a', 'list'] + 1, 'one', set(['a', 'set']), {'a': 'dict'}, ['a', 'list'] ] for obj in objs_without_attr: self.assertRaises(utils.NotEncodable, @@ -49,7 +49,7 @@ def test_encode_as_list(self): # should *fail* when object doesn't have `tolist` method objs_without_attr = [ - 1, 'one', {'a', 'set'}, {'a': 'dict'}, ['a', 'list'] + 1, 'one', set(['a', 'set']), {'a': 'dict'}, ['a', 'list'] ] for obj in objs_without_attr: self.assertRaises(utils.NotEncodable, From 3e39f32d9b42d1be2aea19cc262b93e8ac7917d2 Mon Sep 17 00:00:00 2001 From: Andrew Seier Date: Fri, 13 Mar 2015 07:09:44 -0700 Subject: [PATCH 29/32] assertIs DNE in python 2.6 TestCase --- plotly/tests/test_optional/test_utils/test_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plotly/tests/test_optional/test_utils/test_utils.py b/plotly/tests/test_optional/test_utils/test_utils.py index 22796d2490e..db3d8dc3f56 100644 --- a/plotly/tests/test_optional/test_utils/test_utils.py +++ b/plotly/tests/test_optional/test_utils/test_utils.py @@ -11,7 +11,7 @@ import numpy as np import json import pandas as pd -import six +import sys from pandas.util.testing import assert_series_equal import matplotlib.pyplot as plt @@ -76,7 +76,7 @@ def test_encode_as_pandas(self): # should succeed when we've got specific pandas thingies res = utils.PlotlyJSONEncoder.encode_as_pandas(pd.NaT) - self.assertIs(res, None) + self.assertTrue(res is None) def test_encode_as_numpy(self): From 59b00829dc0a6ce0a4697cd1beefa50fc8d52c99 Mon Sep 17 00:00:00 2001 From: Andrew Seier Date: Fri, 13 Mar 2015 12:36:20 -0700 Subject: [PATCH 30/32] Add note about adding pyenv shims to path --- circle/setup.sh | 1 + circle/test.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/circle/setup.sh b/circle/setup.sh index 979370a33c1..c5ddd14840d 100644 --- a/circle/setup.sh +++ b/circle/setup.sh @@ -13,6 +13,7 @@ function error_exit } # PYENV shims need to be infront of the rest of the path to work! +echo "adding pyenv shims to the beginning of the path in this shell" export PATH="/home/ubuntu/.pyenv/shims:$PATH" # for each version we want, setup a functional virtual environment diff --git a/circle/test.sh b/circle/test.sh index eb65c1ae75f..ebffe7c450a 100644 --- a/circle/test.sh +++ b/circle/test.sh @@ -13,6 +13,7 @@ function error_exit } # PYENV shims need to be infront of the rest of the path to work! +echo "adding pyenv shims to the beginning of the path in this shell" export PATH="/home/ubuntu/.pyenv/shims:$PATH" # for each version we want, setup a functional virtual environment From 2a9d2d3cc89c20f32e18e53d10b0736d4155fd6a Mon Sep 17 00:00:00 2001 From: Andrew Seier Date: Fri, 13 Mar 2015 12:36:55 -0700 Subject: [PATCH 31/32] =?UTF-8?q?printout=20of=20sys.version=5Finfo=20?= =?UTF-8?q?=E2=80=94>=20sys.version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- circle/setup.sh | 5 +++++ circle/test.sh | 11 ++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/circle/setup.sh b/circle/setup.sh index c5ddd14840d..84281f1490c 100644 --- a/circle/setup.sh +++ b/circle/setup.sh @@ -24,6 +24,11 @@ for version in ${PLOTLY_PYTHON_VERSIONS[@]}; do export PYENV_VERSION=${version} echo "Using pyenv version $(pyenv version)" + # this was a major issue previously, sanity check that we're using the + # version we *think* we're using (that pyenv is pointing to) + echo "python -c 'import sys; print(sys.version)'" + python -c 'import sys; print(sys.version)' + # install core requirements all versions need pip install -r ${PLOTLY_CORE_REQUIREMENTS_FILE} || error_exit "${LINENO}: can't install core reqs for Python ${version}" diff --git a/circle/test.sh b/circle/test.sh index ebffe7c450a..b31775d5d42 100644 --- a/circle/test.sh +++ b/circle/test.sh @@ -24,14 +24,11 @@ for version in ${PLOTLY_PYTHON_VERSIONS[@]}; do export PYENV_VERSION=${version} echo "Using pyenv version $(pyenv version)" - echo "python -c 'import sys; print(sys.version_info)' yields:" - python -c 'import sys; print(sys.version_info)' + # this was a major issue previously, sanity check that we're using the + # version we *think* we're using (that pyenv is pointing to) + echo "python -c 'import sys; print(sys.version)'" + python -c 'import sys; print(sys.version)' - echo "python -c 'import os; print(os.getenv('\''PYENV_VERSION'\''))'" - python -c 'import os; print(os.getenv('\''PYENV_VERSION'\''))' - - echo "current env" - env echo "install plotly (ignoring possibly cached versions)" pip install -I ${PLOTLY_PACKAGE_ROOT} || From bf8591d63b49d11dd37e3a3fab50047111fa2aa2 Mon Sep 17 00:00:00 2001 From: Andrew Seier Date: Fri, 13 Mar 2015 12:37:19 -0700 Subject: [PATCH 32/32] =?UTF-8?q?version=20bump=20=E2=80=94>=201.6.12=20(s?= =?UTF-8?q?trict=20json=20fix=20+=20ci=20fix)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plotly/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plotly/version.py b/plotly/version.py index 9a5e84e0a7a..e226d1e9f91 100644 --- a/plotly/version.py +++ b/plotly/version.py @@ -1 +1 @@ -__version__ = '1.6.11' +__version__ = '1.6.12'