Products.cmfplone: port UnicodeSplitter to Python 3

Created on 26 Jun 2018  路  9Comments  路  Source: plone/Products.CMFPlone

With https://github.com/plone/Products.CMFPlone/commit/4fc016f102c9bcadd84c8b4ef63850b31182b0e1 the tests for UnicodeSplitter no longer use PloneTestCase. That means they can now be run in python 3 with ./bin/test -s Products.CMFPlone -t testUnicodeSplitter and as expected they fails spectacularly.
Porting UnicodeSplitter and related tests to py3 requires more knowledge of japanese that I have 馃槈

@terapyon can you please have a look at it or delegate it to someone who might be able to do this?

All 9 comments

@pbauer Okay, I will check the code in this week.

@pbauer

I try to make a new env for Py3 in Ubuntu. But I got error. Please let me know to fix the error.

$ ./bin/buildout -c py3.cfg
mr.developer: The package 'z3c.objpath' from auto-checkout has no source information.

z3c.objpath should not be needed anymore since https://github.com/plone/buildout.coredev/commit/855c6d412e7e4add0f67cbd1fd0d991d21ba003b#diff-f31379029ed90855a5d01e9641483909 (pushed less than an hour ago).

Be sure you have the latest buildout.coredev checkout.
If it is still not working add this line to the [sources] section

z3c.objpath                   = git ${remotes:zope}/z3c.objpath.git                     pushurl=${remotes:zope_push}/z3c.objpath.git                    branch=master

@ale-rt Thank you! I got the new code, I'm trying setup for Py3.

I've just run the test. I got Total: 24 tests, 9 failures, 5 errors and 0 skipped in 10.285 seconds. .
I will go to local developer event (4days camp) next week. I will try to fix this issue with my friends.

@terapyon any news on this issue?

I'm sorry, I'm trying the fix. Please wait for a few weeks.

@terapyon given you are busy I tried with this patch on the python3 branch: https://github.com/plone/Products.CMFPlone/commit/37b106ca9aa5434017a6e6a3c09452a54596c799
Feel free to correct it if wrong!

Note: I just tried to make the tests pass, but maybe we want the splitter methods to return bytes in Python2 and text in Python3 (now they return bytes in both)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

skleinfeldt picture skleinfeldt  路  5Comments

hvelarde picture hvelarde  路  3Comments

MrTango picture MrTango  路  4Comments

pbauer picture pbauer  路  3Comments

pbauer picture pbauer  路  5Comments