Skip to content
Permalink
Browse files

Support Python 3.8, stop supporting Python 3.5 (#627)

* Upgrade to uvicorn 0.10.4
* Drop support for Python 3.5
* Bump all dependencies to latest releases
* Update docs to reflect we no longer support 3.5
* Removed code that skipped black unit test on 3.5

Closes #622
  • Loading branch information
simonw committed Nov 12, 2019
1 parent 5bc2570 commit cf7776d36fbacefa874cbd6e5fcdc9fff7661203
Showing with 18 additions and 21 deletions.
  1. +0 −1 .travis.yml
  2. +1 −1 README.md
  3. +1 −1 docs/contributing.rst
  4. +5 −2 docs/installation.rst
  5. +10 −10 setup.py
  6. +1 −6 tests/test_black.py
@@ -6,7 +6,6 @@ python:
- "3.6"
- "3.7"
- "3.8"
- "3.5"

# Executed for 3.5 AND 3.5 as the first "test" stage:
script:
@@ -69,7 +69,7 @@ sqlite-utils: a Python library and CLI tool for building SQLite databases](https

pip3 install datasette

Datasette requires Python 3.5 or higher. We also have [detailed installation instructions](https://datasette.readthedocs.io/en/stable/installation.html) covering other options such as Docker.
Datasette requires Python 3.6 or higher. We also have [detailed installation instructions](https://datasette.readthedocs.io/en/stable/installation.html) covering other options such as Docker.

## Basic usage

@@ -18,7 +18,7 @@ General guidelines
Setting up a development environment
------------------------------------

If you have Python 3.5 or higher installed on your computer (on OS X the easiest way to do this `is using homebrew <https://docs.python-guide.org/starting/install3/osx/>`__) you can install an editable copy of Datasette using the following steps.
If you have Python 3.6 or higher installed on your computer (on OS X the easiest way to do this `is using homebrew <https://docs.python-guide.org/starting/install3/osx/>`__) you can install an editable copy of Datasette using the following steps.

If you want to use GitHub to publish your changes, first `create a fork of datasette <https://github.com/simonw/datasette/fork>`__ under your own GitHub account.

@@ -69,16 +69,19 @@ You can now run the new custom image like so::
You can confirm that the plugins are installed by visiting
http://127.0.0.1:8001/-/plugins


Install using pip
-----------------

To run Datasette without Docker you will need Python 3.5 or higher.
To run Datasette without Docker you will need Python 3.6 or higher.

You can install Datasette and its dependencies using ``pip``::

pip install datasette

The last version to support Python 3.5 was 0.30.2 - you can install that version like so::

pip install datasette==0.30.2

If you want to install Datasette in its own virtual environment, use this::

python -mvenv datasette-venv
@@ -42,12 +42,12 @@ def get_version():
include_package_data=True,
install_requires=[
"click~=7.0",
"click-default-group~=1.2.1",
"Jinja2~=2.10.1",
"hupper~=1.0",
"click-default-group~=1.2.2",
"Jinja2~=2.10.3",
"hupper~=1.9",
"pint~=0.9",
"pluggy~=0.12.0",
"uvicorn~=0.8.4",
"pluggy~=0.13.0",
"uvicorn~=0.10.4",
"aiofiles~=0.4.0",
],
entry_points="""
@@ -58,11 +58,11 @@ def get_version():
extras_require={
"docs": ["sphinx_rtd_theme", "sphinx-autobuild"],
"test": [
"pytest~=5.0.0",
"pytest~=5.2.2",
"pytest-asyncio~=0.10.0",
"aiohttp~=3.5.3",
"beautifulsoup4~=4.6.1",
"asgiref~=3.1.2",
"aiohttp~=3.6.2",
"beautifulsoup4~=4.8.1",
"asgiref~=3.2.3",
]
+ maybe_black,
},
@@ -74,8 +74,8 @@ def get_version():
"Intended Audience :: End Users/Desktop",
"Topic :: Database",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.5",
],
)
@@ -1,3 +1,4 @@
import black
from click.testing import CliRunner
from pathlib import Path
import pytest
@@ -6,13 +7,7 @@
code_root = Path(__file__).parent.parent


@pytest.mark.skipif(
sys.version_info[:2] < (3, 6), reason="Black requires Python 3.6 or later"
)
def test_black():
# Do not import at top of module because Python 3.5 will not have it installed
import black

runner = CliRunner()
result = runner.invoke(
black.main, [str(code_root / "tests"), str(code_root / "datasette"), "--check"]

0 comments on commit cf7776d

Please sign in to comment.
You can’t perform that action at this time.