Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 470258

Summary: sys-apps/portage-2.1.11.62 with dev-python/pypy-2.0_beta2 passes unicode literal to tigetstr
Product: Portage Development Reporter: Alex Xu (Hello71) <alex_y_xu>
Component: Core - Interface (emerge)Assignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal Keywords: InVCS
Priority: Normal    
Version: 2.1   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 468524    

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.