wiki:Meeting20100904

Meeting 2010-09-04

When

What

Port Genshi to Python 3.

Where

Yola offices, 35 Hope Street  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  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  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 ( 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  FormEncode to Python 3 performed by accident (see link below).
  • Some  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

Mugs

Mugs shot.

Sprinters

Most of the people present at the sprint

  • 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

Attachments