<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Hi Christoph<div><br></div><div>Yes I am running into this issue as well. Another similar one is where</div><div>2to3 suggests the following change:</div><div><br></div><div>from common import make_block_tests</div><div><br></div><div>to</div><div><br></div><div>from <font class="Apple-style-span" color="#FF0000">.</font>common import make_block_tests </div><div><br></div><div>In case hard top see the change is to add a full-stop at the start of common which makes this</div><div>a relative path reference. The error I get after making this change is:</div><div><br></div><div><span class="Apple-style-span" style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; border-collapse: collapse; line-height: 18px; ">ValueError: Attempted relative import in non-package</span></div><div><font class="Apple-style-span" face="Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif" size="4"><span class="Apple-style-span" style="border-collapse: collapse; font-size: 14px; line-height: 18px;"><br></span></font></div><div><font class="Apple-style-span" face="Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif" size="4"><span class="Apple-style-span" style="border-collapse: collapse; font-size: 14px; line-height: 18px;">So I am trying to get this working as well. Let me know how you go?</span></font></div><div><font class="Apple-style-span" face="Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif" size="4"><span class="Apple-style-span" style="border-collapse: collapse; font-size: 14px; line-height: 18px;"><br></span></font></div><div><font class="Apple-style-span" face="Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif" size="4"><span class="Apple-style-span" style="border-collapse: collapse; font-size: 14px; line-height: 18px;">Cheers</span></font></div><div><font class="Apple-style-span" face="Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif" size="4"><span class="Apple-style-span" style="border-collapse: collapse; font-size: 14px; line-height: 18px;">Grail<br></span></font><br>> Date: Mon, 15 Mar 2010 21:41:05 +0100<br>> From: christoph.tapler@gmx.net<br>> To: pycrypto@lists.dlitz.net<br>> Subject: Re: [pycrypto] Pycrypto working with python 3.0 or 3.1<br>> <br>> Hi,<br>> <br>> I could find the relevant change documented in <br>> http://docs.python.org/py3k/whatsnew/3.0.html , "Removed Syntax" section.<br>> Using "from . import X" instead of "import X" should fix the issue.<br>> I will try to adapt the Test Suite asap.<br>> <br>> Cheers,<br>> Christoph<br>> <br>> <br>> On 15.03.2010 02:10, Dwayne C. Litzenberger wrote:<br>> > Are absolute imports standard in Python 3?<br>> ><br>> > http://www.python.org/dev/peps/pep-0328/<br>> ><br>> > On Sun, Mar 14, 2010 at 04:11:58PM +0100, Christoph Tapler wrote:<br>> >> Hi Grail,<br>> >><br>> >> I have tried to fix the test suite, but I came across a problem,<br>> >> which seems to be specific to Python 3. It seems to me that Python 3<br>> >> behaves differently in terms of hierarchical imports.<br>> >><br>> >> To demonstrate this difference, I have attached a small example (just<br>> >> start level_test.py in Python 2 / 3). If you execute this example in<br>> >> Python 2, everything works fine. However, in Python 3, the second<br>> >> (nested) import fails. I don't understand why.<br>> >><br>> >> Do you (or anybody else of course ;-) ) have an idea how this issue<br>> >> could be resolved? Btw, this pattern appears several times in the test<br>> >> suite.<br>> >><br>> >> Kind Regards,<br>> >> Christoph<br>> >><br>> >> On 04.03.2010 03:37, Grail Dane wrote:<br>> >>> Hi Christoph<br>> >>><br>> >>> Good to see this is coming together for you, and as one of the users<br>> >>> mentions,<br>> >>> using the unified option is a general rule of thumb for patches / diffs.<br>> >>><br>> >>> You are correct about the test suite as I have not had a chance to alter<br>> >>> the tests to Python 3 context.<br>> >>><br>> >>> Cheers<br>> >>> Grail<br>> >>><br>> >>> ------------------------------------------------------------------------<br>> >>> Date: Wed, 3 Mar 2010 21:58:09 +0100<br>> >>> From: christoph.tapler@gmx.net<br>> >>> To: pycrypto@lists.dlitz.net<br>> >>> Subject: Re: [pycrypto] Pycrypto working with python 3.0 or 3.1<br>> >>><br>> >>> Hi Grail,<br>> >>><br>> >>> I have applied your patch on my Windows machine. Your AES encryption /<br>> >>> decryption seems to work well - In case<br>> >>> AZCkZ1wU5d0psrwlaoS5R4tz1dRL6rBBNzjIvK9NHSo= is the result ;-)<br>> >>> Moreover, I have tried the diff tool. Not sure if the output is usable<br>> >>> for you. Just<br>> >>> let me know if this format is okay or not. The patch contains a few<br>> >>> rather trivial<br>> >>> fixes for the Windows environment. With those fixes the build is successful.<br>> >>> However, the test suite doesn't build, needs adaptions as well (but I<br>> >>> think only<br>> >>> in Python).<br>> >>><br>> >>> Cheers,<br>> >>> Christoph<br>> >>><br>> >>> On 03.03.2010 03:48, Grail Dane wrote:<br>> >>><br>> >>> OK ... OK ... OK - stop the presses<br>> >>><br>> >>> Well, maybe not just yet, anyhoo, the attached patch allows the<br>> >>> source to compile<br>> >>> and run the attached script<woohoo><br>> >>><br>> >>> Cheers<br>> >>> Grail<br>> >>><br>> >>> ------------------------------------------------------------------------<br>> >>> Meet local singles online. Browse profiles for FREE!<br>> >>> <http://clk.atdmt.com/NMN/go/150855801/direct/01/><br>> >>><br>> >>><br>> >>> _______________________________________________<br>> >>> pycrypto mailing list<br>> >>> pycrypto@lists.dlitz.net<mailto:pycrypto@lists.dlitz.net><br>> >>> http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto<br>> >>><br>> >>><br>> >>><br>> >>><br>> >>> ------------------------------------------------------------------------<br>> >>> Find out now. Link all your email accounts and social updates with<br>> >>> Hotmail.<http://windowslive.ninemsn.com.au/oneinbox?ocid=T162MSN05A0710G><br>> >>><br>> >>><br>> >>><br>> >>> _______________________________________________<br>> >>> pycrypto mailing list<br>> >>> pycrypto@lists.dlitz.net<br>> >>> http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto<br>> >><br>> ><br>> ><br>> >> _______________________________________________<br>> >> pycrypto mailing list<br>> >> pycrypto@lists.dlitz.net<br>> >> http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto<br>> ><br>> ><br>> <br>> _______________________________________________<br>> pycrypto mailing list<br>> pycrypto@lists.dlitz.net<br>> http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto<br></div>                                            <br /><hr />With all the latest places, searching has never been easier. <a href='http://clk.atdmt.com/NMN/go/157631292/direct/01/' target='_new'>Looking for a new home?</a></body>
</html>