Skip to content

Commit 3be1194

Browse files
authored
Update release notes and version for 3.4.0 (#3003)
Update version and release notes for the next feature release, Mesa 3.4.0.
1 parent 4b5eead commit 3be1194

File tree

2 files changed

+142
-1
lines changed

2 files changed

+142
-1
lines changed

HISTORY.md

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,147 @@
11
---
22
title: Release History
33
---
4+
# 3.4.0 (2025-12-24)
5+
## Highlights
6+
The Mesa 3.4.0 feature release introduces universal time tracking, improves batch run reproducibility, and strengthens our deprecation policy. This release also requires Python 3.12+ and includes numerous bug fixes and quality-of-life improvements.
7+
8+
### Universal simulation time with `model.time`
9+
Mesa now provides a single source of truth for simulation time through the `model.time` attribute (#2903). Previously, time was fragmented across different components - simple models used `model.steps` as a proxy, while discrete event simulations stored time in `simulator.time`. This created complexity for features needing consistent time access.
10+
11+
Now all models have a `model.time` attribute that:
12+
- Automatically increments with each step (by 1.0)
13+
- Works seamlessly with discrete event simulators
14+
- Provides a consistent interface for data collection, visualization, and user code
15+
16+
```python
17+
# Basic usage - time auto-increments
18+
model = Model()
19+
model.step()
20+
print(model.time) # 1.0
21+
22+
# With discrete event simulation
23+
simulator = DEVSimulator()
24+
simulator.setup(model)
25+
simulator.schedule_event_absolute(some_function, 2.5)
26+
simulator.run_until(3.0)
27+
print(model.time) # 3.0
28+
```
29+
30+
The old `simulator.time` still works but emits a deprecation warning.
31+
32+
### Improved batch run reproducibility
33+
The `batch_run` function has been updated to provide explicit control over random seeds across replications (#2841). Previously, using `iterations` with a fixed seed caused all iterations to use the same seed, producing identical results instead of independent replications.
34+
35+
The new `rng` parameter accepts either a single seed value or an iterable of seed values, giving you complete control over reproducibility:
36+
37+
```python
38+
rng = np.random.default_rng(42)
39+
seed_values = rng.integers(0, sys.maxsize, size=(5,))
40+
41+
results = mesa.batch_run(
42+
MoneyModel,
43+
parameters=params,
44+
rng=seed_values.tolist(), # Each iteration uses a different seed
45+
)
46+
```
47+
48+
The old `iterations` parameter is now deprecated and will be removed in Mesa 4.0. See the [migration guide](https://mesa.readthedocs.io/latest/migration_guide.html#batch-run) for details on updating your code.
49+
50+
### Strengthened deprecation policy
51+
Mesa now has a formal [deprecation policy](https://github.com/mesa/mesa/blob/main/CONTRIBUTING.md#deprecation-policy) that ensures users have adequate time to migrate while allowing Mesa to evolve (#2900). A related change is that all deprecation warnings now use `FutureWarning` instead of `DeprecationWarning` (#2905), making them visible by default since `DeprecationWarning` is hidden for imported modules.
52+
53+
The policy guarantees:
54+
- New features must be available for at least one minor release before deprecating old ones
55+
- Documentation, migration guides, and examples must be updated before active deprecation
56+
- Breaking changes only occur in major version releases
57+
- Experimental features have more flexibility but still communicate changes
58+
59+
### Organization name change
60+
Mesa has migrated from the `projectmesa` to `mesa` organization on GitHub (#2880), (#2887), thanks to Daniel Langemann ([@dlangemann](https://github.com/dlangemann)) who generously transferred the `mesa` name to us. Our repositories are now accessible at `github.com/mesa/mesa` instead of `github.com/projectmesa/mesa`, signaling authority and maturity in a way that better reflects Mesa's position as *the* agent-based modeling framework in Python. GitHub automatically redirects old links, so existing URLs and git remotes continue to work seamlessly.
61+
62+
### Python 3.12+ required
63+
Mesa 3.4.0 drops support for Python 3.11 and now requires Python 3.12 or higher (#2842). This allows Mesa to use modern Python type parameter syntax and prepares the codebase for future Python features. Python 3.14 is now also fully tested in CI.
64+
65+
### Other improvements
66+
This release includes significant enhancements to the visualization system, including support for `AgentPortrayalStyle` in Altair components, improved property layer styling, and better error handling. The experimental cell space module has been removed in favor of the stable `mesa.discrete_space` module (#2969).
67+
68+
Numerous bugs were fixed, including issues with scalar color handling in matplotlib, empty cell collection indexing, and cell capacity handling. The test suite was reorganized to mirror the source module structure and now treats warnings as errors to prevent accumulation.
69+
70+
We welcome 10 new contributors to the Mesa project in this release! Thank you to everyone who contributed bug fixes, documentation improvements, and feature enhancements.
71+
72+
## What's Changed
73+
### ⏳ Deprecations
74+
* Replace DeprecationWarnings with FutureWarnings by @EwoutH in #2905
75+
* Fix: Auto-increment seed across batch_run iterations by @EwoutH in #2841
76+
### 🎉 New features added
77+
* Add `model.time` as universal source of truth for simulation time by @EwoutH in #2903
78+
### 🛠 Enhancements made
79+
* Refactor SpaceRenderer API to separate setup and draw methods by @Sahil-Chhoker in #2893
80+
* Validate HexGrid torus dimensions by @ShreyasN707 in #2951
81+
* Allow PropertyLayerStyle instance in draw_propertylayer by @ShreyasN707 in #2936
82+
* Support AgentPortrayalStyle in Altair visualization components by @EwoutH in #2985
83+
### 🐛 Bugs fixed
84+
* Update visualization tabs to be compatible with ipyvuetify 3.0 by @EwoutH in #2919
85+
* Use pandas type checking for numeric dtype detection in Altair backend by @EwoutH in #2917
86+
* Fix for Model.reset_rng by @quaquel in #2946
87+
* Fix scalar color handling in legacy `matplotlib` backend. by @falloficarus22 in #2959
88+
* Fix: IndexError in select_random_agent when cell collection is empty by @Nithurshen in #2983
89+
* Fix: Handle capacity=None in Cell.is_full property by @Nithin9585 in #2981
90+
* Fix/cell capacity zero by @ahmednabiled in #2990
91+
* Fix SolaraViz multipage rendering when renderer is absent by @falloficarus22 in #2966
92+
### 🔍 Examples updated
93+
* examples: Add Activation Order and Grid Type selectors to EpsteinCivilViolence by @Nithurshen in #2955
94+
### 📜 Documentation improvements
95+
* Docs: Link to online example model demo in a few places by @EwoutH in #2882
96+
* Update overview.md by @quaquel in #2883
97+
* docs: Changed colab notebook url for tutorial 3 - agentset by @aten2005 in #2890
98+
* Add AI/LLM use guidelines to Code of Conduct by @EwoutH in #2898
99+
* docs: Add deprecation policy to contributor guide by @EwoutH in #2900
100+
* [Docs] Fix typos and inconsistent comments in tutorials by @Mannan-15 in #2948
101+
* Remove capacity constraint on cells from tutorial by @quaquel in #2964
102+
* Fix Navigation Issue by @codebreaker32 in #2938
103+
### 🔧 Maintenance
104+
* Drop Python 3.11, require Python 3.12+ and update to modern type parameter syntax by @EwoutH in #2842
105+
* Pin Readthedocs build to Python 3.13 by @EwoutH in #2899
106+
* tests: Resolved "Missing Random Number Generator" warnings by @ShreyasN707 in #2911
107+
* tests: Update agent portrayals to use AgentPortrayalStyle by @Tejasv-Singh in #2909
108+
* Add Python 3.14 support to workflows and metadata by @EwoutH in #2843
109+
* Fix dtype/default_value mismatches in PropertyLayer tests to resolve UserWarnings by @ShreyasN707 in #2913
110+
* Replace deprecated np.bmat with np.block in Voronoi Delaunay triangulation by @EwoutH in #2915
111+
* Speed up CI by installing only Playwright chromium-headless-shell by @EwoutH in #2916
112+
* Add deprecation category to release notes by @EwoutH in #2914
113+
* test: Update simulator.time deprecation test to expect FutureWarning by @EwoutH in #2922
114+
* tests: Migrate PropertyLayer portrayals from `dict` to `PropertyLayerStyle` by @Tejasv-Singh in #2920
115+
* Fix matplotlib figure memory leak warning in tests by @EwoutH in #2924
116+
* Update organization name from `projectmesa` to `mesa` by @EwoutH in #2880
117+
* Update dict-based agent portrayals to use `AgentPortrayalStyle` in tests by @falloficarus22 in #2934
118+
* Remove experimental cell_space module and update references by @EwoutH in #2969
119+
* Fix PropertyLayer default value type mismatch warnings by @falloficarus22 in #2963
120+
* test: Replace deprecated `iterations` with `rng` in batch_run tests by @EwoutH in #2984
121+
* End of year cleanup by @EwoutH in #2971
122+
* Reorganize tests to mirror source module structure by @EwoutH in #2994
123+
* SolaraViz: move hooks before early return in ComponentsView by @EwoutH in #2925
124+
* Fix reproducibility warnings by adding explicit random parameters by @codebreaker32 in #2978
125+
* ci: treat warnings as errors to prevent accumulation by @EwoutH in #2926
126+
* Reject negative time_delta in schedule_event_relative by @Nithin9585 in #2999
127+
* CI: Add job that runs tests with pip pre-release dependencies by @EwoutH in #1852
128+
* CI: Split off separate coverage job by @EwoutH in #3005
129+
* Model: remove unreleased `step_duration` parameter by @EwoutH in #3007
130+
131+
## New Contributors
132+
* @GlyphicGuy made their first contribution in #2892
133+
* @aten2005 made their first contribution in #2890
134+
* @Tejasv-Singh made their first contribution in #2908
135+
* @ShreyasN707 made their first contribution in #2911
136+
* @Mannan-15 made their first contribution in #2948
137+
* @falloficarus22 made their first contribution in #2959
138+
* @codebreaker32 made their first contribution in #2938
139+
* @Nithurshen made their first contribution in #2955
140+
* @Nithin9585 made their first contribution in #2981
141+
* @ahmednabiled made their first contribution in #2990
142+
143+
**Full Changelog**: https://github.com/mesa/mesa/compare/v3.3.1...v3.4.0
144+
4145
# 3.3.1 (2025-11-07)
5146
## Highlights
6147
Mesa 3.3.1 is a maintenance release focused on bug fixes and documentation improvements following the major 3.3.0 visualization update.

mesa/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
]
2525

2626
__title__ = "mesa"
27-
__version__ = "3.4.0.dev"
27+
__version__ = "3.4.0"
2828
__license__ = "Apache 2.0"
2929
_this_year = datetime.datetime.now(tz=datetime.UTC).date().year
3030
__copyright__ = f"Copyright {_this_year} Mesa Team"

0 commit comments

Comments
 (0)