summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbst-marge-bot <marge-bot@buildstream.build>2020-04-21 09:39:40 +0000
committerbst-marge-bot <marge-bot@buildstream.build>2020-04-21 09:39:40 +0000
commite93d33b1604717283d8684c9702c59a3b37c5063 (patch)
tree081b418ddb7f7159fc273deb1a5b7667dc4749f4
parentfc39f81a2573b08f77391b21f38271858906a9ed (diff)
parent1a2a7905fb69bd4d36c65e2a5bd74aecae7c87f9 (diff)
downloadbuildstream-e93d33b1604717283d8684c9702c59a3b37c5063.tar.gz
Merge branch 'tristan/remove-old-version-annotations' into 'master'
Remove old version annotations See merge request BuildStream/buildstream!1869
-rw-r--r--doc/source/hacking/coding_guidelines.rst8
-rw-r--r--src/buildstream/_loader/loader.py1
-rw-r--r--src/buildstream/element.py16
-rw-r--r--src/buildstream/plugin.py7
-rw-r--r--src/buildstream/sandbox/sandbox.py4
-rw-r--r--src/buildstream/source.py33
-rw-r--r--src/buildstream/types.py2
7 files changed, 12 insertions, 59 deletions
diff --git a/doc/source/hacking/coding_guidelines.rst b/doc/source/hacking/coding_guidelines.rst
index ecab2410f..bdc568c9d 100644
--- a/doc/source/hacking/coding_guidelines.rst
+++ b/doc/source/hacking/coding_guidelines.rst
@@ -39,7 +39,7 @@ When documenting the public API surface which is rendered in the reference
manual, we always mention the major version in which the API was introduced,
as shown in the examples below. If a public API exists without the *Since*
annotation, this is taken to mean that it was available since the first stable
-release 1.0.
+major point release (e.g: 2.0).
Here are some examples to get the hang of the format of API documenting
comments and docstrings.
@@ -57,7 +57,7 @@ comments and docstrings.
Returns:
(Element): The frobnicated version of this Element.
- *Since: 1.2*
+ *Since: 2.2*
"""
...
@@ -85,7 +85,7 @@ comments and docstrings.
self.name = self._compute_name(context, element)
"""The name of this foo
- *Since: 1.2*
+ *Since: 2.2*
"""
.. note::
@@ -121,7 +121,7 @@ comments and docstrings.
context (Context): The invocation Context
count (int): The number to count
- *Since: 1.2*
+ *Since: 2.2*
"""
...
diff --git a/src/buildstream/_loader/loader.py b/src/buildstream/_loader/loader.py
index ea795a7d7..3032f9036 100644
--- a/src/buildstream/_loader/loader.py
+++ b/src/buildstream/_loader/loader.py
@@ -752,7 +752,6 @@ class Loader:
# brief (str): The brief message
# warning_token (str): An optional configurable warning assosciated with this warning,
# this will cause PluginError to be raised if this warning is configured as fatal.
- # (*Since 1.4*)
#
# Raises:
# (:class:`.LoadError`): When warning_token is considered fatal by the project configuration
diff --git a/src/buildstream/element.py b/src/buildstream/element.py
index a7ee40051..6cce9b93f 100644
--- a/src/buildstream/element.py
+++ b/src/buildstream/element.py
@@ -133,7 +133,7 @@ class ElementError(BstError):
detail: A possibly multiline, more detailed error message
reason: An optional machine readable reason string, used for test cases
collect: An optional directory containing partial install contents
- temporary: An indicator to whether the error may occur if the operation was run again. (*Since: 1.2*)
+ temporary: An indicator to whether the error may occur if the operation was run again.
"""
def __init__(
@@ -177,39 +177,27 @@ class Element(Plugin):
BST_FORBID_RDEPENDS = False
"""Whether to raise exceptions if an element has runtime dependencies.
-
- *Since: 1.2*
"""
BST_FORBID_BDEPENDS = False
"""Whether to raise exceptions if an element has build dependencies.
-
- *Since: 1.2*
"""
BST_FORBID_SOURCES = False
"""Whether to raise exceptions if an element has sources.
-
- *Since: 1.2*
"""
BST_VIRTUAL_DIRECTORY = False
"""Whether to raise exceptions if an element uses Sandbox.get_directory
instead of Sandbox.get_virtual_directory.
-
- *Since: 1.4*
"""
BST_RUN_COMMANDS = True
"""Whether the element may run commands using Sandbox.run.
-
- *Since: 1.4*
"""
BST_ELEMENT_HAS_ARTIFACT = True
"""Whether the element produces an artifact when built.
-
- *Since: 1.90*
"""
def __init__(self, context: "Context", project: "Project", meta: "MetaElement", plugin_conf: Dict[str, Any]):
@@ -380,8 +368,6 @@ class Element(Plugin):
By default, this method does nothing, but may be overriden to
allow configure-like commands.
-
- *Since: 1.2*
"""
def assemble(self, sandbox: "Sandbox") -> str:
diff --git a/src/buildstream/plugin.py b/src/buildstream/plugin.py
index 9794b9bba..5c362aff6 100644
--- a/src/buildstream/plugin.py
+++ b/src/buildstream/plugin.py
@@ -403,8 +403,6 @@ class Plugin:
:class:`.LoadError`: In the case that the project path is not
valid or does not exist
- *Since: 1.2*
-
**Example:**
.. code:: python
@@ -459,7 +457,6 @@ class Plugin:
detail: An optional detailed message, can be multiline output
warning_token: An optional configurable warning assosciated with this warning,
this will cause PluginError to be raised if this warning is configured as fatal.
- (*Since 1.4*)
Raises:
(:class:`.PluginError`): When warning_token is considered fatal by the project configuration
@@ -525,7 +522,7 @@ class Plugin:
fail: A message to display if the process returns
a non zero exit code
fail_temporarily: Whether any exceptions should
- be raised as temporary. (*Since: 1.2*)
+ be raised as temporary.
rest_of_args (kwargs): Remaining arguments to subprocess.call()
Returns:
@@ -559,7 +556,7 @@ class Plugin:
fail (str): A message to display if the process returns
a non zero exit code
fail_temporarily (bool): Whether any exceptions should
- be raised as temporary. (*Since: 1.2*)
+ be raised as temporary.
rest_of_args (kwargs): Remaining arguments to subprocess.call()
Returns:
diff --git a/src/buildstream/sandbox/sandbox.py b/src/buildstream/sandbox/sandbox.py
index 6f6acc946..bba051704 100644
--- a/src/buildstream/sandbox/sandbox.py
+++ b/src/buildstream/sandbox/sandbox.py
@@ -273,7 +273,7 @@ class Sandbox:
cwd: The sandbox relative working directory in which to run the command.
env: A dictionary of string key, value pairs to set as environment
variables inside the sandbox environment.
- label: An optional label for the command, used for logging. (*Since: 1.4*)
+ label: An optional label for the command, used for logging.
Returns:
The program exit code, or None if running in batch context.
@@ -335,8 +335,6 @@ class Sandbox:
Raises:
(:class:`.SandboxCommandError`): If a command fails.
-
- *Since: 1.4*
"""
group = _SandboxBatchGroup(label=label)
diff --git a/src/buildstream/source.py b/src/buildstream/source.py
index a221d30a4..c0744e8e7 100644
--- a/src/buildstream/source.py
+++ b/src/buildstream/source.py
@@ -105,10 +105,9 @@ these methods are mandatory to implement.
**Optional**: This is completely optional and will do nothing if left unimplemented.
+
Accessing previous sources
--------------------------
-*Since: 1.4*
-
In the general case, all sources are fetched and tracked independently of one
another. In situations where a source needs to access previous source(s) in
order to perform its own track and/or fetch, following attributes can be set to
@@ -193,7 +192,7 @@ class SourceError(BstError):
message: The breif error description to report to the user
detail: A possibly multiline, more detailed error message
reason: An optional machine readable reason string, used for test cases
- temporary: An indicator to whether the error may occur if the operation was run again. (*Since: 1.2*)
+ temporary: An indicator to whether the error may occur if the operation was run again.
"""
def __init__(
@@ -209,8 +208,6 @@ class SourceFetcher:
places (e.g. a git source with submodules) has a consistent interface for
fetching and substituting aliases.
- *Since: 1.2*
-
.. attention::
When implementing a SourceFetcher, remember to call
@@ -285,8 +282,6 @@ class Source(Plugin):
* Source.track() will be called with an additional keyword argument
`previous_sources_dir` where previous sources will be staged
* this source can not be the first source for an element
-
- *Since: 1.4*
"""
BST_REQUIRES_PREVIOUS_SOURCES_FETCH = False
@@ -298,8 +293,6 @@ class Source(Plugin):
* Source.fetch() will be called with an additional keyword argument
`previous_sources_dir` where previous sources will be staged
* this source can not be the first source for an element
-
- *Since: 1.4*
"""
BST_REQUIRES_PREVIOUS_SOURCES_STAGE = False
@@ -309,8 +302,6 @@ class Source(Plugin):
* All sources listed before current source in the given element will be
staged with the source when it's cached.
* This source can not be the first source for an element.
-
- *Since: 1.4*
"""
BST_STAGE_VIRTUAL_DIRECTORY = False
@@ -318,15 +309,11 @@ class Source(Plugin):
When set to true, virtual directories can be passed to the source to stage
to.
-
- *Since: 1.4*
"""
BST_KEY_REQUIRES_STAGE = False
"""Whether the source will require staging in order to efficiently generate
a unique key.
-
- *Since: 1.91.2*
"""
def __init__(
@@ -401,8 +388,6 @@ class Source(Plugin):
this will only be used for loading refs from alternative locations
than in the `element.bst` file where the given Source object has
been declared.
-
- *Since: 1.2*
"""
raise ImplError("Source plugin '{}' does not implement load_ref()".format(self.get_kind()))
@@ -542,8 +527,6 @@ class Source(Plugin):
The :func:`SourceFetcher.fetch() <buildstream.source.SourceFetcher.fetch>`
method will be called on the returned fetchers one by one,
before consuming the next fetcher in the list.
-
- *Since: 1.2*
"""
return []
@@ -555,8 +538,6 @@ class Source(Plugin):
If source tracking is enabled in the session for this source,
then this will only be called if the sources become cached after
tracking completes.
-
- *Since: 1.4*
"""
def is_cached(self) -> bool:
@@ -567,8 +548,6 @@ class Source(Plugin):
returns `True`.
Returns: whether the source is cached locally or not.
-
- *Since: 1.93.0*
"""
raise ImplError("Source plugin '{}' does not implement is_cached()".format(self.get_kind()))
@@ -596,8 +575,8 @@ class Source(Plugin):
Args:
url: A URL, which may be using an alias
- alias_override: Optionally, an URI to override the alias with. (*Since: 1.2*)
- primary: Whether this is the primary URL for the source. (*Since: 1.2*)
+ alias_override: Optionally, an URI to override the alias with.
+ primary: Whether this is the primary URL for the source.
Returns:
The fully qualified URL, with aliases resolved
@@ -645,8 +624,6 @@ class Source(Plugin):
:func:`Plugin.configure() <buildstream.plugin.Plugin.configure>` if
:func:`Source.translate_url() <buildstream.source.Source.translate_url>`
is not called.
-
- *Since: 1.2*
"""
# Only mark the Source level aliases on the main instance, not in
# a reinstantiated instance in mirroring.
@@ -719,8 +696,6 @@ class Source(Plugin):
resolved
Returns: whether the source is fully resolved or not
-
- *Since: 1.93.0*
"""
return self.get_ref() is not None
diff --git a/src/buildstream/types.py b/src/buildstream/types.py
index 6e217e1a2..71a4dbebd 100644
--- a/src/buildstream/types.py
+++ b/src/buildstream/types.py
@@ -111,8 +111,6 @@ class Scope(FastEnum):
NONE = 4
"""Just the element itself, no dependencies.
-
- *Since: 1.4*
"""