Skip to content

Replace requests.compat.json with real json #1561

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion chart_studio/api/v1/clientresp.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import warnings

from requests.compat import json as _json
import json as _json


from _plotly_utils.utils import PlotlyJSONEncoder
Expand Down
2 changes: 1 addition & 1 deletion chart_studio/api/v2/utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import absolute_import

import requests
from requests.compat import json as _json
import json as _json
from requests.exceptions import RequestException
from retrying import retry

Expand Down
2 changes: 1 addition & 1 deletion chart_studio/grid_objs/grid_objs.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
except ImportError:
from collections import MutableSequence

from requests.compat import json as _json
import json as _json

from _plotly_utils.optional_imports import get_module
from chart_studio import utils, exceptions
Expand Down
2 changes: 1 addition & 1 deletion chart_studio/plotly/plotly.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

import six
import six.moves
from requests.compat import json as _json
import json as _json

import _plotly_utils.utils
import _plotly_utils.exceptions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import absolute_import

from requests import Response
from requests.compat import json as _json
import json as _json
from requests.exceptions import ConnectionError

from chart_studio.api.utils import to_native_utf8_string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import absolute_import

from requests.compat import json as _json
import json as _json

from chart_studio.api.v2 import grids
from chart_studio.tests.test_plot_ly.test_api import PlotlyApiTestCase
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import absolute_import

from requests.compat import json as _json
import json as _json

from chart_studio.api.v2 import images
from chart_studio.tests.test_plot_ly.test_api import PlotlyApiTestCase
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import absolute_import

from requests.compat import json as _json
import json as _json
from requests.exceptions import ConnectionError

from plotly import version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import requests
import six
from nose.plugins.attrib import attr
from requests.compat import json as _json
import json as _json

from chart_studio.tests.utils import PlotlyTestCase

Expand Down
2 changes: 1 addition & 1 deletion chart_studio/tests/test_plot_ly/test_plotly/test_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import requests
import six
import sys
from requests.compat import json as _json
import json as _json
import warnings

from nose.plugins.attrib import attr
Expand Down
2 changes: 1 addition & 1 deletion chart_studio/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import threading
import warnings

from requests.compat import json as _json
import json as _json

from _plotly_utils.exceptions import PlotlyError
from _plotly_utils.optional_imports import get_module
Expand Down
2 changes: 1 addition & 1 deletion chart_studio/widgets/graph_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from collections import deque
import pkgutil

from requests.compat import json as _json
import json as _json

# TODO: protected imports?
import ipywidgets as widgets
Expand Down
2 changes: 1 addition & 1 deletion plotly/graph_reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import pkgutil

import six
from requests.compat import json as _json
import json as _json

from plotly import utils

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from unittest import TestCase

from nose.plugins.attrib import attr
from requests.compat import json as _json
import json as _json

from plotly import graph_reference as gr
from plotly.api import v2
Expand Down
2 changes: 1 addition & 1 deletion plotly/tests/test_core/test_offline/test_offline.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from unittest import TestCase

from nose.plugins.attrib import attr
from requests.compat import json as _json
import json as _json

import plotly
import json
Expand Down
2 changes: 1 addition & 1 deletion plotly/tests/test_core/test_utils/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from inspect import getargspec
from unittest import TestCase

from requests.compat import json as _json
import json as _json

from plotly.utils import (PlotlyJSONEncoder, get_by_path, memoize,
node_generator)
Expand Down
2 changes: 1 addition & 1 deletion plotly/tests/test_optional/test_offline/test_offline.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import re
from nose.tools import raises
from nose.plugins.attrib import attr
from requests.compat import json as _json
import json as _json

from unittest import TestCase

Expand Down
2 changes: 1 addition & 1 deletion plotly/tests/test_optional/test_utils/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import pytz
from nose.plugins.attrib import attr
from pandas.util.testing import assert_series_equal
from requests.compat import json as _json
import json as _json

from plotly import optional_imports, utils
from plotly.graph_objs import Scatter, Scatter3d, Figure, Data
Expand Down
2 changes: 1 addition & 1 deletion plotly/tests/test_plot_ly/test_api/test_v1/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from unittest import TestCase

from requests import Response
from requests.compat import json as _json
import json as _json
from requests.exceptions import ConnectionError

from plotly.api.utils import to_native_utf8_string
Expand Down
2 changes: 1 addition & 1 deletion plotly/tests/test_plot_ly/test_api/test_v2/test_grids.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import absolute_import

from requests.compat import json as _json
import json as _json

from plotly.api.v2 import grids
from plotly.tests.test_plot_ly.test_api import PlotlyApiTestCase
Expand Down
2 changes: 1 addition & 1 deletion plotly/tests/test_plot_ly/test_api/test_v2/test_images.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import absolute_import

from requests.compat import json as _json
import json as _json

from plotly.api.v2 import images
from plotly.tests.test_plot_ly.test_api import PlotlyApiTestCase
Expand Down
2 changes: 1 addition & 1 deletion plotly/tests/test_plot_ly/test_api/test_v2/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import absolute_import

from requests.compat import json as _json
import json as _json
from requests.exceptions import ConnectionError

from plotly import version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import requests
import six
from nose.plugins.attrib import attr
from requests.compat import json as _json
import json as _json

from plotly.tests.utils import PlotlyTestCase

Expand Down
2 changes: 1 addition & 1 deletion plotly/tests/test_plot_ly/test_plotly/test_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import requests
import six
import sys
from requests.compat import json as _json
import json as _json
import warnings

from nose.plugins.attrib import attr
Expand Down