<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#330033" bgcolor="#ffffff">
On 4/5/2011 11:52 AM, Barry Warsaw wrote:
<blockquote cite="mid:20110405145213.29f706aa@neurotica.wooz.org"
type="cite">
<pre wrap="">#. Module version numbers SHOULD conform to the normalized version
format specified in PEP 386 [6]_.
</pre>
</blockquote>
From PEP 386:<br>
<br>
<blockquote type="cite">
<div class="section" id="roadmap">
<h1><a class="toc-backref"
href="http://www.python.org/dev/peps/pep-0386/#id21">Roadmap</a></h1>
<p>Distutils will deprecate its existing versions class in favor
of
<tt class="docutils literal">NormalizedVersion</tt>. The <tt
class="docutils literal">verlib</tt> module presented in
this PEP will be
renamed to <tt class="docutils literal">version</tt> and
placed into the <tt class="docutils literal">distutils</tt>
package.</p>
</div>
</blockquote>
<br>
With more standardization of versions, should the version module be
promoted to stdlib directly?<br>
<br>
<br>
On 4/5/2011 11:52 AM, Barry Warsaw wrote:<br>
<blockquote type="cite">
<pre wrap=""> DEFAULT_VERSION_RE = re.compile(r'(?P<version>\d+\.\d(?:\.\d+)?)')
</pre>
</blockquote>
<blockquote type="cite">
<pre wrap=""> __version__ = pkgutil.get_distribution('elle').metadata['version']
</pre>
</blockquote>
<br>
The RE as given won't match alpha, beta, rc, dev, and post suffixes
that are discussed in POP 386.<br>
<br>
Nor will it match the code shown and quoted for the alternative
distutils2 case.<br>
<br>
<br>
Other comments:<br>
<br>
Are there issues for finding and loading multiple versions of the
same module?<br>
<br>
Should it be possible to determine a version before loading a
module? If yes, the version module would have to be able to find a
parse version strings in any of the many places this PEP suggests
they could be... so that would be somewhat complex, but the
complexity shouldn't be used to change the answer... but if the
answer is yes, it might encourage fewer variant cases to be
supported for acceptable version definition locations for this PEP.<br>
</body>
</html>