Warning on Windows
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Critical
|
John A Meinel |
Bug Description
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I don't know for sure why we are getting this, but on Windows I'm now
seeing:
$ bzr st
C:\Users\
bzr: warning: Failed to load compiled extensions:
No module named _readdir_pyx
Bazaar can run, but performance may be reduced.
Check Bazaar is correctly installed or set ignore_
% '\n '.join(
The main thing is that it is *expected* that we won't build _readdir_pyx
on Windows, so we certainly shouldn't be warning that we are failing to
load it. Arguably we shouldn't be trying to import it in the first place.
affects bzr
status confirmed
importance critical
assignee jameinel
(only in bzr.dev, but we certainly wouldn't want to release 2.1.0b1 with
this bug :)
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAkq
UxQAn2rCzTGBpbI
=wU8E
-----END PGP SIGNATURE-----
Related branches
- Martin Pool: Approve
- Diff: None lines
Changed in bzr: | |
status: | Confirmed → Fix Released |
Changed in bzr: | |
milestone: | none → 2.1.0b1 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
John A Meinel wrote: jameinel\ dev\bzr\ bzr.dev\ bzrlib\ osutils. py:928: UserWarning: missing_ extensions _extension_ load_failures, ))
> Public bug reported:
>
> I don't know for sure why we are getting this, but on Windows I'm now
> seeing:
> $ bzr st
> C:\Users\
> bzr: warning: Failed to load compiled extensions:
> No module named _readdir_pyx
> Bazaar can run, but performance may be reduced.
> Check Bazaar is correctly installed or set ignore_
> % '\n '.join(
>
>
> The main thing is that it is *expected* that we won't build _readdir_pyx
> on Windows, so we certainly shouldn't be warning that we are failing to
> load it. Arguably we shouldn't be trying to import it in the first place.
>
> affects bzr
> status confirmed
> importance critical
> assignee jameinel
>
> (only in bzr.dev, but we certainly wouldn't want to release 2.1.0b1 with
> this bug :)
>
> John
> =:->
This appears to be caused by this function: from_stat_ mode_thunk( mode): from_stat_ mode from_stat_ mode is file_kind_ from_stat_ mode_thunk:
file_ kind_from_ stat_mode = UTF8DirReader( ).kind_ from_mode
failed_ to_load_ extension( e)
_kind_ from_mode as file_kind_ from_stat_ mode from_stat_ mode(mode) from_stat_ mode = file_kind_ from_stat_ mode_thunk
def file_kind_
global file_kind_
if file_kind_
try:
from bzrlib._readdir_pyx import UTF8DirReader
except ImportError, e:
from bzrlib._readdir_py import (
)
return file_kind_
file_kind_
^- note that it is using a bound member function which is a bit strange.
But also that it always uses the _readdir_pyx version.
I doubt this function is terribly performance critical, so I don't think
missing the lib will require a warning, versus earlier when we make use
of the UTF8DirReader code.
So I propose:
=== modified file 'bzrlib/osutils.py'
file_ kind_from_ stat_mode = UTF8DirReader( ).kind_ from_mode to_load_ extension( e)
_kind_ from_mode as file_kind_ from_stat_ mode
- --- bzrlib/osutils.py 2009-09-11 06:39:56 +0000
+++ bzrlib/osutils.py 2009-09-16 11:20:53 +0000
@@ -1828,7 +1828,8 @@
from bzrlib._readdir_pyx import UTF8DirReader
except ImportError, e:
- - failed_
+ # This is one time where we won't warn that an extension
failed to
+ # load. The extension is never available on Windows anyway.
from bzrlib._readdir_py import (
)
John enigmail. mozdev. org/
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAkq wyh0ACgkQJdeBCY SNAAM+3wCglnUJV Jk0lg+cMSnWuOBW KmVy kir9y5ZhM0rqmYb 1q
rsgAoKA6EPT1rU/
=qCLQ
-----END PGP SIGNATURE-----