Python 3 awareness, cleanups, _call replacements

Benjamin Tissoires benjamin.tissoires at gmail.com
Mon Jan 6 11:37:39 PST 2014


Hi Daniel,

thanks for submitting the v2.

I am waiting the "reviewed-by" from Peter regarding patches 2, 5 (commit
message changed a bit), 10 and 11, and I'll apply patches from 1 to 11
(except 8) so that you don't have to resend them later if a v3 is needed.

Regarding patch 8 -> I've commented in it :)

Regarding the rest of the series, I will need a little time to review
it. Some seems straightforward (12, 13, 14), but I'd like some more
reviews/testings on 15-18 and 19!

Cheers,
Benjamin

On Mon, Jan 6, 2014 at 12:38 PM, Daniel Martin <consume.noise at gmail.com
<mailto:consume.noise at gmail.com>> wrote:

    Hi folks,

    this is the second version of a series to make the Python stuff version
    3 aware. In this version I don't bump the Python requirement to 2.7.
    Instead, I've made sure that a `make test` runs fine with Python
    2.6(.8), 2.7(.6) and 3.3(.3).

    The first 11 patches are already known. I've incorporated the comments
    from Peter and adjusted the patches if necessary for max. Python
    compatibility.

    Patch 12 to 19 are new. First there're some cleanups, then 15 to 17 drop
    the _call() functions (and friends) and replace the whole functionallity
    with new wrappers for libc and libevemu API calls.
    Ctypes already knew a way to add a callback for return value checking.
    Using it might be the most important change to make calls into the
    shared libraries look better.

    While adding the wrappers, I've stumbled across evemu_play_one(). Unlike
    the other comparable evemu_... functions it didn't return a negative
    value on error, but a positive one. I don't know if you like this API
    change.

    As always: Comments are welcome.


    Cheers,
        Daniel

    [PATCH evemu 01/19] Make it possible to overwrite python binary via
    [PATCH evemu 02/19] py: Replace print statement with function call
    [PATCH evemu 03/19] py: Don't use find_library for libevemu.so
    [PATCH evemu 04/19] tests: Replace tab with spaces
    [PATCH evemu 05/19] py: Raise statement takes one argument
    [PATCH evemu 06/19] py: Fix file opening
    [PATCH evemu 07/19] py: Fix file object detection
    [PATCH evemu 08/19] py: Add _callstr() - returns str object
    [PATCH evemu 09/19] tests: Open temporary device file in text mode
    [PATCH evemu 10/19] tests: Fix tests with fixed lists
    [PATCH evemu 11/19] py: Change has_prop() and has_event() to return
    [PATCH evemu 12/19] py: Remove unused constants from const.py
    [PATCH evemu 13/19] py: Generate complete dicts in event_names.py
    [PATCH evemu 14/19] py: Cleanup imports, make attr usage more obvious
    [PATCH evemu 15/19] py: Add base class LibraryWrapper
    [PATCH evemu 16/19] py: Add and use wrapper for libc calls
    [PATCH evemu 17/19] py: Add and use wrapper for libevemu calls
    [PATCH evemu 18/19] tests: Compare vendor id with int not str
    [PATCH evemu 19/19] Make evemu_play_one() return negative value on
    _______________________________________________
    Input-tools mailing list
    Input-tools at lists.freedesktop.org
    <mailto:Input-tools at lists.freedesktop.org>
    http://lists.freedesktop.org/mailman/listinfo/input-tools




More information about the Input-tools mailing list