DEAP / deap

Distributed Evolutionary Algorithms in Python
http://deap.readthedocs.org/
GNU Lesser General Public License v3.0
5.88k stars 1.13k forks source link

DEAP no longer installs on Python 3.10 #658

Closed bje- closed 2 years ago

bje- commented 2 years ago

In Python 3.10, lib2to3 was removed and so was the use_2to3 option in setuptools. The fix is to port the whole codebase to Python 3 and remove use_2to3 from setup.py. For more information, see: https://github.com/pypa/setuptools/issues/2086

This is a major problem.

Edanflame commented 2 years ago

this maybe a large work and if you only want to installs the latest deap in python 3.10, you can refer #610

bje- commented 2 years ago

I can't see why it should be a lot of hard work. Currently, DEAP relies on lib2to3 to do the translation and everything works fine. I would suggest that one run of 2to3 --write over the whole source tree would do the job.

fmder commented 2 years ago

@bje- The problem is that the source it produces is very ugly. Plus there is a new branch that would use a lot of new Python features almost ready but the documentation, which I think is the string point of deap, would be mostly obsolete and need a major rework.

fmder commented 2 years ago

But you are right, this is long overdue...

bje- commented 2 years ago

@bje- The problem is that the source it produces is very ugly.

Really? I ran 2to3 and it makes fairly minimal changes to make the code Python 3 compliant. See https://github.com/DEAP/deap/pull/659

bje- commented 2 years ago

I have a fork that has been processed by 2to3. It is working fine and my package is having to use this fork for the time being so that DEAP can run on Python 3.10.

fmder commented 2 years ago

Fixed by #625