Skip to content

Commit 9e90c99

Browse files
authored
Add warning against subapi instantiation in docs (#4335)
1 parent 9bb73a3 commit 9e90c99

File tree

14 files changed

+30
-0
lines changed

14 files changed

+30
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.. warning::
2+
3+
Subapis **must not** be initialized by themselves. They are intended to be
4+
accessed only through the main :ref:`ConanAPI <reference_python_api_conan_api>` attributes.

reference/extensions/python_api.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ and the rest of the members are considered private and can change without notice
3535
python_api/RemoveAPI
3636
python_api/UploadAPI
3737

38+
.. include:: ../../common/subapi_instantiation_warning.inc
39+
3840
There are also some model classes that represent the data structures used in the API.
3941
Note that as with the API, only the **documented** public members are guaranteed to be stable,
4042
and the rest of the members are considered private and can change without notice.

reference/extensions/python_api/CommandAPI.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ Command API
33

44
.. include:: ../../../common/experimental_warning.inc
55

6+
.. include:: ../../../common/subapi_instantiation_warning.inc
7+
68
.. currentmodule:: conan.api.subapi.command
79

810
.. autoclass:: CommandAPI

reference/extensions/python_api/ConfigAPI.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ Config API
33

44
.. include:: ../../../common/experimental_warning.inc
55

6+
.. include:: ../../../common/subapi_instantiation_warning.inc
7+
68
.. currentmodule:: conan.api.subapi.config
79

810
.. autoclass:: ConfigAPI

reference/extensions/python_api/DownloadAPI.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ Download API
33

44
.. include:: ../../../common/experimental_warning.inc
55

6+
.. include:: ../../../common/subapi_instantiation_warning.inc
7+
68
.. currentmodule:: conan.api.subapi.download
79

810
.. autoclass:: DownloadAPI

reference/extensions/python_api/ExportAPI.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ Export API
33

44
.. include:: ../../../common/experimental_warning.inc
55

6+
.. include:: ../../../common/subapi_instantiation_warning.inc
7+
68
.. currentmodule:: conan.api.subapi.export
79

810
.. autoclass:: ExportAPI

reference/extensions/python_api/GraphAPI.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ Graph API
33

44
.. include:: ../../../common/experimental_warning.inc
55

6+
.. include:: ../../../common/subapi_instantiation_warning.inc
7+
68
.. currentmodule:: conan.api.subapi.graph
79

810
.. autoclass:: GraphAPI

reference/extensions/python_api/InstallAPI.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ Install API
33

44
.. include:: ../../../common/experimental_warning.inc
55

6+
.. include:: ../../../common/subapi_instantiation_warning.inc
7+
68
.. currentmodule:: conan.api.subapi.install
79

810
.. autoclass:: InstallAPI

reference/extensions/python_api/ListAPI.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ List API
33

44
.. include:: ../../../common/experimental_warning.inc
55

6+
.. include:: ../../../common/subapi_instantiation_warning.inc
7+
68
.. currentmodule:: conan.api.subapi.list
79

810
.. autoclass:: ListAPI

reference/extensions/python_api/NewAPI.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ New API
33

44
.. include:: ../../../common/experimental_warning.inc
55

6+
.. include:: ../../../common/subapi_instantiation_warning.inc
7+
68
.. currentmodule:: conan.api.subapi.new
79

810
.. autoclass:: NewAPI

0 commit comments

Comments
 (0)