Message5032

Author fabioz
Recipients fabioz
Date 2009-08-15.23:11:07
SpamBayes Score 4.1415826e-10
Marked as misclassified No
Message-id <1250377868.14.0.707427294015.issue1438@psf.upfronthosting.co.za>
In-reply-to
Content
When running with the -Dpython.security.respectJavaAccessibility=false,
the way the code is run which can break programs.

E.g.: 

The code:

frame = JFrame()
frame.visible = True 

will call the setVisible() method, whereas with
respectJavaAccessibility=False it will change the internal variable
'visible'.

This shouldn't happen... when there's a set/get for it, that should be
used as the default access regardless of respectJavaAccessibility (maybe
those internal variables could be exposed with some sort of name
mangling, as python does for its internal variables).

Note: This is pretty important for the pydev debugger, as it'll run with
respectJavaAccessibility=False to be able to gather information on the
java classes, but with that change, the behavior is so different from
running without that flag that it becomes unusable on code using the
property access (and without it, it cannot get information on the java
fields, which is pretty important too). 

Another option would be removing the property access altogether and
force users to use the set/get methods, but I guess that could break
many clients already using it.
History
Date User Action Args
2009-08-15 23:11:08fabiozsetrecipients: + fabioz
2009-08-15 23:11:08fabiozsetmessageid: <1250377868.14.0.707427294015.issue1438@psf.upfronthosting.co.za>
2009-08-15 23:11:08fabiozlinkissue1438 messages
2009-08-15 23:11:07fabiozcreate