= Meeting 04/09/2010 = == When == * 4th of September, 2010. Starting at 10:00am. * [http://www.google.com/calendar/render?eid=anJmZjVtcDQzMHU5ZjRsZnZwamU0Mjh0dW8gMGdjdDRxcDY3b3Nuc3M5aXYwbDVwcXVqZ29AZw Google Calendar entry] == What == Port Genshi to Python 3. == Where == Yola offices, 35 Hope Street [http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=35+hope+street,+cape+town&sll=37.0625,-95.677068&sspn=55.016555,114.169922&ie=UTF8&hq=&hnear=35+Hope+St,+Cape+Town+City+Centre,+Cape+Town,+Western+Cape+8001,+South+Africa&z=17 map link]. (Google Maps still thinks !WebAfrica lives there.) If you can't be present in person you can join us on the #ctpug channel on the [http://www.atrum.org Atrum IRC network]. Some of us will also likely be present on #python-genshi on the Freenode IRC network. == Notes == * Simon Cross will apply to the PSF for fundng * Money to be spent on beer, pizzas, coffee and some memorabilia (coffee mugs currently the odds-on favourite). * We are unlikely to finish in a single sprint - Current plan is to work on some issues during the week after the sprint and have another session on the 11th. * Plan is to ignore C accelerator for the first pass, and port it if time allows * Aim for a single code-base, otherwise distribute and 2to3 solution if single code-base gets too complicated * Expected number of attendees: 6-10 == Preparation == * Porting discussion started on Genshi mailing list [http://groups.google.com/group/genshi/browse_thread/thread/838e8d187c46e549?hl=en link]. * No objections raised so far. * Jeroen (one of the Genshi committers) has offered to help get our code into Genshi svn when we're done (either as a branch or in trunk as appropriate). * Application for PSF funding successful. * Announcement submitted to Python Sprints ([http://pythonsprints.com/2010/08/7/cape-town-python-users-group-genshi-python-3-sprin/ link]). * Mugs designed and sent to printers. * Mugs collected. * Hg repository set up at http://bitbucket.org/hodgestar/genshi-py3k. == Results == * VICTORY! * Hg default branch runs and passes all tests on Python 2.4 to 2.6. * Branch passes all tests on Python 3.1 after running "python3 setup.py build" (using Distribute add-ons to call 2to3). * Branch appears to work on Python 3.2 too. * Several examples run and tested on Python 3.1 (other not run because they rely on outside packages being ported to Python 3). * C module (_speedups) ported and appears to work. * Rough port of [http://formencode.org FormEncode] to Python 3 performed by accident (see link below). * Some [http://www.pyweek.org PyWeek 11] judging while waiting for 2to3 to run. * Nine people attended. == Diffstats == {{{ $ hg diff -g -r 722 | diffstat .hgignore | 4 + MANIFEST.in | 1 README.txt | 5 + doc/common/doctools.py | 8 +- examples_to_py3k.sh | 8 ++ fixes/fix_unicode_in_strings.py | 17 ++++ genshi/_speedups.c | 77 +++++++++++++++++-- genshi/compat.py | 115 +++++++++++++++++++++++++++++ genshi/core.py | 25 ++++-- genshi/filters/html.py | 8 +- genshi/filters/i18n.py | 35 +++++--- genshi/filters/tests/__init__.py | 4 - genshi/filters/tests/i18n.py | 103 ++++++++++++++++---------- genshi/filters/tests/test_html.py | 142 ++++++++++++++++++------------------ genshi/filters/tests/transform.py | 20 +++-- genshi/filters/transform.py | 72 +++++++++++------- genshi/input.py | 33 +++++--- genshi/output.py | 2 genshi/template/astutil.py | 57 ++++++++++---- genshi/template/base.py | 11 +- genshi/template/directives.py | 6 - genshi/template/eval.py | 67 +++++++++------- genshi/template/loader.py | 4 - genshi/template/plugin.py | 2 genshi/template/tests/directives.py | 4 - genshi/template/tests/eval.py | 56 ++++++++------ genshi/template/tests/loader.py | 4 - genshi/template/tests/markup.py | 4 - genshi/template/tests/plugin.py | 6 - genshi/template/text.py | 4 - genshi/tests/core.py | 32 +++----- genshi/tests/input.py | 34 ++++---- genshi/tests/output.py | 4 - genshi/util.py | 29 ------- setup.py | 31 ++++++- 35 files changed, 686 insertions(+), 348 deletions(-) }}} == Post Sprint == * [http://groups.google.com/group/genshi/browse_thread/thread/57b0a6e77a76d3d8 Submission of patch to Genshi mailing list] * [attachment:explicit-utf8-template-encoding.diff Small patch to make Trac compatible with Genshi Py3k branch] (committed to Trac) * [attachment:genshi-py3k-test-patches.diff Patch to make Trac test suite pass with Genshi Py3k branch] (awaiting commit to Trac) == Links == * [http://pythonsprints.com/2010/08/7/cape-town-python-users-group-genshi-python-3-sprin/ Announcement on Python Sprints blog] * [http://pythonsprints.com/2010/08/11/yola-cape-town-south-africa/ Addition of Yola to Python Sprint locations] * [http://github.com/davidfraser/FormEncode Rough port of FormEncode to Python 3] == Mugs == [[Image(mugs-snakes.jpg)]] == Sprinters == [[Image(genshi-sprinters.jpg)]] * Wall: Genshi's test suite passing under Python 3 (with Tarantula Nebula behind) * Back (left-to-right): David, Graham, Stefano, Jeremy, Neil * Front (left-to-right): Simon, Nganpet, Adrianna