In 3.6, the Windows implementation of os.symlink can be simplified to directly call CreateSymbolicLinkW, since this function was added in Windows Vista. The support code for Py_CreateSymbolicLinkW can be removed from Modules/posixmodule.c. enable_symlink can also be removed because SeCreateSymbolicLinkPrivilege gets enabled automatically.
This patch also updates Win32SymlinkTests and Win32JunctionTests to use the user's %TEMP% directory instead of the source tree. It's much more likely that %TEMP% is on the system volume, which should be an NTFS volume that supports symbolic links and junctions.
We should look at merging this, though we need a few things to be done first (anyone can jump in and do these, doesn't have to be Eryk): * patch needs to be converted to a GitHub PR * we should use unique names within %TEMP% to avoid conflicts between tests running in parallel * PEP 7 has changed since the original patch * NEWS and maybe a What's New entry?
Eryk, would you like to address Steve's comments and convert your patch to a GitHub pull request? Let me know if you don't have time to prepare a new patch.
One other thing, I have come across some CI configurations recently where TEMP is not the best choice (e.g. when it's a mount point in a VM/container). It seems likely that at some point we'll centralize the "working directory" for the test suite in a way that can be overridden easily, so using one of the test.support members instead of %TEMP% directly will make that easier.