[issue10784] os.getpriority() and os.setpriority()

2011-02-25 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: Committed in r88608 including Py_RETURN_NONE and Py_BEGIN/END_ALLOW_THREADS changes. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org

[issue10784] os.getpriority() and os.setpriority()

2011-02-25 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: Misc/NEWS updated in r88609. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10784 ___

[issue10784] os.getpriority() and os.setpriority()

2011-02-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: == ERROR: test_set_get_priority (test.test_os.ProgramPriorityTests) -- Traceback (most recent call last):

[issue10784] os.getpriority() and os.setpriority()

2011-02-25 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: On Sat, Feb 26, 2011 at 12:11:10AM +, Antoine Pitrou wrote: if err.errno != errno.EACCESS: AttributeError: 'module' object has no attribute 'EACCESS' That was one 'S' too many. Should be errno.EACCES Looks like Antoine has fixed

[issue10784] os.getpriority() and os.setpriority()

2011-02-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Indeed. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10784 ___ ___

[issue10784] os.getpriority() and os.setpriority()

2011-01-10 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: Question: should Py_BEGIN/END_ALLOW_THREADS be used around getpriority() and setpriority() calls? It's still not clear to me when to use them exactly. -- ___ Python tracker

[issue10784] os.getpriority() and os.setpriority()

2011-01-10 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: You should use begin/end allow threads when the system call might block. To get an indication, trace through the kernel code of some system; my guess is that these are typically non-blocking (i.e. return immediately) - but I might be

[issue10784] os.getpriority() and os.setpriority()

2011-01-10 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10784 ___ ___ Python-bugs-list

[issue10784] os.getpriority() and os.setpriority()

2010-12-28 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Looks good. Would there be a point in making any of the parameters optional? -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10784

[issue10784] os.getpriority() and os.setpriority()

2010-12-28 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Looks good. Would there be a point in making any of the parameters optional? No. The API should look exactly as it does on the system level. Anybody calling these functions should know how call them. --

[issue10784] os.getpriority() and os.setpriority()

2010-12-27 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola' g.rod...@gmail.com: After having implemented a similar thing in psutil ( http://code.google.com/p/psutil/issues/detail?id=142 ) I decided to contribute a patch for Python which exposes getpriority() and setpriority() POSIX calls in the os module. They

[issue10784] os.getpriority() and os.setpriority()

2010-12-27 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: Forgot to attach the patch. -- Added file: http://bugs.python.org/file20177/getsetpriority.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10784

[issue10784] os.getpriority() and os.setpriority()

2010-12-27 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +christian.heimes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10784 ___ ___

[issue10784] os.getpriority() and os.setpriority()

2010-12-27 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: Patch looks good, just one thing: In setpriority(), it should be possible to use the Py_RETURN_NONE; macro instead of INCREFing manually. -- components: +Extension Modules nosy: +rosslagerwall type: - feature request