2525 remove_readonly_exc ,
2626)
2727from setuptools .extern .packaging import tags
28- from setuptools .extern .wheel .wheelfile import WheelFile
2928
3029DEFAULT_FILES = {
3130 "dummy_dist-1.0.dist-info/top_level.txt" ,
@@ -170,7 +169,7 @@ def test_licenses_default(dummy_dist, monkeypatch, tmp_path):
170169 str (tmp_path ),
171170 "--universal" ,
172171 ])
173- with WheelFile ("dist/dummy_dist-1.0-py2.py3-none-any.whl" ) as wf :
172+ with ZipFile ("dist/dummy_dist-1.0-py2.py3-none-any.whl" ) as wf :
174173 license_files = {
175174 "dummy_dist-1.0.dist-info/" + fname for fname in DEFAULT_LICENSE_FILES
176175 }
@@ -190,7 +189,7 @@ def test_licenses_deprecated(dummy_dist, monkeypatch, tmp_path):
190189 str (tmp_path ),
191190 "--universal" ,
192191 ])
193- with WheelFile ("dist/dummy_dist-1.0-py2.py3-none-any.whl" ) as wf :
192+ with ZipFile ("dist/dummy_dist-1.0-py2.py3-none-any.whl" ) as wf :
194193 license_files = {"dummy_dist-1.0.dist-info/DUMMYFILE" }
195194 assert set (wf .namelist ()) == DEFAULT_FILES | license_files
196195
@@ -219,7 +218,7 @@ def test_licenses_override(dummy_dist, monkeypatch, tmp_path, config_file, confi
219218 str (tmp_path ),
220219 "--universal" ,
221220 ])
222- with WheelFile ("dist/dummy_dist-1.0-py2.py3-none-any.whl" ) as wf :
221+ with ZipFile ("dist/dummy_dist-1.0-py2.py3-none-any.whl" ) as wf :
223222 license_files = {
224223 "dummy_dist-1.0.dist-info/" + fname for fname in {"DUMMYFILE" , "LICENSE" }
225224 }
@@ -239,7 +238,7 @@ def test_licenses_disabled(dummy_dist, monkeypatch, tmp_path):
239238 str (tmp_path ),
240239 "--universal" ,
241240 ])
242- with WheelFile ("dist/dummy_dist-1.0-py2.py3-none-any.whl" ) as wf :
241+ with ZipFile ("dist/dummy_dist-1.0-py2.py3-none-any.whl" ) as wf :
243242 assert set (wf .namelist ()) == DEFAULT_FILES
244243
245244
@@ -254,7 +253,7 @@ def test_build_number(dummy_dist, monkeypatch, tmp_path):
254253 "--universal" ,
255254 "--build-number=2" ,
256255 ])
257- with WheelFile ("dist/dummy_dist-1.0-2-py2.py3-none-any.whl" ) as wf :
256+ with ZipFile ("dist/dummy_dist-1.0-2-py2.py3-none-any.whl" ) as wf :
258257 filenames = set (wf .namelist ())
259258 assert "dummy_dist-1.0.dist-info/RECORD" in filenames
260259 assert "dummy_dist-1.0.dist-info/METADATA" in filenames
@@ -307,7 +306,7 @@ def test_compression(dummy_dist, monkeypatch, tmp_path, option, compress_type):
307306 "--universal" ,
308307 f"--compression={ option } " ,
309308 ])
310- with WheelFile ("dist/dummy_dist-1.0-py2.py3-none-any.whl" ) as wf :
309+ with ZipFile ("dist/dummy_dist-1.0-py2.py3-none-any.whl" ) as wf :
311310 filenames = set (wf .namelist ())
312311 assert "dummy_dist-1.0.dist-info/RECORD" in filenames
313312 assert "dummy_dist-1.0.dist-info/METADATA" in filenames
@@ -317,7 +316,7 @@ def test_compression(dummy_dist, monkeypatch, tmp_path, option, compress_type):
317316
318317def test_wheelfile_line_endings (wheel_paths ):
319318 for path in wheel_paths :
320- with WheelFile (path ) as wf :
319+ with ZipFile (path ) as wf :
321320 wheelfile = next (fn for fn in wf .filelist if fn .filename .endswith ("WHEEL" ))
322321 wheelfile_contents = wf .read (wheelfile )
323322 assert b"\r " not in wheelfile_contents
0 commit comments