<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
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="Apple-style-span" style="font-family: sans-serif; font-size: 16px; "><dt id="PyVarObject"><tt class="descname" style="background-color: transparent; padding-top: 0px; padding-right: 1px; padding-bottom: 0px; padding-left: 1px; font-weight: bold; "><font class="Apple-style-span" face="Verdana"><span class="Apple-style-span" style="font-size: 10pt; ">PyVarObject</span></font></tt><font class="Apple-style-span" face="Verdana"><span class="Apple-style-span" style="font-size: 10pt; "><a class="headerlink" href="http://docs.python.org/3.1/c-api/structures.html?highlight=pyobject#PyVarObject" title="Permalink to this definition" style="color: rgb(198, 15, 15); text-decoration: none; visibility: hidden; padding-top: 0px; padding-right: 4px; padding-bottom: 0px; padding-left: 4px; "></a></span></font></dt><dd style="margin-top: 3px; margin-bottom: 10px; margin-left: 30px; text-align: justify; line-height: 20px; "><font class="Apple-style-span" face="Verdana"><span class="Apple-style-span" style="font-size: 10pt; ">This is an extension of </span></font><a title="PyObject" class="reference internal" 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="xref docutils literal" style="background-color: transparent; padding-top: 0px; padding-right: 1px; padding-bottom: 0px; padding-left: 1px; font-weight: bold; "><span class="pre"><span class="highlight" style="background-color: rgb(251, 229, 78); "><font class="Apple-style-span" face="Verdana"><span class="Apple-style-span" style="font-size: 10pt; ">PyObject</span></font></span></span></tt></a><font class="Apple-style-span" face="Verdana"><span class="Apple-style-span" style="font-size: 10pt; "> that adds the </span></font><a title="ob_size" class="reference external" href="http://docs.python.org/3.1/c-api/typeobj.html#ob_size" style="color: rgb(53, 95, 124); text-decoration: none; "><tt class="xref docutils literal" style="background-color: transparent; padding-top: 0px; padding-right: 1px; padding-bottom: 0px; padding-left: 1px; font-weight: bold; "><span class="pre"><font class="Apple-style-span" face="Verdana"><span class="Apple-style-span" style="font-size: 10pt; ">ob_size</span></font></span></tt></a><font class="Apple-style-span" face="Verdana"><span class="Apple-style-span" style="font-size: 10pt; "> field. This is only used for objects that have some notion of </span></font><em><font class="Apple-style-span" face="Verdana"><span class="Apple-style-span" style="font-size: 10pt; ">length</span></font></em><font class="Apple-style-span" face="Verdana"><span class="Apple-style-span" style="font-size: 10pt; ">. </span></font></dd><dd style="margin-top: 3px; margin-bottom: 10px; margin-left: 30px; text-align: justify; line-height: 20px; "><font class="Apple-style-span" face="Verdana"><span class="Apple-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="docutils literal" style="background-color: rgb(236, 240, 243); padding-top: 0px; padding-right: 1px; padding-bottom: 0px; padding-left: 1px; "><span class="pre"><span class="highlight" style="background-color: rgb(251, 229, 78); "><font class="Apple-style-span" face="Verdana"><span class="Apple-style-span" style="font-size: 10pt; ">PyObject</span></font></span><font class="Apple-style-span" face="Verdana"><span class="Apple-style-span" style="font-size: 10pt; ">_VAR_HEAD</span></font></span></tt><font class="Apple-style-span" face="Verdana"><span class="Apple-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/' target='_new'>Shopping Trolley Mechanic</a></body>
</html>