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

Transition from 2to3 setup code to use of six.py as py2/3 compatibility layer #374

Closed
wants to merge 16 commits into from

Conversation

joernhees
Copy link
Member

As a result from discussions in #373 we decided to try using six as a compatibility layer across python versions instead of on setup 2to3 conversion which might not work in certain environments.

@joernhees
Copy link
Member Author

do we still need ez_setup.py in the project dir? it won't work in py3

@joernhees
Copy link
Member Author

can we drop support for py3.2? u'strings' were re-introduced in py3.3 which would allow us not to change 1000 lines of code...
There still are some problematic lines with ur'strings' as py3.3 does not support this anymore due to \u \U escape inconsistencies. I fear we'll run into problems there.

@dbs
Copy link
Contributor

dbs commented Mar 30, 2014

See https://github.com/dbs/rdflib/tree/six_dbs for a number of additional commits on top of the "six" branch, which maintains 100% passing test coverage for Python 2.7 and brings the number of test failures down to 183 on Python 3.3.

Note that I used r'strings' instead of ur'strings' for a few of these commits; seemed to work just fine.

@dbs
Copy link
Contributor

dbs commented Mar 30, 2014

Pushed a bunch more commits onto https://github.com/dbs/rdflib/tree/six_dbs -- many of the unit tests were hidden behind earlier failures, which once those failures were fixed exposed more failures. Fun!

Python 3.3 is currently running at 177 errors / 28 failures, while Python 2.7 is running at 7 errors / 3 failures (looks like a regression slipped into rdflib/term.py). All in all, I believe we're much closer to the goal. What is left looks pretty hairy, though :/

@joernhees
Copy link
Member Author

yupp, once i find a moment i'll continue this and make sure to pull your changes in.
thanks for helping :)

@joernhees
Copy link
Member Author

@dbs i tried pulling in your fixes, but in the end it seems hopeless as there's too many things broken at once. I'm trying a new attempt in #438 where i'll move things away from 2to3 one by one. Hope this helps keeping the status green ;)

@joernhees joernhees closed this Nov 27, 2014
@joernhees joernhees deleted the six branch November 27, 2014 18:53
@dbs
Copy link
Contributor

dbs commented Nov 27, 2014

+1 - sounds like a good direction to me

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

Successfully merging this pull request may close these issues.

2 participants