Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/buildstream/_elementproxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,6 @@ def search(self, name: str) -> Optional["Element"]:
#
return cast("Element", self._plugin)._search(_Scope.RUN, name)

def node_subst_vars(self, node: "ScalarNode") -> str:
return cast("Element", self._plugin).node_subst_vars(node)

def node_subst_sequence_vars(self, node: "SequenceNode[ScalarNode]") -> List[str]:
return cast("Element", self._plugin).node_subst_sequence_vars(node)

def compute_manifest(
self, *, include: Optional[List[str]] = None, exclude: Optional[List[str]] = None, orphans: bool = True
) -> str:
Expand Down
49 changes: 0 additions & 49 deletions src/buildstream/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,55 +505,6 @@ def search(self, name: str) -> Optional["Element"]:

return None

def node_subst_vars(self, node: "ScalarNode") -> str:
"""Replace any variables in the string contained in the node and returns it.

**Warning**: The method is deprecated and will get removed in the next version

Args:
node: A ScalarNode loaded from YAML

Returns:
The value with all variables replaced

Raises:
:class:`.LoadError`: When the node doesn't contain a string or a variable was not found.

**Example:**

.. code:: python

# Expect a string 'name' in 'node', substituting any
# variables in the returned string
name = self.node_subst_vars(node.get_scalar('name'))
"""
# FIXME: remove this
warnings.warn(
"configuration is now automatically expanded, this is a no-op and will be removed.", DeprecationWarning
)
return node.as_str()

def node_subst_sequence_vars(self, node: "SequenceNode[ScalarNode]") -> List[str]:
"""Substitute any variables in the given sequence

**Warning**: The method is deprecated and will get removed in the next version

Args:
node: A SequenceNode loaded from YAML

Returns:
The list with every variable replaced

Raises:
:class:`.LoadError`

"""
# FIXME: remove this
warnings.warn(
"configuration is now automatically expanded, this is a no-op and will be removed.", DeprecationWarning
)
return node.as_str_list()

def compute_manifest(
self, *, include: Optional[List[str]] = None, exclude: Optional[List[str]] = None, orphans: bool = True
) -> str:
Expand Down