bugCompact Disc Input and Control Library - Bugs: bug #38477, inconsistent API for str vs unicode

 
 

bug #38477: inconsistent API for str vs unicode

Submitter:  Thomas Vander Stichele <thomasvs>
Submitted:  Wed 06 Mar 2013 03:34:52 PM UTC
   
 
Category:  Python Severity:  5 - Average
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 07 Mar 2013 12:04:46 AM UTC, comment #1: 

See if the commit 003bcbf fixes.

Rocky Bernstein <rocky>
Group administrator
Wed 06 Mar 2013 03:34:52 PM UTC, original submission:  

This commit: http://git.savannah.gnu.org/gitweb/?p=libcdio/pycdio.git;a=commitdiff;h=1e1c7975c799e9daa595b99aa6ab989a9d4f0959

changed the return type for get_devices_with_cap from list of str to list of unicode.

However, other functions do not accept unicode.

See the below python shell session to demonstrate the issue:



>>> import cdio
>>> cdio.get_devices_with_cap(pycdio.FS_MATCH_ALL, False)

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'pycdio' is not defined

>>> import pycdio
>>> cdio.get_devices_with_cap(pycdio.FS_MATCH_ALL, False)

[u'/dev/cdrom']

>>> pycdio.open_cd(u'/dev/cdrom')

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "pycdio.py", line 835, in open_cd
    return _pycdio.open_cd(*args)
TypeError: in method 'open_cd', argument 1 of type 'char const *'

>>> pycdio.open_cd('/dev/cdrom')

<Swig Object of type 'CdIo_t *' at 0x7f6e2eb1a720>

Thomas Vander Stichele <thomasvs>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rocky (Posted a comment)
  • -email is unavailable- added by thomasvs (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-09-16 rocky Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code