Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #60153 > unrolled thread

how to deal with deprecating API functionality in python module?

Started byChris Friesen <chris.friesen@windriver.com>
First post2013-11-20 18:02 -0600
Last post2013-11-20 18:02 -0600
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  how to deal with deprecating API functionality in python module? Chris Friesen <chris.friesen@windriver.com> - 2013-11-20 18:02 -0600

#60153 — how to deal with deprecating API functionality in python module?

FromChris Friesen <chris.friesen@windriver.com>
Date2013-11-20 18:02 -0600
Subjecthow to deal with deprecating API functionality in python module?
Message-ID<mailman.2999.1385006861.18130.python-list@python.org>
Hi,

I'm pretty new to python, I'm trying to figure out how a python module 
is supposed to make non-backwards-compatible changes without blowing up 
the applications that use it.

In the C world this is straightforward, an application is linked against 
version X of the library, and if the library developers make a 
non-compatible change (remove a deprecated function, or change a 
function signature) they bump the version to X+1.  Then versions X and 
X+1 can both be installed on the system at the same time and 
applications will link against whichever one they were compiled against.

How would something like this work in a python application?  I don't see 
any way to do the equivalent of

import foo version X


Is the only way to incorporate the version in the name?  Like:

import fooX


Any guidance would be appreciated...


Thanks,
Chris

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web