Bug 154975 - Changing python platform does not work
Changing python platform does not work
Status: NEW
Product: python
Classification: Unclassified
Component: Projects
6.x
All All
: P2 (vote)
: TBD
Assigned To: ardavis26
nbpythonqa
: REGRESSION
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-08 22:42 UTC by giorgio42
Modified: 2009-01-15 21:30 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description giorgio42 2008-12-08 22:42:41 UTC
NB 6.5 with Python EA, WinXP SP2, JDK 1.6.0_11.

I tried to use NB Python support with Python 2.6. This hangs NB on startup while the python26 folder is indexed.

After overcoming some hurdles I have been able to remove Python 2.6 again, Jython 2.5.0+ is the only remaining Python
platform now. When I try to run a script in my Python project I get a "selected project has broken python platform ...",
which is ok. However in the Project Properties I now have changed the platform back to Jython 2.5.0+ and I still get
this error message after pressing Shift-F6. If I look at project.properties I notice that platform.active=Python_2.6 has
not changed.

This breaks running Python code from within NB.
Comment 1 tonybeckham 2009-01-14 20:04:01 UTC
In the project properties, the platform selection drop down shows Jython but that does not mean that it has been set. 
You must first select the drop down then choose your platform.  Please try this to see if it solves your problem.
Comment 2 giorgio42 2009-01-15 17:17:14 UTC
Yes, this fixed the problem, but I regards this behavior as bug as well.

I would have expected handling of Python platforms to be consistent with handling Java platforms:
- NB does not silently switch to a different Python platform
- the project should be highlighted as having a "Reference Problem"
- in the project properties' Libraries dialog the drop down should show "Missing platform: Python 2.5.4" (or similar)
- the user has to select a valid platform to resolve the reference problem.
Comment 3 tonybeckham 2009-01-15 18:08:44 UTC
I agree with your points, and I think there is an issue here.  Silently switching could be bad if a user was set on
using a certain platform...thus, I think that "platform problem warning badge" could be added similar to a missing
server reference as in other NetBeans projects.  Along the same line, auto detection of python platforms should detect
any instance on your machine.
Comment 4 Peter Lam 2009-01-15 19:00:40 UTC
IMO, silently switching a platform is not a good thing. Automatically switching a the default is good if the selected
platform is not available, but warn the user and perhaps offer user with an option to do so when it's detected during
execution or debugging. I think there's already such an issue. I'll have to find it.
Comment 5 Peter Lam 2009-01-15 21:30:39 UTC
I could not find the issue that I thought have existed.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo