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

Minor refactoring for Python 3 compatibility #28

Merged
merged 4 commits into from
Jun 25, 2018
Merged

Minor refactoring for Python 3 compatibility #28

merged 4 commits into from
Jun 25, 2018

Conversation

hvelarde
Copy link
Member

No description provided.

@hvelarde
Copy link
Member Author

@plone/framework-team please review.

@hvelarde
Copy link
Member Author

this seems to be zope.interface fault:

https://github.com/zopefoundation/zope.interface/blob/4.5.0/src/zope/interface/common/sequence.py#L34-L38

we need to remove __getitem__ from there also.

@jensens
Copy link
Member

jensens commented Jun 15, 2018

cc @pbauer

In py3 ``__getitem__`` not only gets a number (an index),
but it can also get a slice (i.e. the subscript on list[1:2:]).
@gforcada
Copy link
Member

@pbauer as you are more into the python3... I was fixing a test failure in plone.app.querystring that lead me to the commit I made here in this branch.

With my commit and without @hvelarde commit both p.a.querystring and p.a.contentlisting tests passes (circa one test that fails anyway in p.a.contentlisting). With @hvelarde and my commits there are 5 test failures.

@hvelarde which tests where you trying to fix? 🤔

@hvelarde
Copy link
Member Author

@gforcada I'm using a different approach to achieve Python 3 compatibility (using pylint --py3k to find issues in our code); as mentioned in the code itself __getslice__ has been deprecated since Python 2.0 and we need to remove it.

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.

5 participants