-
Notifications
You must be signed in to change notification settings - Fork 3.1k
import pwd fails under Jython on Windows #1975
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
Conversation
os._name is system-specific and may be missing
@jimbaker already has a PR for html5lib to fix them to work on Jython, that's waiting on them to get merge + release that (See: html5lib/html5lib-python#150). |
The current status is that pip is unusable in Jython. Given pip's choice to vendor in the requests / html5lib code, fixing it here while waiting for html5lib to get a release out with the fix is a perfectly viable choice, especially since the fix is a small, clearly-defined patch in one module. (Note that is has already been three months since this issue closed, and still no fix). |
We don't patch the items in The question I guess is whether we want to do that or not. Personally I'd prefer not to if we can help it, so we'll likely wait till we're ready to make a release to do that and will likely poke html5lib to see about getting it sorted there. |
Carrying patches in vendored copies of software is often a very ill-advised idea. If those patches are not included upstream, future releases may drop them accidentally and introduce regressions. Further, the best people to be fixing problems in vendored libraries are the library authors and maintainers, not people relying on the library itself. We're all fairly intelligent but sometimes things in a library can horribly wrong if we just carry our own version of it that we merge with upstream. Our patch could very well cause a vulnerability if we mindlessly re-apply it and we break something sensitive. I'm glad to hear the project does not patch any libraries in |
@tseaver I'd go poke the html5lib project and ask them how they're doing fixing this. |
Seemed to get fixed in html5lib/html5lib-python#185 |
The module pwd is designed to fail under Microsoft Windows and should be avoided. The detection code fails under Jython where the platform is Java. I copied the detection code from pwd; maybe we should just try pwd and handle the exception accordingly instead.