Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 470258 - sys-apps/portage-2.1.11.62 with dev-python/pypy-2.0_beta2 passes unicode literal to tigetstr
Summary: sys-apps/portage-2.1.11.62 with dev-python/pypy-2.0_beta2 passes unicode lite...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 468524
  Show dependency tree
 
Reported: 2013-05-18 14:05 UTC by Alex Xu (Hello71)
Modified: 2013-05-19 00:27 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Xu (Hello71) 2013-05-18 14:05:40 UTC
pym/_emerge/JobStatusDisplay.py:

from __future__ import unicode_literals
...
class JobStatusDisplay(object):
...
        _termcap_name_map = {
                'carriage_return' : 'cr',
                'clr_eol'         : 'el',
                'newline'         : 'nel',
        }
...
                for k, capname in self._termcap_name_map.items():
                        code = tigetstr(capname)

pypy doesn't like this and spits out:

initializer for ctype 'char *' must be a str or list or tuple, not unicode

with a backtrace.

This fixes the issue:

                for k, capname in self._termcap_name_map.items():
-                        code = tigetstr(capname)
+                        code = tigetstr(str(capname))
Comment 2 Zac Medico gentoo-dev 2013-05-19 00:26:17 UTC
This is fixed in 2.1.12.1 and 2.2.0_alpha176.