-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: mesa/mesa
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.4.1
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: mesa/mesa
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.4.2
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 9 commits
- 12 files changed
- 3 contributors
Commits on Jan 23, 2026
-
Update Ruff hook id in pre-commit config
Switch the Ruff pre-commit hook from the deprecated `ruff` legacy alias to the canonical `ruff-check` hook ID, aligning the configuration with upstream changes in `ruff-pre-commit` and eliminating the “legacy alias” warning while preserving existing linting and auto-fix behavior. See astral-sh/ruff-pre-commit#124
Configuration menu - View commit details
-
Copy full SHA for 7ee8235 - Browse repository at this point
Copy the full SHA 7ee8235View commit details -
Configuration menu - View commit details
-
Copy full SHA for bd08742 - Browse repository at this point
Copy the full SHA bd08742View commit details -
Configuration menu - View commit details
-
Copy full SHA for 12250ae - Browse repository at this point
Copy the full SHA 12250aeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7687c17 - Browse repository at this point
Copy the full SHA 7687c17View commit details -
Configuration menu - View commit details
-
Copy full SHA for 66038fc - Browse repository at this point
Copy the full SHA 66038fcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3a19ee6 - Browse repository at this point
Copy the full SHA 3a19ee6View commit details -
Add Mesa development process guidelines (#3135)
Expanded CONTRIBUTING.md with detailed information about Mesa's development philosophy, contribution workflow, and best practices for proposing and implementing features. This addition aims to help contributors understand when to open issues, discussions, or PRs, and outlines the stages of problem alignment, design, and implementation.
Configuration menu - View commit details
-
Copy full SHA for 6942d31 - Browse repository at this point
Copy the full SHA 6942d31View commit details -
A memory leak was discovered in Mesa where model instances could never be garbage collected after agents were created. The root cause was the `Agent._ids` class attribute—a `defaultdict` that stored references to model instances to ensure `unique_id` values were unique on a per-model basis. Because `_ids` was a class-level attribute that persisted across the Python process, any model instance used as a key in this dictionary maintained a hard reference indefinitely, preventing the garbage collector from cleaning up the model and all its associated objects (agents, grids, etc.) even after the model went out of scope or was explicitly deleted. This bug had significant practical consequences for Mesa users, particularly those running multiple simulations or batch experiments. Each time a model was instantiated and run within a function, the model objects would accumulate in RAM rather than being cleaned up when the function exited. This meant that running many model instances—common in parameter sweeps, sensitivity analyses, or optimization workflows—would cause unbounded memory growth, eventually exhausting available RAM. The issue was especially problematic because it was invisible to users: simply letting a model go out of scope or calling `del model` appeared to work but silently retained all the memory, and even explicitly removing agents with `model.remove_all_agents()` only partially addressed the problem depending on the space types used. The fix moved the `unique_id` assignment logic from the `Agent` class into the `Model.register_agent()` method, eliminating the problematic class-level `_ids` defaultdict entirely. Instead of tracking IDs across all model instances in a shared dictionary, each model now maintains its own `agent_id_counter` instance attribute that starts at 1 and increments with each registered agent. This approach ensures that `unique_id` remains unique within each model instance while allowing the garbage collector to properly clean up model objects when they go out of scope, since there are no longer any persistent class-level references to model instances. The fix also replaced `itertools.count` with simple integer incrementation, which avoids upcoming pickle compatibility issues in Python 3.14.
Configuration menu - View commit details
-
Copy full SHA for 5f13d6b - Browse repository at this point
Copy the full SHA 5f13d6bView commit details -
Update release notes and version for 3.4.2
Update version and release notes for the next patch release, Mesa 3.4.2.
Configuration menu - View commit details
-
Copy full SHA for 7287946 - Browse repository at this point
Copy the full SHA 7287946View commit details
Loading
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v3.4.1...v3.4.2