DEAP / deap

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

2to3 support not working with setup tools >= 58 #595

Open jasonzutty opened 2 years ago

jasonzutty commented 2 years ago

I am running python3.8 and using pip 21.3

If you install deap as a dependency of your package using a requirements.txt file pointing to the repo as: deap @ git+https://github.com/deap/deap@master you will get an error: error in deap setup command: use_2to3 is invalid.

The install for the main package is run using pip install . and the requirements file is split line by line into a list and passed into install_requires in setup tools.setup()

This can be fixed by forcing setuptools==57 prior to running

robjampar commented 2 years ago

I don't think it's viable to keep pinning setuptools to 57.5.

Prob time to drop python 2 support.

robjampar commented 2 years ago

https://github.com/DEAP/deap/pull/625

aabmets commented 2 years ago

@robjampar @jasonzutty @jameshughes89

I've created a Python 3.10 port of the DEAP library called DEAP-er. It's currently in beta, but you could check it out and provide feedback about any bugs.

anilbey commented 2 years ago

Oh here's the original ticket of #639 .

Did you merge #625 in your fork (DEAP-er) @aabmets ?

In DEAP-er the git history is lost. Could you preserve it ? Thanks

aabmets commented 2 years ago

@anilbey Well, DEAP-er isn't really a fork of DEAP, because the DEAP library is mature enough that besides Python 3.10 compatibility there isn't much to work on, and the original maintainers have been ignoring pull requests for months, so there isn't really any point in contributing to the original DEAP library.

anilbey commented 2 years ago

Git history is extremely important and useful. Without the git history there's no git revert, git blame. In fact there's no version control. One cannot read the commit history to see which other parts of the code are changed alongside the code you are working on. Many commits are linked to the issues and pull requests on Github and the only way to access that information is in the git history. It is not only useful for the contributors but also for the users who sometimes need to access the discussions on Github.

Yet git history acknowledges the original authors of each commit. The authors are no longer recognised when ones copy pastes the code and rewrites the git history.

anilbey commented 2 years ago

the original maintainers have been ignoring pull requests for months, so there isn't really any point in contributing to the original DEAP library.

In this case the solution is to: 1) fork DEAP 2) apply your changes 3) name it DEAP-er

anilbey commented 2 years ago

This way some other forks of DEAP (there are >900 of them) can also use the changes you introduced in DEAP-er. Or maybe they'll switch to a branch on DEAP-er instead.

aabmets commented 2 years ago

@anilbey Thanks I didn't know that. I'll see what I can do.