Skip to content

Commit 294d743

Browse files
authored
Merge pull request #4357 from plotly/no-universal
remove py2 from build
2 parents 59cdd99 + 7d85198 commit 294d743

File tree

110 files changed

+42
-366
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+42
-366
lines changed

contributing.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -271,11 +271,11 @@ pytest plotly/tests/test_plotly/test_plot.py::test_function
271271

272272
Running tests with tox is much more powerful, but requires a bit more setup.
273273

274-
You'll need to export an environment variable for *each* tox environment you wish to test with. For example, if you want to test with `Python 2.7` and
274+
You'll need to export an environment variable for *each* tox environment you wish to test with. For example, if you want to test with `Python 3.9` and
275275
`Python 3.6`, but only care to check the `core` specs, you would need to ensure that the following variables are exported:
276276

277277
```
278-
export PLOTLY_TOX_PYTHON_27=<python binary>
278+
export PLOTLY_TOX_PYTHON_39=<python binary>
279279
export PLOTLY_TOX_PYTHON_36=<python binary>
280280
```
281281

@@ -286,15 +286,15 @@ Where the `<python binary` is going to be specific to your development setup. As
286286
# tox envs #
287287
############
288288

289-
export PLOTLY_TOX_PYTHON_27=python2.7
290-
export PLOTLY_TOX_PYTHON_34=python3.4
291-
export TOXENV=py27-core,py34-core
289+
export PLOTLY_TOX_PYTHON_39=python3.9
290+
export PLOTLY_TOX_PYTHON_36=python3.6
291+
export TOXENV=py39-core,py36-core
292292
```
293293

294294
Where `TOXENV` is the environment list you want to use when invoking `tox` from the command line. Note that the `PLOTLY_TOX_*` pattern is used to pass in variables for use in the `tox.ini` file. Though this is a little setup, intensive, you'll get the following benefits:
295295

296296
* `tox` will automatically manage a virtual env for each environment you want to test in.
297-
* You only have to run `tox` and know that the module is working in both `Python 2` and `Python 3`.
297+
* You only have to run `tox` and know that the module is working in all included Python versions.
298298

299299
Finally, `tox` allows you to pass in additional command line arguments that are formatted in (by us) in the `tox.ini` file, see `{posargs}`. This is setup to help with our configuration of [pytest markers](http://doc.pytest.org/en/latest/example/markers.html), which are set up in `packages/python/plotly/pytest.ini`. To run only tests that are *not* tagged with `nodev`, you could use the following command:
300300

doc/apidoc/conf.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
#
31
# Configuration file for the Sphinx documentation builder.
42
#
53
# This file does only contain a selection of the most common options. For a

doc/unconverted/python/amazon-redshift.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ This notebook will go over one of the easiest ways to graph data from your [Amaz
4545
In this notebook we'll be using [Amazon's Sample Redshift Data](http://docs.aws.amazon.com/redshift/latest/gsg/rs-gsg-create-sample-db.html) for this notebook. Although we won't be connecting through a JDBC/ODBC connection we'll be using the [psycopg2 package](http://initd.org/psycopg/docs/index.html) with [SQLAlchemy](http://www.sqlalchemy.org/) and [pandas](http://pandas.pydata.org/) to make it simple to query and analyze our data.
4646

4747
```python
48-
from __future__ import print_function #python 3 support
49-
5048
import plotly.plotly as py
5149
import plotly.graph_objs as go
5250
import plotly.tools as tls

doc/unconverted/python/apache-spark.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ We can test for the Spark Context's existence with `print sc`.
122122
<!-- #endregion -->
123123

124124
```python
125-
from __future__ import print_function #python 3 support
126125
print(sc)
127126
```
128127

packages/python/plotly/_plotly_utils/basevalidators.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import absolute_import
2-
31
import base64
42
import numbers
53
import textwrap
@@ -146,7 +144,7 @@ def copy_to_readonly_numpy_array(v, kind=None, force_numeric=False):
146144
# --------------------------
147145
if force_numeric and new_v.dtype.kind not in numeric_kinds:
148146
raise ValueError(
149-
"Input value is not numeric and" "force_numeric parameter set to True"
147+
"Input value is not numeric and force_numeric parameter set to True"
150148
)
151149

152150
if "U" not in kind:

packages/python/plotly/_plotly_utils/colors/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@
7373
Be careful! If you have a lot of unique numbers in your color column you will
7474
end up with a colormap that is massive and may slow down graphing performance.
7575
"""
76-
from __future__ import absolute_import
77-
7876
import decimal
7977
from numbers import Number
8078

packages/python/plotly/_plotly_utils/optional_imports.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
Stand-alone module to provide information about whether optional deps exist.
33
44
"""
5-
from __future__ import absolute_import
6-
75
from importlib import import_module
86
import logging
97
import sys
@@ -30,7 +28,7 @@ def get_module(name, should_load=True):
3028
return import_module(name)
3129
except ImportError:
3230
_not_importable.add(name)
33-
except Exception as e:
31+
except Exception:
3432
_not_importable.add(name)
3533
msg = f"Error importing optional module {name}"
3634
logger.exception(msg)

packages/python/plotly/_plotly_utils/utils.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
from _plotly_utils.basevalidators import ImageUriValidator
99

1010

11-
PY36_OR_LATER = sys.version_info >= (3, 6)
12-
13-
1411
def cumsum(x):
1512
"""
1613
Custom cumsum to avoid a numpy import.

packages/python/plotly/plotly/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
- exceptions: defines our custom exception classes
2626
2727
"""
28-
from __future__ import absolute_import
2928
import sys
3029
from typing import TYPE_CHECKING
3130
from _plotly_utils.importers import relative_import

packages/python/plotly/plotly/_subplots.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
from __future__ import absolute_import, unicode_literals
3-
41
# Constants
52
# ---------
63
# Subplot types that are each individually positioned with a domain

0 commit comments

Comments
 (0)