Menu

#5 python-3.1 support

open
nobody
None
5
2013-10-11
2011-09-06
No

The attached patches make py-Xlib compile with python-3.1, while dropping support for python-2.4.x and python-2.5.x (2.6.x and 2.7.x are fine).

Discussion

  • Thomas Klausner

    Thomas Klausner - 2011-09-06

    Patch for python-3.1 support.

     
  • Anonymous

    Anonymous - 2013-09-04

    I'm afraid above patch was only the tip of the iceberg. Current xlib still uses tons of deprecated Python concepts, such as old-style classes, intermixing bytes and str, calling apply(), obsolete cmp(), the "new" module, and so on. On top of that, there are some Python 3 specific things which need to be ported, such as / now yielding a float (needs //), and imports now always being absolute instead of relative.

    The attached patch ports the whole Xlib, plus the examples and the tests. With this, all test cases and examples work with both python 2.7 and 3.3.

     
  • Marc Deslauriers

    Here is an updated version of the patch that fixes a couple of porting errors.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.