Okay, I have filed codeplex issue
<span id="IssueIdLabel">30143 for this, with a simple test module</span> which demonstrates the problem.<br>This completely breaks adodbapi, and would probably kill many other imported modules. I think someone should go in an jack up the priority to high.<br>
IMHO it is a release breaker. Is not adodbapi still part of the test suite? The failure should have shown up there.<br>--<br>Vernon Cole<br><br><div class="gmail_quote">On Thu, Feb 10, 2011 at 3:42 AM, Federico Vaggi <span dir="ltr"><<a href="mailto:vaggi@cosbi.eu" target="_blank">vaggi@cosbi.eu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">
I ran into a relatively similar problem with importing networkx into
IronPython, but was able to fix it by editing out a few of the
lines. It seems that the import behaviour in cpython and ironpython
is slightly different sometime.<br>
<br>
I can post a list of the steps that I took if it is helpful at all.<br>
<br>
Federico<div><div></div><div><br>
On 09/02/2011 23:45, Vernon Cole wrote:
</div></div><blockquote type="cite"><div><div></div><div>I can't see an item like this on the bug list. Perhaps
the sky is falling, perhaps, not. I am reporting the problem here
in case it is. It seems like something the "big guns" should be
made aware of right away. The behavior seems to have changed
since IPy 2.6, and if someone has indeed been working on "import"
then we have a regression.<br>
<br>
First.... here's CPython 2.7 -- I install the package and then
import it from another directory...<br>
<console dump><br>
<span style="color: rgb(0, 0, 153);">C:\hg\adodbapi>py27
setup.py install</span><br style="color: rgb(0, 0, 153);">
<br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);">C:\hg\adodbapi>c:\python27\python.exe
setup.py install</span><br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);">adodbapi version="2.4.0.2"</span><br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);">running install</span><br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);">running build</span><br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);">running build_py</span><br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);">copying adodbapi.py ->
build\lib\adodbapi</span><br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);">copying ado_consts.py ->
build\lib\adodbapi</span><br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);">copying __init__.py ->
build\lib\adodbapi</span><br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);">running install_lib</span><br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);">copying
build\lib\adodbapi\adodbapi.py ->
c:\python27\Lib\site-packages\adodbapi</span><br style="color: rgb(0, 0, 153);">
<br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);">running install_egg_info</span><br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);">Writing
c:\python27\Lib\site-packages\adodbapi-2.4.0.2-py2.7.egg-info</span><br style="color: rgb(0, 0, 153);">
<br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);">C:\hg\adodbapi>home</span><br style="color: rgb(0, 0, 153);">
<br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);">C:\hg\adodbapi>C:</span><br style="color: rgb(0, 0, 153);">
<br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);">C:\hg\adodbapi>cd
\Users\vernon</span><br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);">C:\Users\vernon>py27</span><br style="color: rgb(0, 0, 153);">
<br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);">C:\Users\vernon>c:\python27\python.exe</span><br style="color: rgb(0, 0, 153);">
<br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);">Python 2.7 (r27:82525, Jul 4
2010, 09:01:59) [MSC v.1500 32 bit (Intel)] on win32</span><br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);">Type "help", "copyright",
"credits" or "license" for more information.</span><br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);">>>> import adodbapi</span><br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);">>>> adodbapi.version</span><br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);">'adodbapi v2.4.0.2'</span><br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);"></console></span><br>
................... The version attribute works<br>
<br>
Now I try the same thing on an administrator console (I think that
IronPython is correct in required the higher privilege here) <br>
and a big THANK YOU for having a working distutils! ........<br>
<console AS ADMINISTRATOR dump><br>
<span style="color: rgb(204, 0, 0);">C:\hg\adodbapi>ipy
setup.py install</span><br style="color: rgb(204, 0, 0);">
<br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">C:\hg\adodbapi>"c:\program
files\IronPython 2.7\ipy.exe" setup.py install</span><br style="color: rgb(204, 0, 0);">
<br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">adodbapi version="2.4.0.2"</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">running install</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">running build</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">running build_py</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">copying adodbapi.py ->
build\lib\adodbapi</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">copying ado_consts.py ->
build\lib\adodbapi</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">copying __init__.py ->
build\lib\adodbapi</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">warning: build_py:
byte-compiling is disabled, skipping.</span><br style="color: rgb(204, 0, 0);">
<br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">running install_lib</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">warning: install_lib:
byte-compiling is disabled, skipping.</span><br style="color: rgb(204, 0, 0);">
<br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">running install_egg_info</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">Removing c:\program
files\IronPython 2.7\Lib\site-packages\adodbapi-2.4.0.2-py2.</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">7.egg-info</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">Writing c:\program
files\IronPython 2.7\Lib\site-packages\adodbapi-2.4.0.2-py2.7</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">.egg-info</span><br style="color: rgb(204, 0, 0);">
<br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">C:\hg\adodbapi>home</span><br style="color: rgb(204, 0, 0);">
<br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">C:\hg\adodbapi>C:</span><br style="color: rgb(204, 0, 0);">
<br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">C:\hg\adodbapi>cd
\Users\vernon</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">C:\Users\vernon>ipy</span><br style="color: rgb(204, 0, 0);">
<br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">C:\Users\vernon>"c:\program
files\IronPython 2.7\ipy.exe"</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">IronPython 2.7 Beta 2
(2.7.0.20) on .NET 4.0.30319.1</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">Type "help", "copyright",
"credits" or "license" for more information.</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">>>> import adodbapi</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">>>> adodbapi.version</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">Traceback (most recent call
last):</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);"> File "<stdin>", line
1, in <module></span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);">AttributeError: 'module'
object has no attribute 'version'</span><br>
</console><br>
................. Where did the attribute go??????????????<br>
<br>
Now I hand copy the adodbapi folder from IronPython 2.7
site-packages into IronPython 2.6 site packages (because 2.6
distutils will not work) and continue with the same admin
console...<br>
<console dump continues><br>
<span style="color: rgb(0, 0, 153);">>>> exit()</span><br style="color: rgb(0, 0, 153);">
<br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);">C:\Users\vernon>ipy26</span><br style="color: rgb(0, 0, 153);">
<br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);">C:\Users\vernon>"c:\program
files\Ironpython 2.6\ipy.exe"</span><br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);">IronPython 2.6.1
(2.6.10920.0) on .NET 2.0.50727.4206</span><br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);">Type "help", "copyright",
"credits" or "license" for more information.</span><br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);">>>> import adodbapi</span><br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);">>>> adodbapi.version</span><br style="color: rgb(0, 0, 153);">
<span style="color: rgb(0, 0, 153);">'adodbapi v2.4.0.2'</span><br>
</console><br>
........................ so it seems to me that "import" is badly
broken. I am unable to test adodbapi.<br>
<br>
The code I am testing is at:<br>
hg clone <a href="http://adodbapi.hg.sourceforge.net:8000/hgroot/adodbapi/adodbapi#main" target="_blank">http://adodbapi.hg.sourceforge.net:8000/hgroot/adodbapi/adodbapi#main</a><br>
<br>
Is there anything I should do?<br>
--<br>
Vernon<br>
<br>
</div></div><pre><fieldset></fieldset>
_______________________________________________
Users mailing list
<a href="mailto:Users@lists.ironpython.com" target="_blank">Users@lists.ironpython.com</a>
<a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a>
</pre>
</blockquote>
<br>
</div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.ironpython.com" target="_blank">Users@lists.ironpython.com</a><br>
<a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><br>
<br></blockquote></div><br>