This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients gregory.p.smith, neologix, pitrou, python-dev, r.david.murray, rosslagerwall, vstinner
Date 2011-05-30.19:40:05
SpamBayes Score 4.3306985e-09
Marked as misclassified No
Message-id <201105302140.00131.victor.stinner@haypocalc.com>
In-reply-to <BANLkTi=dORP0=eWtPs2cfV_i1jshjCsigw@mail.gmail.com>
Content
> See the patch attached.

I like your patch, it removes many duplicate code :-)

Some comments:
 - I don't like an if surrounding the whole function, I prefer "if not ...: 
return" to avoid the (useless) indentation. Well, it's my coding style, do as 
you want.
 - You should add docstrings. Something like "Raise a SkipTest if the OS is 
Linux and the kernel version if lesser than min_version. For example, 
support.requires_linux_version(2, 6, 28) raises a SkipTest if the version is 
lesser than 2.6.28."
 - You should move the "if version < ..." outside the try/except ValueError

+            # platform.release() is something like '2.6.33.7-desktop-2mnb'
+            version_string = platform.release().split('-')[0]

Dummy micro-optimization: .split('-', 1)[0] or .partition('-')[0] is maybe 
better than .split('-')[0].

> > By the way, I like the new os.pipe2() function! You may want to document
> > it in
> > the "What's new in Python 3.3" doc (just mention the new function, the
> > document will be rephrased later).
> 
> Sure, where is this document?

Doc/whatsnew/3.3.rst
History
Date User Action Args
2011-05-30 19:40:06vstinnersetrecipients: + vstinner, gregory.p.smith, pitrou, r.david.murray, neologix, rosslagerwall, python-dev
2011-05-30 19:40:05vstinnerlinkissue12196 messages
2011-05-30 19:40:05vstinnercreate