21
21
from poetry .plugins .plugin_manager import PluginManager
22
22
from poetry .poetry import Poetry
23
23
from poetry .toml .file import TOMLFile
24
+ from poetry .utils .cache import ArtifactCache
24
25
25
26
26
27
if TYPE_CHECKING :
@@ -118,7 +119,7 @@ def get_package(cls, name: str, version: str) -> ProjectPackage:
118
119
@classmethod
119
120
def create_pool (
120
121
cls ,
121
- auth_config : Config ,
122
+ config : Config ,
122
123
sources : Iterable [dict [str , Any ]] = (),
123
124
io : IO | None = None ,
124
125
disable_cache : bool = False ,
@@ -132,11 +133,13 @@ def create_pool(
132
133
if disable_cache :
133
134
logger .debug ("Disabling source caches" )
134
135
135
- pool = RepositoryPool ()
136
+ pool = RepositoryPool (
137
+ artifact_cache = ArtifactCache (cache_dir = config .artifacts_cache_directory )
138
+ )
136
139
137
140
for source in sources :
138
141
repository = cls .create_package_source (
139
- source , auth_config , disable_cache = disable_cache
142
+ source , config , disable_cache = disable_cache
140
143
)
141
144
priority = Priority [source .get ("priority" , Priority .PRIMARY .name ).upper ()]
142
145
if "default" in source or "secondary" in source :
@@ -184,7 +187,7 @@ def create_pool(
184
187
185
188
@classmethod
186
189
def create_package_source (
187
- cls , source : dict [str , str ], auth_config : Config , disable_cache : bool = False
190
+ cls , source : dict [str , str ], config : Config , disable_cache : bool = False
188
191
) -> LegacyRepository :
189
192
from poetry .repositories .legacy_repository import LegacyRepository
190
193
from poetry .repositories .single_page_repository import SinglePageRepository
@@ -206,7 +209,7 @@ def create_package_source(
206
209
return repository_class (
207
210
name ,
208
211
url ,
209
- config = auth_config ,
212
+ config = config ,
210
213
disable_cache = disable_cache ,
211
214
)
212
215
0 commit comments