<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=windows-1252"
 http-equiv="Content-Type">
  <title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
On 02/13/2010 10:15 PM, Charles R Harris wrote:
<blockquote
 cite="mid:e06186141002131315s3ea23c73ub1194f7e136abf99@mail.gmail.com"
 type="cite"><br>
  <br>
  <div class="gmail_quote">On Sat, Feb 13, 2010 at 2:07 PM, Xavier
Gnata <span dir="ltr"><<a moz-do-not-send="true"
 href="mailto:xavier.gnata@gmail.com">xavier.gnata@gmail.com</a>></span>
wrote:<br>
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
    <div class="im">On 02/13/2010 09:28 PM, Pauli Virtanen wrote:<br>
> We will most likely have experimental py3 support in 2.0.<br>
><br>
> If you, or someone else wishes to help bringing 2.0 to fully work
with Py3, now is a very good time to step up.<br>
><br>
> How to give a hand:<br>
><br>
> 1. Get my latest py3 branch from <a moz-do-not-send="true"
 href="http://github.com/pv/numpy-work/tree/py3k" target="_blank">http://github.com/pv/numpy-work/tree/py3k</a><br>
><br>
> Read doc/py3k.txt<br>
><br>
> 2. Get py3 branch of nose (see doc/py3k.txt in the branch).<br>
><br>
> 3. Build numpy, and run unit tests (build with
"NPY_SEPARATE_BUILD=1 python3 setup.py build", numscons is not
supported at the moment).<br>
><br>
> 4. Fix bugs revealed by the unit tests. Currently, C code is
mostly ported, so you can probably also help only by writing Python.
There are about 100 test failures (of 2400) left.<br>
><br>
> Many test failures occur also because the tests are wrong. For
instance: the numpy I/O requires bytes, but some tests supply it
unicode strings -> need changes in tests.<br>
><br>
> One useful thing to do is to help with the str/bytes transition on
the python side. Since the same code must work with pythons from 2.4 to
3.0 (for 3 it's automatically run through 2to3 on build), there are
some helpers in numpy.compat.py3k for helping with this. See several
previous commits on the branch on that.<br>
><br>
> Another useful thing could be to port an existing numpy-using code
to py3 and test if it works with the current py3k branch, what fails,
and if the failures are already revealed by unit tests. Even if it does
not work at the moment, having it at hand will help testing the rc when
it comes. This, because I wouldn't completely rely on our unit test
coverage.<br>
><br>
> Finally, try to write some PEP 3118 using code, and check how it
works. (You can use python >= 2.6 for this if you get numpy from the
py3k branch.)<br>
><br>
><br>
    </div>
Well I don't know where I should report that but your branch doesn't<br>
compile with python3.1:<br>
numpy/core/blasdot/_dotblas.c: In function<br>
‘dotblas_matrixproduct’:<br>
numpy/core/blasdot/_dotblas.c:404: error: ‘PyArrayObject’ has no member<br>
named ‘ob_type’<br>
numpy/core/blasdot/_dotblas.c:404: error: ‘PyArrayObject’ has no member<br>
named ‘ob_type’<br>
numpy/core/blasdot/_dotblas.c:407: error: ‘PyArrayObject’ has no member<br>
named ‘ob_type’<br>
    <br>
and so on...<br>
    <br>
    <br>
AFAICS, it is easy to fix using the Py_TYPE macro.<br>
    <br>
For instance:<br>
-  if (ap1->ob_type != ap2->ob_type) {<br>
+ if (Py_TYPE(ap1) != Py_TYPE(ap2)) {<br>
    <font color="#888888"><br>
    </font></blockquote>
  <div><br>
Pauli fixed a lot of those. Did you remove the old build directory and
all that stuff?<br>
  <br>
Chuck <br>
  </div>
  <br>
  </div>
</blockquote>
Well I ran git clone git://github.com/pv/numpy-work.git an hour ago (in
an empty directory)<br>
<br>
Xavier<br>
<br>
</body>
</html>