[Yum-devel] [UG] [PATCH] handle non-integer sub-versions

Michael Stenner mstenner at linux.duke.edu
Thu May 19 18:24:55 UTC 2005


On Thu, May 19, 2005 at 10:53:51AM +1000, Martin Pool wrote:
> Aaron identified this bug in urlgrabber, which is used (and much
> appreciated) in bazaar-ng.
> 
> (Actually I think you may need to do hasattr(sys, 'version_info') to
> handle 1.x pythons.)

Thanks very much.

  1) I don't care about 1.x pythons.  urlgrabber now requires urllib2,
     which doesn't exist in 1.x.
  2) I don't feel compelled to parse sys.version
  3) I didn't know about sys.version_info and my life is better now :)

It's fixed in CVS.  I'll probably push a new version soon.  I'll try
and do a once-over soon to see if there's any other outstanding stuff
I need to do.

> ----- Forwarded message from Aaron Bentley <aaron.bentley at utoronto.ca> -----
> urlgrabber parses the Python version string, but doesn't handle all 
> possibilities correctly; it assumes all integers, and some python 
> installs will have something different.  For my install, sys.version 
> reads: "2.3.4c1 (#4, Jul 20 2004, 08:57:39)
> [GCC 2.95.4 20011002 (Debian prerelease)]"

As a sidenote, I had changed the preparsing (in cvs) to not assume
integers, but using version_info is better still, both because it's
cleaner and also because I'm sure to conform the the python version
format.  This way, if somebody has something crazy in the version
(like '2.3+') that causes trouble, I can just blame it on the python
package :)
					-Michael
-- 
  Michael D. Stenner                            mstenner at ece.arizona.edu
  ECE Department, the University of Arizona                 520-626-1619
  1230 E. Speedway Blvd., Tucson, AZ 85721-0104                 ECE 524G



More information about the Yum-devel mailing list