Repository: conan-io/conan
Pull request #17572 (2025-01-14 13:57:28)

refactor moving model conans->conan
Changelog: Omit
Docs: Omit

Pure refactor, moving "mode" from conans to conan namespace

There is some risk this will break users that were abusing and using the undocumented ``from conans`` for things that exists in the ``cli`` layer in commands, that users might have copied & pasted, like:
```python
RecipeReference
PkgReference
HomePaths
Lockfile # this one has to be moved to the API level
```
It is very likely that RecipeReference and PkgReference we want them as part of the public API somewhere too, to be discussed.


Patch:
diff --git a/conan/__init__.py b/conan/__init__.py
index 93deaa4fe..4fbd3d044 100644
--- a/conan/__init__.py
+++ b/conan/__init__.py
@@ -1,5 +1,5 @@
-from conans.model.conan_file import ConanFile
-from conan.tools.scm import Version as _Version
+from conan.internal.model.conan_file import ConanFile
+from conan.internal.model.version import Version
 
 __version__ = '2.12.0-dev'
-conan_version = _Version(__version__)
+conan_version = Version(__version__)
diff --git a/conan/api/conan_api.py b/conan/api/conan_api.py
index d63845c42..091af879f 100644
--- a/conan/api/conan_api.py
+++ b/conan/api/conan_api.py
@@ -22,7 +22,7 @@ from conan.api.subapi.upload import UploadAPI
 from conans.client.migrations import ClientMigrator
 from conan.errors import ConanException
 from conan.internal.paths import get_conan_user_home
-from conans.model.version_range import validate_conan_version
+from conan.internal.model.version_range import validate_conan_version
 
 
 class ConanAPI:
diff --git a/conan/api/model.py b/conan/api/model.py
index 4c6132bbd..0532f5454 100644
--- a/conan/api/model.py
+++ b/conan/api/model.py
@@ -7,10 +7,10 @@ from conans.client.graph.graph import RECIPE_EDITABLE, RECIPE_CONSUMER, RECIPE_P
     RECIPE_VIRTUAL, BINARY_SKIP, BINARY_MISSING, BINARY_INVALID
 from conan.internal.errors import NotFoundException
 from conan.errors import ConanException
-from conans.model.package_ref import PkgReference
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.package_ref import PkgReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conans.util.files import load
-from conans.model.version_range import VersionRange
+from conan.internal.model.version_range import VersionRange
 
 LOCAL_RECIPES_INDEX = "local-recipes-index"
 
diff --git a/conan/api/subapi/cache.py b/conan/api/subapi/cache.py
index b3cf0b215..b4476f0e6 100644
--- a/conan/api/subapi/cache.py
+++ b/conan/api/subapi/cache.py
@@ -11,8 +11,8 @@ from conan.internal.cache.home_paths import HomePaths
 from conan.internal.cache.integrity_check import IntegrityChecker
 from conans.client.downloaders.download_cache import DownloadCache
 from conan.errors import ConanException
-from conans.model.package_ref import PkgReference
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.package_ref import PkgReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conans.util.dates import revision_timestamp_now
 from conans.util.files import rmdir, gzopen_without_timestamps, mkdir, remove
 
diff --git a/conan/api/subapi/config.py b/conan/api/subapi/config.py
index 04155f2ec..02a89445e 100644
--- a/conan/api/subapi/config.py
+++ b/conan/api/subapi/config.py
@@ -16,10 +16,10 @@ 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
 from conan.errors import ConanException
-from conans.model.conf import ConfDefinition, BUILT_IN_CONFS
-from conans.model.pkg_type import PackageType
-from conans.model.recipe_ref import RecipeReference
-from conans.model.settings import Settings
+from conan.internal.model.conf import ConfDefinition, BUILT_IN_CONFS
+from conan.internal.model.pkg_type import PackageType
+from conan.internal.model.recipe_ref import RecipeReference
+from conan.internal.model.settings import Settings
 from conans.util.files import load, save
 
 
diff --git a/conan/api/subapi/download.py b/conan/api/subapi/download.py
index 18c2bee9e..67fdf63bc 100644
--- a/conan/api/subapi/download.py
+++ b/conan/api/subapi/download.py
@@ -6,8 +6,8 @@ from conan.api.model import Remote, PackagesList
 from conan.api.output import ConanOutput
 from conan.internal.conan_app import ConanBasicApp
 from conan.errors import ConanException
-from conans.model.package_ref import PkgReference
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.package_ref import PkgReference
+from conan.internal.model.recipe_ref import RecipeReference
 
 
 class DownloadAPI:
diff --git a/conan/api/subapi/export.py b/conan/api/subapi/export.py
index bfba33d91..64b027573 100644
--- a/conan/api/subapi/export.py
+++ b/conan/api/subapi/export.py
@@ -6,7 +6,7 @@ from conan.internal.api.export import cmd_export
 from conan.internal.methods import run_package_method
 from conans.client.graph.graph import BINARY_BUILD, RECIPE_INCACHE
 from conans.client.hook_manager import HookManager
-from conans.model.package_ref import PkgReference
+from conan.internal.model.package_ref import PkgReference
 from conans.util.files import mkdir
 
 
diff --git a/conan/api/subapi/graph.py b/conan/api/subapi/graph.py
index 8ffaeb067..e933e53ad 100644
--- a/conan/api/subapi/graph.py
+++ b/conan/api/subapi/graph.py
@@ -6,7 +6,7 @@ from conans.client.graph.graph_binaries import GraphBinariesAnalyzer
 from conans.client.graph.graph_builder import DepsGraphBuilder
 from conans.client.graph.profile_node_definer import initialize_conanfile_profile, consumer_definer
 from conan.errors import ConanException
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 
 
 class GraphAPI:
diff --git a/conan/api/subapi/list.py b/conan/api/subapi/list.py
index 9ede07a18..33b6f5e03 100644
--- a/conan/api/subapi/list.py
+++ b/conan/api/subapi/list.py
@@ -9,9 +9,9 @@ from conan.internal.conan_app import ConanBasicApp
 from conan.internal.paths import CONANINFO
 from conan.internal.errors import NotFoundException
 from conan.errors import ConanException
-from conans.model.info import load_binary_info
-from conans.model.package_ref import PkgReference
-from conans.model.recipe_ref import RecipeReference, ref_matches
+from conan.internal.model.info import load_binary_info
+from conan.internal.model.package_ref import PkgReference
+from conan.internal.model.recipe_ref import RecipeReference, ref_matches
 from conans.util.dates import timelimit
 from conans.util.files import load
 
diff --git a/conan/api/subapi/local.py b/conan/api/subapi/local.py
index 24c47d34e..bf078441e 100644
--- a/conan/api/subapi/local.py
+++ b/conan/api/subapi/local.py
@@ -10,7 +10,7 @@ from conans.client.graph.profile_node_definer import initialize_conanfile_profil
 from conan.internal.errors import conanfile_exception_formatter
 from conan.errors import ConanException
 from conans.client.hook_manager import HookManager
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conans.util.files import chdir
 
 
diff --git a/conan/api/subapi/lockfile.py b/conan/api/subapi/lockfile.py
index 76a807179..093010f78 100644
--- a/conan/api/subapi/lockfile.py
+++ b/conan/api/subapi/lockfile.py
@@ -4,7 +4,7 @@ from conan.api.output import ConanOutput
 from conan.cli import make_abs_path
 from conans.client.graph.graph import Overrides
 from conan.errors import ConanException
-from conans.model.graph_lock import Lockfile, LOCKFILE
+from conan.internal.model.lockfile import Lockfile, LOCKFILE
 
 
 class LockfileAPI:
diff --git a/conan/api/subapi/profiles.py b/conan/api/subapi/profiles.py
index 1caf38c14..d83e88cbe 100644
--- a/conan/api/subapi/profiles.py
+++ b/conan/api/subapi/profiles.py
@@ -7,7 +7,7 @@ from conans.client.loader import load_python_file
 from conan.internal.api.profile.profile_loader import ProfileLoader
 from conan.internal.errors import scoped_traceback
 from conan.errors import ConanException
-from conans.model.profile import Profile
+from conan.internal.model.profile import Profile
 
 DEFAULT_PROFILE_NAME = "default"
 
diff --git a/conan/api/subapi/remove.py b/conan/api/subapi/remove.py
index d3613fc3c..1e789ba27 100644
--- a/conan/api/subapi/remove.py
+++ b/conan/api/subapi/remove.py
@@ -2,8 +2,8 @@ from typing import Optional
 
 from conan.api.model import Remote
 from conan.internal.conan_app import ConanBasicApp
-from conans.model.package_ref import PkgReference
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.package_ref import PkgReference
+from conan.internal.model.recipe_ref import RecipeReference
 
 
 class RemoveAPI:
diff --git a/conan/api/subapi/workspace.py b/conan/api/subapi/workspace.py
index 3c51b7b70..586c6761a 100644
--- a/conan/api/subapi/workspace.py
+++ b/conan/api/subapi/workspace.py
@@ -8,7 +8,7 @@ from conan.tools.scm import Git
 from conan.errors import ConanException
 from conans.client.graph.graph import RECIPE_EDITABLE
 from conans.client.source import retrieve_exports_sources
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conans.util.files import merge_directories
 
 
diff --git a/conan/cli/command.py b/conan/cli/command.py
index db8bae805..5447203b3 100644
--- a/conan/cli/command.py
+++ b/conan/cli/command.py
@@ -4,7 +4,7 @@ from contextlib import redirect_stdout
 
 from conan.api.output import ConanOutput
 from conan.errors import ConanException
-from conans.model.conf import CORE_CONF_PATTERN
+from conan.internal.model.conf import CORE_CONF_PATTERN
 
 
 class OnceArgument(argparse.Action):
@@ -126,7 +126,7 @@ class ConanArgumentParser(argparse.ArgumentParser):
             ConanOutput().error("The --lockfile-packages arg is private and shouldn't be used")
         global_conf = self._conan_api.config.global_conf
         if args.core_conf:
-            from conans.model.conf import ConfDefinition
+            from conan.internal.model.conf import ConfDefinition
             confs = ConfDefinition()
             for c in args.core_conf:
                 if not CORE_CONF_PATTERN.match(c):
diff --git a/conan/cli/commands/cache.py b/conan/cli/commands/cache.py
index cee375272..333c705b6 100644
--- a/conan/cli/commands/cache.py
+++ b/conan/cli/commands/cache.py
@@ -7,8 +7,8 @@ from conan.cli import make_abs_path
 from conan.cli.command import conan_command, conan_subcommand, OnceArgument
 from conan.cli.commands.list import print_list_text, print_list_json
 from conan.errors import ConanException
-from conans.model.package_ref import PkgReference
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.package_ref import PkgReference
+from conan.internal.model.recipe_ref import RecipeReference
 
 
 def json_export(data):
diff --git a/conan/cli/commands/graph.py b/conan/cli/commands/graph.py
index aa1fb298c..595da8370 100644
--- a/conan/cli/commands/graph.py
+++ b/conan/cli/commands/graph.py
@@ -17,7 +17,7 @@ from conan.internal.deploy import do_deploys
 from conans.client.graph.graph import BINARY_MISSING
 from conans.client.graph.install_graph import InstallGraph, ProfileArgs
 from conan.internal.errors import NotFoundException
-from conans.model.recipe_ref import ref_matches, RecipeReference
+from conan.internal.model.recipe_ref import ref_matches, RecipeReference
 
 
 def explain_formatter_text(data):
diff --git a/conan/cli/commands/lock.py b/conan/cli/commands/lock.py
index 0d7c3f395..6b4f2cf54 100644
--- a/conan/cli/commands/lock.py
+++ b/conan/cli/commands/lock.py
@@ -6,8 +6,8 @@ from conan.cli.command import conan_command, OnceArgument, conan_subcommand
 from conan.cli import make_abs_path
 from conan.cli.args import common_graph_args, validate_common_graph_args
 from conan.cli.printers.graph import print_graph_packages, print_graph_basic
-from conans.model.graph_lock import Lockfile, LOCKFILE
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.lockfile import Lockfile, LOCKFILE
+from conan.internal.model.recipe_ref import RecipeReference
 
 
 @conan_command(group="Consumer")
diff --git a/conan/cli/formatters/list/binary_html_table.py b/conan/cli/formatters/list/binary_html_table.py
index 266e02ea2..6b0e0ac1b 100644
--- a/conan/cli/formatters/list/binary_html_table.py
+++ b/conan/cli/formatters/list/binary_html_table.py
@@ -1,6 +1,6 @@
 from collections import OrderedDict, defaultdict
 
-from conans.model.package_ref import PkgReference
+from conan.internal.model.package_ref import PkgReference
 
 
 class RowResult(object):
diff --git a/conan/cps/cps.py b/conan/cps/cps.py
index 9f47c9959..4fab7911a 100644
--- a/conan/cps/cps.py
+++ b/conan/cps/cps.py
@@ -2,7 +2,7 @@ import json
 import os
 from enum import Enum
 
-from conans.model.build_info import CppInfo
+from conan.internal.model.cpp_info import CppInfo
 from conans.util.files import save, load
 
 
diff --git a/conan/internal/api/detect/detect_api.py b/conan/internal/api/detect/detect_api.py
index 96879adf6..b429db308 100644
--- a/conan/internal/api/detect/detect_api.py
+++ b/conan/internal/api/detect/detect_api.py
@@ -6,7 +6,7 @@ import textwrap
 
 from conan.api.output import ConanOutput
 from conan.errors import ConanException
-from conans.model.version import Version
+from conan.internal.model.version import Version
 from conans.util.files import load, save
 from conans.util.runners import check_output_runner, detect_runner
 
diff --git a/conan/internal/api/export.py b/conan/internal/api/export.py
index 72d77fa63..af2a67028 100644
--- a/conan/internal/api/export.py
+++ b/conan/internal/api/export.py
@@ -6,8 +6,8 @@ from conan.api.output import ConanOutput
 from conan.tools.scm import Git
 from conan.internal.errors import conanfile_exception_formatter
 from conan.errors import ConanException
-from conans.model.manifest import FileTreeManifest
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.manifest import FileTreeManifest
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.internal.paths import DATA_YML
 from conans.util.files import is_dirty, rmdir, set_dirty, mkdir, clean_dirty, chdir
 
diff --git a/conan/internal/api/local/editable.py b/conan/internal/api/local/editable.py
index c2e543e13..9ec2eb6c9 100644
--- a/conan/internal/api/local/editable.py
+++ b/conan/internal/api/local/editable.py
@@ -4,7 +4,7 @@ import json
 import os
 from os.path import join, normpath
 
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conans.util.files import load, save
 
 
diff --git a/conan/internal/api/profile/profile_loader.py b/conan/internal/api/profile/profile_loader.py
index 2d16b5cf2..bd1254dd8 100644
--- a/conan/internal/api/profile/profile_loader.py
+++ b/conan/internal/api/profile/profile_loader.py
@@ -10,10 +10,10 @@ from conan.internal.api.detect import detect_api
 from conan.internal.cache.home_paths import HomePaths
 from conan.tools.env.environment import ProfileEnvironment
 from conan.errors import ConanException
-from conans.model.conf import ConfDefinition, CORE_CONF_PATTERN
-from conans.model.options import Options
-from conans.model.profile import Profile
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.conf import ConfDefinition, CORE_CONF_PATTERN
+from conan.internal.model.options import Options
+from conan.internal.model.profile import Profile
+from conan.internal.model.recipe_ref import RecipeReference
 from conans.util.config_parser import ConfigParser
 from conans.util.files import mkdir, load_user_encoded
 
diff --git a/conan/internal/cache/cache.py b/conan/internal/cache/cache.py
index 4436555c4..6445ae9ac 100644
--- a/conan/internal/cache/cache.py
+++ b/conan/internal/cache/cache.py
@@ -12,8 +12,8 @@ from conan.internal.cache.conan_reference_layout import RecipeLayout, PackageLay
 from conan.internal.cache.db.cache_database import CacheDatabase
 from conan.internal.errors import ConanReferenceAlreadyExistsInDB
 from conan.errors import ConanException
-from conans.model.package_ref import PkgReference
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.package_ref import PkgReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conans.util.dates import revision_timestamp_now
 from conans.util.files import rmdir, renamedir, mkdir
 
diff --git a/conan/internal/cache/conan_reference_layout.py b/conan/internal/cache/conan_reference_layout.py
index 9bcd58160..e10a8194f 100644
--- a/conan/internal/cache/conan_reference_layout.py
+++ b/conan/internal/cache/conan_reference_layout.py
@@ -1,7 +1,7 @@
 import os
 from contextlib import contextmanager
 
-from conans.model.manifest import FileTreeManifest
+from conan.internal.model.manifest import FileTreeManifest
 from conan.internal.paths import CONANFILE, DATA_YML
 from conans.util.files import set_dirty, clean_dirty, is_dirty, rmdir
 
diff --git a/conan/internal/cache/db/cache_database.py b/conan/internal/cache/db/cache_database.py
index 6cd38b7c7..57a85e6f7 100644
--- a/conan/internal/cache/db/cache_database.py
+++ b/conan/internal/cache/db/cache_database.py
@@ -4,9 +4,9 @@ import sqlite3
 from conan.api.output import ConanOutput
 from conan.internal.cache.db.packages_table import PackagesDBTable
 from conan.internal.cache.db.recipes_table import RecipesDBTable
-from conans.model.package_ref import PkgReference
-from conans.model.recipe_ref import RecipeReference
-from conans.model.version import Version
+from conan.internal.model.package_ref import PkgReference
+from conan.internal.model.recipe_ref import RecipeReference
+from conan.internal.model.version import Version
 
 
 class CacheDatabase:
diff --git a/conan/internal/cache/db/packages_table.py b/conan/internal/cache/db/packages_table.py
index 9dceb3fa1..711bc24df 100644
--- a/conan/internal/cache/db/packages_table.py
+++ b/conan/internal/cache/db/packages_table.py
@@ -2,8 +2,8 @@ import sqlite3
 
 from conan.internal.cache.db.table import BaseDbTable
 from conan.internal.errors import ConanReferenceDoesNotExistInDB, ConanReferenceAlreadyExistsInDB
-from conans.model.package_ref import PkgReference
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.package_ref import PkgReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conans.util.dates import timestamp_now
 
 
diff --git a/conan/internal/cache/db/recipes_table.py b/conan/internal/cache/db/recipes_table.py
index d17fe36e8..6e1a75538 100644
--- a/conan/internal/cache/db/recipes_table.py
+++ b/conan/internal/cache/db/recipes_table.py
@@ -2,7 +2,7 @@ import sqlite3
 
 from conan.internal.cache.db.table import BaseDbTable
 from conan.internal.errors import ConanReferenceDoesNotExistInDB, ConanReferenceAlreadyExistsInDB
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conans.util.dates import timestamp_now
 
 
diff --git a/conan/internal/cache/integrity_check.py b/conan/internal/cache/integrity_check.py
index 742109721..eb2e7dca0 100644
--- a/conan/internal/cache/integrity_check.py
+++ b/conan/internal/cache/integrity_check.py
@@ -2,8 +2,8 @@ import os
 
 from conan.api.output import ConanOutput
 from conan.errors import ConanException
-from conans.model.package_ref import PkgReference
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.package_ref import PkgReference
+from conan.internal.model.recipe_ref import RecipeReference
 
 
 class IntegrityChecker:
diff --git a/conan/internal/methods.py b/conan/internal/methods.py
index 17050dbef..7fd46bebb 100644
--- a/conan/internal/methods.py
+++ b/conan/internal/methods.py
@@ -4,10 +4,10 @@ from conan.api.output import ConanOutput
 from conan.errors import ConanException
 from conan.internal.errors import conanfile_exception_formatter, conanfile_remove_attr
 from conan.internal.paths import CONANINFO
-from conans.model.manifest import FileTreeManifest
-from conans.model.package_ref import PkgReference
-from conans.model.pkg_type import PackageType
-from conans.model.requires import BuildRequirements, TestRequirements, ToolRequirements
+from conan.internal.model.manifest import FileTreeManifest
+from conan.internal.model.package_ref import PkgReference
+from conan.internal.model.pkg_type import PackageType
+from conan.internal.model.requires import BuildRequirements, TestRequirements, ToolRequirements
 from conans.util.files import mkdir, chdir, save
 
 
diff --git a/conans/model/__init__.py b/conan/internal/model/__init__.py
similarity index 100%
rename from conans/model/__init__.py
rename to conan/internal/model/__init__.py
diff --git a/conans/model/conan_file.py b/conan/internal/model/conan_file.py
similarity index 97%
rename from conans/model/conan_file.py
rename to conan/internal/model/conan_file.py
index ac8418515..3af81e440 100644
--- a/conans/model/conan_file.py
+++ b/conan/internal/model/conan_file.py
@@ -4,13 +4,13 @@ from pathlib import Path
 from conan.api.output import ConanOutput, Color
 from conans.client.subsystems import command_env_wrapper
 from conan.errors import ConanException
-from conans.model.build_info import MockInfoProperty
-from conans.model.conf import Conf
-from conans.model.dependencies import ConanFileDependencies
-from conans.model.layout import Folders, Infos, Layouts
-from conans.model.options import Options
-from conans.model.requires import Requirements
-from conans.model.settings import Settings
+from conan.internal.model.cpp_info import MockInfoProperty
+from conan.internal.model.conf import Conf
+from conan.internal.model.dependencies import ConanFileDependencies
+from conan.internal.model.layout import Folders, Infos, Layouts
+from conan.internal.model.options import Options
+from conan.internal.model.requires import Requirements
+from conan.internal.model.settings import Settings
 
 
 class ConanFile:
diff --git a/conans/model/conanfile_interface.py b/conan/internal/model/conanfile_interface.py
similarity index 100%
rename from conans/model/conanfile_interface.py
rename to conan/internal/model/conanfile_interface.py
diff --git a/conans/model/conf.py b/conan/internal/model/conf.py
similarity index 99%
rename from conans/model/conf.py
rename to conan/internal/model/conf.py
index 6d7ce915e..065af3098 100644
--- a/conans/model/conf.py
+++ b/conan/internal/model/conf.py
@@ -7,7 +7,7 @@ import fnmatch
 from collections import OrderedDict
 
 from conan.errors import ConanException
-from conans.model.recipe_ref import ref_matches
+from conan.internal.model.recipe_ref import ref_matches
 
 BUILT_IN_CONFS = {
     "core:required_conan_version": "Raise if current version does not match the defined range.",
diff --git a/conans/model/build_info.py b/conan/internal/model/cpp_info.py
similarity index 99%
rename from conans/model/build_info.py
rename to conan/internal/model/cpp_info.py
index 57b619dab..18a3852bd 100644
--- a/conans/model/build_info.py
+++ b/conan/internal/model/cpp_info.py
@@ -7,7 +7,7 @@ from collections import OrderedDict, defaultdict
 
 from conan.api.output import ConanOutput
 from conan.errors import ConanException
-from conans.model.pkg_type import PackageType
+from conan.internal.model.pkg_type import PackageType
 from conans.util.files import load, save
 
 _DIRS_VAR_NAMES = ["_includedirs", "_srcdirs", "_libdirs", "_resdirs", "_bindirs", "_builddirs",
diff --git a/conans/model/dependencies.py b/conan/internal/model/dependencies.py
similarity index 98%
rename from conans/model/dependencies.py
rename to conan/internal/model/dependencies.py
index 443eeee54..49c192f15 100644
--- a/conans/model/dependencies.py
+++ b/conan/internal/model/dependencies.py
@@ -2,8 +2,8 @@ from collections import OrderedDict
 
 from conans.client.graph.graph import RECIPE_PLATFORM
 from conan.errors import ConanException
-from conans.model.recipe_ref import RecipeReference
-from conans.model.conanfile_interface import ConanFileInterface
+from conan.internal.model.recipe_ref import RecipeReference
+from conan.internal.model.conanfile_interface import ConanFileInterface
 
 
 class UserRequirementsDict(object):
diff --git a/conans/model/info.py b/conan/internal/model/info.py
similarity index 98%
rename from conans/model/info.py
rename to conan/internal/model/info.py
index c22c31013..085eb0c72 100644
--- a/conans/model/info.py
+++ b/conan/internal/model/info.py
@@ -1,9 +1,9 @@
 import hashlib
 
 from conan.errors import ConanException
-from conans.model.dependencies import UserRequirementsDict
-from conans.model.package_ref import PkgReference
-from conans.model.recipe_ref import RecipeReference, Version
+from conan.internal.model.dependencies import UserRequirementsDict
+from conan.internal.model.package_ref import PkgReference
+from conan.internal.model.recipe_ref import RecipeReference, Version
 from conans.util.config_parser import ConfigParser
 
 
diff --git a/conans/model/layout.py b/conan/internal/model/layout.py
similarity index 98%
rename from conans/model/layout.py
rename to conan/internal/model/layout.py
index de453f917..5ddacf543 100644
--- a/conans/model/layout.py
+++ b/conan/internal/model/layout.py
@@ -1,7 +1,7 @@
 import os
 
-from conans.model.build_info import CppInfo
-from conans.model.conf import Conf
+from conan.internal.model.cpp_info import CppInfo
+from conan.internal.model.conf import Conf
 
 
 class Infos(object):
diff --git a/conans/model/graph_lock.py b/conan/internal/model/lockfile.py
similarity index 99%
rename from conans/model/graph_lock.py
rename to conan/internal/model/lockfile.py
index b6272acc0..ea0304200 100644
--- a/conans/model/graph_lock.py
+++ b/conan/internal/model/lockfile.py
@@ -6,8 +6,8 @@ from collections import OrderedDict
 from conan.api.output import ConanOutput
 from conans.client.graph.graph import RECIPE_VIRTUAL, RECIPE_CONSUMER, CONTEXT_BUILD, Overrides
 from conan.errors import ConanException
-from conans.model.recipe_ref import RecipeReference
-from conans.model.version_range import VersionRange
+from conan.internal.model.recipe_ref import RecipeReference
+from conan.internal.model.version_range import VersionRange
 from conans.util.files import load, save
 
 LOCKFILE = "conan.lock"
diff --git a/conans/model/manifest.py b/conan/internal/model/manifest.py
similarity index 100%
rename from conans/model/manifest.py
rename to conan/internal/model/manifest.py
diff --git a/conans/model/options.py b/conan/internal/model/options.py
similarity index 99%
rename from conans/model/options.py
rename to conan/internal/model/options.py
index c4c3d1945..99aff0171 100644
--- a/conans/model/options.py
+++ b/conan/internal/model/options.py
@@ -1,5 +1,5 @@
 from conan.errors import ConanException
-from conans.model.recipe_ref import ref_matches
+from conan.internal.model.recipe_ref import ref_matches
 
 _falsey_options = ["false", "none", "0", "off", ""]
 
diff --git a/conans/model/package_ref.py b/conan/internal/model/package_ref.py
similarity index 98%
rename from conans/model/package_ref.py
rename to conan/internal/model/package_ref.py
index 2980f71a2..415d204a2 100644
--- a/conans/model/package_ref.py
+++ b/conan/internal/model/package_ref.py
@@ -1,5 +1,5 @@
 from conan.errors import ConanException
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conans.util.dates import timestamp_to_str
 
 
diff --git a/conans/model/pkg_type.py b/conan/internal/model/pkg_type.py
similarity index 100%
rename from conans/model/pkg_type.py
rename to conan/internal/model/pkg_type.py
diff --git a/conans/model/profile.py b/conan/internal/model/profile.py
similarity index 98%
rename from conans/model/profile.py
rename to conan/internal/model/profile.py
index d20fb815a..f93322563 100644
--- a/conans/model/profile.py
+++ b/conan/internal/model/profile.py
@@ -2,9 +2,9 @@ import copy
 from collections import OrderedDict, defaultdict
 
 from conan.tools.env.environment import ProfileEnvironment
-from conans.model.conf import ConfDefinition
-from conans.model.options import Options
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.conf import ConfDefinition
+from conan.internal.model.options import Options
+from conan.internal.model.recipe_ref import RecipeReference
 
 
 class Profile:
diff --git a/conans/model/recipe_ref.py b/conan/internal/model/recipe_ref.py
similarity index 99%
rename from conans/model/recipe_ref.py
rename to conan/internal/model/recipe_ref.py
index 6165ec4c9..5f3139bf1 100644
--- a/conans/model/recipe_ref.py
+++ b/conan/internal/model/recipe_ref.py
@@ -4,7 +4,7 @@ import re
 from functools import total_ordering
 
 from conan.errors import ConanException
-from conans.model.version import Version
+from conan.internal.model.version import Version
 from conans.util.dates import timestamp_to_str
 
 
diff --git a/conans/model/requires.py b/conan/internal/model/requires.py
similarity index 99%
rename from conans/model/requires.py
rename to conan/internal/model/requires.py
index 5be2f3413..17e519f6d 100644
--- a/conans/model/requires.py
+++ b/conan/internal/model/requires.py
@@ -1,9 +1,9 @@
 from collections import OrderedDict
 
 from conan.errors import ConanException
-from conans.model.pkg_type import PackageType
-from conans.model.recipe_ref import RecipeReference
-from conans.model.version_range import VersionRange
+from conan.internal.model.pkg_type import PackageType
+from conan.internal.model.recipe_ref import RecipeReference
+from conan.internal.model.version_range import VersionRange
 
 
 class Requirement:
diff --git a/conans/model/settings.py b/conan/internal/model/settings.py
similarity index 100%
rename from conans/model/settings.py
rename to conan/internal/model/settings.py
diff --git a/conans/model/version.py b/conan/internal/model/version.py
similarity index 100%
rename from conans/model/version.py
rename to conan/internal/model/version.py
diff --git a/conans/model/version_range.py b/conan/internal/model/version_range.py
similarity index 99%
rename from conans/model/version_range.py
rename to conan/internal/model/version_range.py
index 841abb3d1..0b75fb27a 100644
--- a/conans/model/version_range.py
+++ b/conan/internal/model/version_range.py
@@ -1,7 +1,7 @@
 from functools import total_ordering
 from typing import Optional
 
-from conans.model.version import Version
+from conan.internal.model.version import Version
 from conan.errors import ConanException
 
 
diff --git a/conan/internal/runner/docker.py b/conan/internal/runner/docker.py
index ad23e646b..c21bee192 100644
--- a/conan/internal/runner/docker.py
+++ b/conan/internal/runner/docker.py
@@ -6,11 +6,10 @@ import shutil
 import yaml
 from conan.api.model import ListPattern
 from conan.api.output import Color, ConanOutput
-from conan.api.conan_api import ConfigAPI
 from conan.cli import make_abs_path
 from conan.internal.runner import RunnerException
 from conan.errors import ConanException
-from conans.model.version import Version
+from conan.internal.model.version import Version
 
 
 def config_parser(file_path):
@@ -63,7 +62,6 @@ def _docker_info(msg, error=False):
 
 class DockerRunner:
     def __init__(self, conan_api, command, host_profile, build_profile, args, raw_args):
-        import docker
         import docker.api.build
         try:
             docker_base_urls = [
diff --git a/conan/internal/workspace.py b/conan/internal/workspace.py
index 5f95ff836..434790c59 100644
--- a/conan/internal/workspace.py
+++ b/conan/internal/workspace.py
@@ -8,7 +8,7 @@ from conan.internal.cache.home_paths import HomePaths
 from conan.internal.conan_app import CmdWrapper, ConanFileHelpers
 from conans.client.loader import load_python_file
 from conan.errors import ConanException
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conans.util.files import load, save
 
 
diff --git a/conan/tools/__init__.py b/conan/tools/__init__.py
index a8a45d353..2cc34cc2b 100644
--- a/conan/tools/__init__.py
+++ b/conan/tools/__init__.py
@@ -1,4 +1,4 @@
-from conans.model.build_info import CppInfo as _CppInfo
+from conan.internal.model.cpp_info import CppInfo as _CppInfo
 
 
 def CppInfo(conanfile):
diff --git a/conan/tools/apple/xcodedeps.py b/conan/tools/apple/xcodedeps.py
index 369e025ef..b980df1c5 100644
--- a/conan/tools/apple/xcodedeps.py
+++ b/conan/tools/apple/xcodedeps.py
@@ -6,7 +6,7 @@ from jinja2 import Template
 
 from conan.internal import check_duplicated_generator
 from conan.errors import ConanException
-from conans.model.dependencies import get_transitive_requires
+from conan.internal.model.dependencies import get_transitive_requires
 from conans.util.files import load, save
 from conan.tools.apple.apple import _to_apple_arch
 
diff --git a/conan/tools/build/cppstd.py b/conan/tools/build/cppstd.py
index 1bea2f41d..43c3e9da4 100644
--- a/conan/tools/build/cppstd.py
+++ b/conan/tools/build/cppstd.py
@@ -2,7 +2,7 @@ import operator
 
 from conan.errors import ConanInvalidConfiguration, ConanException
 from conan.internal.api.detect.detect_api import default_cppstd as default_cppstd_
-from conans.model.version import Version
+from conan.internal.model.version import Version
 
 
 def check_min_cppstd(conanfile, cppstd, gnu_extensions=False):
diff --git a/conan/tools/build/cstd.py b/conan/tools/build/cstd.py
index 2d69eaba9..abc594ee1 100644
--- a/conan/tools/build/cstd.py
+++ b/conan/tools/build/cstd.py
@@ -1,7 +1,7 @@
 import operator
 
 from conan.errors import ConanInvalidConfiguration, ConanException
-from conans.model.version import Version
+from conan.internal.model.version import Version
 
 
 def check_min_cstd(conanfile, cstd, gnu_extensions=False):
diff --git a/conan/tools/build/flags.py b/conan/tools/build/flags.py
index 86470d16a..c13137339 100644
--- a/conan/tools/build/flags.py
+++ b/conan/tools/build/flags.py
@@ -1,4 +1,4 @@
-from conans.model.version import Version
+from conan.internal.model.version import Version
 
 
 def architecture_flag(conanfile):
diff --git a/conan/tools/cmake/cmakedeps/cmakedeps.py b/conan/tools/cmake/cmakedeps/cmakedeps.py
index 2439a9467..d8d607778 100644
--- a/conan/tools/cmake/cmakedeps/cmakedeps.py
+++ b/conan/tools/cmake/cmakedeps/cmakedeps.py
@@ -15,7 +15,7 @@ from conan.tools.cmake.cmakedeps.templates.target_data import ConfigDataTemplate
 from conan.tools.cmake.cmakedeps.templates.targets import TargetsTemplate
 from conan.tools.files import save
 from conan.errors import ConanException
-from conans.model.dependencies import get_transitive_requires
+from conan.internal.model.dependencies import get_transitive_requires
 
 
 class CMakeDeps(object):
diff --git a/conan/tools/cmake/cmakedeps2/cmakedeps.py b/conan/tools/cmake/cmakedeps2/cmakedeps.py
index 0847d1848..d1c090eb1 100644
--- a/conan/tools/cmake/cmakedeps2/cmakedeps.py
+++ b/conan/tools/cmake/cmakedeps2/cmakedeps.py
@@ -13,7 +13,7 @@ from conan.tools.cmake.cmakedeps2.target_configuration import TargetConfiguratio
 from conan.tools.cmake.cmakedeps2.targets import TargetsTemplate2
 from conan.tools.files import save
 from conan.errors import ConanException
-from conans.model.dependencies import get_transitive_requires
+from conan.internal.model.dependencies import get_transitive_requires
 from conans.util.files import load
 
 FIND_MODE_MODULE = "module"
diff --git a/conan/tools/cmake/cmakedeps2/target_configuration.py b/conan/tools/cmake/cmakedeps2/target_configuration.py
index 15b95930a..454a4e8c9 100644
--- a/conan/tools/cmake/cmakedeps2/target_configuration.py
+++ b/conan/tools/cmake/cmakedeps2/target_configuration.py
@@ -7,7 +7,7 @@ from jinja2 import Template
 from conan.api.output import ConanOutput
 from conan.errors import ConanException
 from conans.client.graph.graph import CONTEXT_BUILD, CONTEXT_HOST
-from conans.model.pkg_type import PackageType
+from conan.internal.model.pkg_type import PackageType
 
 
 class TargetConfigurationTemplate2:
diff --git a/conan/tools/cmake/toolchain/blocks.py b/conan/tools/cmake/toolchain/blocks.py
index d1f4ec55d..2d7f643af 100644
--- a/conan/tools/cmake/toolchain/blocks.py
+++ b/conan/tools/cmake/toolchain/blocks.py
@@ -19,7 +19,7 @@ from conan.tools.microsoft.visual import msvc_version_to_toolset_version
 from conan.internal.api.install.generators import relativize_path
 from conans.client.subsystems import deduce_subsystem, WINDOWS
 from conan.errors import ConanException
-from conans.model.version import Version
+from conan.internal.model.version import Version
 from conans.util.files import load
 
 
diff --git a/conan/tools/cmake/toolchain/toolchain.py b/conan/tools/cmake/toolchain/toolchain.py
index 6d834ec9b..36ad0e925 100644
--- a/conan/tools/cmake/toolchain/toolchain.py
+++ b/conan/tools/cmake/toolchain/toolchain.py
@@ -21,7 +21,7 @@ from conan.tools.intel import IntelCC
 from conan.tools.microsoft import VCVars
 from conan.tools.microsoft.visual import vs_ide_version
 from conan.errors import ConanException
-from conans.model.options import _PackageOption
+from conan.internal.model.options import _PackageOption
 from conans.util.files import save
 
 
diff --git a/conan/tools/env/environment.py b/conan/tools/env/environment.py
index c6f9f6cd9..61155fdce 100644
--- a/conan/tools/env/environment.py
+++ b/conan/tools/env/environment.py
@@ -7,7 +7,7 @@ from conan.api.output import ConanOutput
 from conan.internal.api.install.generators import relativize_paths
 from conans.client.subsystems import deduce_subsystem, WINDOWS, subsystem_path
 from conan.errors import ConanException
-from conans.model.recipe_ref import ref_matches
+from conan.internal.model.recipe_ref import ref_matches
 from conans.util.files import save
 
 
diff --git a/conan/tools/gnu/autotoolstoolchain.py b/conan/tools/gnu/autotoolstoolchain.py
index 5a384e8f7..e2daf568f 100644
--- a/conan/tools/gnu/autotoolstoolchain.py
+++ b/conan/tools/gnu/autotoolstoolchain.py
@@ -11,7 +11,7 @@ from conan.tools.build.flags import architecture_flag, build_type_flags, cppstd_
 from conan.tools.env import Environment, VirtualBuildEnv
 from conan.tools.gnu.get_gnu_triplet import _get_gnu_triplet
 from conan.tools.microsoft import VCVars, msvc_runtime_flag, unix_path, check_min_vs, is_msvc
-from conans.model.pkg_type import PackageType
+from conan.internal.model.pkg_type import PackageType
 
 
 class AutotoolsToolchain:
diff --git a/conan/tools/gnu/gnutoolchain.py b/conan/tools/gnu/gnutoolchain.py
index 6407f5c30..1b22240e8 100644
--- a/conan/tools/gnu/gnutoolchain.py
+++ b/conan/tools/gnu/gnutoolchain.py
@@ -12,7 +12,7 @@ from conan.tools.env import Environment
 from conan.tools.gnu.get_gnu_triplet import _get_gnu_triplet
 from conan.tools.microsoft import VCVars, msvc_runtime_flag, unix_path, check_min_vs, is_msvc
 from conan.errors import ConanException
-from conans.model.pkg_type import PackageType
+from conan.internal.model.pkg_type import PackageType
 
 
 class GnuToolchain:
diff --git a/conan/tools/gnu/pkgconfigdeps.py b/conan/tools/gnu/pkgconfigdeps.py
index 0bcaaf5b3..5ef67d55d 100644
--- a/conan/tools/gnu/pkgconfigdeps.py
+++ b/conan/tools/gnu/pkgconfigdeps.py
@@ -8,7 +8,7 @@ from jinja2 import Template, StrictUndefined
 from conan.errors import ConanException
 from conan.internal import check_duplicated_generator
 from conan.tools.gnu.gnudeps_flags import GnuDepsFlags
-from conans.model.dependencies import get_transitive_requires
+from conan.internal.model.dependencies import get_transitive_requires
 from conans.util.files import save
 
 
diff --git a/conan/tools/google/bazeldeps.py b/conan/tools/google/bazeldeps.py
index 4a9a1aca7..fa73a9fbc 100644
--- a/conan/tools/google/bazeldeps.py
+++ b/conan/tools/google/bazeldeps.py
@@ -7,8 +7,8 @@ from jinja2 import Template, StrictUndefined
 
 from conan.errors import ConanException
 from conan.internal import check_duplicated_generator
-from conans.model.dependencies import get_transitive_requires
-from conans.model.pkg_type import PackageType
+from conan.internal.model.dependencies import get_transitive_requires
+from conan.internal.model.pkg_type import PackageType
 from conans.util.files import save
 
 _BazelTargetInfo = namedtuple("DepInfo", ['repository_name', 'name', 'ref_name', 'requires', 'cpp_info'])
diff --git a/conan/tools/meson/helpers.py b/conan/tools/meson/helpers.py
index 6e6861abc..5f275849e 100644
--- a/conan/tools/meson/helpers.py
+++ b/conan/tools/meson/helpers.py
@@ -1,6 +1,6 @@
 from conan.api.output import ConanOutput
 from conan.tools.build.flags import cppstd_msvc_flag
-from conans.model.options import _PackageOption
+from conan.internal.model.options import _PackageOption
 
 __all__ = ["to_meson_machine", "to_meson_value", "to_cppstd_flag", "to_cstd_flag"]
 
diff --git a/conan/tools/microsoft/msbuilddeps.py b/conan/tools/microsoft/msbuilddeps.py
index 01bf9f09e..4477c5836 100644
--- a/conan/tools/microsoft/msbuilddeps.py
+++ b/conan/tools/microsoft/msbuilddeps.py
@@ -9,7 +9,7 @@ from jinja2 import Template
 from conan.internal import check_duplicated_generator
 from conan.errors import ConanException
 from conan.internal.api.install.generators import relativize_path
-from conans.model.dependencies import get_transitive_requires
+from conan.internal.model.dependencies import get_transitive_requires
 from conans.util.files import load, save
 
 VALID_LIB_EXTENSIONS = (".so", ".lib", ".a", ".dylib", ".bc")
diff --git a/conan/tools/qbs/qbsdeps.py b/conan/tools/qbs/qbsdeps.py
index c546e6993..69e9bc89e 100644
--- a/conan/tools/qbs/qbsdeps.py
+++ b/conan/tools/qbs/qbsdeps.py
@@ -1,6 +1,6 @@
 from conan.tools.files import save
 from conan.errors import ConanException
-from conans.model.dependencies import get_transitive_requires
+from conan.internal.model.dependencies import get_transitive_requires
 import json
 import os
 
diff --git a/conan/tools/scm/__init__.py b/conan/tools/scm/__init__.py
index 9d4097bc7..dece8113f 100644
--- a/conan/tools/scm/__init__.py
+++ b/conan/tools/scm/__init__.py
@@ -1,2 +1,2 @@
 from conan.tools.scm.git import Git
-from conans.model.version import Version
+from conan.internal.model.version import Version
diff --git a/conan/tools/scm/git.py b/conan/tools/scm/git.py
index f3578e2c9..6e0ad9e27 100644
--- a/conan/tools/scm/git.py
+++ b/conan/tools/scm/git.py
@@ -4,7 +4,7 @@ import os
 from conan.api.output import Color
 from conan.tools.files import chdir, update_conandata
 from conan.errors import ConanException
-from conans.model.conf import ConfDefinition
+from conan.internal.model.conf import ConfDefinition
 from conans.util.files import mkdir
 from conans.util.runners import check_output_runner
 
@@ -137,7 +137,9 @@ class Git:
             return bool(status)
         # Parse the status output, line by line, and match it with "_excluded"
         lines = [line.strip() for line in status.splitlines()]
-        lines = [line.split()[1] for line in lines if line]
+        # line is of the form STATUS PATH, get the path by splitting
+        # (Taking into account that STATUS is one word, PATH might be many)
+        lines = [line.split(maxsplit=1)[1].strip('"') for line in lines if line]
         lines = [line for line in lines if not any(fnmatch.fnmatch(line, p) for p in self._excluded)]
         self._conanfile.output.debug(f"Filtered git status: {lines}")
         return bool(lines)
diff --git a/conans/client/graph/build_mode.py b/conans/client/graph/build_mode.py
index 12b121e09..042652007 100644
--- a/conans/client/graph/build_mode.py
+++ b/conans/client/graph/build_mode.py
@@ -1,5 +1,5 @@
 from conan.errors import ConanException
-from conans.model.recipe_ref import ref_matches
+from conan.internal.model.recipe_ref import ref_matches
 
 
 class BuildMode:
diff --git a/conans/client/graph/compute_pid.py b/conans/client/graph/compute_pid.py
index 5852b9387..f6248fd83 100644
--- a/conans/client/graph/compute_pid.py
+++ b/conans/client/graph/compute_pid.py
@@ -3,7 +3,7 @@ from collections import OrderedDict
 from conan.internal.errors import conanfile_remove_attr, conanfile_exception_formatter
 from conan.errors import ConanException, ConanInvalidConfiguration
 from conan.internal.methods import auto_header_only_package_id
-from conans.model.info import ConanInfo, RequirementsInfo, RequirementInfo, PythonRequiresInfo
+from conan.internal.model.info import ConanInfo, RequirementsInfo, RequirementInfo, PythonRequiresInfo
 
 
 def compute_package_id(node, modes, config_version):
diff --git a/conans/client/graph/graph.py b/conans/client/graph/graph.py
index 6e036d88c..ff2471180 100644
--- a/conans/client/graph/graph.py
+++ b/conans/client/graph/graph.py
@@ -1,8 +1,8 @@
 from collections import OrderedDict
 
 from conans.client.graph.graph_error import GraphError
-from conans.model.package_ref import PkgReference
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.package_ref import PkgReference
+from conan.internal.model.recipe_ref import RecipeReference
 
 RECIPE_DOWNLOADED = "Downloaded"
 RECIPE_INCACHE = "Cache"  # The previously installed recipe in cache is being used
diff --git a/conans/client/graph/graph_binaries.py b/conans/client/graph/graph_binaries.py
index a37cb9f84..237bd5f58 100644
--- a/conans/client/graph/graph_binaries.py
+++ b/conans/client/graph/graph_binaries.py
@@ -16,9 +16,9 @@ from conans.client.graph.proxy import should_update_reference
 from conan.internal.errors import conanfile_exception_formatter, ConanConnectionError, NotFoundException, \
     PackageNotFoundException
 from conan.errors import ConanException
-from conans.model.info import RequirementInfo, RequirementsInfo
-from conans.model.package_ref import PkgReference
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.info import RequirementInfo, RequirementsInfo
+from conan.internal.model.package_ref import PkgReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conans.util.files import load
 
 
diff --git a/conans/client/graph/graph_builder.py b/conans/client/graph/graph_builder.py
index eb08479bb..52ae002e4 100644
--- a/conans/client/graph/graph_builder.py
+++ b/conans/client/graph/graph_builder.py
@@ -5,18 +5,18 @@ from collections import deque
 from conan.internal.cache.conan_reference_layout import BasicLayout
 from conan.internal.methods import run_configure_method
 from conans.client.graph.graph import DepsGraph, Node, CONTEXT_HOST, \
-    CONTEXT_BUILD, TransitiveRequirement, RECIPE_VIRTUAL, RECIPE_EDITABLE, RECIPE_CONSUMER
+    CONTEXT_BUILD, TransitiveRequirement, RECIPE_VIRTUAL, RECIPE_EDITABLE
 from conans.client.graph.graph import RECIPE_PLATFORM
 from conans.client.graph.graph_error import GraphLoopError, GraphConflictError, GraphMissingError, \
     GraphRuntimeError, GraphError
 from conans.client.graph.profile_node_definer import initialize_conanfile_profile
 from conans.client.graph.provides import check_graph_provides
 from conan.errors import ConanException
-from conans.model.conan_file import ConanFile
-from conans.model.options import Options, _PackageOptions
-from conans.model.pkg_type import PackageType
-from conans.model.recipe_ref import RecipeReference, ref_matches
-from conans.model.requires import Requirement
+from conan.internal.model.conan_file import ConanFile
+from conan.internal.model.options import Options, _PackageOptions
+from conan.internal.model.pkg_type import PackageType
+from conan.internal.model.recipe_ref import RecipeReference, ref_matches
+from conan.internal.model.requires import Requirement
 
 
 class DepsGraphBuilder(object):
diff --git a/conans/client/graph/install_graph.py b/conans/client/graph/install_graph.py
index 9bd432b7c..2a23fd8c5 100644
--- a/conans/client/graph/install_graph.py
+++ b/conans/client/graph/install_graph.py
@@ -1,14 +1,13 @@
 import json
 import os
-import shlex
 import textwrap
 
 from conan.api.output import ConanOutput
 from conans.client.graph.graph import RECIPE_CONSUMER, RECIPE_VIRTUAL, BINARY_SKIP, \
     BINARY_MISSING, BINARY_INVALID, Overrides, BINARY_BUILD, BINARY_EDITABLE_BUILD, BINARY_PLATFORM
 from conan.errors import ConanException, ConanInvalidConfiguration
-from conans.model.package_ref import PkgReference
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.package_ref import PkgReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conans.util.files import load
 
 
diff --git a/conans/client/graph/profile_node_definer.py b/conans/client/graph/profile_node_definer.py
index 1b5bba25b..748304d03 100644
--- a/conans/client/graph/profile_node_definer.py
+++ b/conans/client/graph/profile_node_definer.py
@@ -1,6 +1,6 @@
 from conans.client.graph.graph import CONTEXT_BUILD
 from conan.errors import ConanException
-from conans.model.recipe_ref import ref_matches
+from conan.internal.model.recipe_ref import ref_matches
 
 
 def initialize_conanfile_profile(conanfile, profile_build, profile_host, base_context,
diff --git a/conans/client/graph/provides.py b/conans/client/graph/provides.py
index fd8ab2c8e..549b95bc2 100644
--- a/conans/client/graph/provides.py
+++ b/conans/client/graph/provides.py
@@ -1,5 +1,5 @@
 from conans.client.graph.graph_error import GraphProvidesError
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 
 
 def check_graph_provides(dep_graph):
diff --git a/conans/client/graph/python_requires.py b/conans/client/graph/python_requires.py
index b9542ef5f..8162dc375 100644
--- a/conans/client/graph/python_requires.py
+++ b/conans/client/graph/python_requires.py
@@ -1,8 +1,8 @@
 import os
 
 from conan.errors import ConanException
-from conans.model.recipe_ref import RecipeReference
-from conans.model.requires import Requirement
+from conan.internal.model.recipe_ref import RecipeReference
+from conan.internal.model.requires import Requirement
 
 
 class PyRequire(object):
diff --git a/conans/client/graph/range_resolver.py b/conans/client/graph/range_resolver.py
index bd21c44d1..1fce07bbb 100644
--- a/conans/client/graph/range_resolver.py
+++ b/conans/client/graph/range_resolver.py
@@ -1,7 +1,7 @@
 from conans.client.graph.proxy import should_update_reference
 from conan.errors import ConanException
-from conans.model.recipe_ref import RecipeReference
-from conans.model.version_range import VersionRange
+from conan.internal.model.recipe_ref import RecipeReference
+from conan.internal.model.version_range import VersionRange
 
 
 class RangeResolver:
diff --git a/conans/client/installer.py b/conans/client/installer.py
index bcd3ffa82..0842e2f98 100644
--- a/conans/client/installer.py
+++ b/conans/client/installer.py
@@ -13,8 +13,8 @@ from conans.client.hook_manager import HookManager
 from conans.client.source import retrieve_exports_sources, config_source
 from conan.internal.errors import conanfile_remove_attr, conanfile_exception_formatter
 from conan.errors import ConanException
-from conans.model.build_info import CppInfo, MockInfoProperty
-from conans.model.package_ref import PkgReference
+from conan.internal.model.cpp_info import CppInfo, MockInfoProperty
+from conan.internal.model.package_ref import PkgReference
 from conan.internal.paths import CONANINFO
 from conans.util.files import clean_dirty, is_dirty, mkdir, rmdir, save, set_dirty, chdir
 
diff --git a/conans/client/loader.py b/conans/client/loader.py
index 8fb865f75..23f44d527 100644
--- a/conans/client/loader.py
+++ b/conans/client/loader.py
@@ -18,11 +18,11 @@ from conan.tools.microsoft import vs_layout
 from conans.client.loader_txt import ConanFileTextLoader
 from conan.internal.errors import conanfile_exception_formatter, NotFoundException
 from conan.errors import ConanException
-from conans.model.conan_file import ConanFile
-from conans.model.options import Options
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.conan_file import ConanFile
+from conan.internal.model.options import Options
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.internal.paths import DATA_YML
-from conans.model.version_range import validate_conan_version
+from conan.internal.model.version_range import validate_conan_version
 from conans.util.files import load, chdir, load_user_encoded
 
 
diff --git a/conans/client/remote_manager.py b/conans/client/remote_manager.py
index 1257b889c..46e8aa690 100644
--- a/conans/client/remote_manager.py
+++ b/conans/client/remote_manager.py
@@ -12,9 +12,9 @@ from conan.internal.cache.conan_reference_layout import METADATA
 from conans.client.pkg_sign import PkgSignaturesPlugin
 from conan.internal.errors import ConanConnectionError, NotFoundException, PackageNotFoundException
 from conan.errors import ConanException
-from conans.model.info import load_binary_info
-from conans.model.package_ref import PkgReference
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.info import load_binary_info
+from conan.internal.model.package_ref import PkgReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conans.util.files import rmdir, human_size
 from conan.internal.paths import EXPORT_SOURCES_TGZ_NAME, EXPORT_TGZ_NAME, PACKAGE_TGZ_NAME
 from conans.util.files import mkdir, tar_extract
diff --git a/conans/client/rest/client_routes.py b/conans/client/rest/client_routes.py
index 8b60962e4..a250c8b9e 100644
--- a/conans/client/rest/client_routes.py
+++ b/conans/client/rest/client_routes.py
@@ -1,7 +1,7 @@
 from urllib.parse import urlencode
 
-from conans.model.recipe_ref import RecipeReference
-from conans.model.rest_routes import RestRoutes
+from conan.internal.model.recipe_ref import RecipeReference
+from conans.client.rest.rest_routes import RestRoutes
 
 
 def _format_ref(url, ref):
diff --git a/conans/client/rest/rest_client_v2.py b/conans/client/rest/rest_client_v2.py
index 627400ad6..359d536cd 100644
--- a/conans/client/rest/rest_client_v2.py
+++ b/conans/client/rest/rest_client_v2.py
@@ -16,9 +16,9 @@ from conans.client.rest.file_uploader import FileUploader
 from conan.internal.errors import AuthenticationException, ForbiddenException, NotFoundException, \
     RecipeNotFoundException, PackageNotFoundException, EXCEPTION_CODE_MAPPING
 from conan.errors import ConanException
-from conans.model.package_ref import PkgReference
+from conan.internal.model.package_ref import PkgReference
 from conan.internal.paths import EXPORT_SOURCES_TGZ_NAME
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conans.util.dates import from_iso8601_to_timestamp
 from conans.util.thread import ExceptionThread
 
diff --git a/conans/model/rest_routes.py b/conans/client/rest/rest_routes.py
similarity index 100%
rename from conans/model/rest_routes.py
rename to conans/client/rest/rest_routes.py
diff --git a/conans/client/rest_client_local_recipe_index.py b/conans/client/rest_client_local_recipe_index.py
index 4fa57964f..8470d23f5 100644
--- a/conans/client/rest_client_local_recipe_index.py
+++ b/conans/client/rest_client_local_recipe_index.py
@@ -15,8 +15,8 @@ from conans.client.loader import ConanFileLoader
 from conan.internal.errors import ConanReferenceDoesNotExistInDB, NotFoundException, RecipeNotFoundException, \
     PackageNotFoundException
 from conan.errors import ConanException
-from conans.model.conf import ConfDefinition
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.conf import ConfDefinition
+from conan.internal.model.recipe_ref import RecipeReference
 from conans.util.files import load, save, rmdir, copytree_compat
 
 
diff --git a/conans/migrations.py b/conans/migrations.py
index b47d8a6ef..96056c9e1 100644
--- a/conans/migrations.py
+++ b/conans/migrations.py
@@ -4,7 +4,7 @@ from conan import conan_version
 from conan.api.output import ConanOutput
 from conans.client.loader import load_python_file
 from conan.errors import ConanException, ConanMigrationError
-from conans.model.version import Version
+from conan.internal.model.version import Version
 from conans.util.files import load, save
 
 CONAN_VERSION = "version.txt"
diff --git a/conans/server/rest/bottle_routes.py b/conans/server/rest/bottle_routes.py
index e9ba68d85..6252b835a 100644
--- a/conans/server/rest/bottle_routes.py
+++ b/conans/server/rest/bottle_routes.py
@@ -1,4 +1,4 @@
-from conans.model.rest_routes import RestRoutes
+from conans.client.rest.rest_routes import RestRoutes
 
 
 class BottleRoutes(RestRoutes):
diff --git a/conans/server/rest/controller/v2/__init__.py b/conans/server/rest/controller/v2/__init__.py
index a86271aec..36cae0331 100644
--- a/conans/server/rest/controller/v2/__init__.py
+++ b/conans/server/rest/controller/v2/__init__.py
@@ -1,5 +1,5 @@
-from conans.model.package_ref import PkgReference
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.package_ref import PkgReference
+from conan.internal.model.recipe_ref import RecipeReference
 
 
 def get_package_ref(name, version, username, channel, package_id, revision, p_revision):
diff --git a/conans/server/rest/controller/v2/conan.py b/conans/server/rest/controller/v2/conan.py
index 29c80770a..e3744335e 100644
--- a/conans/server/rest/controller/v2/conan.py
+++ b/conans/server/rest/controller/v2/conan.py
@@ -1,7 +1,7 @@
 from bottle import request
 
 from conan.internal.errors import NotFoundException
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conans.server.rest.bottle_routes import BottleRoutes
 from conans.server.rest.controller.v2 import get_package_ref
 from conans.server.service.v2.service_v2 import ConanServiceV2
diff --git a/conans/server/rest/controller/v2/delete.py b/conans/server/rest/controller/v2/delete.py
index 92f34bc4f..a417d1bf2 100644
--- a/conans/server/rest/controller/v2/delete.py
+++ b/conans/server/rest/controller/v2/delete.py
@@ -1,4 +1,4 @@
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conans.server.rest.bottle_routes import BottleRoutes
 from conans.server.rest.controller.v2 import get_package_ref
 from conans.server.service.v2.service_v2 import ConanServiceV2
diff --git a/conans/server/rest/controller/v2/revisions.py b/conans/server/rest/controller/v2/revisions.py
index 5ee1c919b..f9ea3c854 100644
--- a/conans/server/rest/controller/v2/revisions.py
+++ b/conans/server/rest/controller/v2/revisions.py
@@ -1,4 +1,4 @@
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conans.server.rest.bottle_routes import BottleRoutes
 from conans.server.rest.controller.v2 import get_package_ref
 from conans.server.service.v2.service_v2 import ConanServiceV2
diff --git a/conans/server/rest/controller/v2/search.py b/conans/server/rest/controller/v2/search.py
index 092694e7f..416bb582c 100644
--- a/conans/server/rest/controller/v2/search.py
+++ b/conans/server/rest/controller/v2/search.py
@@ -1,6 +1,6 @@
 from bottle import request
 
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conans.server.rest.bottle_routes import BottleRoutes
 from conans.server.service.v2.search import SearchService
 
diff --git a/conans/server/service/authorize.py b/conans/server/service/authorize.py
index 67150205f..7cccfd440 100644
--- a/conans/server/service/authorize.py
+++ b/conans/server/service/authorize.py
@@ -16,7 +16,7 @@ from conan.internal.errors import InternalErrorException, AuthenticationExceptio
 #  ############################################
 #  ############ ABSTRACT CLASSES ##############
 #  ############################################
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 
 
 class Authorizer(object, metaclass=ABCMeta):
diff --git a/conans/server/service/v2/search.py b/conans/server/service/v2/search.py
index 079f1b37d..0ae388188 100644
--- a/conans/server/service/v2/search.py
+++ b/conans/server/service/v2/search.py
@@ -4,8 +4,8 @@ import re
 from fnmatch import translate
 
 from conan.internal.errors import ForbiddenException, RecipeNotFoundException
-from conans.model.package_ref import PkgReference
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.package_ref import PkgReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.internal.paths import CONANINFO
 from conans.server.utils.files import list_folder_subdirs
 from conans.util.files import load
diff --git a/conans/server/service/v2/service_v2.py b/conans/server/service/v2/service_v2.py
index a7c0f158b..6b9810df3 100644
--- a/conans/server/service/v2/service_v2.py
+++ b/conans/server/service/v2/service_v2.py
@@ -5,7 +5,7 @@ from bottle import FileUpload, static_file
 
 from conan.internal.errors import NotFoundException, RecipeNotFoundException, PackageNotFoundException
 from conan.internal.paths import CONAN_MANIFEST
-from conans.model.package_ref import PkgReference
+from conan.internal.model.package_ref import PkgReference
 from conans.server.service.mime import get_mime_type
 from conans.server.store.server_store import ServerStore
 from conans.util.files import mkdir
diff --git a/conans/server/store/server_store.py b/conans/server/store/server_store.py
index 8f3fb7843..037d2cf5e 100644
--- a/conans/server/store/server_store.py
+++ b/conans/server/store/server_store.py
@@ -4,8 +4,8 @@ from os.path import join, normpath, relpath
 from conan.internal.errors import RecipeNotFoundException, PackageNotFoundException
 from conan.errors import ConanException
 from conan.internal.paths import CONAN_MANIFEST
-from conans.model.package_ref import PkgReference
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.package_ref import PkgReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conans.server.revision_list import RevisionList
 
 REVISIONS_FILE = "revisions.txt"


Test patch:
diff --git a/conan/cli/commands/test.py b/conan/cli/commands/test.py
index eda4ebafc..e181af97a 100644
--- a/conan/cli/commands/test.py
+++ b/conan/cli/commands/test.py
@@ -7,7 +7,7 @@ from conan.cli.args import add_lockfile_args, add_common_install_arguments
 from conan.cli.formatters.graph import format_graph_json
 from conan.cli.printers import print_profiles
 from conan.cli.printers.graph import print_graph_basic, print_graph_packages
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 
 
 @conan_command(group="Creator", formatters={"json": format_graph_json})
diff --git a/conan/test/assets/genconanfile.py b/conan/test/assets/genconanfile.py
index 55f61de54..1b15efb65 100644
--- a/conan/test/assets/genconanfile.py
+++ b/conan/test/assets/genconanfile.py
@@ -1,4 +1,4 @@
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 
 
 class GenConanfile(object):
diff --git a/conan/test/assets/pkg_cmake.py b/conan/test/assets/pkg_cmake.py
index fd426210e..148f47424 100644
--- a/conan/test/assets/pkg_cmake.py
+++ b/conan/test/assets/pkg_cmake.py
@@ -1,6 +1,6 @@
 import textwrap
 
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.test.assets.cmake import gen_cmakelists
 from conan.test.assets.sources import gen_function_h, gen_function_cpp
 
diff --git a/conan/test/utils/mocks.py b/conan/test/utils/mocks.py
index 3e616b70a..9638b4ad8 100644
--- a/conan/test/utils/mocks.py
+++ b/conan/test/utils/mocks.py
@@ -4,9 +4,9 @@ from io import StringIO
 from conan import ConanFile
 from conan.errors import ConanException
 from conan.internal.conan_app import ConanFileHelpers
-from conans.model.conf import Conf
-from conans.model.layout import Folders, Infos
-from conans.model.options import Options
+from conan.internal.model.conf import Conf
+from conan.internal.model.layout import Folders, Infos
+from conan.internal.model.options import Options
 
 
 class LocalDBMock(object):
diff --git a/conan/test/utils/profiles.py b/conan/test/utils/profiles.py
index ef15eb8de..aa005ce15 100644
--- a/conan/test/utils/profiles.py
+++ b/conan/test/utils/profiles.py
@@ -1,7 +1,7 @@
 import os
 
-from conans.model.options import Options
-from conans.model.profile import Profile
+from conan.internal.model.options import Options
+from conan.internal.model.profile import Profile
 from conans.util.files import save
 
 
diff --git a/conan/test/utils/tools.py b/conan/test/utils/tools.py
index b6afae8f0..88ade0755 100644
--- a/conan/test/utils/tools.py
+++ b/conan/test/utils/tools.py
@@ -36,11 +36,11 @@ from conan.cli.cli import Cli, _CONAN_INTERNAL_CUSTOM_COMMANDS_PATH
 from conan.test.utils.env import environment_update
 from conan.internal.errors import NotFoundException
 from conan.errors import ConanException
-from conans.model.manifest import FileTreeManifest
-from conans.model.package_ref import PkgReference
-from conans.model.profile import Profile
-from conans.model.recipe_ref import RecipeReference
-from conans.model.settings import Settings
+from conan.internal.model.manifest import FileTreeManifest
+from conan.internal.model.package_ref import PkgReference
+from conan.internal.model.profile import Profile
+from conan.internal.model.recipe_ref import RecipeReference
+from conan.internal.model.settings import Settings
 from conan.test.assets import copy_assets
 from conan.test.assets.genconanfile import GenConanfile
 from conan.test.utils.artifactory import ArtifactoryServer
diff --git a/test/functional/layout/test_in_cache.py b/test/functional/layout/test_in_cache.py
index d539bb24a..12360054f 100644
--- a/test/functional/layout/test_in_cache.py
+++ b/test/functional/layout/test_in_cache.py
@@ -3,8 +3,8 @@ import textwrap
 
 import pytest
 
-from conans.model.package_ref import PkgReference
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.package_ref import PkgReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.test.assets.genconanfile import GenConanfile
 from conan.test.utils.test_files import temp_folder
 from conan.test.utils.tools import TestClient, NO_SETTINGS_PACKAGE_ID
diff --git a/test/functional/layout/test_layout_autopackage.py b/test/functional/layout/test_layout_autopackage.py
index 0231714b6..23286e34d 100644
--- a/test/functional/layout/test_layout_autopackage.py
+++ b/test/functional/layout/test_layout_autopackage.py
@@ -1,7 +1,7 @@
 import os
 
-from conans.model.package_ref import PkgReference
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.package_ref import PkgReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.test.assets.genconanfile import GenConanfile
 from conan.test.utils.tools import TestClient
 
diff --git a/test/functional/only_source_test.py b/test/functional/only_source_test.py
index c5f9931ac..debca48c9 100644
--- a/test/functional/only_source_test.py
+++ b/test/functional/only_source_test.py
@@ -1,7 +1,7 @@
 import os
 import unittest
 
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.test.assets.genconanfile import GenConanfile
 from conan.test.utils.tools import TestClient
 
diff --git a/test/functional/revisions_test.py b/test/functional/revisions_test.py
index d7dd9c370..c7164e00b 100644
--- a/test/functional/revisions_test.py
+++ b/test/functional/revisions_test.py
@@ -8,7 +8,7 @@ from mock import patch
 
 from conan.test.utils.env import environment_update
 from conan.internal.errors import RecipeNotFoundException
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conans.server.revision_list import RevisionList
 from conan.test.utils.tools import TestServer, GenConanfile, TestClient
 from conans.util.files import load
diff --git a/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps_components_names.py b/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps_components_names.py
index 5f9a9cd2e..e0678c01b 100644
--- a/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps_components_names.py
+++ b/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps_components_names.py
@@ -5,7 +5,7 @@ import textwrap
 
 import pytest
 
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.test.assets.genconanfile import GenConanfile
 from conan.test.assets.sources import gen_function_h, gen_function_cpp
 from conan.test.utils.tools import TestClient
diff --git a/test/functional/toolchains/cmake/cmakedeps/test_link_order.py b/test/functional/toolchains/cmake/cmakedeps/test_link_order.py
index cc7bf1341..04364d3e0 100644
--- a/test/functional/toolchains/cmake/cmakedeps/test_link_order.py
+++ b/test/functional/toolchains/cmake/cmakedeps/test_link_order.py
@@ -6,7 +6,7 @@ import textwrap
 import pytest
 from jinja2 import Template
 
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.test.utils.tools import TestClient
 
 """
diff --git a/test/functional/toolchains/gnu/test_pkg_config.py b/test/functional/toolchains/gnu/test_pkg_config.py
index 6d972f4a1..2b7cb9bfd 100644
--- a/test/functional/toolchains/gnu/test_pkg_config.py
+++ b/test/functional/toolchains/gnu/test_pkg_config.py
@@ -33,7 +33,7 @@ class TestPkgConfig:
         conanfile = textwrap.dedent("""
             from conan import ConanFile
             from conan.tools.gnu import PkgConfig
-            from conans.model.build_info import CppInfo
+            from conan.tools import CppInfo
 
             class Pkg(ConanFile):
                 def generate(self):
@@ -42,7 +42,7 @@ class TestPkgConfig:
                     self.output.info(f"VERSION: {pkg_config.version}")
                     self.output.info(f"VARIABLES: {pkg_config.variables['prefix']}")
 
-                    cpp_info = CppInfo()
+                    cpp_info = CppInfo(self)
                     pkg_config.fill_cpp_info(cpp_info, is_system=False, system_libs=["m"])
 
                     assert cpp_info.includedirs == ['/usr/local/include/libastral']
diff --git a/test/functional/toolchains/meson/test_meson.py b/test/functional/toolchains/meson/test_meson.py
index 8298c17b9..f1950a942 100644
--- a/test/functional/toolchains/meson/test_meson.py
+++ b/test/functional/toolchains/meson/test_meson.py
@@ -8,7 +8,7 @@ import pytest
 
 from conan.test.assets.sources import gen_function_cpp, gen_function_h
 from conan.test.utils.tools import TestClient
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from test.functional.toolchains.meson._base import TestMesonBase
 
 
diff --git a/test/functional/tools/scm/test_git.py b/test/functional/tools/scm/test_git.py
index 7c8df1697..d4211ec68 100644
--- a/test/functional/tools/scm/test_git.py
+++ b/test/functional/tools/scm/test_git.py
@@ -26,7 +26,7 @@ class TestGitBasicCapture:
             version = "0.1"
 
             def export(self):
-                git = Git(self, self.recipe_folder, excluded=["myfile.txt", "mynew.txt"])
+                git = Git(self, self.recipe_folder, excluded=["myfile.txt", "mynew.txt", "file with spaces.txt"])
                 commit = git.get_commit()
                 repo_commit = git.get_commit(repository=True)
                 url = git.get_remote_url()
@@ -127,7 +127,8 @@ class TestGitBasicCapture:
         c.run("export . -vvv")
         assert "pkg/0.1: DIRTY: False" in c.out
         c.save({"myfile.txt": "changed",
-                "mynew.txt": "new"})
+                "mynew.txt": "new",
+                "file with spaces.txt": "hello"})
         c.run("export .")
         assert "pkg/0.1: DIRTY: False" in c.out
         c.save({"other.txt": "new"})
diff --git a/test/integration/build_requires/test_toolchain_packages.py b/test/integration/build_requires/test_toolchain_packages.py
index d46a068a4..b8b4e49c5 100644
--- a/test/integration/build_requires/test_toolchain_packages.py
+++ b/test/integration/build_requires/test_toolchain_packages.py
@@ -1,7 +1,7 @@
 import json
 import textwrap
 
-from conans.model.package_ref import PkgReference
+from conan.internal.model.package_ref import PkgReference
 from conan.test.utils.tools import TestClient
 
 
diff --git a/test/integration/cache/cache2_update_test.py b/test/integration/cache/cache2_update_test.py
index d14df60a7..ad964b020 100644
--- a/test/integration/cache/cache2_update_test.py
+++ b/test/integration/cache/cache2_update_test.py
@@ -4,7 +4,7 @@ from collections import OrderedDict
 import pytest
 from mock import patch
 
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conans.server.revision_list import RevisionList
 from conan.test.assets.genconanfile import GenConanfile
 from conan.test.utils.tools import TestClient, TestServer, NO_SETTINGS_PACKAGE_ID
diff --git a/test/integration/command/alias_test.py b/test/integration/command/alias_test.py
index 8b5c7243e..975fa778a 100644
--- a/test/integration/command/alias_test.py
+++ b/test/integration/command/alias_test.py
@@ -2,7 +2,7 @@ import os
 import textwrap
 import unittest
 
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.test.utils.tools import TestClient, GenConanfile
 
 
diff --git a/test/integration/command/config_test.py b/test/integration/command/config_test.py
index a85a51e2b..17c552ec4 100644
--- a/test/integration/command/config_test.py
+++ b/test/integration/command/config_test.py
@@ -3,7 +3,7 @@ import os
 import textwrap
 
 from conan.api.conan_api import ConanAPI
-from conans.model.conf import BUILT_IN_CONFS
+from conan.internal.model.conf import BUILT_IN_CONFS
 from conan.test.utils.test_files import temp_folder
 from conan.test.utils.tools import TestClient
 from conan.test.utils.env import environment_update
diff --git a/test/integration/command/create_test.py b/test/integration/command/create_test.py
index bf0cd056e..df0a72d6c 100644
--- a/test/integration/command/create_test.py
+++ b/test/integration/command/create_test.py
@@ -3,7 +3,7 @@ import os
 import re
 import textwrap
 
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.test.utils.tools import TestClient, NO_SETTINGS_PACKAGE_ID, GenConanfile
 from conans.util.files import load
 
diff --git a/test/integration/command/download/download_selected_packages_test.py b/test/integration/command/download/download_selected_packages_test.py
index 16b2061e0..9c85b9711 100644
--- a/test/integration/command/download/download_selected_packages_test.py
+++ b/test/integration/command/download/download_selected_packages_test.py
@@ -2,7 +2,7 @@ import os
 
 import pytest
 
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.test.assets.genconanfile import GenConanfile
 from conan.test.utils.tools import TestClient
 from conans.util.files import load
diff --git a/test/integration/command/download/download_test.py b/test/integration/command/download/download_test.py
index e46b723f6..5987abd57 100644
--- a/test/integration/command/download/download_test.py
+++ b/test/integration/command/download/download_test.py
@@ -3,7 +3,7 @@ import textwrap
 from collections import OrderedDict
 from unittest import mock
 
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.test.utils.tools import TestClient, TestServer, NO_SETTINGS_PACKAGE_ID, GenConanfile
 from conans.util.files import load
 
diff --git a/test/integration/command/export/export_path_test.py b/test/integration/command/export/export_path_test.py
index 9a87684f3..f02688b17 100644
--- a/test/integration/command/export/export_path_test.py
+++ b/test/integration/command/export/export_path_test.py
@@ -3,7 +3,7 @@ import textwrap
 
 import pytest
 
-from conans.model.manifest import FileTreeManifest
+from conan.internal.model.manifest import FileTreeManifest
 from conan.test.assets.genconanfile import GenConanfile
 from conan.test.utils.tools import TestClient
 
diff --git a/test/integration/command/export/export_test.py b/test/integration/command/export/export_test.py
index ea2485ac1..2eb757130 100644
--- a/test/integration/command/export/export_test.py
+++ b/test/integration/command/export/export_test.py
@@ -8,8 +8,8 @@ import unittest
 import pytest
 from parameterized import parameterized
 
-from conans.model.manifest import FileTreeManifest
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.manifest import FileTreeManifest
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.internal.paths import CONANFILE, CONAN_MANIFEST
 from conan.test.utils.tools import TestClient, GenConanfile
 from conans.util.files import load, save
diff --git a/test/integration/command/install/install_update_test.py b/test/integration/command/install/install_update_test.py
index 42bbed328..161a925e3 100644
--- a/test/integration/command/install/install_update_test.py
+++ b/test/integration/command/install/install_update_test.py
@@ -2,7 +2,7 @@ import os
 import textwrap
 from time import sleep
 
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.test.utils.tools import TestClient, GenConanfile
 from conans.util.files import load
 
diff --git a/test/integration/command/install/test_install_transitive.py b/test/integration/command/install/test_install_transitive.py
index 2a7591012..8cc09409b 100644
--- a/test/integration/command/install/test_install_transitive.py
+++ b/test/integration/command/install/test_install_transitive.py
@@ -2,8 +2,8 @@ import os
 
 import pytest
 
-from conans.model.info import load_binary_info
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.info import load_binary_info
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.internal.paths import CONANFILE_TXT, CONANINFO
 from conan.test.utils.tools import TestClient,  GenConanfile
 from conans.util.files import load
diff --git a/test/integration/command/remove_test.py b/test/integration/command/remove_test.py
index 46b86c253..20e9937b7 100644
--- a/test/integration/command/remove_test.py
+++ b/test/integration/command/remove_test.py
@@ -7,8 +7,8 @@ import pytest
 
 from conan.api.conan_api import ConanAPI
 from conan.internal.errors import NotFoundException
-from conans.model.package_ref import PkgReference
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.package_ref import PkgReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.test.utils.tools import NO_SETTINGS_PACKAGE_ID, TestClient, TestServer, GenConanfile
 from conan.test.utils.env import environment_update
 
diff --git a/test/integration/command/test_package_test.py b/test/integration/command/test_package_test.py
index 727fa9872..2267d1803 100644
--- a/test/integration/command/test_package_test.py
+++ b/test/integration/command/test_package_test.py
@@ -3,7 +3,7 @@ import os
 import textwrap
 import unittest
 
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.internal.paths import CONANFILE
 from conan.test.utils.tools import NO_SETTINGS_PACKAGE_ID, TestClient, GenConanfile
 from conans.util.files import load
diff --git a/test/integration/command/upload/syncronize_test.py b/test/integration/command/upload/syncronize_test.py
index 27dd539e1..4fe401fb1 100644
--- a/test/integration/command/upload/syncronize_test.py
+++ b/test/integration/command/upload/syncronize_test.py
@@ -2,8 +2,8 @@ import os
 import unittest
 
 from conan.tools.files.files import untargz  # FIXME: DO not import from tools
-from conans.model.manifest import FileTreeManifest
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.manifest import FileTreeManifest
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.internal.paths import EXPORT_TGZ_NAME
 from conan.test.assets.genconanfile import GenConanfile
 from conan.test.utils.test_files import temp_folder
diff --git a/test/integration/command/upload/upload_compression_test.py b/test/integration/command/upload/upload_compression_test.py
index 3eb271638..c21d5e743 100644
--- a/test/integration/command/upload/upload_compression_test.py
+++ b/test/integration/command/upload/upload_compression_test.py
@@ -1,6 +1,6 @@
 import os
 
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.test.assets.genconanfile import GenConanfile
 from conan.test.utils.test_files import uncompress_packaged_files
 from conan.test.utils.tools import TestClient
diff --git a/test/integration/command/upload/upload_test.py b/test/integration/command/upload/upload_test.py
index ab57218c2..8c5249d22 100644
--- a/test/integration/command/upload/upload_test.py
+++ b/test/integration/command/upload/upload_test.py
@@ -12,8 +12,8 @@ from mock import patch
 from requests import Response
 
 from conan.errors import ConanException
-from conans.model.package_ref import PkgReference
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.package_ref import PkgReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.internal.paths import EXPORT_SOURCES_TGZ_NAME, PACKAGE_TGZ_NAME
 from conan.test.utils.tools import NO_SETTINGS_PACKAGE_ID, TestClient, TestServer, \
     GenConanfile, TestRequester, TestingResponse
diff --git a/test/integration/command_v2/search_test.py b/test/integration/command_v2/search_test.py
index 7262f6d81..796fe0a09 100644
--- a/test/integration/command_v2/search_test.py
+++ b/test/integration/command_v2/search_test.py
@@ -6,7 +6,7 @@ import pytest
 
 from conan.internal.errors import ConanConnectionError
 from conan.errors import ConanException
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.test.assets.genconanfile import GenConanfile
 from conan.test.utils.tools import TestClient, TestServer
 
diff --git a/test/integration/conan_api/list_test.py b/test/integration/conan_api/list_test.py
index ee7ca6a53..6a6804222 100644
--- a/test/integration/conan_api/list_test.py
+++ b/test/integration/conan_api/list_test.py
@@ -1,7 +1,7 @@
 from conan.api.conan_api import ConanAPI
 from conan.test.utils.env import environment_update
-from conans.model.package_ref import PkgReference
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.package_ref import PkgReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.test.assets.genconanfile import GenConanfile
 from conan.test.utils.tools import TestClient
 
diff --git a/test/integration/conan_api/search_test.py b/test/integration/conan_api/search_test.py
index 1aaa07f0a..cefde3771 100644
--- a/test/integration/conan_api/search_test.py
+++ b/test/integration/conan_api/search_test.py
@@ -1,8 +1,7 @@
 import pytest
 
 from conan.api.conan_api import ConanAPI
-from conan.api.model import Remote
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.test.assets.genconanfile import GenConanfile
 from conan.test.utils.tools import TestClient
 
diff --git a/test/integration/conan_api/test_local_api.py b/test/integration/conan_api/test_local_api.py
index df681ce29..f84c09bb8 100644
--- a/test/integration/conan_api/test_local_api.py
+++ b/test/integration/conan_api/test_local_api.py
@@ -3,7 +3,7 @@ import os
 from conan.api.conan_api import ConanAPI
 from conan.test.assets.genconanfile import GenConanfile
 from conan.test.utils.test_files import temp_folder
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conans.util.files import save
 
 
diff --git a/test/integration/conan_v2/test_legacy_cpp_info.py b/test/integration/conan_v2/test_legacy_cpp_info.py
index e25c39046..e742e23f3 100644
--- a/test/integration/conan_v2/test_legacy_cpp_info.py
+++ b/test/integration/conan_v2/test_legacy_cpp_info.py
@@ -1,6 +1,6 @@
 import textwrap
 
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.test.assets.genconanfile import GenConanfile
 from conan.test.utils.tools import TestClient
 from conans.util.files import load, save
diff --git a/test/integration/conanfile/conan_data_test.py b/test/integration/conanfile/conan_data_test.py
index 64aa2a86f..ec39cc642 100644
--- a/test/integration/conanfile/conan_data_test.py
+++ b/test/integration/conanfile/conan_data_test.py
@@ -7,7 +7,7 @@ import unittest
 import pytest
 import yaml
 
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.test.utils.file_server import TestFileServer
 from conan.test.utils.test_files import tgz_with_contents
 from conan.test.utils.tools import TestClient, GenConanfile
diff --git a/test/integration/configuration/conf/test_conf_copy.py b/test/integration/configuration/conf/test_conf_copy.py
index 79ffc70d9..46597afd8 100644
--- a/test/integration/configuration/conf/test_conf_copy.py
+++ b/test/integration/configuration/conf/test_conf_copy.py
@@ -1,4 +1,4 @@
-from conans.model.conf import Conf
+from conan.internal.model.conf import Conf
 
 
 def test_copy_conaninfo_conf():
diff --git a/test/integration/configuration/profile_test.py b/test/integration/configuration/profile_test.py
index 9709bd682..b8a6f3396 100644
--- a/test/integration/configuration/profile_test.py
+++ b/test/integration/configuration/profile_test.py
@@ -272,7 +272,7 @@ class ProfileTest(unittest.TestCase):
         self.client.run("remove '*' -c")
         # Create a simple recipe to require
         winreq_conanfile = '''
-from conans.model.conan_file import ConanFile
+from conan import ConanFile
 
 class winrequireDefaultNameConan(ConanFile):
     name = "winrequire"
@@ -286,7 +286,7 @@ class winrequireDefaultNameConan(ConanFile):
         self.client.run("export . --user=lasote --channel=stable")
 
         # Now require the first recipe depending on OS=windows
-        conanfile = '''from conans.model.conan_file import ConanFile
+        conanfile = '''from conan import ConanFile
 import os
 
 class DefaultNameConan(ConanFile):
@@ -339,7 +339,7 @@ class ProfileAggregationTest(unittest.TestCase):
     """)
 
     conanfile = dedent("""
-    from conans.model.conan_file import ConanFile
+    from conan import ConanFile
     import os
 
     class DefaultNameConan(ConanFile):
@@ -352,7 +352,7 @@ class ProfileAggregationTest(unittest.TestCase):
     """)
 
     consumer = dedent("""
-    from conans.model.conan_file import ConanFile
+    from conan import ConanFile
     import os
 
     class DefaultNameConan(ConanFile):
diff --git a/test/integration/configuration/requester_test.py b/test/integration/configuration/requester_test.py
index 5acb47360..ee0e9ba65 100644
--- a/test/integration/configuration/requester_test.py
+++ b/test/integration/configuration/requester_test.py
@@ -6,7 +6,7 @@ from mock import Mock, MagicMock
 
 from conan import __version__
 from conans.client.rest.conan_requester import ConanRequester
-from conans.model.conf import ConfDefinition
+from conan.internal.model.conf import ConfDefinition
 from conan.test.utils.tools import temp_folder
 from conans.util.files import save
 
diff --git a/test/integration/export_sources_test.py b/test/integration/export_sources_test.py
index a18defe33..af1fb404c 100644
--- a/test/integration/export_sources_test.py
+++ b/test/integration/export_sources_test.py
@@ -1,7 +1,7 @@
 import os
 import textwrap
 
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.test.assets.genconanfile import GenConanfile
 from conan.test.utils.tools import TestClient
 
diff --git a/test/integration/graph/core/graph_manager_base.py b/test/integration/graph/core/graph_manager_base.py
index 7303cb6bc..a379004f1 100644
--- a/test/integration/graph/core/graph_manager_base.py
+++ b/test/integration/graph/core/graph_manager_base.py
@@ -8,12 +8,12 @@ from conan.api.conan_api import ConanAPI
 from conan.internal.cache.cache import PkgCache
 from conan.internal.cache.home_paths import HomePaths
 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
-from conans.model.profile import Profile
-from conans.model.recipe_ref import RecipeReference
-from conans.model.settings import Settings
+from conan.internal.model.conf import ConfDefinition
+from conan.internal.model.manifest import FileTreeManifest
+from conan.internal.model.options import Options
+from conan.internal.model.profile import Profile
+from conan.internal.model.recipe_ref import RecipeReference
+from conan.internal.model.settings import Settings
 from conan.test.utils.test_files import temp_folder
 from conan.test.utils.tools import GenConanfile
 from conans.util.dates import revision_timestamp_now
diff --git a/test/integration/graph/core/test_build_requires.py b/test/integration/graph/core/test_build_requires.py
index a3945956a..73b14adec 100644
--- a/test/integration/graph/core/test_build_requires.py
+++ b/test/integration/graph/core/test_build_requires.py
@@ -5,7 +5,7 @@ import pytest
 from parameterized import parameterized
 
 from conans.client.graph.graph_error import GraphConflictError, GraphLoopError, GraphRuntimeError
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from test.integration.graph.core.graph_manager_base import GraphManagerTest
 from conan.test.utils.tools import GenConanfile, NO_SETTINGS_PACKAGE_ID, TestClient
 
diff --git a/test/integration/graph/test_dependencies_visit.py b/test/integration/graph/test_dependencies_visit.py
index 718e1f06b..439bf5d43 100644
--- a/test/integration/graph/test_dependencies_visit.py
+++ b/test/integration/graph/test_dependencies_visit.py
@@ -2,7 +2,7 @@ import textwrap
 
 import pytest
 
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.test.assets.genconanfile import GenConanfile
 from conan.test.utils.tools import TestClient
 
diff --git a/test/integration/graph/test_replace_requires.py b/test/integration/graph/test_replace_requires.py
index affa15e94..228dd32bc 100644
--- a/test/integration/graph/test_replace_requires.py
+++ b/test/integration/graph/test_replace_requires.py
@@ -3,7 +3,7 @@ import textwrap
 
 import pytest
 
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.test.assets.genconanfile import GenConanfile
 from conan.test.utils.tools import TestClient
 
diff --git a/test/integration/graph/version_ranges/version_ranges_cached_test.py b/test/integration/graph/version_ranges/version_ranges_cached_test.py
index 8466c0cfd..98649dbac 100644
--- a/test/integration/graph/version_ranges/version_ranges_cached_test.py
+++ b/test/integration/graph/version_ranges/version_ranges_cached_test.py
@@ -4,7 +4,7 @@ import pytest
 from mock import patch
 
 from conans.client.remote_manager import RemoteManager
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.test.assets.genconanfile import GenConanfile
 from conan.test.utils.tools import TestClient, TestServer
 
diff --git a/test/integration/hooks/test_post_export.py b/test/integration/hooks/test_post_export.py
index 260ab1cb7..f9a22e26b 100644
--- a/test/integration/hooks/test_post_export.py
+++ b/test/integration/hooks/test_post_export.py
@@ -1,7 +1,7 @@
 import os
 import textwrap
 
-from conans.model.manifest import FileTreeManifest
+from conan.internal.model.manifest import FileTreeManifest
 from conan.test.assets.genconanfile import GenConanfile
 from conan.test.utils.tools import TestClient
 from conans.util.files import save
diff --git a/test/integration/hooks/test_post_package.py b/test/integration/hooks/test_post_package.py
index fef17b7c4..de6b1cf43 100644
--- a/test/integration/hooks/test_post_package.py
+++ b/test/integration/hooks/test_post_package.py
@@ -1,7 +1,7 @@
 import os
 import textwrap
 
-from conans.model.manifest import FileTreeManifest
+from conan.internal.model.manifest import FileTreeManifest
 from conan.test.assets.genconanfile import GenConanfile
 from conan.test.utils.tools import TestClient
 from conans.util.files import save
diff --git a/test/integration/lockfile/test_ci.py b/test/integration/lockfile/test_ci.py
index 542dbd47e..344828077 100644
--- a/test/integration/lockfile/test_ci.py
+++ b/test/integration/lockfile/test_ci.py
@@ -3,7 +3,7 @@ import textwrap
 
 import pytest
 
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.test.assets.genconanfile import GenConanfile
 from conan.test.utils.tools import TestClient
 
diff --git a/test/integration/lockfile/test_ci_overrides.py b/test/integration/lockfile/test_ci_overrides.py
index a6f2221f6..413ee757e 100644
--- a/test/integration/lockfile/test_ci_overrides.py
+++ b/test/integration/lockfile/test_ci_overrides.py
@@ -2,7 +2,7 @@ import json
 
 import pytest
 
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.test.assets.genconanfile import GenConanfile
 from conan.test.utils.tools import TestClient
 
diff --git a/test/integration/lockfile/test_ci_revisions.py b/test/integration/lockfile/test_ci_revisions.py
index 12952fc0d..f5037c49c 100644
--- a/test/integration/lockfile/test_ci_revisions.py
+++ b/test/integration/lockfile/test_ci_revisions.py
@@ -3,7 +3,7 @@ import textwrap
 
 import pytest
 
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.test.utils.tools import TestClient
 
 conanfile = textwrap.dedent("""
diff --git a/test/integration/lockfile/test_lock_requires.py b/test/integration/lockfile/test_lock_requires.py
index 167f291f8..19bf48611 100644
--- a/test/integration/lockfile/test_lock_requires.py
+++ b/test/integration/lockfile/test_lock_requires.py
@@ -5,7 +5,7 @@ import time
 
 import pytest
 
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.test.assets.genconanfile import GenConanfile
 from conan.test.utils.tools import TestClient
 
diff --git a/test/integration/metadata/test_metadata_logs.py b/test/integration/metadata/test_metadata_logs.py
index a3911b703..86b650235 100644
--- a/test/integration/metadata/test_metadata_logs.py
+++ b/test/integration/metadata/test_metadata_logs.py
@@ -3,7 +3,7 @@ import textwrap
 
 import pytest
 
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.test.utils.tools import TestClient
 from conans.util.files import load, save
 
diff --git a/test/integration/options/options_in_requirements_test.py b/test/integration/options/options_in_requirements_test.py
index c0d52a353..93e8b63e2 100644
--- a/test/integration/options/options_in_requirements_test.py
+++ b/test/integration/options/options_in_requirements_test.py
@@ -1,7 +1,7 @@
 import os
 import unittest
 
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.test.utils.tools import TestClient
 
 
diff --git a/test/integration/package_id/full_revision_mode_test.py b/test/integration/package_id/full_revision_mode_test.py
index d6789d3ba..d9eaf8c05 100644
--- a/test/integration/package_id/full_revision_mode_test.py
+++ b/test/integration/package_id/full_revision_mode_test.py
@@ -2,7 +2,7 @@ import unittest
 from textwrap import dedent
 
 
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.test.utils.tools import TestClient, GenConanfile
 from conans.util.files import save
 
diff --git a/test/integration/py_requires/python_requires_test.py b/test/integration/py_requires/python_requires_test.py
index ac032298a..9588fbc8d 100644
--- a/test/integration/py_requires/python_requires_test.py
+++ b/test/integration/py_requires/python_requires_test.py
@@ -3,7 +3,7 @@ import textwrap
 import time
 import unittest
 
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.test.utils.tools import TestClient, GenConanfile
 
 
diff --git a/test/integration/remote/auth_test.py b/test/integration/remote/auth_test.py
index 90c4c83b7..2b9d08269 100644
--- a/test/integration/remote/auth_test.py
+++ b/test/integration/remote/auth_test.py
@@ -8,7 +8,7 @@ from requests.models import Response
 
 from conan.internal.api.remotes.localdb import LocalDB
 from conan.internal.errors import AuthenticationException
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.internal.paths import CONANFILE
 from conan.test.assets.genconanfile import GenConanfile
 from conan.test.utils.test_files import temp_folder
diff --git a/test/integration/remote/multi_remote_test.py b/test/integration/remote/multi_remote_test.py
index 3ab4d074d..420542fb5 100644
--- a/test/integration/remote/multi_remote_test.py
+++ b/test/integration/remote/multi_remote_test.py
@@ -2,7 +2,7 @@ import unittest
 from collections import OrderedDict
 from time import sleep
 
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.internal.paths import CONANFILE
 from conan.test.assets.genconanfile import GenConanfile
 from conan.test.utils.tools import TestClient, TestServer
diff --git a/test/integration/remote/rest_api_test.py b/test/integration/remote/rest_api_test.py
index 568550796..1207e0e4c 100644
--- a/test/integration/remote/rest_api_test.py
+++ b/test/integration/remote/rest_api_test.py
@@ -7,12 +7,12 @@ from conans.client.remote_manager import Remote
 from conans.client.rest.auth_manager import ConanApiAuthManager
 from conans.client.rest.conan_requester import ConanRequester
 from conans.client.rest.rest_client import RestApiClient
-from conans.model.conf import ConfDefinition
+from conan.internal.model.conf import ConfDefinition
 from conan.test.utils.env import environment_update
 from conan.api.input import UserInput
-from conans.model.manifest import FileTreeManifest
-from conans.model.package_ref import PkgReference
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.manifest import FileTreeManifest
+from conan.internal.model.package_ref import PkgReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.internal.paths import CONANFILE, CONANINFO, CONAN_MANIFEST
 from conan.test.assets.genconanfile import GenConanfile
 from conan.test.utils.mocks import LocalDBMock
diff --git a/test/integration/settings/settings_override_test.py b/test/integration/settings/settings_override_test.py
index e1959a2bf..cfeb10dbc 100644
--- a/test/integration/settings/settings_override_test.py
+++ b/test/integration/settings/settings_override_test.py
@@ -2,7 +2,7 @@ import os
 
 import pytest
 
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.internal.paths import CONANINFO
 from conan.test.assets.genconanfile import GenConanfile
 from conan.test.utils.tools import TestClient
diff --git a/test/integration/symlinks/symlinks_test.py b/test/integration/symlinks/symlinks_test.py
index 48cbe16ff..02632fc92 100644
--- a/test/integration/symlinks/symlinks_test.py
+++ b/test/integration/symlinks/symlinks_test.py
@@ -4,8 +4,8 @@ import textwrap
 
 import pytest
 
-from conans.model.package_ref import PkgReference
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.package_ref import PkgReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.internal.paths import PACKAGE_TGZ_NAME
 from conan.test.assets.genconanfile import GenConanfile
 from conan.test.utils.test_files import temp_folder
diff --git a/test/integration/test_migrations.py b/test/integration/test_migrations.py
index f84544431..233b09729 100644
--- a/test/integration/test_migrations.py
+++ b/test/integration/test_migrations.py
@@ -10,7 +10,7 @@ from conan.test.assets.genconanfile import GenConanfile
 from conan.test.utils.test_files import temp_folder
 from conan.test.utils.tools import TestClient
 from conans.client.migrations import ClientMigrator
-from conans.model.version import Version
+from conan.internal.model.version import Version
 from conans.util.files import save, load
 
 
diff --git a/test/integration/test_package_python_files.py b/test/integration/test_package_python_files.py
index 2c2032143..2dfd51c34 100644
--- a/test/integration/test_package_python_files.py
+++ b/test/integration/test_package_python_files.py
@@ -1,7 +1,7 @@
 import os
 import textwrap
 
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conans.util.files import load
 from conan.test.utils.tools import TestClient, NO_SETTINGS_PACKAGE_ID
 
diff --git a/test/integration/tgz_macos_dot_files_test.py b/test/integration/tgz_macos_dot_files_test.py
index 8da10dae7..76a2f36bf 100644
--- a/test/integration/tgz_macos_dot_files_test.py
+++ b/test/integration/tgz_macos_dot_files_test.py
@@ -9,7 +9,7 @@ import unittest
 import pytest
 
 from conans.client.remote_manager import uncompress_file
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.internal.paths import EXPORT_SOURCES_TGZ_NAME
 from conan.test.utils.tools import TestClient, NO_SETTINGS_PACKAGE_ID
 
diff --git a/test/integration/tools/fix_symlinks_test.py b/test/integration/tools/fix_symlinks_test.py
index e3e7fef4f..fa757c76a 100644
--- a/test/integration/tools/fix_symlinks_test.py
+++ b/test/integration/tools/fix_symlinks_test.py
@@ -5,7 +5,7 @@ import unittest
 
 import pytest
 
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.test.utils.tools import TestClient
 
 
diff --git a/test/integration/tools/system/package_manager_test.py b/test/integration/tools/system/package_manager_test.py
index 25bcb90f0..1309469b9 100644
--- a/test/integration/tools/system/package_manager_test.py
+++ b/test/integration/tools/system/package_manager_test.py
@@ -8,7 +8,7 @@ from unittest.mock import PropertyMock
 from conan.tools.system.package_manager import Apt, Apk, Dnf, Yum, Brew, Pkg, PkgUtil, Chocolatey, \
     Zypper, PacMan, _SystemPackageManagerTool
 from conan.errors import ConanException
-from conans.model.settings import Settings
+from conan.internal.model.settings import Settings
 from conan.test.utils.mocks import ConanFileMock, MockSettings
 
 
diff --git a/test/unittests/client/build/cpp_std_flags_test.py b/test/unittests/client/build/cpp_std_flags_test.py
index 282b7decd..dcf1e1fa3 100644
--- a/test/unittests/client/build/cpp_std_flags_test.py
+++ b/test/unittests/client/build/cpp_std_flags_test.py
@@ -2,7 +2,7 @@ import unittest
 
 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.internal.model.version import Version
 from conan.test.utils.mocks import MockSettings, ConanFileMock
 
 
diff --git a/test/unittests/client/file_copier/test_report_copied_files.py b/test/unittests/client/file_copier/test_report_copied_files.py
index ffc1ce82f..c51ca00e0 100644
--- a/test/unittests/client/file_copier/test_report_copied_files.py
+++ b/test/unittests/client/file_copier/test_report_copied_files.py
@@ -1,7 +1,7 @@
 import unittest
 
 from conan.api.output import ConanOutput
-from conans.model.manifest import FileTreeManifest
+from conan.internal.model.manifest import FileTreeManifest
 from conan.test.utils.mocks import RedirectedTestOutput
 from conan.test.utils.tools import redirect_output
 
diff --git a/test/unittests/client/graph/build_mode_test.py b/test/unittests/client/graph/build_mode_test.py
index 653dd053a..02f3ab0bc 100644
--- a/test/unittests/client/graph/build_mode_test.py
+++ b/test/unittests/client/graph/build_mode_test.py
@@ -2,7 +2,7 @@ import pytest
 
 from conans.client.graph.build_mode import BuildMode
 from conan.errors import ConanException
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.test.utils.mocks import ConanFileMock, RedirectedTestOutput
 from conan.test.utils.tools import redirect_output
 
diff --git a/test/unittests/client/graph/deps_graph_test.py b/test/unittests/client/graph/deps_graph_test.py
index b09df4b27..4c60ebcfa 100644
--- a/test/unittests/client/graph/deps_graph_test.py
+++ b/test/unittests/client/graph/deps_graph_test.py
@@ -4,8 +4,8 @@ from mock import Mock
 
 from conans.client.graph.graph import CONTEXT_HOST
 from conans.client.graph.graph_builder import DepsGraph, Node
-from conans.model.conan_file import ConanFile
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.conan_file import ConanFile
+from conan.internal.model.recipe_ref import RecipeReference
 
 
 class DepsGraphTest(unittest.TestCase):
diff --git a/test/unittests/client/profile_loader/compiler_cppstd_test.py b/test/unittests/client/profile_loader/compiler_cppstd_test.py
index f2468f7a0..c62c9bb0c 100644
--- a/test/unittests/client/profile_loader/compiler_cppstd_test.py
+++ b/test/unittests/client/profile_loader/compiler_cppstd_test.py
@@ -10,8 +10,8 @@ from conan.internal.cache.home_paths import HomePaths
 from conan.internal.api.profile.profile_loader import ProfileLoader
 from conan.internal.default_settings import default_settings_yml
 from conan.errors import ConanException
-from conans.model.conf import ConfDefinition
-from conans.model.settings import Settings
+from conan.internal.model.conf import ConfDefinition
+from conan.internal.model.settings import Settings
 from conan.test.utils.test_files import temp_folder
 from conans.util.files import save
 
diff --git a/test/unittests/client/profile_loader/profile_loader_test.py b/test/unittests/client/profile_loader/profile_loader_test.py
index 9e20d9c5e..650f1d73d 100644
--- a/test/unittests/client/profile_loader/profile_loader_test.py
+++ b/test/unittests/client/profile_loader/profile_loader_test.py
@@ -5,7 +5,7 @@ import pytest
 
 from conan.internal.api.profile.profile_loader import _ProfileParser, ProfileLoader
 from conan.errors import ConanException
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.test.utils.mocks import ConanFileMock, MockSettings
 from conan.test.utils.test_files import temp_folder
 from conans.util.files import save
diff --git a/test/unittests/client/toolchain/autotools/autotools_test.py b/test/unittests/client/toolchain/autotools/autotools_test.py
index 42a51d196..58388c4c9 100644
--- a/test/unittests/client/toolchain/autotools/autotools_test.py
+++ b/test/unittests/client/toolchain/autotools/autotools_test.py
@@ -3,7 +3,7 @@ import os
 from conan.tools.build import save_toolchain_args
 from conan.tools.gnu import Autotools
 from conan import ConanFile
-from conans.model.conf import Conf
+from conan.internal.model.conf import Conf
 from test.unittests.util.tools_test import RunnerMock
 from conan.test.utils.mocks import MockSettings
 from conan.test.utils.test_files import temp_folder
diff --git a/test/unittests/client/toolchain/autotools/autotools_toolchain_test.py b/test/unittests/client/toolchain/autotools/autotools_toolchain_test.py
index ae7c2a6e4..0879043d0 100644
--- a/test/unittests/client/toolchain/autotools/autotools_toolchain_test.py
+++ b/test/unittests/client/toolchain/autotools/autotools_toolchain_test.py
@@ -10,7 +10,7 @@ from conan.test.utils.test_files import temp_folder
 from conan.tools.build import load_toolchain_args
 from conan.tools.files import save
 from conan.tools.gnu import AutotoolsToolchain
-from conans.model.conf import Conf
+from conan.internal.model.conf import Conf
 
 
 def test_modify_environment():
diff --git a/test/unittests/client/tools/apple/test_xcodebuild.py b/test/unittests/client/tools/apple/test_xcodebuild.py
index b2c191c0d..32cf2575b 100644
--- a/test/unittests/client/tools/apple/test_xcodebuild.py
+++ b/test/unittests/client/tools/apple/test_xcodebuild.py
@@ -1,7 +1,7 @@
 import pytest
 
 from conan.tools.apple import XcodeBuild
-from conans.model.conf import ConfDefinition
+from conan.internal.model.conf import ConfDefinition
 from conan.test.utils.mocks import ConanFileMock, MockSettings
 
 
diff --git a/test/unittests/model/build_info/components_test.py b/test/unittests/model/build_info/components_test.py
index a1656333a..ff4c2259b 100644
--- a/test/unittests/model/build_info/components_test.py
+++ b/test/unittests/model/build_info/components_test.py
@@ -1,6 +1,6 @@
 import unittest
 
-from conans.model.build_info import CppInfo
+from conan.internal.model.cpp_info import CppInfo
 
 
 class CppInfoComponentsTest(unittest.TestCase):
diff --git a/test/unittests/model/build_info/generic_properties_test.py b/test/unittests/model/build_info/generic_properties_test.py
index 689be06af..c99daf605 100644
--- a/test/unittests/model/build_info/generic_properties_test.py
+++ b/test/unittests/model/build_info/generic_properties_test.py
@@ -1,4 +1,4 @@
-from conans.model.build_info import CppInfo
+from conan.internal.model.cpp_info import CppInfo
 
 
 def test_set_get_properties():
diff --git a/test/unittests/model/build_info/new_build_info_test.py b/test/unittests/model/build_info/new_build_info_test.py
index 4bfcdee1d..c554de8d0 100644
--- a/test/unittests/model/build_info/new_build_info_test.py
+++ b/test/unittests/model/build_info/new_build_info_test.py
@@ -1,6 +1,6 @@
 import pytest
 
-from conans.model.build_info import CppInfo, _DIRS_VAR_NAMES, _FIELD_VAR_NAMES
+from conan.internal.model.cpp_info import CppInfo, _DIRS_VAR_NAMES, _FIELD_VAR_NAMES
 
 
 def test_components_order():
diff --git a/test/unittests/model/build_info/test_deduce_locations.py b/test/unittests/model/build_info/test_deduce_locations.py
index 5a3d0a883..5460b2e6b 100644
--- a/test/unittests/model/build_info/test_deduce_locations.py
+++ b/test/unittests/model/build_info/test_deduce_locations.py
@@ -4,13 +4,12 @@ from unittest.mock import MagicMock
 
 import pytest
 
-from conan.errors import ConanException
 from conan.test.utils.mocks import ConanFileMock
 from conan.test.utils.test_files import temp_folder
 from conan.tools.files import save
-from conans.model.build_info import CppInfo
-from conans.model.pkg_type import PackageType
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.cpp_info import CppInfo
+from conan.internal.model.pkg_type import PackageType
+from conan.internal.model.recipe_ref import RecipeReference
 from conans.util.files import save
 
 
diff --git a/test/unittests/model/conanfile_test.py b/test/unittests/model/conanfile_test.py
index b8adb93b3..03c9cabc7 100644
--- a/test/unittests/model/conanfile_test.py
+++ b/test/unittests/model/conanfile_test.py
@@ -1,7 +1,7 @@
 import textwrap
 import unittest
 
-from conans.model.conan_file import ConanFile
+from conan.internal.model.conan_file import ConanFile
 from conan.test.utils.tools import TestClient
 
 
diff --git a/test/unittests/model/info_test.py b/test/unittests/model/info_test.py
index ba14cf468..16c8216e9 100644
--- a/test/unittests/model/info_test.py
+++ b/test/unittests/model/info_test.py
@@ -1,6 +1,6 @@
-from conans.model.info import ConanInfo, RequirementsInfo, PythonRequiresInfo
-from conans.model.options import Options
-from conans.model.settings import Settings
+from conan.internal.model.info import ConanInfo, RequirementsInfo, PythonRequiresInfo
+from conan.internal.model.options import Options
+from conan.internal.model.settings import Settings
 
 
 def test_false_values_affect_none():
diff --git a/test/unittests/model/manifest_test.py b/test/unittests/model/manifest_test.py
index 830b37281..3d2e22295 100644
--- a/test/unittests/model/manifest_test.py
+++ b/test/unittests/model/manifest_test.py
@@ -3,7 +3,7 @@ import platform
 
 import pytest
 
-from conans.model.manifest import FileTreeManifest
+from conan.internal.model.manifest import FileTreeManifest
 from conan.test.utils.test_files import temp_folder
 from conans.util.files import load, md5, save
 
diff --git a/test/unittests/model/options_test.py b/test/unittests/model/options_test.py
index 24ddc72da..51dee1a08 100644
--- a/test/unittests/model/options_test.py
+++ b/test/unittests/model/options_test.py
@@ -3,8 +3,8 @@ import textwrap
 import pytest
 
 from conan.errors import ConanException
-from conans.model.options import Options
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.options import Options
+from conan.internal.model.recipe_ref import RecipeReference
 
 
 class TestOptions:
diff --git a/test/unittests/model/other_settings_test.py b/test/unittests/model/other_settings_test.py
index 4abbb1b0e..39e443c8b 100644
--- a/test/unittests/model/other_settings_test.py
+++ b/test/unittests/model/other_settings_test.py
@@ -2,8 +2,8 @@ import os
 import textwrap
 import unittest
 
-from conans.model.info import load_binary_info
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.info import load_binary_info
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.internal.paths import CONANFILE
 from conan.test.utils.tools import TestClient
 from conans.util.files import load, save
diff --git a/test/unittests/model/profile_test.py b/test/unittests/model/profile_test.py
index 88cea6127..d67f98229 100644
--- a/test/unittests/model/profile_test.py
+++ b/test/unittests/model/profile_test.py
@@ -2,7 +2,7 @@ import unittest
 from collections import OrderedDict
 
 from conan.tools.env.environment import ProfileEnvironment
-from conans.model.profile import Profile
+from conan.internal.model.profile import Profile
 
 
 class ProfileTest(unittest.TestCase):
diff --git a/test/unittests/model/settings_test.py b/test/unittests/model/settings_test.py
index 0c63f49f1..749aa7f59 100644
--- a/test/unittests/model/settings_test.py
+++ b/test/unittests/model/settings_test.py
@@ -5,7 +5,7 @@ import pytest
 
 from conan.internal.default_settings import default_settings_yml
 from conan.errors import ConanException
-from conans.model.settings import Settings, bad_value_msg, undefined_field
+from conan.internal.model.settings import Settings, bad_value_msg, undefined_field
 
 
 def undefined_value(v):
diff --git a/test/unittests/model/test_conf.py b/test/unittests/model/test_conf.py
index 841a87bf7..25dfbdedf 100644
--- a/test/unittests/model/test_conf.py
+++ b/test/unittests/model/test_conf.py
@@ -3,7 +3,7 @@ import textwrap
 import pytest
 
 from conan.errors import ConanException
-from conans.model.conf import ConfDefinition
+from conan.internal.model.conf import ConfDefinition
 
 
 @pytest.fixture()
diff --git a/test/unittests/model/test_package_reference.py b/test/unittests/model/test_package_reference.py
index 941c09327..caeb18c48 100644
--- a/test/unittests/model/test_package_reference.py
+++ b/test/unittests/model/test_package_reference.py
@@ -1,4 +1,4 @@
-from conans.model.package_ref import PkgReference
+from conan.internal.model.package_ref import PkgReference
 
 
 def test_package_reference():
diff --git a/test/unittests/model/test_recipe_reference.py b/test/unittests/model/test_recipe_reference.py
index 382424c1c..e811c7cd2 100644
--- a/test/unittests/model/test_recipe_reference.py
+++ b/test/unittests/model/test_recipe_reference.py
@@ -1,7 +1,7 @@
 import pytest
 
 from conan.errors import ConanException
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 
 
 def test_recipe_reference():
diff --git a/test/unittests/model/version/test_version_bump.py b/test/unittests/model/version/test_version_bump.py
index 23b3e1a26..180d8860c 100644
--- a/test/unittests/model/version/test_version_bump.py
+++ b/test/unittests/model/version/test_version_bump.py
@@ -1,6 +1,6 @@
 import pytest
 
-from conans.model.version import Version
+from conan.internal.model.version import Version
 
 values = [
     ['1.0.0',       0, "2.0.0"],
diff --git a/test/unittests/model/version/test_version_comparison.py b/test/unittests/model/version/test_version_comparison.py
index da480377e..f35cd9796 100644
--- a/test/unittests/model/version/test_version_comparison.py
+++ b/test/unittests/model/version/test_version_comparison.py
@@ -1,6 +1,6 @@
 import pytest
 
-from conans.model.version import Version
+from conan.internal.model.version import Version
 
 v = [("1", "2"),
      ("1.0", "1.1"),
diff --git a/test/unittests/model/version/test_version_parse.py b/test/unittests/model/version/test_version_parse.py
index e68f77ddd..bdd4e27ba 100644
--- a/test/unittests/model/version/test_version_parse.py
+++ b/test/unittests/model/version/test_version_parse.py
@@ -1,6 +1,6 @@
 import pytest
 
-from conans.model.version import Version
+from conan.internal.model.version import Version
 
 v = [("1.2.3",
       (1, 2, 3), None, None),
diff --git a/test/unittests/model/version/test_version_range.py b/test/unittests/model/version/test_version_range.py
index b380de47b..8b172c2c3 100644
--- a/test/unittests/model/version/test_version_range.py
+++ b/test/unittests/model/version/test_version_range.py
@@ -3,8 +3,8 @@ import textwrap
 import pytest
 
 from conan.errors import ConanException
-from conans.model.version import Version
-from conans.model.version_range import VersionRange
+from conan.internal.model.version import Version
+from conan.internal.model.version_range import VersionRange
 from conan.test.utils.tools import TestClient
 
 values = [
diff --git a/test/unittests/model/version/test_version_range_intersection.py b/test/unittests/model/version/test_version_range_intersection.py
index 1ad131974..a379a9673 100644
--- a/test/unittests/model/version/test_version_range_intersection.py
+++ b/test/unittests/model/version/test_version_range_intersection.py
@@ -1,6 +1,6 @@
 import pytest
 
-from conans.model.version_range import VersionRange
+from conan.internal.model.version_range import VersionRange
 
 values = [
     # empty / any ranges
diff --git a/test/unittests/model/versionrepr_test.py b/test/unittests/model/versionrepr_test.py
index 59b2b13f7..d28ef3b16 100644
--- a/test/unittests/model/versionrepr_test.py
+++ b/test/unittests/model/versionrepr_test.py
@@ -1,7 +1,7 @@
 import unittest
 
-from conans.model.info import _VersionRepr
-from conans.model.version import Version
+from conan.internal.model.info import _VersionRepr
+from conan.internal.model.version import Version
 
 
 class VersionReprTest(unittest.TestCase):
diff --git a/test/unittests/server/service/authorizer_test.py b/test/unittests/server/service/authorizer_test.py
index 1424dad61..be2d75d69 100644
--- a/test/unittests/server/service/authorizer_test.py
+++ b/test/unittests/server/service/authorizer_test.py
@@ -1,8 +1,8 @@
 import unittest
 
 from conan.internal.errors import InternalErrorException, AuthenticationException, ForbiddenException
-from conans.model.package_ref import PkgReference
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.package_ref import PkgReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conans.server.service.authorize import BasicAuthorizer
 
 
diff --git a/test/unittests/server/service/service_test.py b/test/unittests/server/service/service_test.py
index 8e3e1f7d4..698bd25ec 100644
--- a/test/unittests/server/service/service_test.py
+++ b/test/unittests/server/service/service_test.py
@@ -3,9 +3,9 @@ import os
 import unittest
 
 from conan.internal.errors import NotFoundException
-from conans.model.manifest import FileTreeManifest
-from conans.model.package_ref import PkgReference
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.manifest import FileTreeManifest
+from conan.internal.model.package_ref import PkgReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.internal.paths import CONANINFO, CONAN_MANIFEST
 from conans.server.service.authorize import BasicAuthorizer
 from conans.server.service.v2.search import SearchService
diff --git a/test/unittests/tools/build/test_cppstd.py b/test/unittests/tools/build/test_cppstd.py
index 1a4f6f80d..1997c72bb 100644
--- a/test/unittests/tools/build/test_cppstd.py
+++ b/test/unittests/tools/build/test_cppstd.py
@@ -3,7 +3,7 @@ import pytest
 from conan.internal.api.detect.detect_api import detect_cppstd
 from conan.tools.build import supported_cppstd, check_min_cppstd, valid_min_cppstd
 from conan.errors import ConanException, ConanInvalidConfiguration
-from conans.model.version import Version
+from conan.internal.model.version import Version
 from conan.test.utils.mocks import MockSettings, ConanFileMock
 
 
diff --git a/test/unittests/tools/cmake/test_cmake_cmd_line_args.py b/test/unittests/tools/cmake/test_cmake_cmd_line_args.py
index b8848cda9..ffc3c4c0c 100644
--- a/test/unittests/tools/cmake/test_cmake_cmd_line_args.py
+++ b/test/unittests/tools/cmake/test_cmake_cmd_line_args.py
@@ -3,7 +3,7 @@ import textwrap
 import pytest
 
 from conan.tools.cmake.cmake import _cmake_cmd_line_args
-from conans.model.conf import ConfDefinition
+from conan.internal.model.conf import ConfDefinition
 from conan.test.utils.mocks import ConanFileMock
 
 
diff --git a/test/unittests/tools/cmake/test_cmake_install.py b/test/unittests/tools/cmake/test_cmake_install.py
index 846040606..d6bf9fa6c 100644
--- a/test/unittests/tools/cmake/test_cmake_install.py
+++ b/test/unittests/tools/cmake/test_cmake_install.py
@@ -1,8 +1,8 @@
 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.model.conf import Conf
-from conans.model.settings import Settings
+from conan.internal.model.conf import Conf
+from conan.internal.model.settings import Settings
 from conan.test.utils.mocks import ConanFileMock
 from conan.test.utils.test_files import temp_folder
 
diff --git a/test/unittests/tools/cmake/test_cmake_presets_definitions.py b/test/unittests/tools/cmake/test_cmake_presets_definitions.py
index 0d15efc12..2b474c8fd 100644
--- a/test/unittests/tools/cmake/test_cmake_presets_definitions.py
+++ b/test/unittests/tools/cmake/test_cmake_presets_definitions.py
@@ -3,9 +3,9 @@ from mock import mock
 
 from conan.tools.cmake import CMake
 from conan.tools.cmake.presets import write_cmake_presets
-from conans.model.conan_file import ConanFile
-from conans.model.conf import Conf
-from conans.model.settings import Settings
+from conan.internal.model.conan_file import ConanFile
+from conan.internal.model.conf import Conf
+from conan.internal.model.settings import Settings
 from conan.test.utils.test_files import temp_folder
 
 
diff --git a/test/unittests/tools/cmake/test_cmake_test.py b/test/unittests/tools/cmake/test_cmake_test.py
index 901fb3f45..8caf8603a 100644
--- a/test/unittests/tools/cmake/test_cmake_test.py
+++ b/test/unittests/tools/cmake/test_cmake_test.py
@@ -3,8 +3,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.model.conf import Conf
-from conans.model.settings import Settings
+from conan.internal.model.conf import Conf
+from conan.internal.model.settings import Settings
 from conan.test.utils.mocks import ConanFileMock
 from conan.test.utils.test_files import temp_folder
 
diff --git a/test/unittests/tools/cmake/test_cmaketoolchain.py b/test/unittests/tools/cmake/test_cmaketoolchain.py
index 5eb8d43be..26169dece 100644
--- a/test/unittests/tools/cmake/test_cmaketoolchain.py
+++ b/test/unittests/tools/cmake/test_cmaketoolchain.py
@@ -8,9 +8,9 @@ from conan.internal.default_settings import default_settings_yml
 from conan.tools.cmake import CMakeToolchain
 from conan.tools.cmake.toolchain.blocks import Block
 from conan.errors import ConanException
-from conans.model.conf import Conf
-from conans.model.options import Options
-from conans.model.settings import Settings
+from conan.internal.model.conf import Conf
+from conan.internal.model.options import Options
+from conan.internal.model.settings import Settings
 
 
 @pytest.fixture
diff --git a/test/unittests/tools/env/test_env.py b/test/unittests/tools/env/test_env.py
index a3384cc0e..cfec7acd2 100644
--- a/test/unittests/tools/env/test_env.py
+++ b/test/unittests/tools/env/test_env.py
@@ -8,7 +8,7 @@ import pytest
 from conan.tools.env import Environment
 from conan.tools.env.environment import ProfileEnvironment
 from conans.client.subsystems import WINDOWS
-from conans.model.recipe_ref import RecipeReference
+from conan.internal.model.recipe_ref import RecipeReference
 from conan.test.utils.mocks import ConanFileMock, MockSettings
 from conan.test.utils.test_files import temp_folder
 from conan.test.utils.env import environment_update
diff --git a/test/unittests/tools/files/collect_lib_test.py b/test/unittests/tools/files/collect_lib_test.py
index 73c62d4d4..aaa2c154a 100644
--- a/test/unittests/tools/files/collect_lib_test.py
+++ b/test/unittests/tools/files/collect_lib_test.py
@@ -4,7 +4,7 @@ import platform
 import pytest
 
 from conan.tools.files import collect_libs
-from conans.model.build_info import CppInfo
+from conan.internal.model.cpp_info import CppInfo
 from conan.test.utils.mocks import ConanFileMock, RedirectedTestOutput
 from conan.test.utils.test_files import temp_folder
 from conan.test.utils.tools import redirect_output
diff --git a/test/unittests/tools/gnu/autotoolschain_test.py b/test/unittests/tools/gnu/autotoolschain_test.py
index 37096e970..eec8d7cce 100644
--- a/test/unittests/tools/gnu/autotoolschain_test.py
+++ b/test/unittests/tools/gnu/autotoolschain_test.py
@@ -5,7 +5,7 @@ import pytest
 from conan.tools.build import cmd_args_to_string
 from conan.tools.gnu import AutotoolsToolchain
 from conan.errors import ConanException
-from conans.model.conf import Conf
+from conan.internal.model.conf import Conf
 from conan.test.utils.mocks import ConanFileMock, MockSettings
 
 
diff --git a/test/unittests/tools/gnu/test_gnutoolchain.py b/test/unittests/tools/gnu/test_gnutoolchain.py
index c53f9d7bb..48fffbe94 100644
--- a/test/unittests/tools/gnu/test_gnutoolchain.py
+++ b/test/unittests/tools/gnu/test_gnutoolchain.py
@@ -1,11 +1,9 @@
-from unittest.mock import patch
-
 import pytest
 
 from conan.tools.build import cmd_args_to_string
 from conan.tools.gnu import GnuToolchain
 from conan.errors import ConanException
-from conans.model.conf import Conf
+from conan.internal.model.conf import Conf
 from conan.test.utils.mocks import ConanFileMock, MockSettings
 
 
diff --git a/test/unittests/tools/intel/test_intel_cc.py b/test/unittests/tools/intel/test_intel_cc.py
index 39ef3446e..6fcc8e3e1 100644
--- a/test/unittests/tools/intel/test_intel_cc.py
+++ b/test/unittests/tools/intel/test_intel_cc.py
@@ -7,7 +7,7 @@ from mock import patch
 from conan.tools.build.flags import architecture_flag, cppstd_flag
 from conan.tools.intel import IntelCC
 from conan.errors import ConanException
-from conans.model.conf import ConfDefinition
+from conan.internal.model.conf import ConfDefinition
 from conan.test.utils.mocks import ConanFileMock, MockSettings
 
 
diff --git a/test/unittests/tools/meson/test_meson.py b/test/unittests/tools/meson/test_meson.py
index 8998347a7..4f80ea8af 100644
--- a/test/unittests/tools/meson/test_meson.py
+++ b/test/unittests/tools/meson/test_meson.py
@@ -1,7 +1,7 @@
 import textwrap
 
 from conan.tools.meson import Meson
-from conans.model.conf import ConfDefinition
+from conan.internal.model.conf import ConfDefinition
 from conan.test.utils.mocks import ConanFileMock, MockSettings
 
 
diff --git a/test/unittests/tools/microsoft/test_msbuild.py b/test/unittests/tools/microsoft/test_msbuild.py
index 3039fbefd..b4c96296a 100644
--- a/test/unittests/tools/microsoft/test_msbuild.py
+++ b/test/unittests/tools/microsoft/test_msbuild.py
@@ -4,8 +4,8 @@ import pytest
 
 from conan import ConanFile
 from conan.tools.microsoft import MSBuild, MSBuildToolchain, is_msvc, is_msvc_static_runtime
-from conans.model.conf import ConfDefinition, Conf
-from conans.model.settings import Settings
+from conan.internal.model.conf import ConfDefinition, Conf
+from conan.internal.model.settings import Settings
 from conan.test.utils.mocks import MockSettings, ConanFileMock, MockOptions
 from conan.test.utils.test_files import temp_folder
 from conans.util.files import load
diff --git a/test/unittests/tools/microsoft/test_subsystem.py b/test/unittests/tools/microsoft/test_subsystem.py
index be4ae1ef1..3404d37d3 100644
--- a/test/unittests/tools/microsoft/test_subsystem.py
+++ b/test/unittests/tools/microsoft/test_subsystem.py
@@ -3,7 +3,7 @@ import textwrap
 import pytest
 
 from conan.tools.microsoft import unix_path, unix_path_package_info_legacy
-from conans.model.conf import ConfDefinition
+from conan.internal.model.conf import ConfDefinition
 from conan.test.utils.mocks import MockSettings, ConanFileMock
 
 expected_results = [
diff --git a/test/unittests/util/detect_test.py b/test/unittests/util/detect_test.py
index 654a27c75..943ed8470 100644
--- a/test/unittests/util/detect_test.py
+++ b/test/unittests/util/detect_test.py
@@ -7,7 +7,7 @@ from parameterized import parameterized
 
 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.internal.model.version import Version
 from conan.test.utils.mocks import RedirectedTestOutput
 from conan.test.utils.tools import redirect_output
 from conan.test.utils.env import environment_update
diff --git a/test/unittests/util/files/strip_root_extract_test.py b/test/unittests/util/files/strip_root_extract_test.py
index cdbdb7b4a..3f8746b99 100644
--- a/test/unittests/util/files/strip_root_extract_test.py
+++ b/test/unittests/util/files/strip_root_extract_test.py
@@ -5,7 +5,7 @@ import zipfile
 
 from conan.tools.files.files import untargz, unzip
 from conan.errors import ConanException
-from conans.model.manifest import gather_files
+from conan.internal.model.manifest import gather_files
 from conan.test.utils.mocks import ConanFileMock
 from conan.test.utils.mocks import RedirectedTestOutput
 from conan.test.utils.test_files import temp_folder
diff --git a/test/unittests/util/tools_test.py b/test/unittests/util/tools_test.py
index 7581d6128..a7c14476a 100644
--- a/test/unittests/util/tools_test.py
+++ b/test/unittests/util/tools_test.py
@@ -6,8 +6,8 @@ import unittest
 import pytest
 
 from conan.tools.files import replace_in_file, collect_libs
-from conans.model.build_info import CppInfo
-from conans.model.layout import Infos
+from conan.internal.model.cpp_info import CppInfo
+from conan.internal.model.layout import Infos
 from conan.test.utils.mocks import ConanFileMock, RedirectedTestOutput
 from conan.test.utils.test_files import temp_folder
 from conan.test.utils.tools import redirect_output