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

pytest 7.2.0 no longer installs py #286

Closed
moto-timo opened this issue Oct 29, 2022 · 2 comments · Fixed by #288
Closed

pytest 7.2.0 no longer installs py #286

moto-timo opened this issue Oct 29, 2022 · 2 comments · Fixed by #288

Comments

@moto-timo
Copy link

Since pytest-dev/pytest#10396 the py library is
no longer installed, but dumb-init needs 'py._path'.

    ImportError while importing test module '/tmp/tmp.k8zSDBKT6S/dumb-init-1.2.5/tests/child_processes_test.py'.
    Hint: make sure your test modules/packages have valid Python names.
    Traceback:
    /usr/lib/python3.8/importlib/__init__.py:127: in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
    tests/child_processes_test.py:10: in <module>
        from testing import is_alive
    testing/__init__.py:11: in <module>
        from py._path.local import LocalPath
    E   ModuleNotFoundError: No module named 'py._path'; 'py' is not a package
moto-timo added a commit to moto-timo/yocto-dockerfiles that referenced this issue Oct 29, 2022
Since pytest-dev/pytest#10396 the py library is
no longer installed, but dumb-init needs 'py._path'.

Fixes:

ImportError while importing test module '/tmp/tmp.k8zSDBKT6S/dumb-init-1.2.5/tests/child_processes_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/child_processes_test.py:10: in <module>
    from testing import is_alive
testing/__init__.py:11: in <module>
    from py._path.local import LocalPath
E   ModuleNotFoundError: No module named 'py._path'; 'py' is not a package

Issue filed upstream:
Yelp/dumb-init#286

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
moto-timo added a commit to moto-timo/yocto-dockerfiles that referenced this issue Oct 29, 2022
Append 'py' to dumb-init*/requirements-dev.txt

Since pytest-dev/pytest#10396 the py library is
no longer installed, but dumb-init needs 'py._path'.

Fixes:

ImportError while importing test module '/tmp/tmp.k8zSDBKT6S/dumb-init-1.2.5/tests/child_processes_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/child_processes_test.py:10: in <module>
    from testing import is_alive
testing/__init__.py:11: in <module>
    from py._path.local import LocalPath
E   ModuleNotFoundError: No module named 'py._path'; 'py' is not a package

Issue filed upstream:
Yelp/dumb-init#286

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
moto-timo added a commit to moto-timo/yocto-dockerfiles that referenced this issue Oct 29, 2022
Append 'py' to dumb-init*/requirements-dev.txt

Since pytest-dev/pytest#10396 the py library is
no longer installed, but dumb-init needs 'py._path'.

Fixes:

ImportError while importing test module '/tmp/tmp.k8zSDBKT6S/dumb-init-1.2.5/tests/child_processes_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/child_processes_test.py:10: in <module>
    from testing import is_alive
testing/__init__.py:11: in <module>
    from py._path.local import LocalPath
E   ModuleNotFoundError: No module named 'py._path'; 'py' is not a package

Issue filed upstream:
Yelp/dumb-init#286

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
moto-timo added a commit to moto-timo/dumb-init that referenced this issue Oct 29, 2022
For pytest >= 7.2.0, the 'py' library is no longer installed.

Fixes:
Yelp#286

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
moto-timo added a commit to crops/yocto-dockerfiles that referenced this issue Oct 29, 2022
Append 'py' to dumb-init*/requirements-dev.txt

Since pytest-dev/pytest#10396 the py library is
no longer installed, but dumb-init needs 'py._path'.

Fixes:

ImportError while importing test module '/tmp/tmp.k8zSDBKT6S/dumb-init-1.2.5/tests/child_processes_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/child_processes_test.py:10: in <module>
    from testing import is_alive
testing/__init__.py:11: in <module>
    from py._path.local import LocalPath
E   ModuleNotFoundError: No module named 'py._path'; 'py' is not a package

Issue filed upstream:
Yelp/dumb-init#286

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
@asottile
Copy link
Contributor

#288 is a better approach -- eliminate py entirely (it's deprecated after all)

@moto-timo
Copy link
Author

moto-timo commented Oct 30, 2022

@asottile agreed. Thank you for doing the right thing.

@chriskuehl it would be very helpful if you could merge this and do a release with a full source tarball, as that is what we are pulling and building (and testing -- this gives you some extra Linux distro coverage, since we have a matrix of ~14 distro/version combinations).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants