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

 
 

bug #38477: inconsistent API for str vs unicode

Submitted by:  Thomas Vander Stichele <thomasvs>
Submitted on:  Wed 06 Mar 2013 03:34:52 PM UTC  
 
Category: PythonSeverity: 5 - Average
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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

See if the commit 003bcbf fixes.

Rocky Bernstein <rocky>
Project 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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 16 Sep 2013 01:10:36 AM UTCrockyOpen/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup