<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Hi All<div><br></div><div>So I am going to go on a limb a little and say I have successfully compiled pycrypto with python 3.1.1</div><div><br></div><div>The attached patch makes the necessary changes to remove any errors during install.</div><div>If someone would like to give me a small test script, I am happy to see if my tinkering actually works</div><div>or is just allowing it to install??</div><div><br></div><div>I am also aware that some of the changes are probably not the best way to do it, but I am happy to investigate</div><div>further once I have it working :)</div><div><br></div><div>Cheers</div><div>Grail<br><br><hr id="ecxstopSpelling">From: grail69@hotmail.com<br>To: pycrypto@lists.dlitz.net<br>Date: Fri, 15 Jan 2010 00:32:04 +0000<br>Subject: Re: [pycrypto] python crypto with python 3.0 or 3.1<br><br>
<style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Verdana;}
</style>
Hi<div><br></div><div>Thanks for the speedy reply :)</div><div><br></div><div>I am a little confused though as the doco for 3.1 says:</div><div><br></div><div><span class="ecxecxApple-style-span" style="font-family: sans-serif; font-size: 16px;"><dt id="ecxecxPyVarObject"><tt class="ecxecxdescname" style="padding: 0px 1px; background-color: transparent; font-weight: bold;"><font class="ecxecxApple-style-span" face="Verdana"><span class="ecxecxApple-style-span" style="font-size: 10pt;">PyVarObject</span></font></tt><font class="ecxecxApple-style-span" face="Verdana"><span class="ecxecxApple-style-span" style="font-size: 10pt;"><a class="ecxecxheaderlink" href="http://docs.python.org/3.1/c-api/structures.html?highlight=pyobject#PyVarObject" title="Permalink to this definition" style="padding: 0px 4px; color: rgb(198, 15, 15); text-decoration: none; visibility: hidden;"></a></span></font></dt><dd style="margin-bottom: 10px; margin-left: 30px; text-align: justify; line-height: 20px;"><font class="ecxecxApple-style-span" face="Verdana"><span class="ecxecxApple-style-span" style="font-size: 10pt;">This is an extension of </span></font><a title="PyObject" class="ecxecxreference ecxecxinternal" href="http://docs.python.org/3.1/c-api/structures.html?highlight=pyobject#PyObject" style="color: rgb(53, 95, 124); text-decoration: none;"><tt class="ecxecxxref ecxecxdocutils ecxecxliteral" style="padding: 0px 1px; background-color: transparent; font-weight: bold;"><span class="pre"><span class="ecxecxhighlight" style="background-color: rgb(251, 229, 78);"><font class="ecxecxApple-style-span" face="Verdana"><span class="ecxecxApple-style-span" style="font-size: 10pt;">PyObject</span></font></span></span></tt></a><font class="ecxecxApple-style-span" face="Verdana"><span class="ecxecxApple-style-span" style="font-size: 10pt;"> that adds the </span></font><a title="ob_size" class="ecxecxreference ecxecxexternal" href="http://docs.python.org/3.1/c-api/typeobj.html#ob_size" style="color: rgb(53, 95, 124); text-decoration: none;"><tt class="ecxecxxref ecxecxdocutils ecxecxliteral" style="padding: 0px 1px; background-color: transparent; font-weight: bold;"><span class="pre"><font class="ecxecxApple-style-span" face="Verdana"><span class="ecxecxApple-style-span" style="font-size: 10pt;">ob_size</span></font></span></tt></a><font class="ecxecxApple-style-span" face="Verdana"><span class="ecxecxApple-style-span" style="font-size: 10pt;"> field. This is only used for objects that have some notion of </span></font><em><font class="ecxecxApple-style-span" face="Verdana"><span class="ecxecxApple-style-span" style="font-size: 10pt;">length</span></font></em><font class="ecxecxApple-style-span" face="Verdana"><span class="ecxecxApple-style-span" style="font-size: 10pt;">. </span></font></dd><dd style="margin-bottom: 10px; margin-left: 30px; text-align: justify; line-height: 20px;"><font class="ecxecxApple-style-span" face="Verdana"><span class="ecxecxApple-style-span" style="font-size: 10pt;">This type does not often appear in the Python/C API. It corresponds to the fields defined by the expansion of the </span></font><tt class="ecxecxdocutils ecxecxliteral" style="padding: 0px 1px; background-color: rgb(236, 240, 243);"><span class="pre"><span class="ecxecxhighlight" style="background-color: rgb(251, 229, 78);"><font class="ecxecxApple-style-span" face="Verdana"><span class="ecxecxApple-style-span" style="font-size: 10pt;">PyObject</span></font></span><font class="ecxecxApple-style-span" face="Verdana"><span class="ecxecxApple-style-span" style="font-size: 10pt;">_VAR_HEAD</span></font></span></tt><font class="ecxecxApple-style-span" face="Verdana"><span class="ecxecxApple-style-span" style="font-size: 10pt;"> macro.</span></font></dd></span>This appears to be the same as what is written in the doco for 2.6.4 as well, which pycrypto seems to work with.</div><div><br></div><div>Well i will keep looking to see what i can find out.</div><div><br></div><div>Cheers</div><div>Grail</div><div><br>> Date: Thu, 14 Jan 2010 10:07:36 +0100<br>> From: don@amberfisharts.com<br>> To: pycrypto@lists.dlitz.net<br>> Subject: Re: [pycrypto] python crypto with python 3.0 or 3.1<br>> <br>> Hi,<br>> <br>> as far as I know there hasn't been a move to port pyCrypto to python 3.x<br>> so simply compiling against python 3.x is bound to fail!<br>> If you try to port yourself and during that effort ran into this compiler <br>> error then if you look at the documentation [1] or this blog post [2]<br>> (it's<br>> a bit outdated since the docs have been fixed in the meantime) you will<br>> see<br>> that the first few lines (besides other things) of a python extension type<br>> have<br>> changed from <br>> <br>> PyObject_HEAD_INIT(NULL)<br>> 0, /* ob_size */<br>> "myTypeName", /* tp_name */<br>> <br>> to<br>> <br>> PyVarObject_HEAD_INIT(NULL, 0)<br>> "myTypeName", /* tp_name */<br>> <br>> If I recall correctly, the ob_size has be moved to a different structure<br>> and no longer<br>> is a member of PyTypeObject.<br>> So to sum it up:<br>> * no porting effort exist so far, AFAIK<br>> * no, the error is not bogus<br>> <br>> sincerely yours<br>> //Lorenz<br>> <br>> [1] http://docs.python.org/dev/py3k/extending/newtypes.html<br>> [2]<br>> http://rhodesmill.org/brandon/2008/porting-a-c-extension-module-to-python-30/<br>> <br>> <br>> <br>> On Thu, 14 Jan 2010 07:52:59 +0000, Grail Dane <grail69@hotmail.com><br>> wrote:<br>> > Hi GuysI am new to the list but have recently run into this issue.Has<br>> > there been any movement?Personally I am stuck when gcc tries to compile<br>> > src/_fastmath.cwhich seems to die with an error about 'ob_size' member<br>> not<br>> > existing :(This seems to be bogus as I traced back the struct's to<br>> include<br>> > PyObject_VAR_HEADwhich does have this as member.Any further help on this<br>> > would be appreciated ;)Cheers Grail>On Fri, Dec 04, 2009 at 11:44:00AM<br>> > +0100, Tobias Koeck wrote:>>Is it possible to run python crypto with<br>> python<br>> > 3.0 or 3.1. If not is <br>> >>>it planed to adjust?<br>> > <br>> >>Sure, and it'll happen sooner if somebody volunteers to do it. :-)<br>> > <br>> >>There will need to be be some strategy for Python 2.x compatibility, and<br>> <br>> >>the contributor(s) need to to meet the PyCrypto Code Submission <br>> >>Requirements:<br>> > <br>> >>http://www.dlitz.net/software/pycrypto/submission-requirements/<br>> > <br>> >>-- <br>> >>Dwayne C. Litzenberger <dlitz at dlitz.net><br>> >> Key-signing key - 19E1 1FE8 B3CF F273 ED17 4A24 928C EC13 39C2 5CF7<br>> >> Annual key (2009) - C805 1746 397B 0202 2758 2821 58E0 894B 81D2 582E<br>> >><br>> > _________________________________________________________________<br>> > View photos of singles in your area! Browse profiles for FREE<br>> > http://clk.atdmt.com/NMN/go/150855801/direct/01/<br>> _______________________________________________<br>> pycrypto mailing list<br>> pycrypto@lists.dlitz.net<br>> http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto<br></div>                                            <br><hr>If It Exists, You'll Find it on SEEK <a href="http://clk.atdmt.com/NMN/go/157639755/direct/01/">Shopping Trolley Mechanic</a></div>                                            <br><hr>Sell your old one fast! <a href="http://clk.atdmt.com/NMN/go/157637060/direct/01/">Time for a new car?</a>                                            <br /><hr />If It Exists, You'll Find it on SEEK <a href='http://clk.atdmt.com/NMN/go/157639755/direct/01/' target='_new'>Shopping Trolley Mechanic</a></body>
</html>