Ticket #29 (closed defect: fixed)

Opened 11 months ago

Last modified 5 months ago

Wrong System Reqirements

Reported by: adem2@yandex.ru Assigned to: ian
Priority: trivial Milestone: Urwid 0.9.8
Component: documentation Version:
Keywords: Cc:

Description

urwid 0.9.8.1 is NOT compatible with Python 2.2

File urwid/canvas.py contains generator expressions in line 483 and more. When I tried to install urwid with Python 2.3.4, I had got a message about syntax error

File source/str_util.c contains constants Py_RETURN_TRUE and Py_RETURN_FALSE which are absent in header files of Python 2.3.4

Attachments

Change History

02/15/08 15:06:24 changed by ian

Thanks for the report.

Do you know how to fix this? I haven't looked into the C side of python modules much yet. Failing that, you can remove the c module and urwid will use the python old_str_util module instead.

Let me know what works for you.

Ian

02/16/08 03:58:42 changed by adem2@yandex.ru

It seems that these macros exist in the newer versions of Python only for convenience, to don't forget to apply Py_INCREF

So solving of the problem should be something like this:

#ifndef Py_RETURN_TRUE #define Py_RETURN_TRUE return Py_INCREF(Py_True), Py_True #endif

#ifndef Py_RETURN_FALSE #define Py_RETURN_FALSE return Py_INCREF(Py_False), Py_False #endif

For now I try to use urwid-0.9.7.2 but it's not a good idea so I'll try to solve these problems for me.

Is it possible to change generator expressions on something like map(lambda x: x[0], .......) conditionally, depend on Python version or presense of generator expressions? How makes this better?

07/29/08 16:40:51 changed by anonymous

  • status changed from new to closed.
  • resolution set to fixed.

Add/Change #29 (Wrong System Reqirements)




Change Properties
Action