Do Python libraries need a ersion number?
Eric S. Raymond
esr at thyrsus.com
Fri Dec 15 10:00:27 UTC 2017
Hal Murray <hmurray at megapathdsl.net>:
>
> esr at thyrsus.com said:
> > If you look in the library Python directories you will see that this is not
> > done. It would make writing imports a problem, as "ntp-1.0" is not parsed
> > as a single token in Python.
>
> So we have to use things like ntp, ntp2, ... ?
>
> Do Python libraries get used by other projects? (as compared to the project
> that installs them) How do they change the API?
You can load a library even if its API version has changed. It's up
to library authors to provide a version explicitly, if they choose to,
and library clients to check it, if they choose to.
In practice this is seldom done; instead APIs are kept backward-compatible.
Practice gets some help here from Python being a language that does not
conduce to bulky code; thus, nobody minds leaving old entry points in
place very much.
--
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
My work is funded by the Internet Civil Engineering Institute: https://icei.org
Please visit their site and donate: the civilization you save might be your own.
More information about the devel
mailing list