From 874bca97cbfabd59cc8efd5381fdd08efc7c7f06 Mon Sep 17 00:00:00 2001 From: Cory Benfield Date: Wed, 24 May 2017 10:03:48 -0700 Subject: [PATCH 1/2] Disable pytest messing with warnings. We may be able to remove this if pytest resolves pytest-dev/pytest#2430 --- MANIFEST.in | 2 +- pytest.ini | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 pytest.ini diff --git a/MANIFEST.in b/MANIFEST.in index 7d22bd33eb..67702a9d94 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,2 @@ -include README.rst LICENSE NOTICE HISTORY.rst requests/cacert.pem +include README.rst LICENSE NOTICE HISTORY.rst pytest.ini requests/cacert.pem recursive-include tests *.py diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000000..c1fa878547 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,2 @@ +[pytest] +addopts = -p no:warnings \ No newline at end of file From f3d310b299af587d668493f09d82c84c197d00fd Mon Sep 17 00:00:00 2001 From: Cory Benfield Date: Wed, 24 May 2017 10:20:07 -0700 Subject: [PATCH 2/2] Turns out @kennethreitz suprise-broke the CI --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 6ad0bc3553..b9588ebd9b 100755 --- a/setup.py +++ b/setup.py @@ -51,7 +51,7 @@ def run_tests(self): requires = [] test_requirements = ['pytest>=2.8.0', 'pytest-httpbin==0.0.7', 'pytest-cov', 'pytest-mock'] -with open('requests/__init__.py', 'r') as fd: +with open('requests/__init__.py', 'r', 'utf-8') as fd: version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1)