Edgewall Software

Opened 17 years ago

Closed 17 years ago

#177 closed defect (fixed)

genshi trunk doesn't work on python 2.3

Reported by: anonymous Owned by: cmlenz
Priority: major Milestone: 0.5
Component: General Version: devel
Keywords: Cc:

Description

Not sure if this is intentional or not. I hope it's not.

The two issues I ran into before I gave up were:

  • ast.GenExpr? doesn't exist, and
  • "exec foo in bar, baz" won't accept a non-dict for baz.

I ended up just using 0.4.4 instead.

Change History (4)

comment:1 Changed 17 years ago by cboos

For the second point, isn't that a matter of doing:

  • genshi/template/base.py

     
    470470                yield kind, (tag, Attrs(new_attrs)), pos
    471471
    472472            elif kind is EXPR:
    473                 result = data.evaluate(ctxt)
     473                result = data.evaluate(_ctxt2dict(ctxt))
    474474                if result is not None:
    475475                    # First check for a string, otherwise the iterable test
    476476                    # below succeeds, and the string will be chopped up into

(not tested, just thought about that while looking at the code)

comment:2 Changed 17 years ago by cmlenz

  • Status changed from new to assigned

#175 marked as dupe.

comment:3 Changed 17 years ago by anonymous

Why explicitly check the version, and not do something like hasattr(ast, 'GenExpr')?

comment:4 Changed 17 years ago by cmlenz

  • Resolution set to fixed
  • Status changed from assigned to closed

There are some test failures remaining (mostly due to missing line number reporting in Expat), but otherwise trunk should now work correctly on Python 2.3 after [822:826].

Note: See TracTickets for help on using tickets.