[Zope-dev] Re: import error in python2.6

Tres Seaver tseaver at palladion.com
Wed Jul 30 21:37:04 EDT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bristow Thankachan wrote:
> Hi,
> 
> Can anybody tell me how to run the module ImplPython in python2.6 to check
> for syntax errors. Or is there any other means by which I can correct the
> import error of the module ImplPython? The error message is as follows:-
> 
> Running tests at level 1
> /home/zope/ztrunk26/lib/python/zope/schema/_field.py:24: DeprecationWarning:
> the sets module is deprecated
>   from sets import Set as SetType
> Traceback (most recent call last):
>   File "./test.py", line 117, in <module>
> sys.exit(testrunner.run(defaults))
>   File "/home/zope/ztrunk26/lib/python/zope/testing/testrunner.py", line
> 932, in run
> failed = not run_with_options(options)
>   File "/home/zope/ztrunk26/lib/python/zope/testing/testrunner.py", line
> 1040, in run_with_options
> tests_by_layer_name = find_tests(options, found_suites)
>   File "/home/zope/ztrunk26/lib/python/zope/testing/testrunner.py", line
> 1615, in find_tests
> for suite in found_suites:
>   File "/home/zope/ztrunk26/lib/python/zope/testing/testrunner.py", line
> 1654, in find_suites
> for fpath, package in find_test_files(options):
>   File "/home/zope/ztrunk26/lib/python/zope/testing/testrunner.py", line
> 1735, in find_test_files
> for f, package in find_test_files_(options):
>   File "/home/zope/ztrunk26/lib/python/zope/testing/testrunner.py", line
> 1763, in find_test_files_
> for (p, package) in test_dirs(options, {}):
>   File "/home/zope/ztrunk26/lib/python/zope/testing/testrunner.py", line
> 1818, in test_dirs
> p = import_name(p)
>   File "/home/zope/ztrunk26/lib/python/zope/testing/testrunner.py", line
> 1834, in import_name
> __import__(name)
>   File "/home/zope/ztrunk26/lib/python/AccessControl/__init__.py", line 17,
> in <module>
> from Implementation import setImplementation
>   File "/home/zope/ztrunk26/lib/python/AccessControl/Implementation.py",
> line 98, in <module>
> setImplementation("C")
>   File "/home/zope/ztrunk26/lib/python/AccessControl/Implementation.py",
> line 51, in setImplementation
> from AccessControl import ImplC as impl
>   File "/home/zope/ztrunk26/lib/python/AccessControl/ImplC.py", line 29, in
> <module>
> from ImplPython import RestrictedDTML, SecurityManager, ZopeSecurityPolicy
> ImportError: No module named ImplPython
> 
> regards
> 
> Bristow.
> 
> 
> On Mon, Jul 28, 2008 at 8:44 PM, Baiju M <mbaiju at zeomega.com> wrote:
> 
>> Hi Bristow,
>>
>>
>> Bristow Thankachan wrote:
>>
>>>  Hi,
>>>
>>>  During the porting to python2.6, I'm stuck with the import error. I
>>>  need your help to correct the error. The error message is give
>>>  below:-

Does this same test raise a deprecation warning under 2.5?  I seem to
recall that implicit relative imports were going to go away in some
version of Python.  In that case, does:

  'from AccessControl.ImplPython import ...'

fix the problem?


Tres.
- --
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIkRdA+gerLs4ltQ4RAmGqAKDFEEf7EKic9NKJWwxFG73Ar8DdlQCffH0M
1xjV0zfDPjNuBr5kyGAA49I=
=Hd78
-----END PGP SIGNATURE-----



More information about the Zope-Dev mailing list