Skip to content

Commit 2553388

Browse files
authored
Drop support for Python 2.7 (#652)
1 parent 9a4081f commit 2553388

File tree

7 files changed

+10
-23
lines changed

7 files changed

+10
-23
lines changed

.devcontainer/Dockerfile

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,13 @@ ARG NODE_VERSION="none"
99
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
1010

1111
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
12-
&& apt-get -y install --no-install-recommends tig python2.7 python2.7-dev
12+
&& apt-get -y install --no-install-recommends tig
1313

1414
RUN /usr/local/bin/python3 -m pip install --upgrade pip
1515
COPY requirements.txt /tmp/pip-tmp/
1616
COPY dev-requirements*.txt /tmp/pip-tmp/
17-
RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/dev-requirements-py3.txt \
18-
&& wget https://bootstrap.pypa.io/pip/2.7/get-pip.py \
19-
&& python2.7 get-pip.py \
20-
&& rm get-pip.py \
21-
&& python2.7 -m pip install -r /tmp/pip-tmp/dev-requirements-py2.txt \
17+
RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/dev-requirements-py3.txt
2218
&& rm -rf /tmp/pip-tmp
2319

2420
# [Optional] Uncomment this line to install global node packages.
25-
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
21+
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1

CONTRIBUTING.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ Setting up the dev environment
33
To isolate dependencies from your global python installation, it is important to use a tool like
44
[virtualenv](https://virtualenv.pypa.io/en/stable/). With `virtualenv` you can install the dev environment by doing the following.
55

6-
Another option would be to use docker directly, i.e.
6+
Another option would be to use docker directly, i.e.
77
```bash
88
docker run -it -v `echo $PWD`:/root python:3.6.8 bash
9-
docker run -it -v `echo $PWD`:/root python:2.7.12 bash
109

1110
```
1211

@@ -28,7 +27,7 @@ Requirements:
2827
Developing using Github CodeSpaces
2928
----------------------------------
3029

31-
The same development container setup used for local VSCode also works with GitHub CodeSpaces. If you have CodeSpaces enabled in your Github account then can just create a CodeSpace from the repoand start coding.
30+
The same development container setup used for local VSCode also works with GitHub CodeSpaces. If you have CodeSpaces enabled in your Github account then can just create a CodeSpace from the repoand start coding.
3231

3332
In order to test the CLI against a Databricks cluster you can define the these secrets for your CodeSpace so you don't have to run `databricks init` eacht time you open it:
3433

@@ -41,4 +40,3 @@ https://docs.github.com/en/codespaces/managing-your-codespaces/managing-encrypte
4140
Running Tests
4241
----------------
4342
- `tox`
44-

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
FROM python:2.7
1+
FROM python:3.6
22

33
WORKDIR /usr/src/databricks-cli
44

55
COPY . .
66

77
RUN pip install --upgrade pip && \
8-
pip install -r dev-requirements-py2.txt && \
8+
pip install -r dev-requirements-py3.txt && \
99
pip list && \
1010
./lint.sh && \
1111
pip install . && \

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Please leave bug reports as issues on our `GitHub project <https://github.com/da
2323
Requirements
2424
------------
2525

26-
- Python Version > 2.7.9 or > 3.6
26+
- Python Version > 3.6
2727

2828
Installation
2929
---------------
@@ -63,7 +63,7 @@ Using Docker
6363
6464
# run command in docker
6565
docker run -it databricks-cli fs --help
66-
66+
6767
Documentation
6868
-------------
6969

databricks_cli/sdk/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
2727
Currently supports services including clusters, clusters policies and jobs.
2828
29-
Requires Python 2.7.9 or above.
29+
Requires Python 3.6 or above.
3030
3131
To get started, below is an example usage of the Python API client.
3232

dev-requirements-py2.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
classifiers=[
5959
'Intended Audience :: Developers',
6060
'Intended Audience :: System Administrators',
61-
'Programming Language :: Python :: 2.7',
6261
'Programming Language :: Python :: 3.6',
6362
'License :: OSI Approved :: Apache Software License',
6463
],

0 commit comments

Comments
 (0)