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 jaraco
Recipients brian.curtin, eric.smith, jaraco
Date 2010-08-01.14:48:23
SpamBayes Score 0.04852537
Marked as misclassified No
Message-id <1280674107.78.0.812756473512.issue9333@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2010-08-01 14:48:28jaracosetrecipients: + jaraco, eric.smith, brian.curtin
2010-08-01 14:48:27jaracosetmessageid: <1280674107.78.0.812756473512.issue9333@psf.upfronthosting.co.za>
2010-08-01 14:48:24jaracolinkissue9333 messages
2010-08-01 14:48:24jaracocreate