Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange call of policy.validate in Traversable #926

Open
gotcha opened this issue Oct 31, 2020 · 3 comments
Open

Strange call of policy.validate in Traversable #926

gotcha opened this issue Oct 31, 2020 · 3 comments
Labels

Comments

@gotcha
Copy link
Member

gotcha commented Oct 31, 2020

While debugging, I came to the following line:

obj, obj, None, next):

Which passes None to validate instead of the name variable that is used at line 301.

@dataflake @icemac Do you see a reason for not passing the actual nameto that validate call ?

All other calls in restrictedTraverse (except 1) do pass the available namevariable.

@dataflake
Copy link
Member

If you look at the git blame you will notice that none of us ever touched this code and it's been that way forever. So no, I do not know.

If there is an actual problem it would be helpful if you described it.

@gotcha
Copy link
Member Author

gotcha commented Oct 31, 2020

I actually went through git blame until first commit by hannosch which sounds like moving from elsewhere.
I know none of you did touch it.

I think it is spurious that the name is not used in this particular case. And I am asking advice of people I consider wise.
Think of this as code review while trying to make sense of code when debugging.

And sorry for the noise if you think this makes no sense.

@icemac
Copy link
Member

icemac commented Nov 4, 2020

I think this code was added in e10b7d6 (_none has the value of None and was changed in a later commit to None.) – Looks like it was introduced in Zope 2.9.

I must admit that I do not understand what was the goal of that change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants