This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jaraco
Recipients jaraco, lemburg, pitrou
Date 2019-04-14.00:46:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1555202770.24.0.873743144639.issue35967@roundup.psfhosted.org>
In-reply-to
Content
> I don't quite follow: since you are the author of the tool, you can of
course have your uname.py import platform and then apply one of the
above tricks.

I thought I'd tried that, but failed [ref](https://github.com/jaraco/cmdix/issues/1#issuecomment-462207845), which is why I committed [this change](https://github.com/jaraco/cmdix/commit/c53908b4b39771eed9f64fff5bed8af51baae4d0).

The problem is that, if `pkg_resources` is used to implement the entry point for the `uname` console script, or if any other library happens to call platform.*, such as in site.py, before the patch has been allowed to run, the invocation of `uname` itself ends up invoking `uname`, causing unlimited recursion. No amount of patching in the `uname` command implementation can help that.

> Your PR is missing tests, though, to support that it actually
returns the same values are before for a set of common platforms.

Yes, that sounds like a good plan. I'll add some tests that assert the values and then update the tests to match the current output, establish a baseline.
History
Date User Action Args
2019-04-14 00:46:10jaracosetrecipients: + jaraco, lemburg, pitrou
2019-04-14 00:46:10jaracosetmessageid: <1555202770.24.0.873743144639.issue35967@roundup.psfhosted.org>
2019-04-14 00:46:10jaracolinkissue35967 messages
2019-04-14 00:46:10jaracocreate