From 201e5b18b1ad20704217f31ef529f84b42d8bcfb Mon Sep 17 00:00:00 2001 From: rocky Date: Tue, 12 Jun 2018 14:44:08 -0400 Subject: [PATCH] Administrivia: Remove six dependency.. add version of hypothesis known to work --- pytest/validate.py | 8 +++++--- requirements.txt | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pytest/validate.py b/pytest/validate.py index 51f8b964..bbdfa7b5 100644 --- a/pytest/validate.py +++ b/pytest/validate.py @@ -6,16 +6,18 @@ import difflib import subprocess import tempfile import functools -# compatability -import six # uncompyle6 / xdis -from uncompyle6 import PYTHON_VERSION, IS_PYPY, deparse_code +from uncompyle6 import PYTHON_VERSION, PYTHON3, IS_PYPY, deparse_code # TODO : I think we can get xdis to support the dis api (python 3 version) by doing something like this there from xdis.bytecode import Bytecode from xdis.main import get_opcode opc = get_opcode(PYTHON_VERSION, IS_PYPY) Bytecode = functools.partial(Bytecode, opc=opc) +if PYTHON3: + from io import StringIO +else: + from StringIO import StringIO def _dis_to_text(co): return Bytecode(co).dis() diff --git a/requirements.txt b/requirements.txt index f1629154..5b1e7b65 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,4 @@ # Pick up stuff from setup.py +hypothesis==2.0.0 +pytest -e .