Building Jython3

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Building Jython3

fwierzbicki@gmail.com
Starting a new thread, and including Isaiah Peng in case he has some
insights. Hi Isaiah! We are starting to discuss how to make the
Jython3 sandbox the main line for development after the Jython 2.7.1
release.

On Tue, May 30, 2017 at 6:39 AM, Jeff Allen <[hidden email]> wrote:
> Part of me wants to pursue it, but not as much as making Jython 3 build.

I took a look, and made a couple of changes that get Jython3 building
for me, so the tip of https://github.com/jython/jython3 should now
build (I hope).

For me though, it does not run. I always get:

$ ./dist/bin/jython
Exception in thread "main"
Exception: java.lang.NullPointerException thrown from the
UncaughtExceptionHandler in thread "main"

Investigating further, the issue seems to have been introduced on Sept
19 in this commit, which unfortunately, is a biggish one:

"""
commit 308a17a4e9972aa3814a358917ffbd25fd976864
Author: Isaiah Peng <[hidden email]>
Date:   Mon Sep 19 18:13:57 2016 +0200

    rewrite zipimporter, detach from the shared importer abstract
class, since classpathpyimporter is currently not functional
"""

The last commit that works on my machine is the one just before:

"""
commit cfed7ce10083ca69f2cec19b9a73d78b60e13967
Author: Isaiah Peng <[hidden email]>
Date:   Mon Sep 19 15:24:04 2016 +0200

    throw OSError for negative seek position
"""

Hope this helps!

-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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-dev
Reply | Threaded
Open this post in threaded view
|

Re: Building Jython3

Jim Baker-2
Thanks for kicking this specific discussion off. Some points:

1. We can switch to github now if we focus on Jython 3. I would suggest using squash merges (https://github.com/blog/2141-squash-your-commits). Then over time we can adopt CPython core workflow.

2. We should bring in the Gradle build process that Darjus is working on, and get that into Jython 3 as soon as possible.

3. Once we finish pushing the 2.7 changes into Jython 3, hopefully automated as Stefan suggests, we should backport going forward into 2.7 (some changes will have to be made against 2.7 of course). Having everything in https://github.com/jython/jython, with a branch for 2.7, should simplify; and follows the CPython model. This means Jython 3 will take advantage of the planned history rewriting.

On Tue, May 30, 2017 at 6:50 PM, [hidden email] <[hidden email]> wrote:
Starting a new thread, and including Isaiah Peng in case he has some
insights. Hi Isaiah! We are starting to discuss how to make the
Jython3 sandbox the main line for development after the Jython 2.7.1
release.

On Tue, May 30, 2017 at 6:39 AM, Jeff Allen <[hidden email]> wrote:
> Part of me wants to pursue it, but not as much as making Jython 3 build.

I took a look, and made a couple of changes that get Jython3 building
for me, so the tip of https://github.com/jython/jython3 should now
build (I hope).

For me though, it does not run. I always get:

$ ./dist/bin/jython
Exception in thread "main"
Exception: java.lang.NullPointerException thrown from the
UncaughtExceptionHandler in thread "main"

Investigating further, the issue seems to have been introduced on Sept
19 in this commit, which unfortunately, is a biggish one:

"""
commit 308a17a4e9972aa3814a358917ffbd25fd976864
Author: Isaiah Peng <[hidden email]>
Date:   Mon Sep 19 18:13:57 2016 +0200

    rewrite zipimporter, detach from the shared importer abstract
class, since classpathpyimporter is currently not functional
"""

The last commit that works on my machine is the one just before:

"""
commit cfed7ce10083ca69f2cec19b9a73d78b60e13967
Author: Isaiah Peng <[hidden email]>
Date:   Mon Sep 19 15:24:04 2016 +0200

    throw OSError for negative seek position
"""

Hope this helps!

-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
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-dev
Reply | Threaded
Open this post in threaded view
|

Re: Building Jython3

Jeff Allen-2
In reply to this post by fwierzbicki@gmail.com
I found the same problems and fixed them too. And one that prevents me
compiling on Windows. In the case of the "from __future__" problem I
solved it differently.

I will open a PR for this as a way of exercising the CPython process
(see thread about that). It will conflict with the new tip, but that's
ok because resolving merge conflicts is also a use case to learn. I have
to do this slowly, however, with the Git Book and dev guide open!

Jeff

Jeff Allen

On 31/05/2017 01:50, [hidden email] wrote:

> Starting a new thread, and including Isaiah Peng in case he has some
> insights. Hi Isaiah! We are starting to discuss how to make the
> Jython3 sandbox the main line for development after the Jython 2.7.1
> release.
>
> On Tue, May 30, 2017 at 6:39 AM, Jeff Allen <[hidden email]> wrote:
>> Part of me wants to pursue it, but not as much as making Jython 3 build.
> I took a look, and made a couple of changes that get Jython3 building
> for me, so the tip of https://github.com/jython/jython3 should now
> build (I hope).
>
> For me though, it does not run. I always get:
>
> $ ./dist/bin/jython
> Exception in thread "main"
> Exception: java.lang.NullPointerException thrown from the
> UncaughtExceptionHandler in thread "main"
>
> Investigating further, the issue seems to have been introduced on Sept
> 19 in this commit, which unfortunately, is a biggish one:
>
> """
> commit 308a17a4e9972aa3814a358917ffbd25fd976864
> Author: Isaiah Peng <[hidden email]>
> Date:   Mon Sep 19 18:13:57 2016 +0200
>
>      rewrite zipimporter, detach from the shared importer abstract
> class, since classpathpyimporter is currently not functional
> """
>
> The last commit that works on my machine is the one just before:
>
> """
> commit cfed7ce10083ca69f2cec19b9a73d78b60e13967
> Author: Isaiah Peng <[hidden email]>
> Date:   Mon Sep 19 15:24:04 2016 +0200
>
>      throw OSError for negative seek position
> """
>
> Hope this helps!
>
> -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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-dev
Reply | Threaded
Open this post in threaded view
|

Re: Building Jython3

Isaiah Peng
In reply to this post by fwierzbicki@gmail.com
Hi,

Congratulation on the new release of Jython 2.7.

For the build issue on windows, it should be some jnr-posix call in PosixModule not masked for windows platform.

Regarding gradle integration if we simply wants to fix the dependency management, we could improve the ivy task that's already included in the project. 

> UncaughtExceptionHandler in thread "main"
I'll try to figure out today

Best,
Isaiah

On Wed, 31 May 2017 at 02:51 [hidden email] <[hidden email]> wrote:
Starting a new thread, and including Isaiah Peng in case he has some
insights. Hi Isaiah! We are starting to discuss how to make the
Jython3 sandbox the main line for development after the Jython 2.7.1
release.

On Tue, May 30, 2017 at 6:39 AM, Jeff Allen <[hidden email]> wrote:
> Part of me wants to pursue it, but not as much as making Jython 3 build.

I took a look, and made a couple of changes that get Jython3 building
for me, so the tip of https://github.com/jython/jython3 should now
build (I hope).

For me though, it does not run. I always get:

$ ./dist/bin/jython
Exception in thread "main"
Exception: java.lang.NullPointerException thrown from the
UncaughtExceptionHandler in thread "main"

Investigating further, the issue seems to have been introduced on Sept
19 in this commit, which unfortunately, is a biggish one:

"""
commit 308a17a4e9972aa3814a358917ffbd25fd976864
Author: Isaiah Peng <[hidden email]>
Date:   Mon Sep 19 18:13:57 2016 +0200

    rewrite zipimporter, detach from the shared importer abstract
class, since classpathpyimporter is currently not functional
"""

The last commit that works on my machine is the one just before:

"""
commit cfed7ce10083ca69f2cec19b9a73d78b60e13967
Author: Isaiah Peng <[hidden email]>
Date:   Mon Sep 19 15:24:04 2016 +0200

    throw OSError for negative seek position
"""

Hope this helps!

-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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-dev
Reply | Threaded
Open this post in threaded view
|

Re: Building Jython3

Isaiah Peng
Hi Frank,

Looks like the master branch is force pushed, if I run `dist/bin/jython -S` it shows a stacktrace:

TypeError: org.python.modules.zipimport.PyZipImporter(): 1st arg can't be coerced to org.python.core.PyType
Exception in thread "main" java.util.NoSuchElementException                                                                                                at java.util.LinkedList.removeFirst(LinkedList.java:270)                                                                                           at java.util.LinkedList.pop(LinkedList.java:801)                   
        at org.python.core.Py.printException(Py.java:1420)                                       
        at org.python.core.Py.printException(Py.java:1362)                          
        at org.python.util.jython.run(jython.java:419)                                                                                            
        at org.python.util.jython.main(jython.java:141)                                              

However, when I try the old HEAD `9fae4ae17d27b540b6c22707317fd3c8d83d8cfe`, it can actually run without `-S`, but since I only have a linux machine, cannot grantee that you'll get the same result on other OS.

(git)-[9fae4ae...] % dist/bin/jython                                                                       
Listening for transport dt_socket at address: 5005                                                                                               
Jython 3.5.1a1+ (, Mai 31 2017, 22:20:58)                                                                                                        
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.8.0_131
Type "help", "copyright", "credits" or "license" for more information.                                                                           
>>>

A side note, don't use java9, the bootstrap process needs some change to be able to load java packages from java modules, as there is no more rt.jar exists.

Hope that helps.
Isaiah

On Wed, 31 May 2017 at 09:57 Isaiah Peng <[hidden email]> wrote:
Hi,

Congratulation on the new release of Jython 2.7.

For the build issue on windows, it should be some jnr-posix call in PosixModule not masked for windows platform.

Regarding gradle integration if we simply wants to fix the dependency management, we could improve the ivy task that's already included in the project. 

> UncaughtExceptionHandler in thread "main"
I'll try to figure out today

Best,
Isaiah

On Wed, 31 May 2017 at 02:51 [hidden email] <[hidden email]> wrote:
Starting a new thread, and including Isaiah Peng in case he has some
insights. Hi Isaiah! We are starting to discuss how to make the
Jython3 sandbox the main line for development after the Jython 2.7.1
release.

On Tue, May 30, 2017 at 6:39 AM, Jeff Allen <[hidden email]> wrote:
> Part of me wants to pursue it, but not as much as making Jython 3 build.

I took a look, and made a couple of changes that get Jython3 building
for me, so the tip of https://github.com/jython/jython3 should now
build (I hope).

For me though, it does not run. I always get:

$ ./dist/bin/jython
Exception in thread "main"
Exception: java.lang.NullPointerException thrown from the
UncaughtExceptionHandler in thread "main"

Investigating further, the issue seems to have been introduced on Sept
19 in this commit, which unfortunately, is a biggish one:

"""
commit 308a17a4e9972aa3814a358917ffbd25fd976864
Author: Isaiah Peng <[hidden email]>
Date:   Mon Sep 19 18:13:57 2016 +0200

    rewrite zipimporter, detach from the shared importer abstract
class, since classpathpyimporter is currently not functional
"""

The last commit that works on my machine is the one just before:

"""
commit cfed7ce10083ca69f2cec19b9a73d78b60e13967
Author: Isaiah Peng <[hidden email]>
Date:   Mon Sep 19 15:24:04 2016 +0200

    throw OSError for negative seek position
"""

Hope this helps!

-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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-dev
Reply | Threaded
Open this post in threaded view
|

Re: Building Jython3

Jeff Allen-2

It fails either way for me (-S or not), and with the same error Isaiah reports. However, I'm just impressed it compiles the 3.5 std lib.

When I say "the same error", I can tell that from debug, but in fact it dies trying to print the error because it can't find the right codec (cp850). I'm not phased though, as I've solved that before. (https://hg.python.org/jython/file/tip/src/org/python/core/Py.java#l1345) Lot's to chew on here.

Jeff

Jeff Allen
On 31/05/2017 21:29, Isaiah Peng wrote:
Hi Frank,

Looks like the master branch is force pushed, if I run `dist/bin/jython -S` it shows a stacktrace:

TypeError: org.python.modules.zipimport.PyZipImporter(): 1st arg can't be coerced to org.python.core.PyType
Exception in thread "main" java.util.NoSuchElementException                                                                                                at java.util.LinkedList.removeFirst(LinkedList.java:270)                                                                                           at java.util.LinkedList.pop(LinkedList.java:801)                   
        at org.python.core.Py.printException(Py.java:1420)                                       
        at org.python.core.Py.printException(Py.java:1362)                          
        at org.python.util.jython.run(jython.java:419)                                                                                            
        at org.python.util.jython.main(jython.java:141)                                              

However, when I try the old HEAD `9fae4ae17d27b540b6c22707317fd3c8d83d8cfe`, it can actually run without `-S`, but since I only have a linux machine, cannot grantee that you'll get the same result on other OS.

(git)-[9fae4ae...] % dist/bin/jython                                                                       
Listening for transport dt_socket at address: 5005                                                                                               
Jython 3.5.1a1+ (, Mai 31 2017, 22:20:58)                                                                                                        
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.8.0_131
Type "help", "copyright", "credits" or "license" for more information.                                                                           
>>>

A side note, don't use java9, the bootstrap process needs some change to be able to load java packages from java modules, as there is no more rt.jar exists.

Hope that helps.
Isaiah

On Wed, 31 May 2017 at 09:57 Isaiah Peng <[hidden email]> wrote:
Hi,

Congratulation on the new release of Jython 2.7.

For the build issue on windows, it should be some jnr-posix call in PosixModule not masked for windows platform.

Regarding gradle integration if we simply wants to fix the dependency management, we could improve the ivy task that's already included in the project. 

> UncaughtExceptionHandler in thread "main"
I'll try to figure out today

Best,
Isaiah

On Wed, 31 May 2017 at 02:51 [hidden email] <[hidden email]> wrote:
Starting a new thread, and including Isaiah Peng in case he has some
insights. Hi Isaiah! We are starting to discuss how to make the
Jython3 sandbox the main line for development after the Jython 2.7.1
release.

On Tue, May 30, 2017 at 6:39 AM, Jeff Allen <[hidden email]> wrote:
> Part of me wants to pursue it, but not as much as making Jython 3 build.

I took a look, and made a couple of changes that get Jython3 building
for me, so the tip of https://github.com/jython/jython3 should now
build (I hope).

For me though, it does not run. I always get:

$ ./dist/bin/jython
Exception in thread "main"
Exception: java.lang.NullPointerException thrown from the
UncaughtExceptionHandler in thread "main"

Investigating further, the issue seems to have been introduced on Sept
19 in this commit, which unfortunately, is a biggish one:

"""
commit 308a17a4e9972aa3814a358917ffbd25fd976864
Author: Isaiah Peng <[hidden email]>
Date:   Mon Sep 19 18:13:57 2016 +0200

    rewrite zipimporter, detach from the shared importer abstract
class, since classpathpyimporter is currently not functional
"""

The last commit that works on my machine is the one just before:

"""
commit cfed7ce10083ca69f2cec19b9a73d78b60e13967
Author: Isaiah Peng <[hidden email]>
Date:   Mon Sep 19 15:24:04 2016 +0200

    throw OSError for negative seek position
"""

Hope this helps!

-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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-dev
Reply | Threaded
Open this post in threaded view
|

Re: Building Jython3

Jeff Allen-2

I'm not sure I understand the relevance of "force pushed" as an explanation. However, it now builds for me in a version fetched from https://github.com/jython/jython3. I managed this change by following the CPython dev guide. (See https://github.com/jython/jython3/pull/29, and the thread I started about that process.) It was a bit long-winded, but the first time is not representative.

I'll turn to making sure I can get a meaningful stack trace out on Windows first, as the issue here is encoding -- familiar territory now -- and it is a prerequisite for other progress.

Jeff
Jeff Allen
On 31/05/2017 22:09, Jeff Allen wrote:

It fails either way for me (-S or not), and with the same error Isaiah reports. However, I'm just impressed it compiles the 3.5 std lib.

When I say "the same error", I can tell that from debug, but in fact it dies trying to print the error because it can't find the right codec (cp850). I'm not phased though, as I've solved that before. (https://hg.python.org/jython/file/tip/src/org/python/core/Py.java#l1345) Lot's to chew on here.

Jeff

Jeff Allen
On 31/05/2017 21:29, Isaiah Peng wrote:
Hi Frank,

Looks like the master branch is force pushed, if I run `dist/bin/jython -S` it shows a stacktrace:

TypeError: org.python.modules.zipimport.PyZipImporter(): 1st arg can't be coerced to org.python.core.PyType
Exception in thread "main" java.util.NoSuchElementException                                                                                                at java.util.LinkedList.removeFirst(LinkedList.java:270)                                                                                           at java.util.LinkedList.pop(LinkedList.java:801)                   
        at org.python.core.Py.printException(Py.java:1420)                                       
        at org.python.core.Py.printException(Py.java:1362)                          
        at org.python.util.jython.run(jython.java:419)                                                                                            
        at org.python.util.jython.main(jython.java:141)                                              

However, when I try the old HEAD `9fae4ae17d27b540b6c22707317fd3c8d83d8cfe`, it can actually run without `-S`, but since I only have a linux machine, cannot grantee that you'll get the same result on other OS.

(git)-[9fae4ae...] % dist/bin/jython                                                                       
Listening for transport dt_socket at address: 5005                                                                                               
Jython 3.5.1a1+ (, Mai 31 2017, 22:20:58)                                                                                                        
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.8.0_131
Type "help", "copyright", "credits" or "license" for more information.                                                                           
>>>

A side note, don't use java9, the bootstrap process needs some change to be able to load java packages from java modules, as there is no more rt.jar exists.

Hope that helps.
Isaiah

On Wed, 31 May 2017 at 09:57 Isaiah Peng <[hidden email]> wrote:
Hi,

Congratulation on the new release of Jython 2.7.

For the build issue on windows, it should be some jnr-posix call in PosixModule not masked for windows platform.

Regarding gradle integration if we simply wants to fix the dependency management, we could improve the ivy task that's already included in the project. 

> UncaughtExceptionHandler in thread "main"
I'll try to figure out today

Best,
Isaiah

On Wed, 31 May 2017 at 02:51 [hidden email] <[hidden email]> wrote:
Starting a new thread, and including Isaiah Peng in case he has some
insights. Hi Isaiah! We are starting to discuss how to make the
Jython3 sandbox the main line for development after the Jython 2.7.1
release.

On Tue, May 30, 2017 at 6:39 AM, Jeff Allen <[hidden email]> wrote:
> Part of me wants to pursue it, but not as much as making Jython 3 build.

I took a look, and made a couple of changes that get Jython3 building
for me, so the tip of https://github.com/jython/jython3 should now
build (I hope).

For me though, it does not run. I always get:

$ ./dist/bin/jython
Exception in thread "main"
Exception: java.lang.NullPointerException thrown from the
UncaughtExceptionHandler in thread "main"

Investigating further, the issue seems to have been introduced on Sept
19 in this commit, which unfortunately, is a biggish one:

"""
commit 308a17a4e9972aa3814a358917ffbd25fd976864
Author: Isaiah Peng <[hidden email]>
Date:   Mon Sep 19 18:13:57 2016 +0200

    rewrite zipimporter, detach from the shared importer abstract
class, since classpathpyimporter is currently not functional
"""

The last commit that works on my machine is the one just before:

"""
commit cfed7ce10083ca69f2cec19b9a73d78b60e13967
Author: Isaiah Peng <[hidden email]>
Date:   Mon Sep 19 15:24:04 2016 +0200

    throw OSError for negative seek position
"""

Hope this helps!

-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
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-dev
Reply | Threaded
Open this post in threaded view
|

Re: Building Jython3

Jeff Allen-2
In reply to this post by Jim Baker-2
On 31/05/2017 04:35, Jim Baker wrote:
Thanks for kicking this specific discussion off. Some points:

1. We can switch to github now if we focus on Jython 3. I would suggest using squash merges (https://github.com/blog/2141-squash-your-commits). Then over time we can adopt CPython core workflow.
I think this is good advice when we adopt the the git philosophy of topic-branching frequently committing. (We should.) With Mercurial, branching was discouraged (prohibited in the push, I think). Git gives us a lot of possibilities for squeezing out, at the PR stage or before, the noise-commits caused by merges and development choices later reverted. But let's only squash things together that belong together, and not be afraid to show key points on the journey to a feature if it aids others. This would all make reviewing a change easier.

I will continue using the CPython workflow (on the Jython 3 sandpit) experimentally. The missing part is the tools CPython created: labels, bots, and the linkage to the bug tracker.

2. We should bring in the Gradle build process that Darjus is working on, and get that into Jython 3 as soon as possible.
I'd be happy to adopt that when it's ready, but would like to get on with code.

3. Once we finish pushing the 2.7 changes into Jython 3, hopefully automated as Stefan suggests, we should backport going forward into 2.7 (some changes will have to be made against 2.7 of course). Having everything in https://github.com/jython/jython, with a branch for 2.7, should simplify; and follows the CPython model. This means Jython 3 will take advantage of the planned history rewriting.
Good reminder. Playing back to be sure I've understood ... At present Jython 3 lives separately from the official Jython repository. The desirable state is as Jim says to replicate the CPython pattern (https://docs.python.org/devguide/devcycle.html#branches) on the official Jython repo (https://github.com/jython/jython), where if I've understood correctly, Jython 2.7 (current master) becomes a 2.7 branch, and we bring in the present state of https://github.com/jython/jython3 as the new master. This would give us CI tests on Jython 3 that we presently lack.

I sense we might like to squash some of that into fewer "feature" commits, but not down to one massive one. This sounds like hard labour, maybe too hard.

Not sure I understand the scope of "the intended history re-writing".

 Jeff


On Tue, May 30, 2017 at 6:50 PM, [hidden email] <[hidden email]> wrote:
Starting a new thread, and including Isaiah Peng in case he has some
insights. Hi Isaiah! We are starting to discuss how to make the
Jython3 sandbox the main line for development after the Jython 2.7.1
release.

On Tue, May 30, 2017 at 6:39 AM, Jeff Allen <[hidden email]> wrote:
> Part of me wants to pursue it, but not as much as making Jython 3 build.

I took a look, and made a couple of changes that get Jython3 building
for me, so the tip of https://github.com/jython/jython3 should now
build (I hope).

For me though, it does not run. I always get:

$ ./dist/bin/jython
Exception in thread "main"
Exception: java.lang.NullPointerException thrown from the
UncaughtExceptionHandler in thread "main"

Investigating further, the issue seems to have been introduced on Sept
19 in this commit, which unfortunately, is a biggish one:

"""
commit 308a17a4e9972aa3814a358917ffbd25fd976864
Author: Isaiah Peng <[hidden email]>
Date:   Mon Sep 19 18:13:57 2016 +0200

    rewrite zipimporter, detach from the shared importer abstract
class, since classpathpyimporter is currently not functional
"""

The last commit that works on my machine is the one just before:

"""
commit cfed7ce10083ca69f2cec19b9a73d78b60e13967
Author: Isaiah Peng <[hidden email]>
Date:   Mon Sep 19 15:24:04 2016 +0200

    throw OSError for negative seek position
"""

Hope this helps!

-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
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-dev
Reply | Threaded
Open this post in threaded view
|

Re: Building Jython3

Douglas Clayton

On Sat, Jun 3, 2017 at 5:15 AM Jeff Allen <[hidden email]> wrote:
Git gives us a lot of possibilities for squeezing out, at the PR stage or before, the noise-commits caused by merges and development choices later reverted. But let's only squash things together that belong together, and not be afraid to show key points on the journey to a feature if it aids others. This would all make reviewing a change easier.

I have only contributed a few patches to Jython, but I have used git extensively for many years. I think Jeff's summary here is exactly the right approach: expect developers to clean up the noise and the false starts, but keep the "key points" that make the change intelligible to others. Github's squash merges flatten everything down, regardless of whether that clarifies or confuses the nature of the change. Learning how to do the "interactive rebase" for this definitely has a learning curve, but it pays off pretty quickly in keeping the history understandable. 


Doug




------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-dev
Reply | Threaded
Open this post in threaded view
|

Re: Building Jython3

Jeff Allen-2
In reply to this post by Jeff Allen-2

I find I can get as far as a REPL prompt with -S if I force the console encoding to ascii, and this will let me investigate the problems with import -- if that's not duplicating anyone else.

Jeff
Jeff Allen
On 31/05/2017 22:09, Jeff Allen wrote:

It fails either way for me (-S or not), and with the same error Isaiah reports. However, I'm just impressed it compiles the 3.5 std lib.

When I say "the same error", I can tell that from debug, but in fact it dies trying to print the error because it can't find the right codec (cp850). I'm not phased though, as I've solved that before. (https://hg.python.org/jython/file/tip/src/org/python/core/Py.java#l1345) Lot's to chew on here.

Jeff

Jeff Allen
On 31/05/2017 21:29, Isaiah Peng wrote:
Hi Frank,

Looks like the master branch is force pushed, if I run `dist/bin/jython -S` it shows a stacktrace:

TypeError: org.python.modules.zipimport.PyZipImporter(): 1st arg can't be coerced to org.python.core.PyType
Exception in thread "main" java.util.NoSuchElementException                                                                                                at java.util.LinkedList.removeFirst(LinkedList.java:270)                                                                                           at java.util.LinkedList.pop(LinkedList.java:801)                   
        at org.python.core.Py.printException(Py.java:1420)                                       
        at org.python.core.Py.printException(Py.java:1362)                          
        at org.python.util.jython.run(jython.java:419)                                                                                            
        at org.python.util.jython.main(jython.java:141)                                              

However, when I try the old HEAD `9fae4ae17d27b540b6c22707317fd3c8d83d8cfe`, it can actually run without `-S`, but since I only have a linux machine, cannot grantee that you'll get the same result on other OS.

(git)-[9fae4ae...] % dist/bin/jython                                                                       
Listening for transport dt_socket at address: 5005                                                                                               
Jython 3.5.1a1+ (, Mai 31 2017, 22:20:58)                                                                                                        
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.8.0_131
Type "help", "copyright", "credits" or "license" for more information.                                                                           
>>>

A side note, don't use java9, the bootstrap process needs some change to be able to load java packages from java modules, as there is no more rt.jar exists.

Hope that helps.
Isaiah

On Wed, 31 May 2017 at 09:57 Isaiah Peng <[hidden email]> wrote:
Hi,

Congratulation on the new release of Jython 2.7.

For the build issue on windows, it should be some jnr-posix call in PosixModule not masked for windows platform.

Regarding gradle integration if we simply wants to fix the dependency management, we could improve the ivy task that's already included in the project. 

> UncaughtExceptionHandler in thread "main"
I'll try to figure out today

Best,
Isaiah

On Wed, 31 May 2017 at 02:51 [hidden email] <[hidden email]> wrote:
Starting a new thread, and including Isaiah Peng in case he has some
insights. Hi Isaiah! We are starting to discuss how to make the
Jython3 sandbox the main line for development after the Jython 2.7.1
release.

On Tue, May 30, 2017 at 6:39 AM, Jeff Allen <[hidden email]> wrote:
> Part of me wants to pursue it, but not as much as making Jython 3 build.

I took a look, and made a couple of changes that get Jython3 building
for me, so the tip of https://github.com/jython/jython3 should now
build (I hope).

For me though, it does not run. I always get:

$ ./dist/bin/jython
Exception in thread "main"
Exception: java.lang.NullPointerException thrown from the
UncaughtExceptionHandler in thread "main"

Investigating further, the issue seems to have been introduced on Sept
19 in this commit, which unfortunately, is a biggish one:

"""
commit 308a17a4e9972aa3814a358917ffbd25fd976864
Author: Isaiah Peng <[hidden email]>
Date:   Mon Sep 19 18:13:57 2016 +0200

    rewrite zipimporter, detach from the shared importer abstract
class, since classpathpyimporter is currently not functional
"""

The last commit that works on my machine is the one just before:

"""
commit cfed7ce10083ca69f2cec19b9a73d78b60e13967
Author: Isaiah Peng <[hidden email]>
Date:   Mon Sep 19 15:24:04 2016 +0200

    throw OSError for negative seek position
"""

Hope this helps!

-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
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-dev
Reply | Threaded
Open this post in threaded view
|

Re: Building Jython3

Jim Baker-2
Good tip. This works for me on OSX:

$ PYTHONIOENCODING=ascii dist/bin/jython -S
Jython 3.5.1a1+ (, Jun 3 2017, 21:59:14)
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.8.0_112
>>> print(42)
42
>>>

We have some work in front of us to really get past this point.

On Sun, Jun 4, 2017 at 5:54 AM, Jeff Allen <[hidden email]> wrote:

I find I can get as far as a REPL prompt with -S if I force the console encoding to ascii, and this will let me investigate the problems with import -- if that's not duplicating anyone else.

Jeff
Jeff Allen
On 31/05/2017 22:09, Jeff Allen wrote:

It fails either way for me (-S or not), and with the same error Isaiah reports. However, I'm just impressed it compiles the 3.5 std lib.

When I say "the same error", I can tell that from debug, but in fact it dies trying to print the error because it can't find the right codec (cp850). I'm not phased though, as I've solved that before. (https://hg.python.org/jython/file/tip/src/org/python/core/Py.java#l1345) Lot's to chew on here.

Jeff

Jeff Allen
On 31/05/2017 21:29, Isaiah Peng wrote:
Hi Frank,

Looks like the master branch is force pushed, if I run `dist/bin/jython -S` it shows a stacktrace:

TypeError: org.python.modules.zipimport.PyZipImporter(): 1st arg can't be coerced to org.python.core.PyType
Exception in thread "main" java.util.NoSuchElementException                                                                                                at java.util.LinkedList.removeFirst(LinkedList.java:270)                                                                                           at java.util.LinkedList.pop(LinkedList.java:801)                   
        at org.python.core.Py.printException(Py.java:1420)                                       
        at org.python.core.Py.printException(Py.java:1362)                          
        at org.python.util.jython.run(jython.java:419)                                                                                            
        at org.python.util.jython.main(jython.java:141)                                              

However, when I try the old HEAD `9fae4ae17d27b540b6c22707317fd3c8d83d8cfe`, it can actually run without `-S`, but since I only have a linux machine, cannot grantee that you'll get the same result on other OS.

(git)-[9fae4ae...] % dist/bin/jython                                                                       
Listening for transport dt_socket at address: 5005                                                                                               
Jython 3.5.1a1+ (, Mai 31 2017, 22:20:58)                                                                                                        
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.8.0_131
Type "help", "copyright", "credits" or "license" for more information.                                                                           
>>>

A side note, don't use java9, the bootstrap process needs some change to be able to load java packages from java modules, as there is no more rt.jar exists.

Hope that helps.
Isaiah

On Wed, 31 May 2017 at 09:57 Isaiah Peng <[hidden email]> wrote:
Hi,

Congratulation on the new release of Jython 2.7.

For the build issue on windows, it should be some jnr-posix call in PosixModule not masked for windows platform.

Regarding gradle integration if we simply wants to fix the dependency management, we could improve the ivy task that's already included in the project. 

> UncaughtExceptionHandler in thread "main"
I'll try to figure out today

Best,
Isaiah

On Wed, 31 May 2017 at 02:51 [hidden email] <[hidden email]> wrote:
Starting a new thread, and including Isaiah Peng in case he has some
insights. Hi Isaiah! We are starting to discuss how to make the
Jython3 sandbox the main line for development after the Jython 2.7.1
release.

On Tue, May 30, 2017 at 6:39 AM, Jeff Allen <[hidden email]> wrote:
> Part of me wants to pursue it, but not as much as making Jython 3 build.

I took a look, and made a couple of changes that get Jython3 building
for me, so the tip of https://github.com/jython/jython3 should now
build (I hope).

For me though, it does not run. I always get:

$ ./dist/bin/jython
Exception in thread "main"
Exception: java.lang.NullPointerException thrown from the
UncaughtExceptionHandler in thread "main"

Investigating further, the issue seems to have been introduced on Sept
19 in this commit, which unfortunately, is a biggish one:

"""
commit 308a17a4e9972aa3814a358917ffbd25fd976864
Author: Isaiah Peng <[hidden email]>
Date:   Mon Sep 19 18:13:57 2016 +0200

    rewrite zipimporter, detach from the shared importer abstract
class, since classpathpyimporter is currently not functional
"""

The last commit that works on my machine is the one just before:

"""
commit cfed7ce10083ca69f2cec19b9a73d78b60e13967
Author: Isaiah Peng <[hidden email]>
Date:   Mon Sep 19 15:24:04 2016 +0200

    throw OSError for negative seek position
"""

Hope this helps!

-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
[hidden email]
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
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-dev
Reply | Threaded
Open this post in threaded view
|

Re: Building Jython3

Jim Baker-2
In reply to this post by Douglas Clayton
+1 to logical commits

I'm looking forward to using branches, vs having to carefully prep diffs. BitBucket PRs in particular didn't work well with hg.python.org's gate. Very tedious and time consuming, which unfortunately meant reviews took forever.

On Jun 3, 2017 9:44 AM, "Douglas Clayton" <[hidden email]> wrote:

On Sat, Jun 3, 2017 at 5:15 AM Jeff Allen <[hidden email]> wrote:
Git gives us a lot of possibilities for squeezing out, at the PR stage or before, the noise-commits caused by merges and development choices later reverted. But let's only squash things together that belong together, and not be afraid to show key points on the journey to a feature if it aids others. This would all make reviewing a change easier.

I have only contributed a few patches to Jython, but I have used git extensively for many years. I think Jeff's summary here is exactly the right approach: expect developers to clean up the noise and the false starts, but keep the "key points" that make the change intelligible to others. Github's squash merges flatten everything down, regardless of whether that clarifies or confuses the nature of the change. Learning how to do the "interactive rebase" for this definitely has a learning curve, but it pays off pretty quickly in keeping the history understandable. 


Doug




------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-dev