Repository: conan-io/conan
Pull request #16962 (2024-09-09 18:23:34)

refactor, avoid getting same core config for every package
Changelog: Omit
Docs: Omit

Just a small pending TODO in the code



Patch:
diff --git a/conan/api/conan_api.py b/conan/api/conan_api.py
index 0a922501f..604e205e8 100644
--- a/conan/api/conan_api.py
+++ b/conan/api/conan_api.py
@@ -17,15 +17,15 @@ from conan.api.subapi.remotes import RemotesAPI
 from conan.api.subapi.remove import RemoveAPI
 from conan.api.subapi.search import SearchAPI
 from conan.api.subapi.upload import UploadAPI
-from conans.client.conf.required_version import check_required_conan_version
 from conans.client.migrations import ClientMigrator
 from conans.client.userio import init_colorama
 from conans.errors import ConanException
 from conans.model.version import Version
 from conan.internal.paths import get_conan_user_home
+from conans.model.version_range import validate_conan_version
 
 
-class ConanAPI(object):
+class ConanAPI:
     def __init__(self, cache_folder=None):
 
         version = sys.version_info
@@ -59,4 +59,6 @@ class ConanAPI(object):
         self.lockfile = LockfileAPI(self)
         self.local = LocalAPI(self)
 
-        check_required_conan_version(self.config.global_conf)
+        required_range_new = self.config.global_conf.get("core:required_conan_version")
+        if required_range_new:
+            validate_conan_version(required_range_new)
diff --git a/conan/api/model.py b/conan/api/model.py
index 1c3a93598..abc5ebc84 100644
--- a/conan/api/model.py
+++ b/conan/api/model.py
@@ -56,7 +56,7 @@ class MultiPackagesList:
         try:
             return self.lists[name]
         except KeyError:
-            raise ConanException(f"'{name}' doesn't exist is package list")
+            raise ConanException(f"'{name}' doesn't exist in package list")
 
     def add(self, name, pkg_list):
         self.lists[name] = pkg_list
diff --git a/conan/api/subapi/config.py b/conan/api/subapi/config.py
index 05d64f020..c3ba8032c 100644
--- a/conan/api/subapi/config.py
+++ b/conan/api/subapi/config.py
@@ -7,10 +7,11 @@ from jinja2 import Environment, FileSystemLoader
 
 from conan import conan_version
 from conan.api.output import ConanOutput
-from conans.client.conf import default_settings_yml
-from conan.internal.api import detect_api
+
+from conan.internal.api.detect import detect_api
 from conan.internal.cache.home_paths import HomePaths
 from conan.internal.conan_app import ConanApp
+from conan.internal.default_settings import default_settings_yml
 from conans.client.graph.graph import CONTEXT_HOST, RECIPE_VIRTUAL, Node
 from conans.client.graph.graph_builder import DepsGraphBuilder
 from conans.client.graph.profile_node_definer import consumer_definer
diff --git a/conan/api/subapi/upload.py b/conan/api/subapi/upload.py
index cc151a761..47bf8b1c3 100644
--- a/conan/api/subapi/upload.py
+++ b/conan/api/subapi/upload.py
@@ -4,8 +4,8 @@ from multiprocessing.pool import ThreadPool
 
 from conan.api.output import ConanOutput
 from conan.internal.conan_app import ConanApp
-from conan.internal.upload_metadata import gather_metadata
-from conan.internal.api.uploader import PackagePreparator, UploadExecutor, UploadUpstreamChecker
+from conan.internal.api.uploader import PackagePreparator, UploadExecutor, UploadUpstreamChecker, \
+    gather_metadata
 from conans.client.pkg_sign import PkgSignaturesPlugin
 from conans.client.rest.file_uploader import FileUploader
 from conans.errors import ConanException, AuthenticationException, ForbiddenException
diff --git a/conan/cli/commands/config.py b/conan/cli/commands/config.py
index 3df9b1646..51b18fbb9 100644
--- a/conan/cli/commands/config.py
+++ b/conan/cli/commands/config.py
@@ -104,8 +104,14 @@ def config_list(conan_api, parser, subparser, *args):
     """
     Show all the Conan available configurations: core and tools.
     """
-    parser.parse_args(*args)
-    return conan_api.config.builtin_confs
+    subparser.add_argument('pattern', nargs="?",
+                           help="Filter configuration items that matches this pattern")
+    args = parser.parse_args(*args)
+    confs = conan_api.config.builtin_confs
+    if args.pattern:
+        p = args.pattern.lower()
+        confs = {k: v for k, v in confs.items() if p in k.lower() or p in v.lower()}
+    return confs
 
 
 @conan_subcommand(formatters={"text": list_text_formatter, "json": default_json_formatter})
diff --git a/conan/internal/api/detect/__init__.py b/conan/internal/api/detect/__init__.py
new file mode 100644
index 000000000..e69de29bb
diff --git a/conan/internal/api/detect_api.py b/conan/internal/api/detect/detect_api.py
similarity index 99%
rename from conan/internal/api/detect_api.py
rename to conan/internal/api/detect/detect_api.py
index 0701a56b3..96879adf6 100644
--- a/conan/internal/api/detect_api.py
+++ b/conan/internal/api/detect/detect_api.py
@@ -292,7 +292,7 @@ def default_msvc_runtime(compiler):
 
 
 def detect_msvc_update(version):
-    from conans.client.conf.detect_vs import vs_detect_update
+    from conan.internal.api.detect.detect_vs import vs_detect_update
     return vs_detect_update(version)
 
 
@@ -416,7 +416,7 @@ def default_msvc_ide_version(version):
 
 
 def _detect_vs_ide_version():
-    from conans.client.conf.detect_vs import vs_installation_path
+    from conan.internal.api.detect.detect_vs import vs_installation_path
     msvc_versions = "17", "16", "15"
     for version in msvc_versions:
         vs_path = os.getenv('vs%s0comntools' % version)
diff --git a/conans/client/conf/detect_vs.py b/conan/internal/api/detect/detect_vs.py
similarity index 100%
rename from conans/client/conf/detect_vs.py
rename to conan/internal/api/detect/detect_vs.py
diff --git a/conan/internal/api/profile/detect.py b/conan/internal/api/profile/detect.py
index 9048a82be..7c2d2685d 100644
--- a/conan/internal/api/profile/detect.py
+++ b/conan/internal/api/profile/detect.py
@@ -1,5 +1,5 @@
 from conan.api.output import ConanOutput
-from conan.internal.api.detect_api import detect_os, detect_arch, default_msvc_runtime, \
+from conan.internal.api.detect.detect_api import detect_os, detect_arch, default_msvc_runtime, \
     detect_libcxx, detect_cppstd, detect_default_compiler, default_compiler_version
 
 
diff --git a/conan/internal/api/profile/profile_loader.py b/conan/internal/api/profile/profile_loader.py
index 8b36ef61f..e9047054a 100644
--- a/conan/internal/api/profile/profile_loader.py
+++ b/conan/internal/api/profile/profile_loader.py
@@ -6,7 +6,7 @@ from jinja2 import Environment, FileSystemLoader
 
 from conan import conan_version
 from conan.api.output import ConanOutput
-from conan.internal.api import detect_api
+from conan.internal.api.detect import detect_api
 from conan.internal.cache.home_paths import HomePaths
 from conan.tools.env.environment import ProfileEnvironment
 from conans.errors import ConanException
diff --git a/conan/internal/api/uploader.py b/conan/internal/api/uploader.py
index 6c56a69be..2cdf1ff2a 100644
--- a/conan/internal/api/uploader.py
+++ b/conan/internal/api/uploader.py
@@ -1,3 +1,4 @@
+import fnmatch
 import os
 import shutil
 import time
@@ -277,3 +278,37 @@ def _total_size(cache_files):
         stat = os.stat(file)
         total_size += stat.st_size
     return human_size(total_size)
+
+
+def _metadata_files(folder, metadata):
+    result = {}
+    for root, _, files in os.walk(folder):
+        for f in files:
+            abs_path = os.path.join(root, f)
+            relpath = os.path.relpath(abs_path, folder)
+            if metadata:
+                if not any(fnmatch.fnmatch(relpath, m) for m in metadata):
+                    continue
+            path = os.path.join("metadata", relpath).replace("\\", "/")
+            result[path] = abs_path
+    return result
+
+
+def gather_metadata(package_list, cache, metadata):
+    for rref, recipe_bundle in package_list.refs().items():
+        if metadata or recipe_bundle["upload"]:
+            metadata_folder = cache.recipe_layout(rref).metadata()
+            files = _metadata_files(metadata_folder, metadata)
+            if files:
+                ConanOutput(scope=str(rref)).info(f"Recipe metadata: {len(files)} files")
+                recipe_bundle.setdefault("files", {}).update(files)
+                recipe_bundle["upload"] = True
+
+        for pref, pkg_bundle in package_list.prefs(rref, recipe_bundle).items():
+            if metadata or pkg_bundle["upload"]:
+                metadata_folder = cache.pkg_layout(pref).metadata()
+                files = _metadata_files(metadata_folder, metadata)
+                if files:
+                    ConanOutput(scope=str(pref)).info(f"Package metadata: {len(files)} files")
+                    pkg_bundle.setdefault("files", {}).update(files)
+                    pkg_bundle["upload"] = True
diff --git a/conans/client/conf/__init__.py b/conan/internal/default_settings.py
similarity index 92%
rename from conans/client/conf/__init__.py
rename to conan/internal/default_settings.py
index d7c643407..a8f752e91 100644
--- a/conans/client/conf/__init__.py
+++ b/conan/internal/default_settings.py
@@ -19,43 +19,48 @@ os:
                     "13.0", "13.1", "13.2", "13.3", "13.4", "13.5", "13.6", "13.7",
                     "14.0", "14.1", "14.2", "14.3", "14.4", "14.5", "14.6", "14.7", "14.8",
                     "15.0", "15.1", "15.2", "15.3", "15.4", "15.5", "15.6", "16.0", "16.1",
-                    "16.2", "16.3", "16.4", "16.5", "16.6", "17.0", "17.1", "17.2", "17.3", "17.4", "17.5"]
+                    "16.2", "16.3", "16.4", "16.5", "16.6", "17.0", "17.1", "17.2", "17.3", "17.4", "17.5",
+                    "18.0", "18.1"]
         sdk: ["iphoneos", "iphonesimulator"]
         sdk_version: [null, "11.3", "11.4", "12.0", "12.1", "12.2", "12.4",
                         "13.0", "13.1", "13.2", "13.4", "13.5", "13.6", "13.7",
                         "14.0", "14.1", "14.2", "14.3", "14.4", "14.5", "15.0", "15.2", "15.4",
-                        "15.5", "16.0", "16.1", "16.2", "16.4", "17.0", "17.1", "17.2", "17.4", "17.5"]
+                        "15.5", "16.0", "16.1", "16.2", "16.4", "17.0", "17.1", "17.2", "17.4", "17.5",
+                        "18.0", "18.1"]
     watchOS:
         version: ["4.0", "4.1", "4.2", "4.3", "5.0", "5.1", "5.2", "5.3", "6.0", "6.1", "6.2",
                     "7.0", "7.1", "7.2", "7.3", "7.4", "7.5", "7.6", "8.0", "8.1", "8.3", "8.4",
                     "8.5", "8.6", "8.7", "9.0", "9.1", "9.2", "9.3", "9.4", "9.5", "9.6",
-                    "10.0", "10.1", "10.2", "10.3", "10.4", "10.5"]
+                    "10.0", "10.1", "10.2", "10.3", "10.4", "10.5", "11.0", "11.1"]
         sdk: ["watchos", "watchsimulator"]
         sdk_version: [null, "4.3", "5.0", "5.1", "5.2", "5.3", "6.0", "6.1", "6.2",
                         "7.0", "7.1", "7.2", "7.4", "8.0", "8.0.1", "8.3", "8.5", "9.0", "9.1",
-                        "9.4", "10.0", "10.1", "10.2", "10.4", "10.5"]
+                        "9.4", "10.0", "10.1", "10.2", "10.4", "10.5", "11.0", "11.1"]
     tvOS:
         version: ["11.0", "11.1", "11.2", "11.3", "11.4", "12.0", "12.1", "12.2", "12.3", "12.4",
                     "13.0", "13.2", "13.3", "13.4", "14.0", "14.2", "14.3", "14.4", "14.5",
                     "14.6", "14.7", "15.0", "15.1", "15.2", "15.3", "15.4", "15.5", "15.6",
                     "16.0", "16.1", "16.2", "16.3", "16.4", "16.5", "16.6", "17.0", "17.1", "17.2", "17.3", "17.4",
-                    "17.5"]
+                    "17.5", "18.0", "18.1"]
         sdk: ["appletvos", "appletvsimulator"]
         sdk_version: [null, "11.3", "11.4", "12.0", "12.1", "12.2", "12.4",
                         "13.0", "13.1", "13.2", "13.4", "14.0", "14.2", "14.3", "14.5", "15.0",
-                        "15.2", "15.4", "16.0", "16.1", "16.4", "17.0", "17.1", "17.2", "17.4", "17.5"]
+                        "15.2", "15.4", "16.0", "16.1", "16.4", "17.0", "17.1", "17.2", "17.4", "17.5",
+                        "18.0", "18.1"]
     visionOS:
-        version: ["1.0", "1.1", "1.2"]
+        version: ["1.0", "1.1", "1.2", "2.0", "2.1"]
         sdk: ["xros", "xrsimulator"]
-        sdk_version: [null, "1.0", "1.1", "1.2"]
+        sdk_version: [null, "1.0", "1.1", "1.2", "2.0", "2.1"]
     Macos:
         version: [null, "10.6", "10.7", "10.8", "10.9", "10.10", "10.11", "10.12", "10.13", "10.14", "10.15",
                     "11.0", "11.1", "11.2", "11.3", "11.4", "11.5", "11.6", "11.7",
                     "12.0", "12.1", "12.2", "12.3", "12.4", "12.5", "12.6", "12.7",
                     "13.0", "13.1", "13.2", "13.3", "13.4", "13.5", "13.6",
-                    "14.0", "14.1", "14.2", "14.3", "14.4", "14.5"]
+                    "14.0", "14.1", "14.2", "14.3", "14.4", "14.5", "14.6",
+                    "15.0", "15.1"]
         sdk_version: [null, "10.13", "10.14", "10.15", "11.0", "11.1", "11.3", "12.0", "12.1",
-                        "12.3", "13.0", "13.1", "13.3", "14.0", "14.2", "14.4", "14.5"]
+                        "12.3", "13.0", "13.1", "13.3", "14.0", "14.2", "14.4", "14.5",
+                        "15.0", "15.1"]
         subsystem:
             null:
             catalyst:
@@ -115,7 +120,7 @@ compiler:
     clang:
         version: ["3.3", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9", "4.0",
                   "5.0", "6.0", "7.0", "7.1",
-                  "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18"]
+                  "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"]
         libcxx: [null, libstdc++, libstdc++11, libc++, c++_shared, c++_static]
         cppstd: [null, 98, gnu98, 11, gnu11, 14, gnu14, 17, gnu17, 20, gnu20, 23, gnu23]
         runtime: [null, static, dynamic]
@@ -124,7 +129,7 @@ compiler:
         cstd: [null, 99, gnu99, 11, gnu11, 17, gnu17, 23, gnu23]
     apple-clang:
         version: ["5.0", "5.1", "6.0", "6.1", "7.0", "7.3", "8.0", "8.1", "9.0", "9.1",
-                  "10.0", "11.0", "12.0", "13", "13.0", "13.1", "14", "14.0", "15", "15.0"]
+                  "10.0", "11.0", "12.0", "13", "13.0", "13.1", "14", "14.0", "15", "15.0", "16", "16.0"]
         libcxx: [libstdc++, libc++]
         cppstd: [null, 98, gnu98, 11, gnu11, 14, gnu14, 17, gnu17, 20, gnu20, 23, gnu23]
         cstd: [null, 99, gnu99, 11, gnu11, 17, gnu17, 23, gnu23]
@@ -150,10 +155,6 @@ build_type: [null, Debug, Release, RelWithDebInfo, MinSizeRel]
 """
 
 
-def get_default_settings_yml():
-    return default_settings_yml
-
-
 def migrate_settings_file(cache_folder):
     from conans.client.migrations import update_file
 
diff --git a/conan/internal/upload_metadata.py b/conan/internal/upload_metadata.py
deleted file mode 100644
index 0dc8c2319..000000000
--- a/conan/internal/upload_metadata.py
+++ /dev/null
@@ -1,38 +0,0 @@
-import fnmatch
-import os
-
-from conan.api.output import ConanOutput
-
-
-def _metadata_files(folder, metadata):
-    result = {}
-    for root, _, files in os.walk(folder):
-        for f in files:
-            abs_path = os.path.join(root, f)
-            relpath = os.path.relpath(abs_path, folder)
-            if metadata:
-                if not any(fnmatch.fnmatch(relpath, m) for m in metadata):
-                    continue
-            path = os.path.join("metadata", relpath).replace("\\", "/")
-            result[path] = abs_path
-    return result
-
-
-def gather_metadata(package_list, cache, metadata):
-    for rref, recipe_bundle in package_list.refs().items():
-        if metadata or recipe_bundle["upload"]:
-            metadata_folder = cache.recipe_layout(rref).metadata()
-            files = _metadata_files(metadata_folder, metadata)
-            if files:
-                ConanOutput(scope=str(rref)).info(f"Recipe metadata: {len(files)} files")
-                recipe_bundle.setdefault("files", {}).update(files)
-                recipe_bundle["upload"] = True
-
-        for pref, pkg_bundle in package_list.prefs(rref, recipe_bundle).items():
-            if metadata or pkg_bundle["upload"]:
-                metadata_folder = cache.pkg_layout(pref).metadata()
-                files = _metadata_files(metadata_folder, metadata)
-                if files:
-                    ConanOutput(scope=str(pref)).info(f"Package metadata: {len(files)} files")
-                    pkg_bundle.setdefault("files", {}).update(files)
-                    pkg_bundle["upload"] = True
diff --git a/conan/tools/build/cppstd.py b/conan/tools/build/cppstd.py
index bf66fc624..c15bbaa71 100644
--- a/conan/tools/build/cppstd.py
+++ b/conan/tools/build/cppstd.py
@@ -1,7 +1,7 @@
 import operator
 
 from conan.errors import ConanInvalidConfiguration, ConanException
-from conan.internal.api.detect_api import default_cppstd as default_cppstd_
+from conan.internal.api.detect.detect_api import default_cppstd as default_cppstd_
 from conans.model.version import Version
 
 
diff --git a/conan/tools/build/flags.py b/conan/tools/build/flags.py
index aecaa0931..9805622f4 100644
--- a/conan/tools/build/flags.py
+++ b/conan/tools/build/flags.py
@@ -264,7 +264,10 @@ def _cppstd_apple_clang(clang_version, cppstd):
         v20 = "c++2a"
         vgnu20 = "gnu++2a"
 
-    if clang_version >= "13.0":
+    if clang_version >= "16.0":
+        v23 = "c++23"
+        vgnu23 = "gnu++23"
+    elif clang_version >= "13.0":
         v23 = "c++2b"
         vgnu23 = "gnu++2b"
 
diff --git a/conan/tools/cmake/cmakedeps/templates/target_data.py b/conan/tools/cmake/cmakedeps/templates/target_data.py
index 35330ee09..1e5a6e286 100644
--- a/conan/tools/cmake/cmakedeps/templates/target_data.py
+++ b/conan/tools/cmake/cmakedeps/templates/target_data.py
@@ -23,7 +23,8 @@ class ConfigDataTemplate(CMakeDepsFileTemplate):
         if self.arch:
             data_fname += "-{}".format(self.arch)
         data_fname += "-data.cmake"
-        return data_fname
+        # https://github.com/conan-io/conan/issues/17009
+        return data_fname.replace("|", "_")
 
     @property
     def _build_modules_activated(self):
diff --git a/conan/tools/cmake/presets.py b/conan/tools/cmake/presets.py
index 43739a955..b7e616150 100644
--- a/conan/tools/cmake/presets.py
+++ b/conan/tools/cmake/presets.py
@@ -5,7 +5,7 @@ import textwrap
 
 from conan.api.output import ConanOutput, Color
 from conan.tools.cmake.layout import get_build_folder_custom_vars
-from conan.tools.cmake.toolchain.blocks import GenericSystemBlock, CompilersBlock
+from conan.tools.cmake.toolchain.blocks import GenericSystemBlock
 from conan.tools.cmake.utils import is_multi_configuration
 from conan.tools.build import build_jobs
 from conan.tools.microsoft import is_msvc
@@ -158,13 +158,6 @@ class _CMakePresets:
                     "strategy": "external"
                 }
 
-        # Set the compiler like in the toolchain. Some IDEs like VS or VSCode require the compiler
-        # being set to cl.exe in order to activate the environment using vcvarsall.bat according to
-        # the toolset and architecture settings.
-        compilers = CompilersBlock.get_compilers(conanfile)
-        for lang, compiler in compilers.items():
-            ret["cacheVariables"][f"CMAKE_{lang}_COMPILER"] = compiler.replace("\\", "/")
-
         ret["toolchainFile"] = toolchain_file
         if conanfile.build_folder:
             # If we are installing a ref: "conan install <ref>", we don't have build_folder, because
diff --git a/conan/tools/cmake/toolchain/blocks.py b/conan/tools/cmake/toolchain/blocks.py
index 5549fdf1d..a493f8c44 100644
--- a/conan/tools/cmake/toolchain/blocks.py
+++ b/conan/tools/cmake/toolchain/blocks.py
@@ -865,13 +865,9 @@ class CompilersBlock(Block):
     """)
 
     def context(self):
-        return {"compilers": self.get_compilers(self._conanfile)}
-
-    @staticmethod
-    def get_compilers(conanfile):
         # Reading configuration from "tools.build:compiler_executables" -> {"C": "/usr/bin/gcc"}
-        compilers_by_conf = conanfile.conf.get("tools.build:compiler_executables", default={},
-                                               check_type=dict)
+        compilers_by_conf = self._conanfile.conf.get("tools.build:compiler_executables", default={},
+                                                     check_type=dict)
         # Map the possible languages
         compilers = {}
         # Allowed <LANG> variables (and <LANG>_LAUNCHER)
@@ -882,7 +878,7 @@ class CompilersBlock(Block):
             # To set CMAKE_<LANG>_COMPILER
             if comp in compilers_by_conf:
                 compilers[lang] = compilers_by_conf[comp]
-        return compilers
+        return {"compilers": compilers}
 
 
 class GenericSystemBlock(Block):
@@ -1018,26 +1014,27 @@ class GenericSystemBlock(Block):
     @staticmethod
     def _get_darwin_version(os_name, os_version):
         # version mapping from https://en.wikipedia.org/wiki/Darwin_(operating_system)
+        # but a more detailed version can be found in https://theapplewiki.com/wiki/Kernel
         version_mapping = {
             "Macos": {
                 "10.6": "10", "10.7": "11", "10.8": "12", "10.9": "13", "10.10": "14", "10.11": "15",
                 "10.12": "16", "10.13": "17", "10.14": "18", "10.15": "19", "11": "20", "12": "21",
-                "13": "22", "14": "23",
+                "13": "22", "14": "23", "15": "24"
             },
             "iOS": {
                 "7": "14", "8": "14", "9": "15", "10": "16", "11": "17", "12": "18", "13": "19",
-                "14": "20", "15": "21", "16": "22", "17": "23"
+                "14": "20", "15": "21", "16": "22", "17": "23", "18": "24"
             },
             "watchOS": {
                 "4": "17", "5": "18", "6": "19", "7": "20",
-                "8": "21", "9": "22", "10": "23"
+                "8": "21", "9": "22", "10": "23", "11": "24"
             },
             "tvOS": {
                 "11": "17", "12": "18", "13": "19", "14": "20",
-                "15": "21", "16": "22", "17": "23"
+                "15": "21", "16": "22", "17": "23", "18": "24"
             },
             "visionOS": {
-                "1": "23"
+                "1": "23", "2": "24"
             }
         }
         os_version = Version(os_version).major if os_name != "Macos" or (os_name == "Macos" and Version(
diff --git a/conan/tools/env/virtualbuildenv.py b/conan/tools/env/virtualbuildenv.py
index 0da4b9250..49e9d4847 100644
--- a/conan/tools/env/virtualbuildenv.py
+++ b/conan/tools/env/virtualbuildenv.py
@@ -34,7 +34,7 @@ class VirtualBuildEnv:
         if configuration:
             f += "-" + configuration.replace(".", "_")
         if arch:
-            f += "-" + arch.replace(".", "_")
+            f += "-" + arch.replace(".", "_").replace("|", "_")
         return f
 
     def environment(self):
diff --git a/conan/tools/env/virtualrunenv.py b/conan/tools/env/virtualrunenv.py
index c7308418b..890e8cd19 100644
--- a/conan/tools/env/virtualrunenv.py
+++ b/conan/tools/env/virtualrunenv.py
@@ -52,7 +52,7 @@ class VirtualRunEnv:
         if self.configuration:
             f += "-" + self.configuration.replace(".", "_")
         if self.arch:
-            f += "-" + self.arch.replace(".", "_")
+            f += "-" + self.arch.replace(".", "_").replace("|", "_")
         return f
 
     def environment(self):
diff --git a/conan/tools/gnu/pkgconfig.py b/conan/tools/gnu/pkgconfig.py
index 9d053819d..fb911ba93 100644
--- a/conan/tools/gnu/pkgconfig.py
+++ b/conan/tools/gnu/pkgconfig.py
@@ -1,3 +1,4 @@
+import textwrap
 from io import StringIO
 
 from conan.tools.build import cmd_args_to_string
@@ -30,8 +31,13 @@ class PkgConfig:
             env.prepend_path("PKG_CONFIG_PATH", self._pkg_config_path)
         with env.vars(self._conanfile).apply():
             # This way we get the environment from ConanFile, from profile (default buildenv)
-            output = StringIO()
-            self._conanfile.run(command, stdout=output, quiet=True)
+            output, err = StringIO(), StringIO()
+            ret = self._conanfile.run(command, stdout=output, stderr=err, quiet=True,
+                                      ignore_errors=True)
+            if ret != 0:
+                raise ConanException(f"PkgConfig failed. Command: {command}\n"
+                                     f"    stdout:\n{textwrap.indent(output.getvalue(), '    ')}\n"
+                                     f"    stderr:\n{textwrap.indent(err.getvalue(), '    ')}\n")
         value = output.getvalue().strip()
         return value
 
diff --git a/conan/tools/microsoft/visual.py b/conan/tools/microsoft/visual.py
index 7aad2edf9..233f9c50e 100644
--- a/conan/tools/microsoft/visual.py
+++ b/conan/tools/microsoft/visual.py
@@ -2,7 +2,7 @@ import os
 import textwrap
 
 from conan.internal import check_duplicated_generator
-from conans.client.conf.detect_vs import vs_installation_path
+from conan.internal.api.detect.detect_vs import vs_installation_path
 from conan.errors import ConanException, ConanInvalidConfiguration
 from conan.tools.scm import Version
 from conan.tools.intel.intel_cc import IntelCC
diff --git a/conans/client/conf/required_version.py b/conans/client/conf/required_version.py
deleted file mode 100644
index 50c89935c..000000000
--- a/conans/client/conf/required_version.py
+++ /dev/null
@@ -1,30 +0,0 @@
-from conans import __version__ as client_version
-from conans.errors import ConanException
-from conans.model.version import Version
-from conans.model.version_range import VersionRange
-
-
-def validate_conan_version(required_range):
-    clientver = Version(client_version)
-    version_range = VersionRange(required_range)
-    for conditions in version_range.condition_sets:
-        conditions.prerelease = True
-    if not version_range.contains(clientver, resolve_prerelease=None):
-        raise ConanException("Current Conan version ({}) does not satisfy "
-                             "the defined one ({}).".format(clientver, required_range))
-
-
-def check_required_conan_version(global_conf):
-    """ Check if the required Conan version in config file matches to the current Conan version
-
-            When required_conan_version is not configured, it's skipped
-            When required_conan_version is configured, Conan's version must matches the required
-            version
-            When it doesn't match, an ConanException is raised
-
-        :param global_conf: the global configura
-        :return: None
-    """
-    required_range_new = global_conf.get("core:required_conan_version")
-    if required_range_new:
-        validate_conan_version(required_range_new)
diff --git a/conans/client/graph/compute_pid.py b/conans/client/graph/compute_pid.py
index 2ed1d6a5f..9927e657e 100644
--- a/conans/client/graph/compute_pid.py
+++ b/conans/client/graph/compute_pid.py
@@ -6,20 +6,12 @@ from conans.model.info import ConanInfo, RequirementsInfo, RequirementInfo, Pyth
 from conans.client.conanfile.implementations import auto_header_only_package_id
 
 
-def compute_package_id(node, new_config, config_version):
+def compute_package_id(node, modes, config_version):
     """
     Compute the binary package ID of this node
     """
     conanfile = node.conanfile
-
-    # TODO: Extract
-    unknown_mode = new_config.get("core.package_id:default_unknown_mode", default="semver_mode")
-    non_embed_mode = new_config.get("core.package_id:default_non_embed_mode", default="minor_mode")
-    # recipe_revision_mode already takes into account the package_id
-    embed_mode = new_config.get("core.package_id:default_embed_mode", default="full_mode")
-    python_mode = new_config.get("core.package_id:default_python_mode", default="minor_mode")
-    build_mode = new_config.get("core.package_id:default_build_mode", default=None)
-
+    unknown_mode, non_embed_mode, embed_mode, python_mode, build_mode = modes
     python_requires = getattr(conanfile, "python_requires", None)
     if python_requires:
         python_requires = python_requires.info_requires()
diff --git a/conans/client/graph/graph_binaries.py b/conans/client/graph/graph_binaries.py
index f10991628..67d148cc2 100644
--- a/conans/client/graph/graph_binaries.py
+++ b/conans/client/graph/graph_binaries.py
@@ -32,6 +32,13 @@ class GraphBinariesAnalyzer(object):
         self._evaluated = {}  # {pref: [nodes]}
         compat_folder = HomePaths(conan_app.cache_folder).compatibility_plugin_path
         self._compatibility = BinaryCompatibility(compat_folder)
+        unknown_mode = global_conf.get("core.package_id:default_unknown_mode", default="semver_mode")
+        non_embed = global_conf.get("core.package_id:default_non_embed_mode", default="minor_mode")
+        # recipe_revision_mode already takes into account the package_id
+        embed_mode = global_conf.get("core.package_id:default_embed_mode", default="full_mode")
+        python_mode = global_conf.get("core.package_id:default_python_mode", default="minor_mode")
+        build_mode = global_conf.get("core.package_id:default_build_mode", default=None)
+        self._modes = unknown_mode, non_embed, embed_mode, python_mode, build_mode
 
     @staticmethod
     def _evaluate_build(node, build_mode):
@@ -364,7 +371,7 @@ class GraphBinariesAnalyzer(object):
         return RequirementsInfo(result)
 
     def _evaluate_package_id(self, node, config_version):
-        compute_package_id(node, self._global_conf, config_version=config_version)
+        compute_package_id(node, self._modes, config_version=config_version)
 
         # TODO: layout() execution don't need to be evaluated at GraphBuilder time.
         # it could even be delayed until installation time, but if we got enough info here for
@@ -425,7 +432,7 @@ class GraphBinariesAnalyzer(object):
         if node.path is not None:
             if node.path.endswith(".py"):
                 # For .py we keep evaluating the package_id, validate(), etc
-                compute_package_id(node, self._global_conf, config_version=config_version)
+                compute_package_id(node, self._modes, config_version=config_version)
             # To support the ``[layout]`` in conanfile.txt
             if hasattr(node.conanfile, "layout"):
                 with conanfile_exception_formatter(node.conanfile, "layout"):
diff --git a/conans/client/loader.py b/conans/client/loader.py
index b355c0150..efaed1a64 100644
--- a/conans/client/loader.py
+++ b/conans/client/loader.py
@@ -14,13 +14,13 @@ from pathlib import Path
 from conan.tools.cmake import cmake_layout
 from conan.tools.google import bazel_layout
 from conan.tools.microsoft import vs_layout
-from conans.client.conf.required_version import validate_conan_version
 from conans.client.loader_txt import ConanFileTextLoader
 from conans.errors import ConanException, NotFoundException, conanfile_exception_formatter
 from conans.model.conan_file import ConanFile
 from conans.model.options import Options
 from conans.model.recipe_ref import RecipeReference
 from conan.internal.paths import DATA_YML
+from conans.model.version_range import validate_conan_version
 from conans.util.files import load, chdir, load_user_encoded
 
 
diff --git a/conans/client/migrations.py b/conans/client/migrations.py
index ddde216ac..82997ba4e 100644
--- a/conans/client/migrations.py
+++ b/conans/client/migrations.py
@@ -4,6 +4,7 @@ import textwrap
 
 from conan.api.output import ConanOutput
 from conan.api.subapi.config import ConfigAPI
+from conan.internal.default_settings import migrate_settings_file
 from conans.migrations import Migrator
 from conans.util.dates import timestamp_now
 from conans.util.files import load, save
@@ -44,7 +45,6 @@ class ClientMigrator(Migrator):
         # Migrate the settings if they were the default for that version
         # Time for migrations!
         # Update settings.yml
-        from conans.client.conf import migrate_settings_file
         migrate_settings_file(self.cache_folder)
         # Update compatibility.py, app_compat.py, and cppstd_compat.py.
         from conans.client.graph.compatibility import migrate_compatibility_files
diff --git a/conans/client/rest/file_uploader.py b/conans/client/rest/file_uploader.py
index f8635315b..025f44595 100644
--- a/conans/client/rest/file_uploader.py
+++ b/conans/client/rest/file_uploader.py
@@ -1,7 +1,8 @@
+import os
 import time
 from copy import copy
 
-from conan.api.output import ConanOutput
+from conan.api.output import ConanOutput, TimedOutput
 from conans.client.rest import response_to_str
 from conans.errors import AuthenticationException, ConanException, \
     NotFoundException, ForbiddenException, RequestErrorException, InternalErrorException
@@ -53,7 +54,7 @@ class FileUploader(object):
         return bool(response.ok)
 
     def upload(self, url, abs_path, auth=None, dedup=False, retry=None, retry_wait=None,
-               headers=None):
+               headers=None, ref=None):
         retry = retry if retry is not None else self._config.get("core.upload:retry", default=1,
                                                                  check_type=int)
         retry_wait = retry_wait if retry_wait is not None else \
@@ -69,7 +70,7 @@ class FileUploader(object):
 
         for counter in range(retry + 1):
             try:
-                return self._upload_file(url, abs_path, headers, auth)
+                return self._upload_file(url, abs_path, headers, auth, ref)
             except (NotFoundException, ForbiddenException, AuthenticationException,
                     RequestErrorException):
                 raise
@@ -82,8 +83,28 @@ class FileUploader(object):
                         self._output.info("Waiting %d seconds to retry..." % retry_wait)
                     time.sleep(retry_wait)
 
-    def _upload_file(self, url, abs_path,  headers, auth):
+    def _upload_file(self, url, abs_path, headers, auth, ref):
+        class FileProgress:  # Wrapper just to provide an upload progress every 10 seconds
+            def __init__(self, f, total_size):
+                self._f = f
+                self._total = total_size
+                self._name = os.path.basename(f.name)
+                self._t = TimedOutput(interval=10)
+                self._read = 0
+
+            def __getattr__(self, item):
+                return getattr(self._f, item)
+
+            def read(self, n=-1):
+                read_bytes = self._f.read(n)
+                self._read += len(read_bytes)
+                self._t.info(f"{ref}: Uploading {self._name}: {int(self._read*100/self._total)}%")
+                return read_bytes
+
+        filesize = os.path.getsize(abs_path)
         with open(abs_path, mode='rb') as file_handler:
+            big_file = filesize > 100000000  # 100 MB
+            file_handler = FileProgress(file_handler, filesize) if big_file else file_handler
             try:
                 response = self._requester.put(url, data=file_handler, verify=self._verify_ssl,
                                                headers=headers, auth=auth,
diff --git a/conans/client/rest/rest_client_v2.py b/conans/client/rest/rest_client_v2.py
index 2e46de8de..0002e7f05 100644
--- a/conans/client/rest/rest_client_v2.py
+++ b/conans/client/rest/rest_client_v2.py
@@ -123,14 +123,14 @@ class RestV2Methods(RestCommonMethods):
         # Direct upload the recipe
         urls = {fn: self.router.recipe_file(ref, fn)
                 for fn in files_to_upload}
-        self._upload_files(files_to_upload, urls)
+        self._upload_files(files_to_upload, urls, str(ref))
 
     def _upload_package(self, pref, files_to_upload):
         urls = {fn: self.router.package_file(pref, fn)
                 for fn in files_to_upload}
-        self._upload_files(files_to_upload, urls)
+        self._upload_files(files_to_upload, urls, str(pref))
 
-    def _upload_files(self, files, urls):
+    def _upload_files(self, files, urls, ref):
         failed = []
         uploader = FileUploader(self.requester, self.verify_ssl, self._config)
         # conan_package.tgz and conan_export.tgz are uploaded first to avoid uploading conaninfo.txt
@@ -143,7 +143,7 @@ class RestV2Methods(RestCommonMethods):
                 headers = {}
                 uploader.upload(resource_url, files[filename], auth=self.auth,
                                 dedup=self._checksum_deploy,
-                                headers=headers)
+                                headers=headers, ref=ref)
             except (AuthenticationException, ForbiddenException):
                 raise
             except Exception as exc:
diff --git a/conans/client/subsystems.py b/conans/client/subsystems.py
index ac7ca25c7..39654b147 100644
--- a/conans/client/subsystems.py
+++ b/conans/client/subsystems.py
@@ -72,6 +72,7 @@ def _windows_bash_wrapper(conanfile, command, env, envfiles_folder):
     if not shell_path:
         raise ConanException("The config 'tools.microsoft.bash:path' is "
                              "needed to run commands in a Windows subsystem")
+    shell_path = shell_path.replace("\\", "/")  # Should work in all terminals
     env = env or []
     if subsystem == MSYS2:
         # Configure MSYS2 to inherith the PATH
diff --git a/conans/model/conf.py b/conans/model/conf.py
index c04e48d95..f8e1924e5 100644
--- a/conans/model/conf.py
+++ b/conans/model/conf.py
@@ -272,6 +272,7 @@ class _ConfValue(object):
 class Conf:
     # Putting some default expressions to check that any value could be false
     boolean_false_expressions = ("0", '"0"', "false", '"false"', "off")
+    boolean_true_expressions = ("1", '"1"', "true", '"true"', "on")
 
     def __init__(self):
         # It being ordered allows for Windows case-insensitive composition
@@ -321,8 +322,12 @@ class Conf:
                 raise ConanException(f"Unknown value '{v}' for '{conf_name}'")
             # Some smart conversions
             if check_type is bool and not isinstance(v, bool):
-                # Perhaps, user has introduced a "false", "0" or even "off"
-                return str(v).lower() not in Conf.boolean_false_expressions
+                if str(v).lower() in Conf.boolean_false_expressions:
+                    return False
+                if str(v).lower() in Conf.boolean_true_expressions:
+                    return True
+                raise ConanException(f"[conf] {conf_name} must be a boolean-like object "
+                                     f"(true/false, 1/0, on/off) and value '{v}' does not match it.")
             elif check_type is str and not isinstance(v, str):
                 return str(v)
             elif v is None:  # value was unset
diff --git a/conans/model/version_range.py b/conans/model/version_range.py
index 751683e3e..ba59e84e6 100644
--- a/conans/model/version_range.py
+++ b/conans/model/version_range.py
@@ -3,6 +3,7 @@ from typing import Optional
 
 from conans.errors import ConanException
 from conans.model.recipe_ref import Version
+from conans import __version__ as client_version
 
 
 @total_ordering
@@ -217,3 +218,13 @@ class VersionRange:
 
     def version(self):
         return Version(f"[{self._expression}]")
+
+
+def validate_conan_version(required_range):
+    clientver = Version(client_version)
+    version_range = VersionRange(required_range)
+    for conditions in version_range.condition_sets:
+        conditions.prerelease = True
+    if not version_range.contains(clientver, resolve_prerelease=None):
+        raise ConanException("Current Conan version ({}) does not satisfy "
+                             "the defined one ({}).".format(clientver, required_range))


Test patch:
diff --git a/test/conftest.py b/test/conftest.py
index bc148aabe..b9bc9ff58 100644
--- a/test/conftest.py
+++ b/test/conftest.py
@@ -6,7 +6,7 @@ from shutil import which
 
 import pytest
 
-from conans.client.conf.detect_vs import vswhere
+from conan.internal.api.detect.detect_vs import vswhere
 
 """
 To override these locations with your own in your dev machine:
@@ -132,7 +132,7 @@ tools_locations = {
         "platform": "Windows",
         "default": "system",
         "exe": "make",
-        "system": {"path": {'Windows': "C:/msys64/usr/bin"}},
+        "system": {"path": {'Windows': r"C:\msys64\usr\bin"}},
     },
     'msys2_clang64': {
         "disabled": True,
diff --git a/test/functional/test_profile_detect_api.py b/test/functional/test_profile_detect_api.py
index 1bac560e8..509df1129 100644
--- a/test/functional/test_profile_detect_api.py
+++ b/test/functional/test_profile_detect_api.py
@@ -3,7 +3,7 @@ import textwrap
 
 import pytest
 
-from conan.internal.api import detect_api
+from conan.internal.api.detect import detect_api
 from conan.test.utils.tools import TestClient
 
 
diff --git a/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps_custom_configs.py b/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps_custom_configs.py
index 4169b5f27..3501ddbdc 100644
--- a/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps_custom_configs.py
+++ b/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps_custom_configs.py
@@ -5,7 +5,7 @@ import unittest
 
 import pytest
 
-from conans.client.conf import get_default_settings_yml
+from conan.internal.default_settings import default_settings_yml
 from conan.test.assets.genconanfile import GenConanfile
 from conan.test.assets.sources import gen_function_cpp
 from conan.test.utils.tools import TestClient
@@ -145,7 +145,7 @@ class CustomSettingsTest(unittest.TestCase):
 
     def setUp(self):
         self.client = TestClient(path_with_spaces=False)
-        settings = get_default_settings_yml()
+        settings = default_settings_yml
         settings = settings.replace("build_type: [null, Debug, Release, ",
                                     "build_type: [null, Debug, MyRelease, ")
         save(self.client.cache.settings_path, settings)
diff --git a/test/functional/toolchains/cmake/test_cmake_toolchain.py b/test/functional/toolchains/cmake/test_cmake_toolchain.py
index 2bff99412..b3173091b 100644
--- a/test/functional/toolchains/cmake/test_cmake_toolchain.py
+++ b/test/functional/toolchains/cmake/test_cmake_toolchain.py
@@ -14,6 +14,7 @@ from conan.test.assets.genconanfile import GenConanfile
 from conan.test.utils.test_files import temp_folder
 from conan.test.utils.tools import TestClient, TurboTestClient
 from conans.util.files import save, load, rmdir
+from test.conftest import tools_locations
 
 
 @pytest.mark.skipif(platform.system() != "Windows", reason="Only for windows")
@@ -2041,3 +2042,73 @@ def test_cxx_version_not_overriden_if_hardcoded():
     tc.run("create . -s=compiler.cppstd=17")
     assert "Conan toolchain: C++ Standard 17 with extensions OFF" in tc.out
     assert "Warning: Standard CMAKE_CXX_STANDARD value defined in conan_toolchain.cmake to 17 has been modified to 17" not in tc.out
+
+
+@pytest.mark.tool("cmake", "3.23")  # Android complains if <3.19
+@pytest.mark.tool("android_ndk")
+@pytest.mark.skipif(platform.system() != "Darwin", reason="NDK only installed on MAC")
+def test_cmake_toolchain_crossbuild_set_cmake_compiler():
+    # To reproduce https://github.com/conan-io/conan/issues/16960
+    # the issue happens when you set CMAKE_CXX_COMPILER and CMAKE_C_COMPILER as cache variables
+    # and then cross-build
+    c = TestClient()
+
+    ndk_path = tools_locations["android_ndk"]["system"]["path"][platform.system()]
+    bin_path = ndk_path + (
+        "/toolchains/llvm/prebuilt/darwin-x86_64/bin" if platform.machine() == "x86_64" else
+        "/toolchains/llvm/prebuilt/darwin-arm64/bin"
+    )
+
+    android = textwrap.dedent(f"""
+       [settings]
+       os=Android
+       os.api_level=23
+       arch=x86_64
+       compiler=clang
+       compiler.version=12
+       compiler.libcxx=c++_shared
+       build_type=Release
+       [conf]
+       tools.android:ndk_path={ndk_path}
+       tools.build:compiler_executables = {{"c": "{bin_path}/x86_64-linux-android23-clang", "cpp": "{bin_path}/x86_64-linux-android23-clang++"}}
+       """)
+
+    conanfile = textwrap.dedent(f"""
+        from conan import ConanFile
+        from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout
+        from conan.tools.build import check_min_cppstd
+        class SDKConan(ConanFile):
+            name = "sdk"
+            version = "1.0"
+            generators = "CMakeDeps", "VirtualBuildEnv"
+            settings = "os", "compiler", "arch", "build_type"
+            exports_sources = "CMakeLists.txt"
+            def layout(self):
+                cmake_layout(self)
+            def generate(self):
+                tc = CMakeToolchain(self)
+                tc.cache_variables["SDK_VERSION"] = str(self.version)
+                tc.generate()
+            def build(self):
+                cmake = CMake(self)
+                cmake.configure()
+                cmake.build()
+    """)
+
+    cmake = textwrap.dedent(f"""
+        cmake_minimum_required(VERSION 3.23)
+        project(sdk VERSION ${{SDK_VERSION}}.0)
+        message("sdk: ${{SDK_VERSION}}.0")
+    """)
+
+    c.save({"android": android,
+            "conanfile.py": conanfile,
+            "CMakeLists.txt": cmake,})
+    # first run works ok
+    c.run('build . --profile:host=android')
+    assert 'sdk: 1.0.0' in c.out
+    # in second run CMake says that you have changed variables that require your cache to be deleted.
+    # and deletes the cache and fails
+    c.run('build . --profile:host=android')
+    assert 'VERSION ".0" format invalid.' not in c.out
+    assert 'sdk: 1.0.0' in c.out
diff --git a/test/functional/toolchains/cmake/test_universal_binaries.py b/test/functional/toolchains/cmake/test_universal_binaries.py
index 45dcc2a5f..b02a2e412 100644
--- a/test/functional/toolchains/cmake/test_universal_binaries.py
+++ b/test/functional/toolchains/cmake/test_universal_binaries.py
@@ -99,3 +99,47 @@ def test_create_universal_binary():
     client.run_command("lipo -info './build/armv8|armv8.3|x86_64/Release/foo'")
 
     assert "foo are: x86_64 arm64 arm64e" in client.out
+
+
+@pytest.mark.skipif(platform.system() != "Darwin", reason="Only OSX")
+@pytest.mark.tool("cmake", "3.23")
+def test_create_universal_binary_ninja():
+    client = TestClient()
+
+    client.run("new cmake_lib -d name=mylibrary -d version=1.0")
+
+    client.run('export .')
+
+    conanfile = textwrap.dedent("""
+        [requires]
+        mylibrary/1.0
+        [generators]
+        CMakeToolchain
+        CMakeDeps
+        VirtualBuildEnv
+        VirtualRunEnv
+        """)
+
+    cmake = textwrap.dedent("""
+        cmake_minimum_required(VERSION 3.23)
+        project(ninjatest CXX)
+
+        find_package(mylibrary CONFIG REQUIRED)
+        """)
+
+    client.save({"conanfile.txt": conanfile,
+                 "CMakeLists.txt": cmake},
+                 clean_first=True)
+
+    client.run('install . -s=arch="armv8|x86_64" --build=missing -of=build')
+
+    with client.chdir("build"):
+        client.run_command("cmake .. -GNinja "
+                           "-DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake "
+                           "-DCMAKE_POLICY_DEFAULT_CMP0091=NEW "
+                           "-DCMAKE_BUILD_TYPE=Release")
+
+    assert "expected newline, got '|'" not in client.out
+    assert "Build files have been written to:" in client.out
+    # test that there are no files with the "|" character in the build folder
+    assert not any("|" in f for f in os.listdir(os.path.join(client.current_folder, "build")))
diff --git a/test/functional/toolchains/gnu/autotools/test_win_bash.py b/test/functional/toolchains/gnu/autotools/test_win_bash.py
index ddfc375ab..d26647fce 100644
--- a/test/functional/toolchains/gnu/autotools/test_win_bash.py
+++ b/test/functional/toolchains/gnu/autotools/test_win_bash.py
@@ -121,7 +121,7 @@ def test_conf_inherited_in_test_package():
 
             def package_info(self):
                 self.conf_info.define("tools.microsoft.bash:subsystem", "msys2")
-                self.conf_info.define("tools.microsoft.bash:path", "{}")
+                self.conf_info.define("tools.microsoft.bash:path", r"{}")
     """.format(bash_path))
     client.save({"conanfile.py": conanfile})
     client.run("create .")
diff --git a/test/functional/toolchains/gnu/test_pkg_config.py b/test/functional/toolchains/gnu/test_pkg_config.py
index 5b9105f25..6d972f4a1 100644
--- a/test/functional/toolchains/gnu/test_pkg_config.py
+++ b/test/functional/toolchains/gnu/test_pkg_config.py
@@ -24,6 +24,8 @@ class TestPkgConfig:
                 """)
         c.save({"conanfile.py": conanfile})
         c.run("install .", assert_error=True)
+        assert "PkgConfig failed. Command: pkg-config --libs-only-l something_that_not_exist " \
+               "--print-errors" in c.out
         assert "Package something_that_not_exist was not found" in c.out
 
     def test_pc(self):
diff --git a/test/functional/toolchains/microsoft/test_msbuild.py b/test/functional/toolchains/microsoft/test_msbuild.py
index 073eed151..890f17e77 100644
--- a/test/functional/toolchains/microsoft/test_msbuild.py
+++ b/test/functional/toolchains/microsoft/test_msbuild.py
@@ -5,7 +5,7 @@ import textwrap
 import pytest
 
 from conan.tools.microsoft.visual import vcvars_command
-from conans.client.conf.detect_vs import vs_installation_path
+from conan.internal.api.detect.detect_vs import vs_installation_path
 from conan.test.assets.sources import gen_function_cpp
 from test.functional.utils import check_vs_runtime, check_exe_run
 from conan.test.utils.tools import TestClient
diff --git a/test/functional/util/tools_test.py b/test/functional/util/tools_test.py
index 42c14d8fb..b89fc1c58 100644
--- a/test/functional/util/tools_test.py
+++ b/test/functional/util/tools_test.py
@@ -5,7 +5,7 @@ from shutil import which
 
 import pytest
 
-from conans.client.conf.detect_vs import vswhere
+from conan.internal.api.detect.detect_vs import vswhere
 from conans.errors import ConanException
 from conan.test.utils.env import environment_update
 
diff --git a/test/integration/command/config_test.py b/test/integration/command/config_test.py
index 6ad532893..04b749a47 100644
--- a/test/integration/command/config_test.py
+++ b/test/integration/command/config_test.py
@@ -48,8 +48,10 @@ def test_config_list():
     client.run("config list --format=json")
     assert f"{json.dumps(BUILT_IN_CONFS, indent=4)}\n" == client.stdout
 
-    client.run("config list unexpectedarg", assert_error=True)
-    assert "unrecognized arguments: unexpectedarg" in client.out
+    client.run("config list cmake")
+    assert "tools.cmake:cmake_program: Path to CMake executable" in client.out
+    assert "core.download:parallel" not in client.out
+    assert "tools.build:verbosity" not in client.out
 
 
 def test_config_install():
@@ -85,6 +87,7 @@ def test_config_install_conanignore():
         'config_folder/tests/tester': '',
         'config_folder/other_tests/tester2': ''
     })
+
     def _assert_config_exists(path):
         assert os.path.exists(os.path.join(tc.cache_folder, path))
 
diff --git a/test/integration/command/upload/upload_complete_test.py b/test/integration/command/upload/upload_complete_test.py
index f800957fd..24d6c837f 100644
--- a/test/integration/command/upload/upload_complete_test.py
+++ b/test/integration/command/upload/upload_complete_test.py
@@ -56,7 +56,6 @@ def test_upload_with_pattern():
         client.run("export . --user=frodo --channel=stable")
 
     client.run("upload hello* --confirm -r default")
-    print(client.out)
     for num in range(3):
         assert "Uploading recipe 'hello%s/1.2.1@frodo/stable" % num in client.out
 
diff --git a/test/integration/conanfile/required_conan_version_test.py b/test/integration/conanfile/required_conan_version_test.py
index d4904a2a1..3bde82da8 100644
--- a/test/integration/conanfile/required_conan_version_test.py
+++ b/test/integration/conanfile/required_conan_version_test.py
@@ -22,10 +22,10 @@ def test_required_conan_version():
     client.run("source . ", assert_error=True)
     assert f"Current Conan version ({__version__}) does not satisfy the defined one (>=100.0)" in client.out
 
-    with mock.patch("conans.client.conf.required_version.client_version", "101.0"):
+    with mock.patch("conans.model.version_range.client_version", "101.0"):
         client.run("export . --name=pkg --version=1.0")
 
-    with mock.patch("conans.client.conf.required_version.client_version", "101.0-dev"):
+    with mock.patch("conans.model.version_range.client_version", "101.0-dev"):
         client.run("export . --name=pkg --version=1.0")
 
     client.run("install --requires=pkg/1.0@", assert_error=True)
diff --git a/test/integration/configuration/conf/test_conf.py b/test/integration/configuration/conf/test_conf.py
index 66cc9ef22..d8329e09e 100644
--- a/test/integration/configuration/conf/test_conf.py
+++ b/test/integration/configuration/conf/test_conf.py
@@ -6,7 +6,7 @@ import pytest
 from mock import patch
 
 from conan import conan_version
-from conan.internal.api import detect_api
+from conan.internal.api.detect import detect_api
 from conan.test.assets.genconanfile import GenConanfile
 from conan.test.utils.test_files import temp_folder
 from conans.util.files import save, load
@@ -134,7 +134,7 @@ def test_new_config_file(client):
     assert "[conf] Either 'cache:read_only' does not exist in configuration list" in client.out
 
 
-@patch("conans.client.conf.required_version.client_version", "1.26.0")
+@patch("conans.model.version_range.client_version", "1.26.0")
 def test_new_config_file_required_version():
     client = TestClient()
     conf = textwrap.dedent("""\
diff --git a/test/integration/configuration/required_version_test.py b/test/integration/configuration/required_version_test.py
index d4a92fa11..eb69db7cb 100644
--- a/test/integration/configuration/required_version_test.py
+++ b/test/integration/configuration/required_version_test.py
@@ -11,7 +11,7 @@ from conans.util.files import save
 
 class RequiredVersionTest(unittest.TestCase):
 
-    @mock.patch("conans.client.conf.required_version.client_version", "1.26.0")
+    @mock.patch("conans.model.version_range.client_version", "1.26.0")
     def test_wrong_version(self):
         required_version = "1.23.0"
         client = TestClient()
@@ -20,21 +20,21 @@ class RequiredVersionTest(unittest.TestCase):
         self.assertIn("Current Conan version (1.26.0) does not satisfy the defined "
                       "one ({})".format(required_version), client.out)
 
-    @mock.patch("conans.client.conf.required_version.client_version", "1.22.0")
+    @mock.patch("conans.model.version_range.client_version", "1.22.0")
     def test_exact_version(self):
         required_version = "1.22.0"
         client = TestClient()
         client.save_home({"global.conf": f"core:required_conan_version={required_version}"})
         client.run("--help")
 
-    @mock.patch("conans.client.conf.required_version.client_version", "2.1.0")
+    @mock.patch("conans.model.version_range.client_version", "2.1.0")
     def test_lesser_version(self):
         required_version = "<3.0"
         client = TestClient()
         client.save_home({"global.conf": f"core:required_conan_version={required_version}"})
         client.run("--help")
 
-    @mock.patch("conans.client.conf.required_version.client_version", "1.0.0")
+    @mock.patch("conans.model.version_range.client_version", "1.0.0")
     def test_greater_version(self):
         required_version = ">0.1.0"
         client = TestClient()
diff --git a/test/integration/graph/core/graph_manager_base.py b/test/integration/graph/core/graph_manager_base.py
index 7f4ac1f73..7303cb6bc 100644
--- a/test/integration/graph/core/graph_manager_base.py
+++ b/test/integration/graph/core/graph_manager_base.py
@@ -7,7 +7,7 @@ import yaml
 from conan.api.conan_api import ConanAPI
 from conan.internal.cache.cache import PkgCache
 from conan.internal.cache.home_paths import HomePaths
-from conans.client.conf import default_settings_yml
+from conan.internal.default_settings import default_settings_yml
 from conans.model.conf import ConfDefinition
 from conans.model.manifest import FileTreeManifest
 from conans.model.options import Options
diff --git a/test/integration/toolchains/cmake/test_cmaketoolchain.py b/test/integration/toolchains/cmake/test_cmaketoolchain.py
index a6f1bb75f..a1ed3da24 100644
--- a/test/integration/toolchains/cmake/test_cmaketoolchain.py
+++ b/test/integration/toolchains/cmake/test_cmaketoolchain.py
@@ -1046,30 +1046,6 @@ def test_set_cmake_lang_compilers_and_launchers():
     assert 'set(CMAKE_RC_COMPILER "C:/local/rc.exe")' in toolchain
 
 
-def test_cmake_presets_compiler():
-    profile = textwrap.dedent(r"""
-    [settings]
-    os=Windows
-    arch=x86_64
-    compiler=msvc
-    compiler.version=193
-    compiler.runtime=dynamic
-    [conf]
-    tools.build:compiler_executables={"c": "cl", "cpp": "cl.exe", "rc": "C:\\local\\rc.exe"}
-    """)
-    client = TestClient()
-    conanfile = GenConanfile().with_settings("os", "arch", "compiler")\
-        .with_generator("CMakeToolchain")
-    client.save({"conanfile.py": conanfile,
-                 "profile": profile})
-    client.run("install . -pr:b profile -pr:h profile")
-    presets = json.loads(client.load("CMakePresets.json"))
-    cache_variables = presets["configurePresets"][0]["cacheVariables"]
-    assert cache_variables["CMAKE_C_COMPILER"] == "cl"
-    assert cache_variables["CMAKE_CXX_COMPILER"] == "cl.exe"
-    assert cache_variables["CMAKE_RC_COMPILER"] == "C:/local/rc.exe"
-
-
 def test_cmake_layout_toolchain_folder():
     """ in single-config generators, the toolchain is a different file per configuration
     https://github.com/conan-io/conan/issues/12827
diff --git a/test/unittests/client/build/cpp_std_flags_test.py b/test/unittests/client/build/cpp_std_flags_test.py
index c57948be7..e4318082b 100644
--- a/test/unittests/client/build/cpp_std_flags_test.py
+++ b/test/unittests/client/build/cpp_std_flags_test.py
@@ -1,6 +1,6 @@
 import unittest
 
-from conan.internal.api.detect_api import default_cppstd
+from conan.internal.api.detect.detect_api import default_cppstd
 from conan.tools.build import cppstd_flag
 from conans.model.version import Version
 from conan.test.utils.mocks import MockSettings, ConanFileMock
diff --git a/test/unittests/client/conf/detect/test_gcc_compiler.py b/test/unittests/client/conf/detect/test_gcc_compiler.py
index dd8cc5e80..b7059c600 100644
--- a/test/unittests/client/conf/detect/test_gcc_compiler.py
+++ b/test/unittests/client/conf/detect/test_gcc_compiler.py
@@ -4,7 +4,7 @@ import mock
 from parameterized import parameterized
 
 
-from conan.internal.api.detect_api import detect_gcc_compiler
+from conan.internal.api.detect.detect_api import detect_gcc_compiler
 
 
 class GCCCompilerTestCase(unittest.TestCase):
@@ -12,7 +12,7 @@ class GCCCompilerTestCase(unittest.TestCase):
     @parameterized.expand([("10",), ("4.2",), ('7', )])
     def test_detect_gcc_10(self, version):
         with mock.patch("platform.system", return_value="Linux"):
-            with mock.patch("conan.internal.api.detect_api.detect_runner", return_value=(0, version)):
+            with mock.patch("conan.internal.api.detect.detect_api.detect_runner", return_value=(0, version)):
                 compiler, installed_version, compiler_exe = detect_gcc_compiler()
         self.assertEqual(compiler, 'gcc')
         self.assertEqual(installed_version, version)
diff --git a/test/unittests/client/profile_loader/compiler_cppstd_test.py b/test/unittests/client/profile_loader/compiler_cppstd_test.py
index baaaa33e0..af73239e1 100644
--- a/test/unittests/client/profile_loader/compiler_cppstd_test.py
+++ b/test/unittests/client/profile_loader/compiler_cppstd_test.py
@@ -7,8 +7,8 @@ from jinja2 import Template
 
 from conan.internal.cache.cache import PkgCache
 from conan.internal.cache.home_paths import HomePaths
-from conans.client.conf import default_settings_yml
 from conan.internal.api.profile.profile_loader import ProfileLoader
+from conan.internal.default_settings import default_settings_yml
 from conans.errors import ConanException
 from conans.model.conf import ConfDefinition
 from conans.model.settings import Settings
diff --git a/test/unittests/model/settings_test.py b/test/unittests/model/settings_test.py
index da418033c..93c9adaf0 100644
--- a/test/unittests/model/settings_test.py
+++ b/test/unittests/model/settings_test.py
@@ -3,7 +3,7 @@ import unittest
 
 import pytest
 
-from conans.client.conf import default_settings_yml
+from conan.internal.default_settings import default_settings_yml
 from conans.errors import ConanException
 from conans.model.settings import Settings, bad_value_msg, undefined_field
 
diff --git a/test/unittests/model/test_conf.py b/test/unittests/model/test_conf.py
index 042f74463..e73870a45 100644
--- a/test/unittests/model/test_conf.py
+++ b/test/unittests/model/test_conf.py
@@ -221,10 +221,15 @@ def test_conf_get_check_type_and_default():
         zlib:user.company.check:static_str=off
         user.company.list:newnames+=myname
         core.download:parallel=True
+        user:bad_value_0=Fasle
+        user:bad_value_1=ture
+        user:bad_value_2=10
+        user:bad_value_3='00'
     """)
     c = ConfDefinition()
     c.loads(text)
     assert c.get("user.company.cpu:jobs", check_type=int) == 5
+    assert c.get("user.company.cpu:jobs", check_type=None) == 5
     assert c.get("user.company.cpu:jobs", check_type=str) == "5"  # smart conversion
     with pytest.raises(ConanException) as exc_info:
         c.get("user.company.cpu:jobs", check_type=list)
@@ -243,6 +248,18 @@ def test_conf_get_check_type_and_default():
         c.get("core.download:parallel", check_type=int)
     assert ("[conf] core.download:parallel must be a int-like object. "
             "The value 'True' introduced is a bool object") in str(exc_info.value)
+    with pytest.raises(ConanException) as exc_info:
+        c.get("user:bad_value_0", check_type=bool)
+    assert ("[conf] user:bad_value_0 must be a boolean-like object (true/false, 1/0, on/off) and value 'Fasle' does not match it.") in str(exc_info.value)
+    with pytest.raises(ConanException) as exc_info:
+        c.get("user:bad_value_1", check_type=bool)
+    assert ("[conf] user:bad_value_1 must be a boolean-like object (true/false, 1/0, on/off) and value 'ture' does not match it.") in str(exc_info.value)
+    with pytest.raises(ConanException) as exc_info:
+        c.get("user:bad_value_2", check_type=bool)
+    assert ("[conf] user:bad_value_2 must be a boolean-like object (true/false, 1/0, on/off) and value '10' does not match it.") in str(exc_info.value)
+    with pytest.raises(ConanException) as exc_info:
+        c.get("user:bad_value_3", check_type=bool)
+    assert ("[conf] user:bad_value_3 must be a boolean-like object (true/false, 1/0, on/off) and value '\'00\'' does not match it.") in str(exc_info.value)
 
 
 def test_conf_pop():
diff --git a/test/unittests/tools/build/test_cppstd.py b/test/unittests/tools/build/test_cppstd.py
index 62c617625..943a64288 100644
--- a/test/unittests/tools/build/test_cppstd.py
+++ b/test/unittests/tools/build/test_cppstd.py
@@ -1,6 +1,6 @@
 import pytest
 
-from conan.internal.api.detect_api import detect_cppstd
+from conan.internal.api.detect.detect_api import detect_cppstd
 from conan.tools.build import supported_cppstd, check_min_cppstd, valid_min_cppstd
 from conans.errors import ConanException, ConanInvalidConfiguration
 from conans.model.version import Version
diff --git a/test/unittests/tools/cmake/test_cmake_install.py b/test/unittests/tools/cmake/test_cmake_install.py
index 48308d6f2..846040606 100644
--- a/test/unittests/tools/cmake/test_cmake_install.py
+++ b/test/unittests/tools/cmake/test_cmake_install.py
@@ -1,6 +1,6 @@
+from conan.internal.default_settings import default_settings_yml
 from conan.tools.cmake import CMake
 from conan.tools.cmake.presets import write_cmake_presets
-from conans.client.conf import get_default_settings_yml
 from conans.model.conf import Conf
 from conans.model.settings import Settings
 from conan.test.utils.mocks import ConanFileMock
@@ -13,7 +13,7 @@ def test_run_install_component():
     Issue related: https://github.com/conan-io/conan/issues/10359
     """
     # Load some generic windows settings
-    settings = Settings.loads(get_default_settings_yml())
+    settings = Settings.loads(default_settings_yml)
     settings.os = "Windows"
     settings.arch = "x86"
     settings.build_type = "Release"
@@ -42,7 +42,7 @@ def test_run_install_strip():
     Issue related: https://github.com/conan-io/conan/issues/14166
     """
 
-    settings = Settings.loads(get_default_settings_yml())
+    settings = Settings.loads(default_settings_yml)
     settings.os = "Linux"
     settings.arch = "x86_64"
     settings.build_type = "Release"
@@ -71,7 +71,7 @@ def test_run_install_cli_args():
     Issue related: https://github.com/conan-io/conan/issues/14235
     """
 
-    settings = Settings.loads(get_default_settings_yml())
+    settings = Settings.loads(default_settings_yml)
     settings.os = "Linux"
     settings.arch = "x86_64"
     settings.build_type = "Release"
@@ -99,7 +99,7 @@ def test_run_install_cli_args_strip():
     Issue related: https://github.com/conan-io/conan/issues/14235
     """
 
-    settings = Settings.loads(get_default_settings_yml())
+    settings = Settings.loads(default_settings_yml)
     settings.os = "Linux"
     settings.arch = "x86_64"
     settings.build_type = "Release"
diff --git a/test/unittests/tools/cmake/test_cmake_test.py b/test/unittests/tools/cmake/test_cmake_test.py
index aab3e284e..901fb3f45 100644
--- a/test/unittests/tools/cmake/test_cmake_test.py
+++ b/test/unittests/tools/cmake/test_cmake_test.py
@@ -1,8 +1,8 @@
 import pytest
 
+from conan.internal.default_settings import default_settings_yml
 from conan.tools.cmake import CMake
 from conan.tools.cmake.presets import write_cmake_presets
-from conans.client.conf import get_default_settings_yml
 from conans.model.conf import Conf
 from conans.model.settings import Settings
 from conan.test.utils.mocks import ConanFileMock
@@ -23,7 +23,7 @@ def test_run_tests(generator, target):
     multi-config ones.
     Issue related: https://github.com/conan-io/conan/issues/11405
     """
-    settings = Settings.loads(get_default_settings_yml())
+    settings = Settings.loads(default_settings_yml)
     settings.os = "Windows"
     settings.arch = "x86"
     settings.build_type = "Release"
@@ -46,7 +46,7 @@ def test_run_tests(generator, target):
 
 
 def test_cli_args_configure():
-    settings = Settings.loads(get_default_settings_yml())
+    settings = Settings.loads(default_settings_yml)
 
     conanfile = ConanFileMock()
     conanfile.conf = Conf()
diff --git a/test/unittests/tools/cmake/test_cmaketoolchain.py b/test/unittests/tools/cmake/test_cmaketoolchain.py
index 0420540f7..25ffb1104 100644
--- a/test/unittests/tools/cmake/test_cmaketoolchain.py
+++ b/test/unittests/tools/cmake/test_cmaketoolchain.py
@@ -4,9 +4,9 @@ import pytest
 from mock import Mock
 
 from conan import ConanFile
+from conan.internal.default_settings import default_settings_yml
 from conan.tools.cmake import CMakeToolchain
 from conan.tools.cmake.toolchain.blocks import Block
-from conans.client.conf import get_default_settings_yml
 from conans.errors import ConanException
 from conans.model.conf import Conf
 from conans.model.options import Options
@@ -533,7 +533,7 @@ def test_fpic_enabled(conanfile_linux_fpic):
 def test_libcxx_abi_flag():
     c = ConanFile()
     c.settings = "os", "compiler", "build_type", "arch"
-    c.settings = Settings.loads(get_default_settings_yml())
+    c.settings = Settings.loads(default_settings_yml)
     c.settings.build_type = "Release"
     c.settings.arch = "x86_64"
     c.settings.compiler = "gcc"
@@ -581,7 +581,7 @@ def test_apple_cmake_osx_sysroot(os, os_sdk, arch, expected_sdk):
     """
     c = ConanFile()
     c.settings = "os", "compiler", "build_type", "arch"
-    c.settings = Settings.loads(get_default_settings_yml())
+    c.settings = Settings.loads(default_settings_yml)
     c.settings.os = os
     if os_sdk:
         c.settings.os.sdk = os_sdk
@@ -615,7 +615,7 @@ def test_apple_cmake_osx_sysroot_sdk_mandatory(os, arch, expected_sdk):
     """
     c = ConanFile()
     c.settings = "os", "compiler", "build_type", "arch"
-    c.settings = Settings.loads(get_default_settings_yml())
+    c.settings = Settings.loads(default_settings_yml)
     c.settings.os = os
     c.settings.build_type = "Release"
     c.settings.arch = arch
diff --git a/test/unittests/util/detect_libc_test.py b/test/unittests/util/detect_libc_test.py
index c6106d4cc..c0a8160a0 100644
--- a/test/unittests/util/detect_libc_test.py
+++ b/test/unittests/util/detect_libc_test.py
@@ -1,6 +1,6 @@
 from parameterized import parameterized
 
-from conan.internal.api.detect_api import _parse_gnu_libc, _parse_musl_libc
+from conan.internal.api.detect.detect_api import _parse_gnu_libc, _parse_musl_libc
 
 
 class TestDetectLibc:
diff --git a/test/unittests/util/detect_test.py b/test/unittests/util/detect_test.py
index 0309715e8..654a27c75 100644
--- a/test/unittests/util/detect_test.py
+++ b/test/unittests/util/detect_test.py
@@ -5,7 +5,7 @@ from unittest.mock import patch
 import pytest
 from parameterized import parameterized
 
-from conan.internal.api.detect_api import _cc_compiler
+from conan.internal.api.detect.detect_api import _cc_compiler
 from conan.internal.api.profile.detect import detect_defaults_settings
 from conans.model.version import Version
 from conan.test.utils.mocks import RedirectedTestOutput
@@ -29,7 +29,7 @@ class DetectTest(unittest.TestCase):
         with mock.patch("platform.machine", mock.MagicMock(return_value='XXXXXXXXXXXX')), \
                 mock.patch("platform.processor", mock.MagicMock(return_value=processor)), \
                 mock.patch("platform.system", mock.MagicMock(return_value='AIX')), \
-                mock.patch("conan.internal.api.detect_api._get_aix_conf", mock.MagicMock(return_value=bitness)), \
+                mock.patch("conan.internal.api.detect.detect_api._get_aix_conf", mock.MagicMock(return_value=bitness)), \
                 mock.patch('subprocess.check_output', mock.MagicMock(return_value=version)):
             result = detect_defaults_settings()
             result = dict(result)
@@ -51,7 +51,7 @@ class DetectTest(unittest.TestCase):
             result = dict(result)
             self.assertEqual(expected_arch, result['arch'])
 
-    @mock.patch("conan.internal.api.detect_api.detect_clang_compiler",
+    @mock.patch("conan.internal.api.detect.detect_api.detect_clang_compiler",
                 return_value=("clang", Version("9"), "clang"))
     def test_detect_clang_gcc_toolchain(self, _):
         output = RedirectedTestOutput()
@@ -69,7 +69,7 @@ class DetectTest(unittest.TestCase):
     ["clang version 18 (https://github.com/llvm/llvm-project.git 461274b81d8641eab64d494accddc81d7db8a09e)", "18"],
     ["cc.exe (Rev3, Built by MSYS2 project) 14", "14"],
 ])
-@patch("conan.internal.api.detect_api.detect_runner")
+@patch("conan.internal.api.detect.detect_api.detect_runner")
 def test_detect_cc_versionings(detect_runner_mock, version_return, expected_version):
     detect_runner_mock.return_value = 0, version_return
     compiler, installed_version, compiler_exe = _cc_compiler()
diff --git a/test/unittests/util/detected_architecture_test.py b/test/unittests/util/detected_architecture_test.py
index 99bed7e39..5db15b928 100644
--- a/test/unittests/util/detected_architecture_test.py
+++ b/test/unittests/util/detected_architecture_test.py
@@ -3,7 +3,7 @@ import unittest
 
 from parameterized import parameterized
 
-from conan.internal.api.detect_api import detect_arch
+from conan.internal.api.detect.detect_api import detect_arch
 
 
 class DetectedArchitectureTest(unittest.TestCase):
@@ -41,14 +41,14 @@ class DetectedArchitectureTest(unittest.TestCase):
         with mock.patch("platform.machine", mock.MagicMock(return_value='00FB91F44C00')),\
                 mock.patch("platform.processor", mock.MagicMock(return_value='powerpc')),\
                 mock.patch("platform.system", mock.MagicMock(return_value='AIX')),\
-                mock.patch("conan.internal.api.detect_api._get_aix_conf", mock.MagicMock(return_value='32')),\
+                mock.patch("conan.internal.api.detect.detect_api._get_aix_conf", mock.MagicMock(return_value='32')),\
                 mock.patch('subprocess.check_output', mock.MagicMock(return_value='7.1.0.0')):
             self.assertEqual('ppc32', detect_arch())
 
         with mock.patch("platform.machine", mock.MagicMock(return_value='00FB91F44C00')),\
                 mock.patch("platform.processor", mock.MagicMock(return_value='powerpc')),\
                 mock.patch("platform.system", mock.MagicMock(return_value='AIX')),\
-                mock.patch("conan.internal.api.detect_api._get_aix_conf", mock.MagicMock(return_value='64')),\
+                mock.patch("conan.internal.api.detect.detect_api._get_aix_conf", mock.MagicMock(return_value='64')),\
                 mock.patch('subprocess.check_output', mock.MagicMock(return_value='7.1.0.0')):
             self.assertEqual('ppc64', detect_arch())