Message12156

Author stefan.richthofer
Recipients jeff.allen, stefan.richthofer
Date 2018-10-22.14:11:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1540217480.52.0.788709270274.issue2656@psf.upfronthosting.co.za>
In-reply-to
Content
Right, the test needs consideration. This should only affect one single test: test_TraverseByReflection in test_gc_jy.py.
Traversal by reflection was experimental from the start and is only a fallback for PyObjects that neither implement Traverseproc nor are marked as @Untraversable (all Jython-included PyObjects comply). It is unlikely that someone uses advanced gc features while not taking care of his/her custom PyObjects to comply with traverseproc rules. Traverse by reflection was just meant as a fallback and debug feature to simplify adoption of traverseproc rules and advanced GC features in Jython 2.7.
So I guess it is rarly used at best and anyway only fallbag/debug feature. I think we can safely disable it by default and skip this single test.

If we want to preserve the test for Java 7/8 we would have to remove DONT_TRAVERSE_BY_REFLECTION in corresponding
setUpClass (via gc.removeJythonGCFlags). tearDownClass automatically restores the flags previously saved on setUpClass.

However I'd be fine with either solution - all JVMs or pre/post Java9 only.

I still believe this feature could be restored via JNI but given the rare use cases (debugging issues related to gc behavior differing from CPython) I wouldn't attempt to unless a compelling reason shows up.
History
Date User Action Args
2018-10-22 14:11:20stefan.richthofersetmessageid: <1540217480.52.0.788709270274.issue2656@psf.upfronthosting.co.za>
2018-10-22 14:11:20stefan.richthofersetrecipients: + stefan.richthofer, jeff.allen
2018-10-22 14:11:20stefan.richthoferlinkissue2656 messages
2018-10-22 14:11:19stefan.richthofercreate