[Python-Dev] Python 2.5.1

"Martin v. Löwis" martin at v.loewis.de
Sat Apr 28 01:10:13 CEST 2007

Khalid A. Bakr schrieb:
> 1. The bz2 archive ships with
> \Modules\collectionsmodule.c instead of the
> \Modules\_collectionsmodule.c used in the 2.5 SVN
> branch. In fact the collectionsmodule.c was removed
> some time ago.

Why do you say that?


is still present AFAICT.

> 2. If _collectionsmodule.c is the one to be used in
> branch and source then it follows that \PC\config.c
> needs an update.

But it isn't the one to be used.

> But since that file does not appear to be in my C
> drive and since the Windows error returned is not a
> numeric, but rather a string of the sort: "[Error 5]
> Access is denied: 'c:\\pagefile.sys'" then that test
> fails for me both in the MinGW compiled Python and in
> the officially distributed one.

That's true. Can you come up with a patch? Looking
at the error code of the exception should be sufficient;
it should be 5 (as the message shows). The exception
is *not* a string, but an object.

> 4. Also test_1565150 of test_os which reads as
> follows:
> fails in the MinGW compiled Python with the following
> message:
> ======================================================================
> FAIL: test_1565150 (test.test_os.StatAttributeTests)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "G:\projs\py25\python\r25\lib\test\test_os.py",
> line 241, in test_1565150
>     self.assertEquals(os.stat(self.fname).st_mtime,
> t1)
> AssertionError: 1159195040 != 1159195039.25

That would indicate a bug in the MingW port.

> If the same test passes in the official CPython on the
> same machine (and it does), can it then be deduced
> that this is not a system's issue but a compiler one?

Likely, neither nor. My guess is that the MingW port,
for some reason, decides not to use the Win32 API to
perform stat, but the C library. That is incorrect,
as the C library will perform truncation of subsecond
time stamps. The compiler itself should have no effect
(other than defining different compiler recognition


More information about the Python-Dev mailing list