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

Fix unrestrictedTraverse not handling unicode strings #718

Closed
wants to merge 1 commit into from

Conversation

jugmac00
Copy link
Member

... under Python 2.

This closes #715.

modified: CHANGES.rst
modified: src/OFS/Traversable.py
modified: src/OFS/tests/testTraverse.py

... under Python 2.

This closes #715.

modified:   CHANGES.rst
modified:   src/OFS/Traversable.py
modified:   src/OFS/tests/testTraverse.py
Copy link
Member

@dataflake dataflake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your patch breaks the expected semantics that I am reading out of the discussion on #674. The incoming path should be a native string. You're now allowing unicode strings under Python 2, which are not native strings under Python 2. I would also consider your issue #715 ad invalid because you're asking for something that was explicitly not supported, see the comment inside unrestrictedTraverse.

I would close, this PR, close #715 as invalid and change your own code. Check the strings you get back from the call to getDatabaseNames and convert them to native strings before using them in the call to unrestrictredTraverse.

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

Successfully merging this pull request may close these issues.

None yet

2 participants