[Python-Dev] what level of backward compatibility? how

Jewett, Jim J jim.jewett at eds.com
Thu May 6 17:19:51 EDT 2004


urlparse.py uses lists of strings to indicate which
protocols have which properties.

For instance:

    uses_relative = ['ftp', 'http', 'gopher', 'nntp', 'imap',	 
                     'wais', 'file', 'https', 'shttp', 'mms',
                     'prospero', 'rtsp', 'rtspu', '']

Logically, these are sets, rather than lists.

CVS change 143 changed the lists to sets.

Unfortunately, it breaks client code that did

    urlparse.uses_relative.append('my_protocol')

which was as close to a documented API as existed.

(1)  Is this an OK breakage with the 2.4 switch?
(2)  If not, should this change be backed out, or 
replaced with some set subclass that takes a few of
the list methods?

-jJ



More information about the Python-Dev mailing list