Switch to ~= dependencies, closes #532 (#536)

* Switch to ~= dependencies, closes #532
* Bump click and click-default-group
* imp. is deprecated, use types.ModuleType instead - thanks https://stackoverflow.com/a/32175781
* Upgrade to pytest 5
plugin-config
Simon Willison 2019-07-02 21:32:55 -07:00 zatwierdzone przez GitHub
rodzic 4d2fdafe39
commit f0d32da0a9
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 15 dodań i 15 usunięć

Wyświetl plik

@ -3,7 +3,6 @@ from collections import OrderedDict
import base64 import base64
import click import click
import hashlib import hashlib
import imp
import json import json
import os import os
import pkg_resources import pkg_resources
@ -11,6 +10,7 @@ import re
import shlex import shlex
import tempfile import tempfile
import time import time
import types
import shutil import shutil
import urllib import urllib
import numbers import numbers
@ -588,7 +588,7 @@ def link_or_copy_directory(src, dst):
def module_from_path(path, name): def module_from_path(path, name):
# Adapted from http://sayspy.blogspot.com/2011/07/how-to-import-module-from-just-file.html # Adapted from http://sayspy.blogspot.com/2011/07/how-to-import-module-from-just-file.html
mod = imp.new_module(name) mod = types.ModuleType(name)
mod.__file__ = path mod.__file__ = path
with open(path, "r") as file: with open(path, "r") as file:
code = compile(file.read(), path, "exec", dont_inherit=True) code = compile(file.read(), path, "exec", dont_inherit=True)

Wyświetl plik

@ -41,14 +41,14 @@ setup(
package_data={"datasette": ["templates/*.html"]}, package_data={"datasette": ["templates/*.html"]},
include_package_data=True, include_package_data=True,
install_requires=[ install_requires=[
"click>=6.7", "click~=7.0",
"click-default-group==1.2", "click-default-group~=1.2.1",
"Jinja2==2.10.1", "Jinja2~=2.10.1",
"hupper==1.0", "hupper~=1.0",
"pint==0.8.1", "pint~=0.8.1",
"pluggy>=0.12.0", "pluggy~=0.12.0",
"uvicorn>=0.8.1", "uvicorn~=0.8.1",
"aiofiles==0.4.0", "aiofiles~=0.4.0",
], ],
entry_points=""" entry_points="""
[console_scripts] [console_scripts]
@ -58,11 +58,11 @@ setup(
extras_require={ extras_require={
"docs": ["sphinx_rtd_theme", "sphinx-autobuild"], "docs": ["sphinx_rtd_theme", "sphinx-autobuild"],
"test": [ "test": [
"pytest==4.6.1", "pytest~=5.0.0",
"pytest-asyncio==0.10.0", "pytest-asyncio~=0.10.0",
"aiohttp==3.5.3", "aiohttp~=3.5.3",
"beautifulsoup4==4.6.1", "beautifulsoup4~=4.6.1",
"asgiref==3.1.2", "asgiref~=3.1.2",
] ]
+ maybe_black, + maybe_black,
}, },