Rev 2.66 of funcobject.c made func.__name__ writable for the first time. That's great, but the patch also introduced what I'm pretty sure was an unintended incompatibility: after 2.66, func.__name__ was no longer *readable* in restricted execution mode. I can't think of a good reason to restrict reading func.__name__, and it looks like this part of the change was an accident. So, unless someone objects soon, I intend to restore that func.__name__ is readable regardless of execution mode (but will continue to be unwritable in restricted execution mode). Objections? Tres Seaver filed a bug report (some Zope tests fail under 2.4 because of this): http://www.python.org/sf/1124295
Tim Peters <tim.peters@gmail.com> writes:
Rev 2.66 of funcobject.c made func.__name__ writable for the first time. That's great, but the patch also introduced what I'm pretty sure was an unintended incompatibility: after 2.66, func.__name__ was no longer *readable* in restricted execution mode.
Yeah, my bad.
I can't think of a good reason to restrict reading func.__name__, and it looks like this part of the change was an accident. So, unless someone objects soon, I intend to restore that func.__name__ is readable regardless of execution mode (but will continue to be unwritable in restricted execution mode).
Objections?
Well, I fixed it on reading the bug report and before getting to python-dev mail :) Sorry if this duplicated your work, but hey, it was only a two line change... Cheers, mwh -- The only problem with Microsoft is they just have no taste. -- Steve Jobs, (From _Triumph of the Nerds_ PBS special) and quoted by Aahz on comp.lang.python
[Michael Hudson]
... Well, I fixed it on reading the bug report and before getting to python-dev mail :) Sorry if this duplicated your work, but hey, it was only a two line change...
Na, the real work was tracking it down in the bowels of Zope's C-coded security machinery -- we'll let you do that part next time <wink>. Did you add a test to ensure this remains fixed? A NEWS blurb (at least for 2.4.1 -- the test failures under 2.4 are very visible in the Zope world, due to auto-generated test runner failure reports)?
Tim Peters <tim.peters@gmail.com> writes:
[Michael Hudson]
... Well, I fixed it on reading the bug report and before getting to python-dev mail :) Sorry if this duplicated your work, but hey, it was only a two line change...
Na, the real work was tracking it down in the bowels of Zope's C-coded security machinery -- we'll let you do that part next time <wink>.
Did you add a test to ensure this remains fixed?
Yup.
A NEWS blurb (at least for 2.4.1 -- the test failures under 2.4 are very visible in the Zope world, due to auto-generated test runner failure reports)?
No, I'll do that now. I'm not very good at remembering NEWS blurbs... Cheers, mwh -- 6. The code definitely is not portable - it will produce incorrect results if run from the surface of Mars. -- James Bonfield, http://www.ioccc.org/2000/rince.hint
[sorry for the near-duplicate msgs -- looks like gmail lied when it claimed the first msg was still in "draft" status]
Did you add a test to ensure this remains fixed?
[mwh]
Yup.
Bless you. Did you attach a contributor agreement and mark the test as being contributed under said contributor agreement, adjacent to your valid copyright notice <wink>?
A NEWS blurb ...?
No, I'll do that now. I'm not very good at remembering NEWS blurbs...
LOL -- sorry, I'm just imagining what NEWS would look like if we required a contributor-agreement notification on each blurb. I appreciate your work here, and will try to find a drug to counteract the ones I appear to have overdosed on this morning ...
Tim Peters <tim.peters@gmail.com> writes:
[sorry for the near-duplicate msgs -- looks like gmail lied when it claimed the first msg was still in "draft" status]
Did you add a test to ensure this remains fixed?
[mwh]
Yup.
Bless you. Did you attach a contributor agreement and mark the test as being contributed under said contributor agreement, adjacent to your valid copyright notice <wink>?
Fortunately 2 lines < 25 lines, so I think I'm safe on this one :) Cheers, mwh -- <moshez> glyph: I don't know anything about reality. -- from Twisted.Quotes
[Michael Hudson]
... Well, I fixed it on reading the bug report and before getting to python-dev mail :) Sorry if this duplicated your work, but hey, it was only a two line change...
Na, the real work was tracking it down in the bowels of Zope's C-coded security machinery -- we'll let you do that part next time <wink>. Did you add a test to ensure this remains fixed? A NEWS blurb (at least for 2.4.1 -- the test failures under 2.4 are visible in the Zope world, due to auto-generated test runner failure reports; alas, this is in a new test, and 2.4 worked fine with the Zope tests as they were when 2.4 was released)?
participants (2)
-
Michael Hudson -
Tim Peters