----- Original Nachricht ---- Von: "Dr. Trigon" dr.trigon@surfeu.ch An: pywikipedia-l@lists.wikimedia.org Datum: 01.08.2013 11:03 Betreff: Re: [Pywikipedia-l] Question about externals and patches
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 01.08.2013 05:37, info@gno.de wrote:
There is a remaining bug. Try the following e.g. from idle:
import Wikipedia
you are asked to install patch.exe. If you decline this request you are asked a second time. If declined a second time the script raises a fatal error while importing beautifullsoup. Beautifullsoup is a central part if the screen scraping compat framework and we should not prohibit using the framework for a cosmetic patch. Please give us back that part as e.g. externals or a library script. Anyway it is not a good idea to ask for installation (twice) and fall into a fatal error if you answer is NO. There should be alternatives to patching the working copy (e.g. nightly dump etc.)
Thank you very much for this info! I will look at this as soon as possible!
The question is how to handle the case you descibed? This questions have to be regarded as final part of the install/setup process (checkout, clone or download), so how to handle a sequence of N(o) answers? In fact this means that the user does not want to finish the install/setup process - this is somehow a paradox... Shall I simply output a message:
"Install process could not be finished, framework NOT ready for use!"
Please contribute your ideas! externals/__init__.py is supposed to help us, not to bother us... :) By the way the concept is not new, is was inspired by how "VisTrails" does this.
Thanks and Greetings DrTrigon
I don't like any installation process including rewrite branch/core and I am using pwb.py to have a directory based environment. Maybe for some reasons a installation is necessary but it should be very rare! There is no reason for patching beautifullsoup because we could either use the external library (as something like external) as it is or include it to the framework as it was previously. This is a central library for the compat branch and you cannot run it whithout that stuff. Missing this library stops running the whole framework if some users did not want to install any .exe file. Other patches only depends few scripts or not even a script is affected.
And please check whether a patch is necessary for other parts too and keep the code simple. I guess there could be other ways which have the same effect without running any .exe file which some people don't like to. E.g. for music21, pydmtx, zbar I don't understand why a patch is required (and for what scripts they are needed at all).
best
xqt
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
I don't like any installation process including rewrite branch/core and I am using pwb.py to have a directory based environment. Maybe for some reasons a installation is necessary but it should be very rare! There is no reason for patching beautifullsoup because we could either use the external library (as something like external) as it is or include it to the framework as it was previously. This is a central library for the compat branch and you cannot run it whithout that stuff. Missing this library stops running the whole framework if some users did not want to install any .exe file. Other patches only depends few scripts or not even a script is affected.
I don't like installation either!! This is not about installing the framework itself, but the dependencies needed! That's a big difference! Nobody forces you to use the externals/__init__.py you CAN do this all manually. But I for my part am very unhappy, if I have to install several packages and search them on the web, find the correct version, try to compile it and all the stuff - just to TEST, whether this pywikipedia framework could be useful to me. It is a good thing if it is able to do this by itself - still if you do it by yourself in advance there is no need for externals to jump in. That's supposed to be more beginner-friendly (it is a one-time help to start using the framework).
It is a bad idea to include code like beautifulsoup.py from another source. That makes confusion (who has written the code originally), is problematic with licenses and gives issues with merging new versions. (cosmetic changes were applied to our version and so it was not clear anymore how to merge this with the one upstream) - so we should NOT include other code into our repos! AND on linux systems there is beautifulsoup already included into the distro repo - so it makes no sense to include it with pywikipedia. (similarly for simplejson, setuptools, httplib2, ...)
And please check whether a patch is necessary for other parts too and keep the code simple. I guess there could be other ways which have the same effect without running any .exe file which some people don't like to. E.g. for music21, pydmtx, zbar I don't understand why a patch is required (and for what scripts they are needed at all).
In fact we discussed about all the stuff already in the past [1] (May 2013 till now - search for 'externals' and 'patch') where I explained all that in detail. (I kept it as simple as possible - I explained already several options - The patches are reduced to a minimum - Forking those packages just creates additional workload - Some of those packages are huge - ...)
[1] http://lists.wikimedia.org/pipermail/pywikipedia-l/
I already mentioned - several times - if you have a better solution (I searched one for months now!) then PLEASE tell me! I do not know any other solution to include all my code and scripts here! If you want me to remove them again, fine - I will do this - but it would have been nice to tell me this before I invested weeks of coding into that stuff! And as you should have been seeing e.g. in the migration to git submodules - externals/__init__.py was in fact an easy, simple and fast solution to work-a-round that stuff. Although we migrated to git, it is still as bad as svn - regarding externals or submodules neither (svn, git) has a good solution! But PLEASE tell me a better one if you know it!!
One last way out that I can think of is, we make it non-automatic; we could do it together with the creation of user-config.py as one explicit step the user has to do manually in the beginning (instead of jumping in automatically) - what about that?
Greetings and all the best! DrTrigon
pywikipedia-l@lists.wikimedia.org