aarongarrett / inspyred

Python library for bio-inspired computational intelligence
MIT License
187 stars 58 forks source link

No collection.Sequence in Python 3.11 #26

Closed ThePseudo closed 8 months ago

ThePseudo commented 1 year ago

Description

Inspyred wants the generator to generate a collection.Sequence, which does not exist in Python > 3.9

Update: neither is collections.Iterable.

What I Did

On ec.py, commented lines 422, 423 and 424

Edit: on a better note, just import collections.abc and replace collections.* with collections.abc.*

sanjayankur31 commented 1 year ago

24 should fix these, I think.

sanjayankur31 commented 1 year ago

(these are already fixed in master, actually). #24 adds tweaks to make it also work on py2 which won't be required if inspyred drops py2 support.

sanjayankur31 commented 8 months ago

I've released 1.0.2 with a bunch of fixes, please do test it out and file new issues if you encounter them

https://pypi.org/project/inspyred/1.0.2/