Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[self testsuite] testpep561.py::PEP561Suite tests fail against pip 21.3 #11355

Closed
stanislavlevin opened this issue Oct 19, 2021 · 2 comments · Fixed by #11356
Closed

[self testsuite] testpep561.py::PEP561Suite tests fail against pip 21.3 #11355

stanislavlevin opened this issue Oct 19, 2021 · 2 comments · Fixed by #11356
Labels
bug mypy got something wrong

Comments

@stanislavlevin
Copy link
Contributor

stanislavlevin commented Oct 19, 2021

As of 21.3 pip

Remove the --build-dir option and aliases, one last time. (pypa/pip#10485)

https://pip.pypa.io/en/stable/news/#v21-3

So, all the tests in test/testpep561.py::PEP561Suite fail.

Similar issue pip issue: pypa/pip#10576
Actually, -b was no-op for over 1 year.

Tests log:

...
________________________ testTypedPkgNamespaceRegImport ________________________
[gw5] linux -- Python 3.9.7 /usr/src/RPM/BUILD/python3-module-mypy-0.910/.tox/py
3/bin/python
data: /usr/src/RPM/BUILD/python3-module-mypy-0.910/test-data/unit/pep561.test:15
9:
../../RPM/BUILD/python3-module-mypy-0.910/mypy/test/testpep561.py:43: in run_cas
e
    test_pep561(test_case)
../../RPM/BUILD/python3-module-mypy-0.910/mypy/test/testpep561.py:119: in test_p
ep561
    install_package(pkg, python_executable, use_pip, editable)
../../RPM/BUILD/python3-module-mypy-0.910/mypy/test/testpep561.py:90: in install
_package
    raise Exception(proc.stdout.decode('utf-8') + proc.stderr.decode('utf-8'))
E   Exception: 
E   Usage:   
E     /usr/src/tmp/tmpokx9973n/bin/python -m pip install [options] <requirement specifier> [package-index-options] ...
E     /usr/src/tmp/tmpokx9973n/bin/python -m pip install [options] -r <requirements file> [package-index-options] ...
E     /usr/src/tmp/tmpokx9973n/bin/python -m pip install [options] [-e] <vcs project url> ...
E     /usr/src/tmp/tmpokx9973n/bin/python -m pip install [options] [-e] <local project path> ...
E     /usr/src/tmp/tmpokx9973n/bin/python -m pip install [options] <archive url/path> ...
E   
E   no such option: -b
...
=========================== short test summary info ============================
FAILED mypy/test/testpep561.py::PEP561Suite::testTypedPkgNoSitePkgsIgnoredImports
FAILED mypy/test/testpep561.py::PEP561Suite::testTypedPkgSimple
FAILED mypy/test/testpep561.py::PEP561Suite::testTypedPkgSimplePackageSearchPath
FAILED mypy/test/testpep561.py::PEP561Suite::testTypedPkg_config_nositepackages
FAILED mypy/test/testpep561.py::PEP561Suite::testTypedPkg_args_nositepackages
FAILED mypy/test/testpep561.py::PEP561Suite::testTypedPkgStubs
FAILED mypy/test/testpep561.py::PEP561Suite::testStubPrecedence
FAILED mypy/test/testpep561.py::PEP561Suite::testTypedPkgSimpleEditable
FAILED mypy/test/testpep561.py::PEP561Suite::testTypedPkgNamespaceImportFrom
FAILED mypy/test/testpep561.py::PEP561Suite::testTypedPkgNamespaceImportAs
FAILED mypy/test/testpep561.py::PEP561Suite::testTypedPkgNamespaceRegImport
=========== 11 failed, 8961 passed, 598 skipped in 775.91s (0:12:55) ===========
@stanislavlevin stanislavlevin added the bug mypy got something wrong label Oct 19, 2021
@stanislavlevin
Copy link
Contributor Author

stanislavlevin commented Oct 19, 2021

As a trick env variable PIP_BUILD may be used, which is just ignored by new pip 21.3 and honored by previous versions, but it seems -b is not needed.

@emmatyping
Copy link
Collaborator

Thanks for catching that! I made #11356 to fix this.

huwcbjones added a commit to pexip/os-mypy that referenced this issue Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants