Kevin Ollivier wrote:
On Oct 22, 2004, at 12:03 PM, Chris Barker wrote: [snip - sorry,
we're going to get bogged down by the very same issues that were
discussed earlier]
well, yes. let's not do that. But I do think there is a need for more
clarity of the issues. I'm still not sure where you stand:
Do you think there should be no wx.select at all? Or that it should only
select "major" versions? or ???
I do know you strongly support a better defined, and stronger, system
for maintaining backward compatibility among "minor" version upgrades.
I think we're all for that, provided it doesn't bog down improvements
too much. Of course, it's the "too much" that it is hard to agree on!
Honestly, I'll probably put a wx.requires() line in every app I
write, just like I put a python version number in every #! line.
And that's exactly why I think you and Robin aren't on the same page
here.
Could be. That's why I'm trying to clarify things now. I don't thin it's
all that clear to any of us how this new feature will be used, and as
you said, the earlier we find that out the better, because before too
long, the cat will be out of the bag (to add more animal metaphors)
As he said above, he doesn't expect people to use it as you intend to
here. He wants it only for those who want (need?) to stay-behind, as
a crutch, so to speak, and my guess is that he expects it to be a temporary one at that.
I guess I'm not sure how one ever knows if you need to stay behind or
not. All I ever know is that what I have now works with the version(s)
I've tested it on. If I install it on my, or another person's, machine,
I don't want it to break when a newer version of wxPython is installed.
I can't know if the newer version will break it until it comes out, and
then it's too late to change something already installed.
I do certainly intend to keep any apps I'm maintaining up to date with
current versions.
You seem to want to use it to create a managed environment on other
users' machines.
Exactly, that's one very important use for me.
So, I certainly think there's the potential for some users to use
this feature all the time as a core component of their distribution
strategy.
I know I will.
If more than a few people do this, it could make life really
difficult for wxPython users who just want to download a script and
run it using the latest wxPython.
Here's were we disagree. Which is better:
1) User downloads an script, when it's run, it returns with an error:
"Can't find wxPython2.5.8, which is required for this script"
(or some other helpful message)
or
2) user downloads a script, tries to run it, and it starts up just fine,
then crashes when the mouse is clicked, with an error like:
TypeError: DC_DrawBitmap() takes at most 4 arguments (5 given)
I'd say the first one is much preferred. It is completely clear what the
problem is. While it may be annoying that they now have to either go get
another version of wxPython, or change the "select" line and test it,
that's better than an error from some place deep in the code that just
makes it look like you've given them a buggy piece of software.
For any code I'm giving to the world, I'll probably put the select()
call inside a try block, and give the user a useful message about what
version's I've tested on, and what they should do it they want to test
on a different version, but they should know that they are using an
untested version.
Again, I think if you are distributing to completely naive users, you
should either bundle it, or provide the run time environment for them anyway.
As a result, I think the current approach has a real potential to
introduce as many (if not more) problems than it solves.
I really don't see it as more problems, just making really clear what
the problems are. One point might be that the existence of this system
provides incentive for:
A) Robin to not make much effort at cross-version compatibility
B) Keeping developers (wxPython users) from bothering to test across
versions
This is true , but I think we can count on some discipline in these issues.
And there's the tracer bullet dilemna here - once we know whether or
not it will really introduce problems, many users will already be
using it.
True, but how can we figure this out without testing it?
As an end user of Python scripts, I find someone forcing the user to
create a managed environment
I'm not suggesting forcing anything. The *.py file is being distributed
here. All you need to do is comment out the select() line!
to be, IMHO, annoying. It's one thing to provide the information a
user needs to create a managed environment, but it's another thing
entirely to not even give the user a choice.
Either provide a package that includes everything the user'll need
and doesn't muck with how they've configured their own Python
environment, or let them choose how to configure their environment
themselves and suffer any potential consequences.
How the heck hard is it to comment out one "select()" line at the top of
a script? Any user that can't do that should get a bundle or run-time
environment. I really think you're concerned about a very narrow group of
users: not knowledgeable enough to comment out a line, but knowledgeable
enough to "choose how to configure their environment themselves". Also
knowledgeable enough to not get pissed off when the app crashes due to a
version incompatibility, with no message indicating that this is a problem.
Any number of READMEs that say "this was only tested with the following
versions of wxPython" is less effective than something explicit in the
code, and an error message (or warning) when run.
But don't make the user scour the web for the exact version of
components X, Y, and Z your app needs and then install and configure
them - just so that they can run your app. (Which is, BTW, far more
error prone and troublesome than just shipping me a bundled app!)
I agree, you should either provide a bundles app, or provide and
installer for components X, Y, and Z. That is, if you're trying to
support your users.
I definitely think it should fall back to the default installation,
perhaps popping up a wxMessageBox saying that you're running against
a version other than the recommended version so there may be
problems. (Perhaps also opening a browser window with the wxPython
downloads page if the person says they want to install the proper
version.) This gives the user a choice: install the wxPython version
requested, or try it as is. As long as it's the user, not the
developer, that makes the decision, then I'm okay with it.
Okay, I like this too. As long as the tested version is specified in the code, and the user knows they are running with an untested version, I'm okay with that too. Hey maybe all this jabbering has actually resulted in a consensus we all like!
Anyway, I still think it's useful for us to write down our suspected use
cases, so we can get an idea of how we think this is going to be used,
and decide if:
--the approach supports the uses we envision
--We think the uses are a good idea, or will "introduce more problems
than they solve"
I'll repeat what I wrote before, I hope other will add/comment:
1) folks on wxPython-dev:
We want to be able to run various versions, and have them all installed
at once. wx.require() is a great way to handle this. On the other hand,
we're also sophisticated enough to develop and use our own schemes for
switching between versions.
2) end users, who may not even know their app is written in Python:
These folks should be given a package built with Py2exe Py2app, or
whatever, and this is a non-issue there too.
3) wxPython programmers:
These are folks that are using wxPython, but not involved in it's
development. They have less need to run multiple versions, but they
still have some need. They nay have apps and utilities already written
that they don't want to change when they upgrade, they may see examples
in the Wiki that use a different version than they are using, etc.
wx.require would be very helpful to these folks.
4) Managed users:
These are folks that will run various wxPython based programs on their
machines. They haven't written them themselves, but will use them , and
have newer ones installed later. The programs and the wxPython
installers will have be provided to them. This is a group I am
targeting. Folks in my organization that I give small utilities to. I
don't mind having to give them a new wxPython installer when I give them
a new app that requires and updated version, but I want the stuff I gave
them last year to still work also.
-Chris
···
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker@noaa.gov