1313from . import _path
1414from ._path import FilesSpec
1515from .compat .py312 import import_helper
16+ from .compat .py314 import frozendict
1617
1718
1819@contextlib .contextmanager
@@ -70,7 +71,7 @@ def setUp(self):
7071
7172
7273class DistInfoPkg (OnSysPath , SiteBuilder ):
73- files : FilesSpec = {
74+ files : FilesSpec = frozendict ( {
7475 "distinfo_pkg-1.0.0.dist-info" : {
7576 "METADATA" : """
7677 Name: distinfo-pkg
@@ -94,7 +95,7 @@ class DistInfoPkg(OnSysPath, SiteBuilder):
9495 def main():
9596 print("hello world")
9697 """ ,
97- }
98+ })
9899
99100 def make_uppercase (self ):
100101 """
@@ -113,7 +114,7 @@ class DistInfoPkgEditable(DistInfoPkg):
113114 """
114115
115116 some_hash = '524127ce937f7cb65665130c695abd18ca386f60bb29687efb976faa1596fdcc'
116- files : FilesSpec = {
117+ files : FilesSpec = frozendict ( {
117118 'distinfo_pkg-1.0.0.dist-info' : {
118119 'direct_url.json' : json .dumps ({
119120 "archive_info" : {
@@ -123,22 +124,22 @@ class DistInfoPkgEditable(DistInfoPkg):
123124 "url" : "file:///path/to/distinfo_pkg-1.0.0.editable-py3-none-any.whl" ,
124125 })
125126 },
126- }
127+ })
127128
128129
129130class DistInfoPkgWithDot (OnSysPath , SiteBuilder ):
130- files : FilesSpec = {
131+ files : FilesSpec = frozendict ( {
131132 "pkg_dot-1.0.0.dist-info" : {
132133 "METADATA" : """
133134 Name: pkg.dot
134135 Version: 1.0.0
135136 """ ,
136137 },
137- }
138+ })
138139
139140
140141class DistInfoPkgWithDotLegacy (OnSysPath , SiteBuilder ):
141- files : FilesSpec = {
142+ files : FilesSpec = frozendict ( {
142143 "pkg.dot-1.0.0.dist-info" : {
143144 "METADATA" : """
144145 Name: pkg.dot
@@ -151,15 +152,15 @@ class DistInfoPkgWithDotLegacy(OnSysPath, SiteBuilder):
151152 Version: 1.0.0
152153 """ ,
153154 },
154- }
155+ })
155156
156157
157158class DistInfoPkgOffPath (SiteBuilder ):
158159 files = DistInfoPkg .files
159160
160161
161162class EggInfoPkg (OnSysPath , SiteBuilder ):
162- files : FilesSpec = {
163+ files : FilesSpec = frozendict ( {
163164 "egginfo_pkg.egg-info" : {
164165 "PKG-INFO" : """
165166 Name: egginfo-pkg
@@ -191,11 +192,11 @@ class EggInfoPkg(OnSysPath, SiteBuilder):
191192 def main():
192193 print("hello world")
193194 """ ,
194- }
195+ })
195196
196197
197198class EggInfoPkgPipInstalledNoToplevel (OnSysPath , SiteBuilder ):
198- files : FilesSpec = {
199+ files : FilesSpec = frozendict ( {
199200 "egg_with_module_pkg.egg-info" : {
200201 "PKG-INFO" : "Name: egg_with_module-pkg" ,
201202 # SOURCES.txt is made from the source archive, and contains files
@@ -222,11 +223,11 @@ class EggInfoPkgPipInstalledNoToplevel(OnSysPath, SiteBuilder):
222223 def main():
223224 print("hello world")
224225 """ ,
225- }
226+ })
226227
227228
228229class EggInfoPkgPipInstalledExternalDataFiles (OnSysPath , SiteBuilder ):
229- files : FilesSpec = {
230+ files : FilesSpec = frozendict ( {
230231 "egg_with_module_pkg.egg-info" : {
231232 "PKG-INFO" : "Name: egg_with_module-pkg" ,
232233 # SOURCES.txt is made from the source archive, and contains files
@@ -256,11 +257,11 @@ class EggInfoPkgPipInstalledExternalDataFiles(OnSysPath, SiteBuilder):
256257 def main():
257258 print("hello world")
258259 """ ,
259- }
260+ })
260261
261262
262263class EggInfoPkgPipInstalledNoModules (OnSysPath , SiteBuilder ):
263- files : FilesSpec = {
264+ files : FilesSpec = frozendict ( {
264265 "egg_with_no_modules_pkg.egg-info" : {
265266 "PKG-INFO" : "Name: egg_with_no_modules-pkg" ,
266267 # SOURCES.txt is made from the source archive, and contains files
@@ -282,11 +283,11 @@ class EggInfoPkgPipInstalledNoModules(OnSysPath, SiteBuilder):
282283 # top_level.txt correctly reflects that no modules are installed
283284 "top_level.txt" : b"\n " ,
284285 },
285- }
286+ })
286287
287288
288289class EggInfoPkgSourcesFallback (OnSysPath , SiteBuilder ):
289- files : FilesSpec = {
290+ files : FilesSpec = frozendict ( {
290291 "sources_fallback_pkg.egg-info" : {
291292 "PKG-INFO" : "Name: sources_fallback-pkg" ,
292293 # SOURCES.txt is made from the source archive, and contains files
@@ -304,11 +305,11 @@ class EggInfoPkgSourcesFallback(OnSysPath, SiteBuilder):
304305 def main():
305306 print("hello world")
306307 """ ,
307- }
308+ })
308309
309310
310311class EggInfoFile (OnSysPath , SiteBuilder ):
311- files : FilesSpec = {
312+ files : FilesSpec = frozendict ( {
312313 "egginfo_file.egg-info" : """
313314 Metadata-Version: 1.0
314315 Name: egginfo_file
@@ -321,7 +322,7 @@ class EggInfoFile(OnSysPath, SiteBuilder):
321322 Description: UNKNOWN
322323 Platform: UNKNOWN
323324 """ ,
324- }
325+ })
325326
326327
327328# dedent all text strings before writing
0 commit comments