[petsc-dev] futurize
Jed Brown
jed at jedbrown.org
Mon Apr 2 16:56:56 CDT 2018
Lisandro Dalcin <dalcinl at gmail.com> writes:
> On 2 April 2018 at 23:08, Jed Brown <jed at jedbrown.org> wrote:
>> Would it be too disruptive to run futurize "stage 1" before the 3.9
>> release?
>
> Would this introduce any dependency outside plain Python 2 stdlib?
No. These are the only new imports.
+from functools import reduce
+from __future__ import absolute_import
+from __future__ import print_function
https://bitbucket.org/petsc/petsc/pull-requests/920/python-futurize-stage-1-modernize-python-2/diff
"Stage 2" (not done here) would add a dependency on "future" (or some
manual work to remove it, mostly with strings).
> Sorry, I'm not an expert in these futurize/modernize/six/whatever
> stuff, I got used to write Py 2/3 compatible code from scratch without
> these tools.
>
>> The source would remain Python-2 only, but would be
>> "modernized" so that the next stage (supporting Python-3) would be less
>> disruptive. The goal here would be to make it easier to port
>> configuration changes from 'maint' to 'master' after the release, under
>> the assumption that we'll want to support Python-3 before a 3.10
>> release.
>
> Well, while I'm a bit worried about dependencies, I think your goal
> makes total sense and I would support it.
>
>
> --
> Lisandro Dalcin
> ============
> Research Scientist
> Computer, Electrical and Mathematical Sciences & Engineering (CEMSE)
> Extreme Computing Research Center (ECRC)
> King Abdullah University of Science and Technology (KAUST)
> http://ecrc.kaust.edu.sa/
>
> 4700 King Abdullah University of Science and Technology
> al-Khawarizmi Bldg (Bldg 1), Office # 0109
> Thuwal 23955-6900, Kingdom of Saudi Arabia
> http://www.kaust.edu.sa
>
> Office Phone: +966 12 808-0459
More information about the petsc-dev
mailing list