do we still need to generate applevel _exceptions.py?
Hi pypy-dev, We have pypy/lib/_exceptions.py which is a generated applevel definition and gets translated to pypy/module/exceptionsinterp.py by Christian fine geninterp mechanism. Now to fix some remaining compliancy bugs it seems easy to fix the applevel exceptions definition unless there is a need to still be able to regenerate that as well. I'd guess the latter is not neccessary anymore so is it fine to just fix pypy/lib/_exceptions.py and regenerate? And what was the incantation again to regenerate the exceptionsinterp.py again (did i miss some piece of documentation somewhere)? cheers, holger
holger krekel wrote:
Hi pypy-dev,
We have pypy/lib/_exceptions.py which is a generated applevel definition and gets translated to pypy/module/exceptionsinterp.py by Christian fine geninterp mechanism. Now to fix some remaining compliancy bugs it seems easy to fix the applevel exceptions definition unless there is a need to still be able to regenerate that as well. I'd guess the latter is not neccessary anymore so is it fine to just fix pypy/lib/_exceptions.py and regenerate? And what was the incantation again to regenerate the exceptionsinterp.py again (did i miss some piece of documentation somewhere)?
I think we can continue to generate the exceptions. For migration to future versions, it finds subtle argument additions quite nicely. The only complicancy problems that I see are the __str__ methods. There are just a few to be implemented by hand. A mechanism to supply these methods is inside the generator. As an example there is already one such method implemented, see the end of pypy/tool/_enumerate_exceptions.py About interpleveling the things, I agree with Armin that this should be cache-generated, soon. Will look into that. ciao - chris -- Christian Tismer :^) <mailto:tismer@stackless.com> tismerysoft GmbH : Have a break! Take a ride on Python's Johannes-Niemeyer-Weg 9A : *Starship* http://starship.python.net/ 14109 Berlin : PGP key -> http://wwwkeys.pgp.net/ work +49 30 802 86 56 mobile +49 173 24 18 776 fax +49 30 80 90 57 05 PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04 whom do you want to sponsor today? http://www.stackless.com/
Hi Christian, On Sun, May 08, 2005 at 20:35 +0200, Christian Tismer wrote:
holger krekel wrote:
We have pypy/lib/_exceptions.py which is a generated applevel definition and gets translated to pypy/module/exceptionsinterp.py by Christian fine geninterp mechanism. Now to fix some remaining compliancy bugs it seems easy to fix the applevel exceptions definition unless there is a need to still be able to regenerate that as well. I'd guess the latter is not neccessary anymore so is it fine to just fix pypy/lib/_exceptions.py and regenerate? And what was the incantation again to regenerate the exceptionsinterp.py again (did i miss some piece of documentation somewhere)?
I think we can continue to generate the exceptions. For migration to future versions, it finds subtle argument additions quite nicely.
Right. But after we move to 2.4 do you expect many changes to track?
The only complicancy problems that I see are the __str__ methods. There are just a few to be implemented by hand. A mechanism to supply these methods is inside the generator. As an example there is already one such method implemented, see the end of pypy/tool/_enumerate_exceptions.py
thanks, i hope i used it correctly.
About interpleveling the things, I agree with Armin that this should be cache-generated, soon. Will look into that.
yes, that would be great. In addition i wouldn't mind if we allow to modify the __str__ methods directly in the applevel file at least while staying with a minor python version, it's also more straightforward to test via lib/test2 then. thanks & cheers, holger
participants (3)
-
Christian Tismer
-
holger krekel
-
hpk@trillke.net