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

Bug: _needs_reinstall captures python setup.py --name stderr in addition to stdout #1052

Closed
hashbrowncipher opened this issue Oct 10, 2018 · 4 comments

Comments

@hashbrowncipher
Copy link
Contributor

@hashbrowncipher hashbrowncipher commented Oct 10, 2018

I ran into this bug because my setup.py --name uses the warnings module, which prints to stderr. As a result, tox was unable to infer the location of my egg_info directory.

@hashbrowncipher
Copy link
Contributor Author

@hashbrowncipher hashbrowncipher commented Oct 10, 2018

This has the side-effect of not showing users the warning that their setup.py presumably wanted seen.

@gaborbernat
Copy link
Member

@gaborbernat gaborbernat commented Oct 10, 2018

Is #1051 fix for this? Or this is an additional one?

@hashbrowncipher
Copy link
Contributor Author

@hashbrowncipher hashbrowncipher commented Oct 10, 2018

This is separate from #1051. I wrote up a failing test case for the behavior I'd like to succeed:

def test_warning_emitted(cmd, initproj):
    initproj(
        "spam-0.0.1",
        filedefs={
            "tox.ini": """
        [testenv]
        skipsdist=True
        usedevelop=True
    """,
            "setup.py": """
        from setuptools import setup
        from warnings import warn
        warn("I am a warning")

        setup(name="spam", version="0.0.1")
    """
        }
    )
    result = cmd()
    result = cmd()
    assert "develop-inst-noop" in result.out
@gaborbernat
Copy link
Member

@gaborbernat gaborbernat commented Oct 10, 2018

In this case I would propose to print the warning ourselves too, but still continue with the build. Will address.

hashbrowncipher added a commit to hashbrowncipher/tox that referenced this issue Oct 20, 2018
hashbrowncipher added a commit to hashbrowncipher/tox that referenced this issue Oct 20, 2018
hashbrowncipher added a commit to hashbrowncipher/tox that referenced this issue Oct 20, 2018
@tox-dev tox-dev locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants