|
1 | 1 | # Overview of relocated functions, classes and constants in EasyBuild v4.0 {: #eb4_relocated_functions_classes_constants }
|
2 | 2 |
|
3 |
| -!!! warning |
4 |
| - This page will soon replace <https://docs.easybuild.io/en/latest/EasyBuild4-overview-relocated-functions-constants.html>. |
5 |
| - |
6 |
| - ** |
7 |
| - It still needs to be ported from *reStructuredText* (.rst) to *MarkDown* (.md), |
8 |
| - and you can help with that! |
9 |
| - ** |
10 |
| - |
11 |
| - - source: [`docs/EasyBuild4-overview-relocated-functions-constants.rst` in `easybuilders/easybuild` repo](https://raw.githubusercontent.com/easybuilders/easybuild/develop/docs/EasyBuild4-overview-relocated-functions-constants.rst) |
12 |
| - - target: [`docs/easybuild-v4/overview-relocated-functions-constants.md` in `easybuilders/easybuild-docs` repo](https://github.com/easybuilders/easybuild-docs/tree/main/docs/easybuild-v4/overview-relocated-functions-constants.md) |
13 |
| - |
14 |
| - See <https://github.com/easybuilders/easybuild-docs> for more information. |
15 |
| - |
16 |
| -```rst |
17 |
| -.. _eb4_relocated_functions_classes_constants: |
18 |
| -
|
19 |
| -Overview of relocated functions, classes and constants in EasyBuild v4.0 |
20 |
| -======================================================================== |
21 |
| -
|
22 | 3 | This page provides an alphabetical overview of relocated functions, classes and constants in EasyBuild version 4.0;
|
23 |
| -see :ref:`eb4_changes_backwards_incompatible` for motivation and high-level information. |
| 4 | +see [Backwards-incompatible changes in EasyBuild v4.0][eb4_changes_backwards_incompatible] for motivation and high-level information. |
24 | 5 |
|
25 | 6 |
|
26 |
| -.. _eb4_relocated_basestring: |
| 7 | +## `basestring` type {: #eb4_relocated_basestring } |
27 | 8 |
|
28 |
| -``basestring`` type |
29 |
| -------------------- |
30 |
| -
|
31 |
| -Rather than using the ``basestring`` type from the Python 2 standard library directly (for example in |
32 |
| -an ``isinstance`` expression), the ``string_type`` type from the ``easybuild.tools.py2vs3`` package should be used instead, |
| 9 | +Rather than using the `basestring` type from the Python 2 standard library directly (for example in |
| 10 | +an `isinstance` expression), the `string_type` type from the `easybuild.tools.py2vs3` package should be used instead, |
33 | 11 | to ensure that the code is compatible with both Python 2 and 3.
|
34 | 12 |
|
35 |
| -See also :ref:`py2_py3_compatibility`. |
36 |
| -
|
37 |
| -
|
38 |
| -.. _eb4_relocated_configparser: |
39 |
| -
|
40 |
| -``configparser`` module |
41 |
| ------------------------- |
42 |
| -
|
43 |
| -The ``configparser`` module that is part of the Python 2 standard library (via ``ConfigParser``) |
44 |
| -must now be imported from the ``easybuild.tools.py2vs3`` package, to ensure that the code is compatible with both Python 2 and 3. |
45 |
| -
|
46 |
| -See also :ref:`py2_py3_compatibility`. |
47 |
| -
|
48 |
| -
|
49 |
| -.. _eb4_relocated_DEVEL_MODULE_SUFFIX: |
50 |
| -
|
| 13 | +See also [Compatibility with Python 2 and Python 3][py2_py3_compatibility]. |
51 | 14 |
|
52 |
| -``DEVEL_MODULE_SUFFIX`` constant |
53 |
| --------------------------------- |
54 | 15 |
|
55 |
| -The ``DEVEL_MODULE_SUFFIX`` constant was relocated from ``easybuild.tools.module_naming_scheme`` to ``easybuild.tools.module_naming_scheme.mns``. |
| 16 | +## `configparser` module {: #eb4_relocated_configparser} |
56 | 17 |
|
| 18 | +The `configparser` module that is part of the Python 2 standard library (via `ConfigParser`) |
| 19 | +must now be imported from the `easybuild.tools.py2vs3` package, to ensure that the code is compatible with both Python 2 and 3. |
57 | 20 |
|
58 |
| -.. _eb4_relocated_DUMMY_TOOLCHAIN_NAME_VERSION: |
| 21 | +See also [Compatibility with Python 2 and Python 3][py2_py3_compatibility]. |
59 | 22 |
|
60 |
| -``DUMMY_TOOLCHAIN_NAME`` and ``DUMMY_TOOLCHAIN_VERSION`` constants |
61 |
| ------------------------------------------------------------------- |
62 | 23 |
|
63 |
| -The ``DUMMY_TOOLCHAIN_NAME`` and ``DUMMY_TOOLCHAIN_VERSION`` constants were relocated from ``easybuild.tools.toolchain`` to ``easybuild.tools.toolchain.toolchain``. |
| 24 | +## `DEVEL_MODULE_SUFFIX` constant {: #eb4_relocated_DEVEL_MODULE_SUFFIX } |
64 | 25 |
|
65 |
| -.. note:: Since the ``dummy`` toolchain has been deprecated and is replaced by the ``system`` toolchain (see :ref:`system_toolchain`), |
66 |
| - you should use the ``is_system_toolchain`` function or ``Toolchain.is_system_toolchain`` method to check whether a toolchain |
67 |
| - is a ``dummy`` or ``system`` toolchain, rather than using these constants directly (or using the ``SYSTEM_TOOLCHAIN-*`` equivalents). |
| 26 | +The `DEVEL_MODULE_SUFFIX` constant was relocated from `easybuild.tools.module_naming_scheme` to `easybuild.tools.module_naming_scheme.mns`. |
68 | 27 |
|
69 | 28 |
|
70 |
| -.. _eb4_relocated_FrozenDictKnownKeys: |
71 | 29 |
|
72 |
| -``FrozenDictKnownKeys`` class |
73 |
| ------------------------------ |
| 30 | +## `DUMMY_TOOLCHAIN_NAME` and `DUMMY_TOOLCHAIN_VERSION` constants {: #eb4_relocated_DUMMY_TOOLCHAIN_NAME_VERSION: } |
74 | 31 |
|
75 |
| -The ``FrozenDictKnownKeys`` class from ``vsc.utils.missing`` is now available from ``easybuild.base.frozendict``. |
| 32 | +The `DUMMY_TOOLCHAIN_NAME` and `DUMMY_TOOLCHAIN_VERSION` constants were relocated from `easybuild.tools.toolchain` to `easybuild.tools.toolchain.toolchain`. |
76 | 33 |
|
| 34 | +!!! note |
| 35 | + Since the `dummy` toolchain has been deprecated and is replaced by the `system` toolchain (see [System toolchain][system_toolchain]), |
| 36 | + you should use the `is_system_toolchain` function or `Toolchain.is_system_toolchain` method to check whether a toolchain |
| 37 | + is a `dummy` or `system` toolchain, rather than using these constants directly (or using the `SYSTEM_TOOLCHAIN-*` equivalents). |
77 | 38 |
|
78 |
| -.. _eb4_relocated_GEENRAL_CLASS: |
79 | 39 |
|
80 |
| -``GENERAL_CLASS`` constant |
81 |
| --------------------------- |
| 40 | +## `FrozenDictKnownKeys` class {: #eb4_relocated_FrozenDictKnownKeys } |
82 | 41 |
|
83 |
| -The ``GENERAL_CLASS`` constant was relocated from ``easybuild.tools.module_naming_scheme`` to ``easybuild.tools.config``. |
| 42 | +The `FrozenDictKnownKeys` class from `vsc.utils.missing` is now available from `easybuild.base.frozendict`. |
84 | 43 |
|
85 | 44 |
|
86 |
| -.. _eb4_relocated_get_class_for: |
| 45 | +## `GENERAL_CLASS` constant {: #eb4_relocated_GEENRAL_CLASS } |
87 | 46 |
|
88 |
| -``get_class_for`` function |
89 |
| --------------------------- |
| 47 | +The `GENERAL_CLASS` constant was relocated from `easybuild.tools.module_naming_scheme` to `easybuild.tools.config`. |
90 | 48 |
|
91 |
| -The ``get_class_for`` function from ``vsc.utils.missing`` is now available from ``easybuild.tools.utilities``. |
92 | 49 |
|
| 50 | +`get_class_for` function {: #eb4_relocated_get_class_for } |
93 | 51 |
|
94 |
| -.. _eb4_relocated_get_subclasses: |
| 52 | +The `get_class_for` function from `vsc.utils.missing` is now available from `easybuild.tools.utilities`. |
95 | 53 |
|
96 |
| -``get_subclasses`` function |
97 |
| ---------------------------- |
98 | 54 |
|
99 |
| -The ``get_subclasses`` function from ``vsc.utils.missing`` is now available from ``easybuild.tools.utilities``. |
| 55 | +## `get_subclasses` function {: #eb4_relocated_get_subclasses } |
100 | 56 |
|
| 57 | +The `get_subclasses` function from `vsc.utils.missing` is now available from `easybuild.tools.utilities`. |
101 | 58 |
|
102 |
| -.. _eb4_relocated_INDENT_4SPACES: |
103 | 59 |
|
104 |
| -``INDENT_4SPACES`` constant |
105 |
| ---------------------------- |
| 60 | +## `INDENT_4SPACES` constant {: #eb4_relocated_INDENT_4SPACES } |
106 | 61 |
|
107 |
| -The ``INDENT_4SPACES`` constants was relocated from ``easybuild.framework.easyconfig.format.format`` to ``easybuild.tools.utilities``. |
| 62 | +The `INDENT_4SPACES` constants was relocated from `easybuild.framework.easyconfig.format.format` to `easybuild.tools.utilities`. |
108 | 63 |
|
109 | 64 |
|
110 |
| -.. _eb4_relocated_mk_rst_table: |
| 65 | +## `mk_rst_table` function {: #eb4_relocated_mk_rst_table } |
111 | 66 |
|
112 |
| -``mk_rst_table`` function |
113 |
| --------------------------- |
| 67 | +The `mk_rst_table` function from `vsc.utils.docs` is now available from `easybuild.tools.docs`. |
114 | 68 |
|
115 |
| -The ``mk_rst_table`` function from ``vsc.utils.docs`` is now available from ``easybuild.tools.docs``. |
116 | 69 |
|
| 70 | +## `ModuleNamingScheme` class {: #eb4_relocated_ModuleNamingScheme } |
117 | 71 |
|
118 |
| -.. _eb4_relocated_ModuleNamingScheme: |
| 72 | +The `ModuleNamingScheme` class was relocated from `easybuild.tools.module_naming_scheme` to `easybuild.tools.module_naming_scheme.mns`. |
119 | 73 |
|
120 |
| -``ModuleNamingScheme`` class |
121 |
| ----------------------------- |
122 | 74 |
|
123 |
| -The ``ModuleNamingScheme`` class was relocated from ``easybuild.tools.module_naming_scheme`` to ``easybuild.tools.module_naming_scheme.mns``. |
| 75 | +## `nub` function {: #eb4_relocated_nub } |
124 | 76 |
|
| 77 | +The `nub` function from `vsc.utils.missing` is now available from `easybuild.tools.utilities`. |
125 | 78 |
|
126 |
| -.. _eb4_relocated_nub: |
127 | 79 |
|
128 |
| -``nub`` function |
129 |
| ----------------- |
| 80 | +## `OrderedDict` class {: #eb4_relocated_OrderedDict } |
130 | 81 |
|
131 |
| -The ``nub`` function from ``vsc.utils.missing`` is now available from ``easybuild.tools.utilities``. |
| 82 | +The `OrderedDict` class that is part of the Python 2 standard library (via `collections`) |
| 83 | +must now be imported from the `easybuild.tools.py2vs3` package, to ensure that the code is compatible with both Python 2 and 3. |
132 | 84 |
|
| 85 | +See also [Compatibility with Python 2 and Python 3][py2_py3_compatibility]. |
133 | 86 |
|
134 |
| -.. _eb4_relocated_OrderedDict: |
135 | 87 |
|
136 |
| -``OrderedDict`` class |
137 |
| ---------------------- |
| 88 | +## `reload` function {: #eb4_relocated_reload } |
138 | 89 |
|
139 |
| -The ``OrderedDict`` class that is part of the Python 2 standard library (via ``collections``) |
140 |
| -must now be imported from the ``easybuild.tools.py2vs3`` package, to ensure that the code is compatible with both Python 2 and 3. |
| 90 | +The `reload` function that is a built-in function of the Python 2 standard library |
| 91 | +must now be imported from the `easybuild.tools.py2vs3` package, to ensure that the code is compatible with both Python 2 and 3. |
141 | 92 |
|
142 |
| -See also :ref:`py2_py3_compatibility`. |
| 93 | +See also [Compatibility with Python 2 and Python 3][py2_py3_compatibility]. |
143 | 94 |
|
144 | 95 |
|
145 |
| -.. _eb4_relocated_reload: |
| 96 | +## `shell_quote` function {: #eb4_relocated_shell_quote } |
146 | 97 |
|
147 |
| -``reload`` function |
148 |
| -------------------- |
| 98 | +The `shell_quote` function from `vsc.utils.missing` is now available from `easybuild.tools.utilities`. |
149 | 99 |
|
150 |
| -The ``reload`` function that is a built-in function of the Python 2 standard library |
151 |
| -must now be imported from the ``easybuild.tools.py2vs3`` package, to ensure that the code is compatible with both Python 2 and 3. |
152 | 100 |
|
153 |
| -See also :ref:`py2_py3_compatibility`. |
| 101 | +## `sched_getaffinity` function {: #eb4_relocated_sched_getaffinity } |
154 | 102 |
|
| 103 | +The `sched_getaffinity` function from `vsc.utils.affinity` is now available from `easybuild.tools.systemtools`. |
155 | 104 |
|
156 |
| -.. _eb4_relocated_shell_quote: |
157 | 105 |
|
158 |
| -``shell_quote`` function |
159 |
| ------------------------- |
| 106 | +## `Singleton` class {: #eb4_relocated_Singleton } |
160 | 107 |
|
161 |
| -The ``shell_quote`` function from ``vsc.utils.missing`` is now available from ``easybuild.tools.utilities``. |
| 108 | +The `Singleton` class from `vsc.utils.patterns` is now available from `easybuild.tools.config`. |
162 | 109 |
|
163 | 110 |
|
164 |
| -.. _eb4_relocated_sched_getaffinity: |
| 111 | +## `StringIO` class {: #eb4_relocated_StringIO } |
165 | 112 |
|
166 |
| -``sched_getaffinity`` function |
167 |
| ------------------------------- |
168 |
| -
|
169 |
| -The ``sched_getaffinity`` function from ``vsc.utils.affinity`` is now available from ``easybuild.tools.systemtools``. |
170 |
| -
|
171 |
| -
|
172 |
| -.. _eb4_relocated_Singleton: |
173 |
| -
|
174 |
| -``Singleton`` class |
175 |
| -------------------- |
176 |
| -
|
177 |
| -The ``Singleton`` class from ``vsc.utils.patterns`` is now available from ``easybuild.tools.config``. |
178 |
| -
|
179 |
| -
|
180 |
| -.. _eb4_relocated_StringIO: |
181 |
| -
|
182 |
| -``StringIO`` class |
183 |
| ------------------- |
184 |
| -
|
185 |
| -Rather than importing the ``StringIO`` class from the ``StringIO`` module of the Python 2 standard library, |
186 |
| -it should be imported from the ``easybuild.tools.py2vs3`` package instead, |
| 113 | +Rather than importing the `StringIO` class from the `StringIO` module of the Python 2 standard library, |
| 114 | +it should be imported from the `easybuild.tools.py2vs3` package instead, |
187 | 115 | to ensure that the code is compatible with both Python 2 and 3.
|
188 | 116 |
|
189 |
| -See also :ref:`py2_py3_compatibility`. |
190 |
| -
|
191 |
| -
|
192 |
| -.. _eb4_relocated_subprocess_Popen: |
| 117 | +See also [Compatibility with Python 2 and Python 3][py2_py3_compatibility]. |
193 | 118 |
|
194 |
| -``subprocess.Popen`` function |
195 |
| ------------------------------ |
196 | 119 |
|
197 |
| -Rather than using the ``subprocess.Popen`` function directly, the ``subprocess_popen_text`` function from |
198 |
| -the ``easybuild.tools.py2vs3`` package should be used instead, to ensure that the code is compatible with both Python 2 and 3. |
| 120 | +## `subprocess.Popen` function {: #eb4_relocated_subprocess_Popen } |
199 | 121 |
|
200 |
| -See also :ref:`py2_py3_compatibility`. |
| 122 | +Rather than using the `subprocess.Popen` function directly, the `subprocess_popen_text` function from |
| 123 | +the `easybuild.tools.py2vs3` package should be used instead, to ensure that the code is compatible with both Python 2 and 3. |
201 | 124 |
|
| 125 | +See also [Compatibility with Python 2 and Python 3][py2_py3_compatibility]. |
202 | 126 |
|
203 |
| -.. _eb4_relocated_urlencode: |
204 | 127 |
|
205 |
| -``urlencode`` function |
206 |
| ----------------------- |
| 128 | +## `urlencode` function {: #eb4_relocated_urlencode } |
207 | 129 |
|
208 |
| -Rather than importing the ``urlencode`` function from the ``urllib`` module of the Python 2 standard library, |
209 |
| -it should be imported from the ``easybuild.tools.py2vs3`` package instead, |
| 130 | +Rather than importing the `urlencode` function from the `urllib` module of the Python 2 standard library, |
| 131 | +it should be imported from the `easybuild.tools.py2vs3` package instead, |
210 | 132 | to ensure that the code is compatible with both Python 2 and 3.
|
211 | 133 |
|
212 |
| -See also :ref:`py2_py3_compatibility`. |
| 134 | +See also [Compatibility with Python 2 and Python 3][py2_py3_compatibility]. |
213 | 135 |
|
214 | 136 |
|
215 |
| -.. _eb4_relocated_urllib: |
| 137 | +## `urllib` module {: #eb4_relocated_urllib} |
216 | 138 |
|
217 |
| -``urllib`` module |
218 |
| ------------------ |
219 |
| -
|
220 |
| -Rather than using the ``urllib`` module from the Python 2 standard library directly, |
221 |
| -the ``std_urllib`` module from the ``easybuild.tools.py2vs3`` package should be used instead, |
| 139 | +Rather than using the `urllib` module from the Python 2 standard library directly, |
| 140 | +the `std_urllib` module from the `easybuild.tools.py2vs3` package should be used instead, |
222 | 141 | to ensure that the code is compatible with both Python 2 and 3.
|
223 | 142 |
|
224 |
| -See also :ref:`py2_py3_compatibility`. |
225 |
| -
|
226 |
| -
|
227 |
| -.. _eb4_relocated_urllib2: |
| 143 | +See also [Compatibility with Python 2 and Python 3][py2_py3_compatibility]. |
228 | 144 |
|
229 |
| -``urllib2`` module |
230 |
| ------------------- |
231 | 145 |
|
232 |
| -Functions that were imported from the ``urllib2`` package that is part of the Python 2 standard library |
233 |
| -must now be imported from the ``easybuild.tools.py2vs3`` package, to ensure that the code is compatible with both Python 2 and 3. |
| 146 | +## `urllib2` module {: #eb4_relocated_urllib2 } |
234 | 147 |
|
235 |
| -See also :ref:`py2_py3_compatibility`. |
| 148 | +Functions that were imported from the `urllib2` package that is part of the Python 2 standard library |
| 149 | +must now be imported from the `easybuild.tools.py2vs3` package, to ensure that the code is compatible with both Python 2 and 3. |
236 | 150 |
|
| 151 | +See also [Compatibility with Python 2 and Python 3][py2_py3_compatibility]. |
237 | 152 |
|
238 |
| -.. _eb4_relocated_vsc_utils_modules: |
239 | 153 |
|
240 |
| -``vsc.utils.*`` modules |
241 |
| ------------------------ |
| 154 | +## `vsc.utils.*` modules {: #eb4_relocated_vsc_utils_modules } |
242 | 155 |
|
243 |
| -The functionality from the following ``vsc.utils.*`` modules required by EasyBuild has been ingested in the corresponding ``easybuild.base.*`` module: |
| 156 | +The functionality from the following `vsc.utils.*` modules required by EasyBuild has been ingested in the corresponding `easybuild.base.*` module: |
244 | 157 |
|
245 |
| -* ``vsc.utils.exceptions`` |
246 |
| -* ``vsc.utils.fancylogger`` |
247 |
| -* ``vsc.utils.generaloption`` |
248 |
| -* ``vsc.utils.optcomplete`` |
249 |
| -* ``vsc.utils.rest`` |
250 |
| -* ``vsc.utils.testing`` |
251 |
| -* ``vsc.utils.wrapper`` |
| 158 | +* `vsc.utils.exceptions` |
| 159 | +* `vsc.utils.fancylogger` |
| 160 | +* `vsc.utils.generaloption` |
| 161 | +* `vsc.utils.optcomplete` |
| 162 | +* `vsc.utils.rest` |
| 163 | +* `vsc.utils.testing` |
| 164 | +* `vsc.utils.wrapper` |
252 | 165 |
|
253 |
| -See also :ref:`eb4_no_required_deps`. |
| 166 | +See also [No more required Python packages][eb4_no_required_deps]. |
254 | 167 |
|
255 |
| -``` |
0 commit comments