Author stefan.richthofer
Recipients jeff.allen, stefan.richthofer, wymannmi, zyasoft
Date 2017-02-01.01:12:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Jython 2.7.0 bundeled this custom pip:
However nowadays the Jython-friendly implementation of __get_username disappeared there too. At some point after Jython 2.7.0 this specialized pip was removed, because upstream pip was believed to be suitable for Jython now (forgot to test on Windows?).
I tried to search in to see whether __get_username ever behaved Jython-friendly, but couldn't find it in the vast history. (Also remarkable: The pip bundled with Jython 2.7.0 describes itself as 1.6 while there never was a pip version with that number.) Anyway, based on this I suppose we shouldn't go for option 1) exclusively.

>I also fervently wish sys.platform were not as it is in Jython.

This was a constant pain in JyNI as well. E.g. native ctypes uses for platform-check, and presenting it with 'java' wasn't quite helpful^^ There I solved this by monkeypatching sys.platform (and once JyNI is loaded. I insert a custom PyString subclass (PyShadowString) that displays like "java", but having __eq__ accept the current platform string as well (the one stored in os._name). So on linux you would have
print sys.platform result in 'java'
while sys.platform == 'posix' still yields True.
This manipulation could somewhat break Jython's startup, which I fixed in
Before that fix I applied the monkeypatching after startup, but that was a bit ugly.

Hope this explains option 2) a bit better.

As far as I know in Jython 3 repo this stuff (, sys.platform, what else?) was aligned with CPython behavior again. So hopefully such problems will find their end there.
Date User Action Args
2017-02-01 01:12:51stefan.richthofersetmessageid: <>
2017-02-01 01:12:51stefan.richthofersetrecipients: + stefan.richthofer, zyasoft, jeff.allen, wymannmi
2017-02-01 01:12:51stefan.richthoferlinkissue2521 messages
2017-02-01 01:12:50stefan.richthofercreate