diff --git a/mesa/agent.py b/mesa/agent.py index 57edf1a032a..eeff83f1d53 100644 --- a/mesa/agent.py +++ b/mesa/agent.py @@ -10,7 +10,6 @@ import contextlib import copy import operator -import warnings import weakref from collections import defaultdict from collections.abc import Iterable, Iterator, MutableSet, Sequence @@ -81,12 +80,6 @@ def random(self) -> Random: class AgentSet(MutableSet, Sequence): """ - .. warning:: - The AgentSet is experimental. It may be changed or removed in any and all future releases, including - patch releases. - We would love to hear what you think about this new feature. If you have any thoughts, share them with - us here: https://github.com/projectmesa/mesa/discussions/1919 - A collection class that represents an ordered set of agents within an agent-based model (ABM). This class extends both MutableSet and Sequence, providing set-like functionality with order preservation and sequence operations. @@ -115,17 +108,8 @@ def __init__(self, agents: Iterable[Agent], model: Model): agents (Iterable[Agent]): An iterable of Agent objects to be included in the set. model (Model): The ABM model instance to which this AgentSet belongs. """ - self.model = model - - if not self.__class__.agentset_experimental_warning_given: - self.__class__.agentset_experimental_warning_given = True - warnings.warn( - "The AgentSet is experimental. It may be changed or removed in any and all future releases, including patch releases.\n" - "We would love to hear what you think about this new feature. If you have any thoughts, share them with us here: https://github.com/projectmesa/mesa/discussions/1919", - FutureWarning, - stacklevel=2, - ) + self.model = model self._agents = weakref.WeakKeyDictionary({agent: None for agent in agents}) def __len__(self) -> int: diff --git a/mesa/model.py b/mesa/model.py index 785ffe0c5a6..be5230dc99b 100644 --- a/mesa/model.py +++ b/mesa/model.py @@ -76,9 +76,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: self._steps: int = 0 self._time: TimeT = 0 # the model's clock - # Warning flags for current experimental features. These make sure a warning is only printed once per model. - self.agentset_experimental_warning_given = False - @property def agents(self) -> AgentSet: """Provides an AgentSet of all agents in the model, combining agents from all types."""