On Mon, Jul 13, 2009 at 4:56 PM, Lisandro Dalcin <span dir="ltr"><<a href="mailto:dalcinl@gmail.com">dalcinl@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><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 Mon, Jul 13, 2009 at 6:47 PM, Matt Knepley<<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> wrote:<br>
> I like 1) as well. However someone needs to test the fixes on ancient RH<br>
> python.<br>
><br>
<br>
</div>No problem, I have custom installs of old Python's starting from 2.3<br>
and up to current SVN trunk (2.7)... Do you remember what version is<br>
the ancient RH Python you are talking about?<br><div><div class="h5"></div></div></blockquote><div><br>I think 2.3 is alright. It still needs foo(object) and stuff.<br><br>  Matt<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div class="h5">
>  Matt<br>
><br>
> From the phone<br>
><br>
> On Jul 13, 2009, at 1:15 PM, Lisandro Dalcin <<a href="mailto:dalcinl@gmail.com">dalcinl@gmail.com</a>> wrote:<br>
><br>
>> Fedora 11 moved to Python 2.6. Now many Python stdlib modules are<br>
>> deprecated (as part of the transition to Python 3.x series).<br>
>><br>
>> /u/dalcinl/Devel/PETSc/petsc-dev/config/BuildSystem/config/compilers.py:7:<br>
>> DeprecationWarning: the sets module is deprecated<br>
>>  import sets<br>
>> /u/dalcinl/Devel/PETSc/petsc-dev/config/PETSc/package.py:7:<br>
>> DeprecationWarning: the md5 module is deprecated; use hashlib instead<br>
>>  import md5<br>
>> /u/dalcinl/Devel/PETSc/petsc-dev/config/BuildSystem/script.py:101:<br>
>> DeprecationWarning: The popen2 module is deprecated.  Use the<br>
>> subprocess module.<br>
>>  import popen2<br>
>><br>
>> We could take two approaches to remove these warnings (I bet all you<br>
>> hate warnings as much as me):<br>
>><br>
>> 1) Reimplement things using the modern API's, perhaps by using<br>
>> conditional code depending on the Python version and/or using import<br>
>> with try/except blocks. In particular, this will require:<br>
>> a) use the builtin 'set' type (available since Python 2.4)<br>
>> b) use the 'hashlib' module (available since Python 2.5)<br>
>> c) moving from using 'peopen2' to 'subprocess' (BTW, available since<br>
>> Python2.4) will likely remove the need to use 'select', which I<br>
>> commented some time ago it is not supported (for pipes) in native<br>
>> Windows Python (yes, some day I'll have some working code with the<br>
>> native Windows Python).<br>
>><br>
>> 2) Silent these warnings. I do not think these modules will be ever<br>
>> removed from 2.x series, and porting the whole BuildSystem beast to<br>
>> Python 3.0 is not going to be a 10-minutes task anyway.<br>
>><br>
>><br>
>> I personally prefer (1) and volunteer to provide the fixes, even if<br>
>> that is more work than (2). I would like to know your opinions before<br>
>> start to work on this.<br>
>><br>
>><br>
>> --<br>
>> Lisandro Dalcín<br>
>> ---------------<br>
>> Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)<br>
>> Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)<br>
>> Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)<br>
>> PTLC - Güemes 3450, (3000) Santa Fe, Argentina<br>
>> Tel/Fax: +54-(0)342-451.1594<br>
><br>
<br>
<br>
<br>
--<br>
Lisandro Dalcín<br>
---------------<br>
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)<br>
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)<br>
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)<br>
PTLC - Güemes 3450, (3000) Santa Fe, Argentina<br>
Tel/Fax: +54-(0)342-451.1594<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>