I was so excited about getting IronPython 2.7.2 out the door, I briefly dropped my common sense and made a change to IronPython that never should have been made without triggering another RC release. So what the hell happened?
The change in question is f8cce37. The correction is 4a76497.
What Broke?
The property in question – MaybeNotImplemented – checks to see if a method’s return type has the MaybeNotImplemented attribute, which tells IronPython that the operator may return NotImplemented; this indicates that the attempted operation doesn’t work and that other options should be tried. Without specifying [return:MaybeNotImplemented] on a native method, IronPython won’t generate code to perform the other operations.
Windows Phone Fixes
The issue that triggered the initial change was #32374. This is interesting in itself, as it turns out that MethodInfo.ReturnParameter is not supported on Windows Phone 7 – it exists, and it compiles, but it throws NotSupportException. Joy.
Since mobile support was new, I figured that making a change specific to Windows Phone should be OK. And it probably would have been, had I done what I originally intended and put the new WP7 code in an #if block and left the original code intact. But instead I decided that if the new code worked for both, why not use it?
Static Typing is Not Enough
Notice how small the fix is? MethodInfo.ReturnTypeCustomAttributes returns an ICustomAttributeProvider, which has the IsDefined method. As it turns out, MethodInfo also implements ICustomAttributeProvider. This means that the original fix compiled, ran, and worked for most cases, but failed on others. And they failed in the worst possible way – silently (except for the part where the program breaks).
But but but … TESTS!
Yes, the tests should have caught it. Unfortunately IronPython has been running for a while without paying much attention to the state of the tests, and there’s really no one to blame for this except me. Most of the CPython standard library tests fail at some point or another, which drowns out the useful failures in a sea of noise. This, of course, has to change, so for 2.7.3 I’m focusing on the much smaller set of tests specifically for IronPython (not those inherited from CPython).
After this, there’s no way 2.7.3 is going out without at least that baseline set of tests green, and once I get them in order all new contributions will have to pass the relevant tests. This should be the only time that I have to do an emergency release.
In the meantime, IronPython 2.7.2.1 is available, which fixes this issue.
ReplyDeleteWelcome to my blog
http://my-way-here.blogspot.com
Liberal Democrat Chris Koster hopes to cover up a miserable crime record
ReplyDeleteas Attorney General by trying to embellish a spotty record as Cass County
prosecutor in their new and undeniably false ad pay day loans uk if you've got low credit score, and also you own your house, then an replacement for receiving a quick loan would be to choose a secured loan.
Get wedding decor wholesale from suppliers to bring down the cost.
ReplyDeleteThe typical ceremonies that one can expect to come across in an Indian wedding would include
the 'sangeet', the 'mehndi', the 'milni', and the 'haldi'.
Items used may include hangings, jewelry, gift tags and coin
bags.
my web page :: simple outdoor wedding decorating
Thank you for every other informative website.
ReplyDeleteWhere else may I am getting that type of info written in such an ideal method?
I've a venture that I am simply now running on, and I've been
on the glance out for such information.
Also visit my web blog is quantrim safe
My web page > what Quantrim is made of
Hello friends, how is everything, and what you want to say regarding this piece of
ReplyDeletewriting, in my view its genuinely awesome in support of me.
My web-site: get fit with quantrim
It's a new year, and that means new interior design trends are emerging. Laminate floors come in a huge variety of colors, patterns and designs, and cost a lot less than wood or carpet. Eco Timber Hardwood Flooring, American Clay Interior Plaster, Blue Slide Art Tile, Plumbing Fixtures, Lighting, Window Coverings and much more.
ReplyDeleteFeel free to visit my site; small home interior ideas
Hello Dear, are you actually visiting this web site regularly, if so then you will absolutely get nice
ReplyDeleteknowledge.
Also visit my blog post any dicount for quantrim
I've been surfing online more than 3 hours today, yet I never found any interesting article like yours. It is pretty worth enough for me. In my opinion, if all site owners and bloggers made good content as you did, the internet will be much more useful than ever before.
ReplyDeleteHere is my blog post :: quantrim customer review
What's up, always i used to check website posts here early in the morning, since i like to gain knowledge of more and more.
ReplyDeleteMy blog :: sian
Thanks for sharing your thoughts on scramasaxe.
ReplyDeleteRegards
my blog post - where to buy quantirm