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

pep-561 tests fails (missing tests/masonry/builders/fixtures/pep_561_stub_only/pkg-stubs) #7929

Closed
mtelka opened this issue May 15, 2023 · 5 comments · Fixed by python-poetry/poetry-core#589
Labels
area/core Related to the poetry-core library kind/bug Something isn't working as expected

Comments

@mtelka
Copy link

mtelka commented May 15, 2023

  • Poetry version: poetry_core-1.6.0

  • Python version: 3.9.16

  • OS version and name: OpenIndiana Hipster

  • pyproject.toml: NA

  • [x ] I am on the latest stable Poetry version, installed using a recommended method.

  • [x ] I have searched the issues of this repo and believe that this is not a duplicate.

  • [x ] I have consulted the FAQ and blog for any relevant entries or release notes.

  • [x ] If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

Steps to reproduce:

$ cd /tmp
$ wget https://github.com/python-poetry/poetry-core/releases/download/1.6.0/poetry_core-1.6.0.tar.gz
$ tar xf poetry_core-1.6.0.tar.gz
$ cd poetry_core-1.6.0
$ PYTHONPATH=$(pwd)/src pytest
... snip (see below) ...
=========================== short test summary info ============================
FAILED tests/masonry/builders/test_sdist.py::test_sdist_package_pep_561_stub_only
FAILED tests/masonry/builders/test_wheel.py::test_wheel_package_pep_561_stub_only[pep_561_stub_only]
FAILED tests/masonry/builders/test_wheel.py::test_wheel_package_pep_561_stub_only[pep_561_stub_only_partial]
FAILED tests/masonry/builders/test_wheel.py::test_wheel_package_pep_561_stub_only[pep_561_stub_only_src]
FAILED tests/masonry/builders/test_wheel.py::test_wheel_package_pep_561_stub_only_partial_namespace
FAILED tests/masonry/utils/test_package_include.py::test_pep_561_stub_only_package_good_name_suffix
FAILED tests/masonry/utils/test_package_include.py::test_pep_561_stub_only_partial_namespace_package_good_name_suffix
FAILED tests/masonry/utils/test_package_include.py::test_pep_561_stub_only_package_bad_name_suffix
FAILED tests/utils/test_helpers.py::test_robust_rmtree - AttributeError: 'Moc...
$

(Note to myself: there should be gcc available in PATH.)

Full log:
poetry_core.log

Apparently, the root cause is missing tests/masonry/builders/fixtures/pep_561_stub_only/pkg-stubs in sdist.

@mtelka mtelka added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels May 15, 2023
@mtelka
Copy link
Author

mtelka commented May 15, 2023

Please note that the test_robust_rmtree failure is not related to this issue.

@dimbleby
Copy link
Contributor

https://github.com/python-poetry/poetry-core/blob/0b4c8c70fe9520874ad274a5da3759e4b371ce45/pyproject.toml#L29

so far as I can see there's no good reason to exclude .pyi files - the only such files in the poetry-core repository are ones in test fixtures that probably should be present in the sdist. So probably the fix is just: don't do that.

Feel free to put together a merge request

@dimbleby
Copy link
Contributor

as for the other it looks as though you want a more recent version of pytest-mock. Again a merge request bumping the lower bound in poetry-core's pyproject.toml is surely welcome

@mtelka
Copy link
Author

mtelka commented May 15, 2023

as for the other it looks as though you want a more recent version of pytest-mock. Again a merge request bumping the lower bound in poetry-core's pyproject.toml is surely welcome

Yes, you are right. I do have pytest-mock-3.7.0 and stop was added to MockerFixture in 3.10.0.

@radoering radoering added area/core Related to the poetry-core library and removed status/triage This issue needs to be triaged labels May 16, 2023
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/core Related to the poetry-core library kind/bug Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants