[MERGE] Small tweaks for _walkdirs_wint32
Alexander Belchenko
bialix at ukr.net
Thu Jul 17 19:29:19 BST 2008
John Arbash Meinel пишет:
> Alexander Belchenko wrote:
> | You can ignore my mail if you wish, but I simply can't pass over this
> | patch.
> | Thank you for writing this, I knew bzr must have this long ago,
> | but I was unable to write such code myself.
> |
>
> So, attached is a cleanup patch, which should address the concerns
> Alexander brought up.
>
> It does a few things
>
> 1) Changes the _walkdirs_utf8 implementation to cache its chosen
> selection. This way, it only checks it 1 run, rather than repeating the
> logic all the time.
Agreed.
> 2) Use evil hacks to test that it picks the right implementation based
> on the environment. These aren't terribly evil, but I don't usually like
> writing to variables like 'sys.platform' and 'os.name'.
>
> 3) Use os.name == 'nt' to skip this fast-path on Win98. I'd like people
> not on Vista to test this. (Windows XP, Windows 2000, Win98, etc.) But
> I'm 99% confident that it is correct.
I'm sorry to say this to you, but this is wrong. On Windows 98 os.name is 'nt' too.
As I explain in another mail win32utils.py has correct code (according to MSDN).
It should support Windows Vista, but I can't guarantee it will be valid for new
Windows version (when it will be released, in 2010 maybe?).
>
> 4) Some small documentation improvements and pyrex compatibility changes
> for Alexander.
Thank you for this.
> It is pretty minor, but especially since I changed the logic for
> _walkdirs_utf8 I didn't feel it was trivial enough to go without a review.
I'm sorry but
bb:resubmit
More information about the bazaar
mailing list