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 amaury.forgeotdarc, asvetlov, brian.curtin, eric.smith, ggenellina, giampaolo.rodola, jafo, jaraco, lemburg, loewis, nnorwitz, r.david.murray, ssbarnea, swarren
Date 2010-02-08.00:35:46
SpamBayes Score 8.2800433e-13
Marked as misclassified No
Message-id <D67B8A86984F00488D0776065BA56DBD882237DF2A@Teach.jaraco.com>
In-reply-to <1265083603.77.0.330667072003.issue1578269@psf.upfronthosting.co.za>
Content
Enclosed is patch 21, which addresses the concerns raised by Brian.

Note that I still have work to do resolving the limited user account test failures.

> Brian Curtin <curtin@acm.org> added the comment:
> 
> Most of the guts have already been reviewed, but here are some mainly
> minor comments on the last patch.

Thanks again for the thorough review.

> Lib/test/symlink_support.py
> - No need to import print_function
> - I'd just put the docstrings on one line
> - A bunch of if tests are one-lined

I left `import print_function` in so the script can be run on Python 2.6 without modification.

> Lib/test/test_win_symlink.py
> - getwindowsversion now returns named members, so you can just use
> getwindowsversion().major for example, rather than the tuple.
> - Rather than check the Windows version in the setUp, I think it would
> be cleaner to use the unittest.skipIf decorator on the entire
> WindowsSymlinkTest class.
> - You might want to stack skip decorators to first skip outright if
> it's not Windows, and then skip if it's not Win 6 or greater -- it gets
> you out of checking if getwindowsversion actually exists.
> - test_remove_directory_link_to_missing_target has some commented out
> code.

I tried implementing it using decorators, but I'm not confident that stacking decorators will alleviate the need for checking hasattr(sys, 'getwindowsversion') because the decorators will get run even if the previous decorator returns a skip. If this is possible, please propose a solution. Otherwise, the technique written should work (I'll prove it more with subsequent reports).

I did refactor the tests so there's no longer commented code, but there are now two tests that are skipped and will fail if not skipped. I would like to keep these here to capture where functionality may be improved (though it's not obvious to me that these tests necessarily should pass).

> Modules/posixmodule.c
> - Line 2740 - "//*** todo: fix this"
> - C++ style comments in a few other places (nit picky, I know)
> - Line 5117 - win_symlink__doc__ is double spaced and contains an extra
> slash at line 5121. For consistency it should probably just be single
> spaced.

Done. I removed the TODO. I believe it's an old comment that was already resolved.
Files
File name Uploaded
windows symlink draft 21.patch jaraco, 2010-02-08.00:35:46
History
Date User Action Args
2010-02-08 00:35:49jaracosetrecipients: + jaraco, lemburg, loewis, nnorwitz, jafo, amaury.forgeotdarc, ggenellina, eric.smith, giampaolo.rodola, swarren, r.david.murray, ssbarnea, brian.curtin, asvetlov
2010-02-08 00:35:47jaracolinkissue1578269 messages
2010-02-08 00:35:46jaracocreate