Skip to content

[Bug Report] pymunk>7.0.0 breaks the waterworld env #1320

@JiangpengLI86

Description

@JiangpengLI86

Dependency Version Constraint Allows Breaking Changes in pymunk

The current project dependency specification only constrains pymunk to versions greater than 6.2.0:

sisl = ["pygame>=2.3.0", "pymunk>=6.2.0", "box2d-py>=2.3.5", "scipy>=1.4.1"]

"pymunk>=6.2.0",

However, according to the official pymunk changelog, version 7.0.0 introduces a significant breaking change to the CollisionHandler API:

https://www.pymunk.org/en/latest/changelog.html#pymunk-7-0-0-2025-05-28

As a result, existing code paths that rely on the pre-7.0.0 CollisionHandler behavior will fail when a newer pymunk version is installed. For example, the following usage is no longer compatible:

self.space.add_collision_handler(

Specifically, calls such as self.space.add_collision_handler(...) break under pymunk ≥ 7.0.0.

Code example

from pettingzoo.sisl import waterworld_v4
env = waterworld_v4.parallel_env()
env.reset()

System info

PettingZoo version: 1.25.0
Ubuntu 2204
Python 3.12.9

Suggested Resolution

  • Add an explicit upper bound on the pymunk dependency (e.g., <7.0.0), or
  • Update the affected code to be compatible with pymunk ≥ 7.0.0

Checklist

  • I have checked that there is no similar issue in the repo

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions