Repository navigation
Conversation
codebyNJ
marked this pull request as draft
February 17, 2026 03:48
|
Performance benchmarks:
|
Member
|
main is already on 4.0, so these warnings are not useful here. Rather, we want to first develop 4.0, and then once we have a fair sense of everything that is changing, we can work on the 3.x branch and add in warnings there. |
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
FutureWarningtomodel.step()andmodel.run_model(), guiding users towardmodel.run_for()/model.run_until()batchrunner.py) to userun_for(1)instead ofstep()model.step()tomodel.run_for(1)and add deprecation warning testsAddresses the tracking item in #3132:
Changes
mesa/model.pyFutureWarningin_wrapped_step()andrun_model()mesa/batchrunner.pymodel.step()→model.run_for(1)internallytests/test_model.pyrun_for(1), added 2 deprecation warning teststests/test_schedule_run.pym1.step()→m1.run_for(1)tests/test_lifespan.pyself.step()→self.run_for(1)tests/experimental/test_meta_agents.pymodel.step()→model.run_for(1)tests/test_datacollector.pypytestmarkto filterFutureWarningtests/experimental/test_datarecorder.pypytestmarkto filterFutureWarningDesign decisions
FutureWarning(notDeprecationWarning): Visible to end users by default, consistent with theSimulatordeprecation pattern in Mesarun_model()bypassesself.step(): Callsself._advance_time()directly to avoid emitting a double warning (one fromrun_model+ one fromstep)filterwarningswheremodel.step()is not the focus of the test (e.g., DataCollector tests), and migrated torun_for(1)where feasibleTest plan
-Werror(matching CI configuration)test_step_deprecation_warningverifiesmodel.step()emitsFutureWarningtest_run_model_deprecation_warningverifiesmodel.run_model()emitsFutureWarning