Bug 2256754

Summary: python-inspyred fails to build with Python 3.13: IndexError: list index out of range
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-inspyredAssignee: Ankur Sinha (FranciscoD) <sanjay.ankur>
Status: CLOSED ERRATA QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 40CC: ksurma, mhroncok, neuro-sig, sanjay.ankur
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-inspyred-1.0.2-1.fc41 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-05-31 20:50:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2244836    

Description Karolina Surma 2024-01-04 11:13:31 UTC
python-inspyred fails to build with Python 3.13.0a2.


======================================================================
ERROR: test (tests.example_tests.PAES_Test.test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/inspyred-5fa8224f0c81c74e3c6183457f760af854ad72fb/tests/example_tests.py", line 77, in test
    paes = examples.standard.paes_example.main(prng=prng)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/inspyred-5fa8224f0c81c74e3c6183457f760af854ad72fb/examples/standard/paes_example.py", line 13, in main
    final_pop = ea.evolve(generator=problem.generator,
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/inspyred-5fa8224f0c81c74e3c6183457f760af854ad72fb/inspyred/ec/emo.py", line 171, in evolve
    final_pop = ec.EvolutionaryComputation.evolve(self, generator, evaluator, pop_size, seeds, maximize, bounder, **args)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/inspyred-5fa8224f0c81c74e3c6183457f760af854ad72fb/inspyred/ec/ec.py", line 454, in evolve
    self.archive = self.archiver(random=self._random, population=list(self.population), archive=list(self.archive), args=self._kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/inspyred-5fa8224f0c81c74e3c6183457f760af854ad72fb/inspyred/ec/archivers.py", line 201, in adaptive_grid_archiver
    update_grid(ind, new_archive, num_grid_divisions, adaptive_grid_archiver.global_smallest,
  File "/builddir/build/BUILD/inspyred-5fa8224f0c81c74e3c6183457f760af854ad72fb/inspyred/ec/archivers.py", line 187, in update_grid
    grid_population[loc] += 1
    ~~~~~~~~~~~~~~~^^^^^
IndexError: list index out of range

https://docs.python.org/3.13/whatsnew/3.13.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.13/fedora-rawhide-x86_64/06784088-python-inspyred/

For all our attempts to build python-inspyred with Python 3.13, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/python-inspyred/

Testing and mass rebuild of packages is happening in copr.
You can follow these instructions to test locally in mock if your package builds with Python 3.13:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/

Let us know here if you have any questions.

Python 3.13 is planned to be included in Fedora 41.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.13.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires),
so if this package is required a lot, it's important for us to get it fixed soon.

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Ankur Sinha (FranciscoD) 2024-01-08 09:22:33 UTC
Reported upstream.

Comment 2 Aoife Moloney 2024-02-15 23:08:48 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 40 development cycle.
Changing version to 40.

Comment 3 Fedora Update System 2024-05-31 20:45:09 UTC
FEDORA-2024-de0a080fb6 (python-inspyred-1.0.2-1.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-de0a080fb6

Comment 4 Fedora Update System 2024-05-31 20:50:21 UTC
FEDORA-2024-de0a080fb6 (python-inspyred-1.0.2-1.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.