summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2020-08-14 17:38:44 +0700
committerNguyễn Gia Phong <mcsinyx@disroot.org>2020-08-14 17:56:15 +0700
commit46b938349abc8b57a8f132b9859c24b9620cb380 (patch)
tree3256e8a416a871da97e751ba730551421b1e088e
parent4312b940b4c8426fb428809556236b724aace80c (diff)
downloadpip-46b938349abc8b57a8f132b9859c24b9620cb380.tar.gz
Allow py2 deprecation warning from setuptools
-rw-r--r--news/d90a40c1-15b7-46b9-9162-335bb346b53f.trivial0
-rw-r--r--tests/functional/test_download.py2
-rw-r--r--tests/functional/test_install.py5
3 files changed, 6 insertions, 1 deletions
diff --git a/news/d90a40c1-15b7-46b9-9162-335bb346b53f.trivial b/news/d90a40c1-15b7-46b9-9162-335bb346b53f.trivial
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/news/d90a40c1-15b7-46b9-9162-335bb346b53f.trivial
diff --git a/tests/functional/test_download.py b/tests/functional/test_download.py
index 3e80fa5c5..3291d580d 100644
--- a/tests/functional/test_download.py
+++ b/tests/functional/test_download.py
@@ -4,6 +4,7 @@ import textwrap
from hashlib import sha256
import pytest
+from pip._vendor.six import PY2
from pip._internal.cli.status_codes import ERROR
from pip._internal.utils.urls import path_to_url
@@ -474,6 +475,7 @@ def make_wheel_with_python_requires(script, package_name, python_requires):
package_dir.joinpath('setup.py').write_text(text)
script.run(
'python', 'setup.py', 'bdist_wheel', '--universal', cwd=package_dir,
+ allow_stderr_warning=PY2,
)
file_name = '{}-1.0-py2.py3-none-any.whl'.format(package_name)
diff --git a/tests/functional/test_install.py b/tests/functional/test_install.py
index 2185251d2..abf5a8d07 100644
--- a/tests/functional/test_install.py
+++ b/tests/functional/test_install.py
@@ -9,6 +9,7 @@ import textwrap
from os.path import curdir, join, pardir
import pytest
+from pip._vendor.six import PY2
from pip._internal.cli.status_codes import ERROR, SUCCESS
from pip._internal.models.index import PyPI, TestPyPI
@@ -1565,7 +1566,9 @@ def test_install_incompatible_python_requires_wheel(script, with_wheel):
version='0.1')
"""))
script.run(
- 'python', 'setup.py', 'bdist_wheel', '--universal', cwd=pkga_path)
+ 'python', 'setup.py', 'bdist_wheel', '--universal',
+ cwd=pkga_path, allow_stderr_warning=PY2,
+ )
result = script.pip('install', './pkga/dist/pkga-0.1-py2.py3-none-any.whl',
expect_error=True)
assert _get_expected_error_text() in result.stderr, str(result)