Message112335
I'm attaching this patch for discussion: Here's what I had in mind for addressing the NotImplementedError when calling os.symlink on Windows XP. During the posixmodule initialization, if the system does not have the CreateSymbolicLink API call, the function is never added to the module. This will greatly simplify the tests and will limit the impact of this new capability on Windows XP.
This function could be extended to do the same for privilege testing.
Caution - I have not tested the patch, only written it for discussion purposes.
What do you think of this approach to hide the NotImplementedError? If there's no objection, I'll flesh out the complete implementation, update the tests and documentation, and resubmit another patch.
How about using this technique to hide the function when the privilege isn't present?
The one objection I could see w.r.t. privileges is the privilege could be granted after the module is initialized - meaning that a given process would need to have the privilege granted before importing the os module. |
|
Date |
User |
Action |
Args |
2010-08-01 14:48:28 | jaraco | set | recipients:
+ jaraco, eric.smith, brian.curtin |
2010-08-01 14:48:27 | jaraco | set | messageid: <1280674107.78.0.812756473512.issue9333@psf.upfronthosting.co.za> |
2010-08-01 14:48:24 | jaraco | link | issue9333 messages |
2010-08-01 14:48:24 | jaraco | create | |
|