Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with xproto.OpenFont with Python 3 #5

Closed
flacjacket opened this issue Jun 25, 2014 · 3 comments
Closed

Problem with xproto.OpenFont with Python 3 #5

flacjacket opened this issue Jun 25, 2014 · 3 comments

Comments

@flacjacket
Copy link
Collaborator

I got rid of the obvious Python 3 compatibility issues in qtile and tried running the test suite. It wound up failing, throwing the following exception a lot:

Traceback (most recent call last):
  File "/usr/lib64/python3.3/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/home/sean/qtile/qtile/test/utils.py", line 95, in wrapped_fun
    return function(self)
  File "/home/sean/qtile/qtile/test/test_bar.py", line 272, in test_err
    self.qtileRaises(libqtile.confreader.ConfigError, ErrConf())
  File "/home/sean/qtile/qtile/test/utils.py", line 187, in qtileRaises
    config, self.display, self.fname)
  File "/usr/lib64/python3.3/unittest/case.py", line 570, in assertRaises
    return context.handle('assertRaises', callableObj, args, kwargs)
  File "/usr/lib64/python3.3/unittest/case.py", line 135, in handle
    callable_obj(*args, **kwargs)
  File "/home/sean/qtile/qtile/libqtile/manager.py", line 78, in __init__
    self.conn = xcbq.Connection(displayName)
  File "/home/sean/qtile/qtile/libqtile/xcbq.py", line 751, in __init__
    self.cursors = Cursors(self)
  File "/home/sean/qtile/qtile/libqtile/xcbq.py", line 925, in __init__
    self._new(name, cursor_font)
  File "/home/sean/qtile/qtile/libqtile/xcbq.py", line 929, in _new
    self.conn.conn.core.OpenFont(fid, len("cursor"), "cursor")
  File "/usr/lib64/python3.3/site-packages/xcffib-prerelease-py3.3-linux-x86_64.egg/xcffib/xproto.py", line 1587, in OpenFont
    buf.write(xcffib.pack_list(name, "c"))
  File "/usr/lib64/python3.3/site-packages/xcffib-prerelease-py3.3-linux-x86_64.egg/xcffib/__init__.py", line 517, in pack_list
    return struct.pack("=" + pack_type * len(from_), *tuple(from_))
struct.error: char format requires a bytes object of length 1

It looks like it is a problem with this, rather than a problem with qtile, I haven't had a chance to look into it, but I will try to figure out what is the problem.

@tych0 tych0 closed this as completed in ff1f60b Jun 25, 2014
@tych0
Copy link
Owner

tych0 commented Jun 25, 2014

Ah yes, another wonderful python3 bug. It also looks like at some point I also introduced an intermittent seg fault in the python 3 tests :-(

@tych0
Copy link
Owner

tych0 commented Jun 25, 2014

Also, thanks for looking into all this! If you want to add your python3 commits somewhere, you can make PRs to https://github.com/tych0/qtile/tree/cffi and I can merge them with the rest of the CFFI stuff once we go that route.

@flacjacket
Copy link
Collaborator Author

No problem! I'd looked into making qtile run on 3, but got snagged on stuff like xpyb, I owe a great thanks to xcffib for that. I'll push up my workings on a Python 3 with cffi qtile branch and open a PR against your branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants