<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>So I tried the suggestion below but still received the error about import from non-package :(</div><div><br></div><div>I changed it to read:</div><div><br></div><div>from Crypto.SelfTest.Cipher import common</div><div>return common.make_block_tests(AES, "AES", test_data)</div><div><br></div><div>and it does not error on that but now presents me with a segfault :(</div><div><br></div><div>So I seem to have gone from bad to worse. So I am hoping someone on this</div><div>list might be able to suggest how I can track the fault to find out what is wrong now??</div><div><br></div><div>Cheers</div><div>Grail<br><br>> Date: Wed, 17 Mar 2010 20:36:01 +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>> Following replacement - I have used AES as an example - seems to work<br>> fine:<br>> <br>> From:<br>> from common import make_block_tests<br>> return make_block_tests(AES, "AES", test_data)<br>> <br>> To:<br>> from . import common<br>> return common.make_block_tests(AES, "AES", test_data)<br>> <br>> In some files, you also need to remove the "import common import dict" <br>> at the beginning of the files. According to the comment, this was only<br>> needed for Python 2.1 / 2.2. Hence that removal should not negatively <br>> affect functionality.<br>> <br>> Unfortunately I don't have enough time to do all the replacements in<br>> the next days. I could send you a patch on weekend earliest.<br>> <br>> Cheers,<br>> Christoph<br>> <br>> On 15.03.2010 21:41, Christoph Tapler wrote:<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 /<br>> >>>> diffs.<br>> >>>><br>> >>>> You are correct about the test suite as I have not had a chance to<br>> >>>> alter<br>> >>>> the tests to Python 3 context.<br>> >>>><br>> >>>> Cheers<br>> >>>> Grail<br>> >>>><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<br>> >>>> 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>> >>>><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>> >>>><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>> >>>> _______________________________________________<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>> _______________________________________________<br>> pycrypto mailing list<br>> pycrypto@lists.dlitz.net<br>> http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto<br></div><div style="z-index: -1; position:absolute; top:0px; left: 0px; width: 100%; height: 2646px;"></div>                                            <br /><hr />Meet local singles online. <a href='http://clk.atdmt.com/NMN/go/150855801/direct/01/' target='_new'>Browse profiles for FREE!</a></body>
</html>