Re: Jython 2.7.1 rc2 soft release
Jeff Allen <[email protected]>
| Newsgroups | gmane.comp.lang.jython.devel |
|---|---|
| Message-ID | <[email protected]> |
I'm happy to go with that. In the same circumstances, I believe I saw
pip on CPython 2.7 also fail, so I don't feel too bad. The ticket you
link demonstrates what I've found all through this work: beyond every
line that produces an encoding/decoding exception, there's another one
just waiting for you to reach it.
Part of me wants to pursue it, but not as much as making Jython 3 build.
Jeff Allen
On 30/05/2017 14:02, Jim Baker wrote:
> I don't see this as a blocker for RC2 or for 2.7.1 itself: there is a
> workaround at least on Linuxes that support Unicode usernames, with
> jython -m pip. Furthermore the root problem seems to be for such
> installs in pip code, or its upstream like setuptools. Such fixes can
> and should be done outside the Jython development process.
>
> More on my reasoning:
>
> We only recently gained the capability of support Unicode in
> usernames, which incidentally is not supported on OSX (that name would
> have been added in its Pinyin form) or on RedHat. Most likely the
> problem is in pip and/or setuptools; see for example
> https://github.com/pypa/pip/issues/3463; the resolution of this
> requires Windows-specific code.
>
> But I can add Unicode usernames on Ubuntu 16.04.2, so I tried it with
> pip. In a nutshell, one can make it work by using jython -m pip. The
> command line version (which uses setuptools to install) fails as follows:
>
> x-耀华@thought:~$ ~/jython2.7.1-rc2/bin/pip --version
> File "<string>", line None
> SyntaxError: Non-ASCII character in file
> '/home/x-耀华/jython2.7.1-rc2/bin/pip', but no encoding declared; see
> http://www.python.org/peps/pep-0263.html for details
>
> We can workaround this with jython -m pip, and this works for packages
> that are not installing executable scripts. However, it then fails
> with something like yolk:
>
> x-耀华@thought:~$ ~/jython2.7.1-rc2/bin/jython -m pip install yolk
> Collecting yolk
> /home/x-耀华/jython2.7.1-rc2/Lib/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:310:
> SNIMissingWarning: An HTTPS request has been made, but the SNI
> (Subject Name Indication) extension to TLS is not available on this
> platform. This may cause the server to present an incorrect TLS
> certificate, which can cause validation failures. You can upgrade to a
> newer version of Python to solve this. For more information, see
> https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
> warnings.warn(
> Downloading yolk-0.4.3.tar.gz (86kB)
> 100% |████████████████████████████████| 92kB 682kB/s
> Requirement already satisfied: setuptools in
> /home/x-??/jython2.7.1-rc2/Lib/site-packages (from yolk)
> Installing collected packages: yolk
> Running setup.py install for yolk ... error
> Complete output from command /home/x-耀华/jython2.7.1-rc2/bin/jython
> -u -c "import setuptools,
> tokenize;__file__='/tmp/pip-build-yq3q1p/yolk/setup.py';f=getattr(tokenize,
> 'open', open)(__file__);code=f.read().replace('\r\n',
> '\n');f.close();exec(compile(code, __file__, 'exec'))" install
> --record /tmp/pip-loUh2K-record/install-record.txt
> --single-version-externally-managed --compile:
> running install
> running build
> running build_py
> creating build
> creating build/lib
> creating build/lib/yolk
> copying yolk/cli.py -> build/lib/yolk
> copying yolk/utils.py -> build/lib/yolk
> copying yolk/pypi.py -> build/lib/yolk
> copying yolk/metadata.py -> build/lib/yolk
> copying yolk/setuptools_support.py -> build/lib/yolk
> copying yolk/yolklib.py -> build/lib/yolk
> copying yolk/__init__.py -> build/lib/yolk
> creating build/lib/yolk/plugins
> copying yolk/plugins/__init__.py -> build/lib/yolk/plugins
> copying yolk/plugins/base.py -> build/lib/yolk/plugins
> running install_lib
> creating /home/x-耀华/jython2.7.1-rc2/Lib/site-packages/yolk
> copying build/lib/yolk/cli.py ->
> /home/x-耀华/jython2.7.1-rc2/Lib/site-packages/yolk
> copying build/lib/yolk/utils.py ->
> /home/x-耀华/jython2.7.1-rc2/Lib/site-packages/yolk
> copying build/lib/yolk/pypi.py ->
> /home/x-耀华/jython2.7.1-rc2/Lib/site-packages/yolk
> copying build/lib/yolk/metadata.py ->
> /home/x-耀华/jython2.7.1-rc2/Lib/site-packages/yolk
> copying build/lib/yolk/setuptools_support.py ->
> /home/x-耀华/jython2.7.1-rc2/Lib/site-packages/yolk
> copying build/lib/yolk/yolklib.py ->
> /home/x-耀华/jython2.7.1-rc2/Lib/site-packages/yolk
> creating /home/x-耀华/jython2.7.1-rc2/Lib/site-packages/yolk/plugins
> copying build/lib/yolk/plugins/__init__.py ->
> /home/x-耀华/jython2.7.1-rc2/Lib/site-packages/yolk/plugins
> copying build/lib/yolk/plugins/base.py ->
> /home/x-耀华/jython2.7.1-rc2/Lib/site-packages/yolk/plugins
> copying build/lib/yolk/__init__.py ->
> /home/x-耀华/jython2.7.1-rc2/Lib/site-packages/yolk
> byte-compiling
> /home/x-耀华/jython2.7.1-rc2/Lib/site-packages/yolk/cli.py to cli$py.class
> byte-compiling
> /home/x-耀华/jython2.7.1-rc2/Lib/site-packages/yolk/utils.py to
> utils$py.class
> byte-compiling
> /home/x-耀华/jython2.7.1-rc2/Lib/site-packages/yolk/pypi.py to
> pypi$py.class
> byte-compiling
> /home/x-耀华/jython2.7.1-rc2/Lib/site-packages/yolk/metadata.py to
> metadata$py.class
> byte-compiling
> /home/x-耀华/jython2.7.1-rc2/Lib/site-packages/yolk/setuptools_support.py
> to setuptools_support$py.class
> byte-compiling
> /home/x-耀华/jython2.7.1-rc2/Lib/site-packages/yolk/yolklib.py to
> yolklib$py.class
> byte-compiling
> /home/x-耀华/jython2.7.1-rc2/Lib/site-packages/yolk/plugins/__init__.py
> to __init__$py.class
> byte-compiling
> /home/x-耀华/jython2.7.1-rc2/Lib/site-packages/yolk/plugins/base.py to
> base$py.class
> byte-compiling
> /home/x-耀华/jython2.7.1-rc2/Lib/site-packages/yolk/__init__.py to
> __init__$py.class
> running install_egg_info
> running egg_info
> writing yolk.egg-info/PKG-INFO
> writing requirements to yolk.egg-info/requires.txt
> writing entry points to yolk.egg-info/entry_points.txt
> writing top-level names to yolk.egg-info/top_level.txt
> writing dependency_links to yolk.egg-info/dependency_links.txt
> warning: manifest_maker: standard file '-c' not found
>
> reading manifest file 'yolk.egg-info/SOURCES.txt'
> reading manifest template 'MANIFEST.in'
> warning: no files found matching '*.txt' under directory 'tests'
> warning: no files found matching '*.conf' under directory 'docs'
> warning: no files found matching '*.css_t' under directory 'docs'
> warning: no files found matching 'indexsidebar.html' under
> directory 'docs'
> warning: no files found matching 'tests/test_cli.py'
> writing manifest file 'yolk.egg-info/SOURCES.txt'
> Copying yolk.egg-info to
> /home/x-耀华/jython2.7.1-rc2/Lib/site-packages/yolk-0.4.3-py2.7.egg-info
> running install_scripts
> Installing yolk script to /home/x-耀华/jython2.7.1-rc2/bin
> Traceback (most recent call last):
> File "<string>", line 1, in <module>
> File "/tmp/pip-build-yq3q1p/yolk/setup.py", line 10, in <module>
> setup(name="yolk",
> File "/home/x-耀华/jython2.7.1-rc2/Lib/distutils/core.py", line
> 151, in setup
> dist.run_commands()
> File "/home/x-耀华/jython2.7.1-rc2/Lib/distutils/core.py", line
> 151, in setup
> dist.run_commands()
> File "/home/x-耀华/jython2.7.1-rc2/Lib/distutils/dist.py", line
> 953, in run_commands
> self.run_command(cmd)
> File "/home/x-耀华/jython2.7.1-rc2/Lib/distutils/dist.py", line
> 972, in run_command
> cmd_obj.run()
> File
> "/home/x-耀华/jython2.7.1-rc2/Lib/site-packages/setuptools/command/install.py",
> line 61, in run
> return orig.install.run(self)
> File
> "/home/x-耀华/jython2.7.1-rc2/Lib/distutils/command/install.py", line
> 589, in run
> self.run_command(cmd_name)
> File "/home/x-耀华/jython2.7.1-rc2/Lib/distutils/cmd.py", line
> 326, in run_command
> self.distribution.run_command(command)
> File "/home/x-耀华/jython2.7.1-rc2/Lib/distutils/dist.py", line
> 972, in run_command
> cmd_obj.run()
> File
> "/home/x-耀华/jython2.7.1-rc2/Lib/site-packages/setuptools/command/install_scripts.py",
> line 49, in run
> self.write_script(*args)
> File
> "/home/x-耀华/jython2.7.1-rc2/Lib/site-packages/setuptools/command/install_scripts.py",
> line 63, in write_script
> f.write(contents)
> UnicodeEncodeError: 'ascii' codec can't encode characters in
> position 10-11: ordinal not in range(128)
>
> ----------------------------------------
> Traceback (most recent call last):
> File "/home/x-耀华/jython2.7.1-rc2/Lib/runpy.py", line 161, in
> _run_module_as_main
> return _run_code(code, main_globals, None,
> File "/home/x-耀华/jython2.7.1-rc2/Lib/runpy.py", line 72, in _run_code
> exec code in run_globals
> File "/home/x-耀华/jython2.7.1-rc2/Lib/site-packages/pip/__main__.py",
> line 19, in <module>
> sys.exit(pip.main())
> File "/home/x-耀华/jython2.7.1-rc2/Lib/site-packages/pip/__init__.py",
> line 233, in main
> return command.main(cmd_args)
> File
> "/home/x-耀华/jython2.7.1-rc2/Lib/site-packages/pip/basecommand.py",
> line 226, in main
> logger.critical(str(exc))
> UnicodeEncodeError: 'ascii' codec can't encode characters in position
> 17-18: ordinal not in range(128)
>
>
> On Tue, May 30, 2017 at 1:45 AM, Jeff Allen <[email protected]
> <mailto:[email protected]>> wrote:
>
> I have also tested installing yolk.
>
> This works on Windows for my account, but not for user 用户名, where
> pip fails while trying to do an os.path.join(). I've traced this
> back to the fact that the URL that it derived the filename from is
> a unicode, whereas the base directory for installation is a
> byte-encoded non-ascii path. I blame the derivation of the url,
> but I haven't found where its unicode-ness first arises. I suspect
> it is on return from a Java method we use/wrote in urllib*.
>
> How seriously do we rate this?
>
> Jeff Allen
>
> On 30/05/2017 02:46, Jim Baker wrote:
>> I also tested the installer on Ubuntu 16.04.2 LTS with Java 8
>> (1.8.0_131), and it works as expected (regrtest, yolk smoke
>> test); I also tested the standalone jar. More below.
>>
>> Given Jeff's testing on Windows — very nice that Jython now works
>> with Unicode in the username! — we have completed basic sanity
>> checks and *we can finalize this RC2*.
>>
>> I haven't really tried to do much testing with the standalone jar
>> in the past, in part because all the tests are stripped from it.
>> However, it is possible to run most of the tests, excluding
>> introspective type tests that try to look up Python files that
>> are enclosed in the standalone jar (not going to work before we
>> fix http://bugs.jython.org/issue2143
>> <http://bugs.jython.org/issue2143>).
>>
>> Also interestingly it is possible to do the following with the
>> standalone jar:
>>
>> $ java -jar jython-standalone-2.7.1-rc2.jar -m ensurepip
>> Collecting setuptools
>> Collecting pip
>> Installing collected packages: setuptools, pip
>> Failed to open /Users/jbaker/jythondev/test-standalone/bin/jython
>> Failed to open /Users/jbaker/jythondev/test-standalone/bin/jython
>> Failed to open /Users/jbaker/jythondev/test-standalone/bin/jython
>> Failed to open /Users/jbaker/jythondev/test-standalone/bin/jython
>> Failed to open /Users/jbaker/jythondev/test-standalone/bin/jython
>> Successfully installed pip-9.0.1 setuptools-28.8.0
>> jimbaker:test-standalone jbaker$ java -jar
>> jython-standalone-2.7.1-rc2.jar -m pip install pytz
>> Collecting pytz
>> Downloading pytz-2017.2-py2.py3-none-any.whl (484kB)
>> 100% |████████████████████████████████| 491kB 556kB/s
>> Installing collected packages: pytz
>> Successfully installed pytz-2017.2
>>
>> And then use the pytz package etc. Such packages are simply
>> installed in Lib/site-packages, which will be created if missing.
>> JYTHONPATH probably needs to be set properly for all this to
>> work. Interesting detail that I hadn't connected before myself.
>>
>> On Mon, May 29, 2017 at 7:27 PM, Jim Baker <[email protected]
>> <mailto:[email protected]>> wrote:
>>
>> I tested the installation on OSX 10.12 (Sierra), including
>> the smoke test for pip/setuptools (yolk) and the regrtest,
>> and it works as expected.
>>
>> As I mentioned in http://bugs.jython.org/issue2594
>> <http://bugs.jython.org/issue2594>, test_load_cert_chain in
>> test_ssl relies on signed jars in Bouncy Castle. Fortunately
>> if those jars are on the CLASSPATH, they will precede
>> Jython's shaded/uber jar variants.
>>
>>
>>
>> On Mon, May 29, 2017 at 6:25 PM, Jeff Allen
>> <[email protected] <mailto:[email protected]>> wrote:
>>
>> This installed fine for me on Windows (actually for user
>> 用户名), including pip & setuptools.
>>
>> I ran the regression test as ..\2.7.1-rc2\bin\jython -m
>> test.regrtest -e and got 3 failures.
>>
>> 372 tests OK.
>> 7 tests skipped:
>> test_codecmaps_hk test_curses test_smtpnet
>> test_socketserver
>> test_subprocess test_urllib2net test_urllibnet
>> 3 tests failed:
>> test___all__ test_inspect test_ssl
>> 3 fails unexpected:
>> test___all__ test_inspect test_ssl
>>
>> test___all__ fails on a missing ServeletException see
>> http://bugs.jython.org/issue2308
>> <http://bugs.jython.org/issue2308>
>>
>> ..\2.7.1-rc2\bin\jython -m test.test_inspect
>> ..\2.7.1-rc2\bin\jython -m test.regrtest test_inspect
>> pass when re-run in isolation.
>>
>> ..\2.7.1-rc2\bin\jython -m test.test_ssl
>> fails as reported in http://bugs.jython.org/issue2594
>> <http://bugs.jython.org/issue2594>
>>
>> Passing test with Netty shower:
>>
>> test_socket
>> May 29, 2017 8:28:36 PM
>> org.python.netty.bootstrap.AbstractBootstrap setChannelOption
>> WARNING: Unknown channel option 'SO_KEEPALIVE' for
>> channel '[id: 0x286e32d1]'
>> May 29, 2017 8:28:36 PM
>> org.python.netty.bootstrap.AbstractBootstrap setChannelOption
>> WARNING: Unknown channel option 'SO_KEEPALIVE' for
>> channel '[id: 0x666fcd99]'
>> May 29, 2017 8:28:40 PM
>> org.python.netty.util.concurrent.DefaultPromise safeExecute
>> SEVERE: Failed to submit a listener notification task.
>> Event loop shut down?
>> java.util.concurrent.RejectedExecutionException: event
>> executor terminated
>> at
>> org.python.netty.util.concurrent.SingleThreadEventExecutor.reject(SingleThreadEventExecutor.java:821)
>> at
>> org.python.netty.util.concurrent.SingleThreadEventExecutor.offerTask(SingleThreadEventExecutor.java:327)
>> at
>> org.python.netty.util.concurrent.SingleThreadEventExecutor.addTask(SingleThreadEventExecutor.java:320)
>> ...
>>
>> Maybe the SSL failure is a worry, but nothing else.
>>
>> Jeff
>>
>>
>> Jeff Allen
>>
>>
>> On 29/05/2017 19:17, [email protected]
>> <mailto:[email protected]> wrote:
>>
>> Hi all,
>>
>> I've put together a soft release of 2.7.1 rc2.
>>
>> Please test! As soon as I get a couple of sanity
>> checks, I'll finalize
>> the RC and do a real announcement.
>>
>> The releases:
>>
>> installer:
>> https://oss.sonatype.org/content/repositories/orgpython-1065/org/python/jython-installer/2.7.1-rc2/jython-installer-2.7.1-rc2.jar
>> <https://oss.sonatype.org/content/repositories/orgpython-1065/org/python/jython-installer/2.7.1-rc2/jython-installer-2.7.1-rc2.jar>
>>
>> standalone:
>> https://oss.sonatype.org/content/repositories/orgpython-1066/org/python/jython-standalone/2.7.1-rc2/jython-standalone-2.7.1-rc2.jar
>> <https://oss.sonatype.org/content/repositories/orgpython-1066/org/python/jython-standalone/2.7.1-rc2/jython-standalone-2.7.1-rc2.jar>
>>
>> The parent directories of each of the above have the
>> checksums, source
>> jars, javadocs, etc.
>>
>> -Frank
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the
>> world's most
>> engaging tech sites, Slashdot.org!
>> http://sdm.link/slashdot
>> _______________________________________________
>> Jython-dev mailing list
>> [email protected]
>> <mailto:[email protected]>
>> https://lists.sourceforge.net/lists/listinfo/jython-dev
>> <https://lists.sourceforge.net/lists/listinfo/jython-dev>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the
>> world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Jython-dev mailing list
>> [email protected]
>> <mailto:[email protected]>
>> https://lists.sourceforge.net/lists/listinfo/jython-dev
>> <https://lists.sourceforge.net/lists/listinfo/jython-dev>
>>
>>
>>
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Jython-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jython-dev