bpo-45124: Remove the bdist_msi command (GH-28195)

The bdist_msi command, deprecated in Python 3.9, is now removed.
Use bdist_wheel (wheel packages) instead.
This commit is contained in:
Hugo van Kemenade 2021-09-07 13:34:27 +03:00 committed by GitHub
parent 533e725821
commit eb254b43d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 18 additions and 822 deletions

View file

@ -18,13 +18,12 @@ class BuildTestCase(support.TempdirManager,
# we can set the format
dist = self.create_dist()[1]
cmd = bdist(dist)
cmd.formats = ['msi']
cmd.formats = ['tar']
cmd.ensure_finalized()
self.assertEqual(cmd.formats, ['msi'])
self.assertEqual(cmd.formats, ['tar'])
# what formats does bdist offer?
formats = ['bztar', 'gztar', 'msi', 'rpm', 'tar',
'xztar', 'zip', 'ztar']
formats = ['bztar', 'gztar', 'rpm', 'tar', 'xztar', 'zip', 'ztar']
found = sorted(cmd.format_command)
self.assertEqual(found, formats)
@ -36,11 +35,7 @@ class BuildTestCase(support.TempdirManager,
cmd.ensure_finalized()
dist.command_obj['bdist'] = cmd
names = ['bdist_dumb'] # bdist_rpm does not support --skip-build
if os.name == 'nt':
names.append('bdist_msi')
for name in names:
for name in ['bdist_dumb']: # bdist_rpm does not support --skip-build
subcmd = cmd.get_finalized_command(name)
if getattr(subcmd, '_unsupported', False):
# command is not supported on this build
@ -52,5 +47,6 @@ class BuildTestCase(support.TempdirManager,
def test_suite():
return unittest.makeSuite(BuildTestCase)
if __name__ == '__main__':
run_unittest(test_suite())

View file

@ -1,27 +0,0 @@
"""Tests for distutils.command.bdist_msi."""
import sys
import unittest
from test.support import run_unittest
from test.support.warnings_helper import check_warnings
from distutils.tests import support
@unittest.skipUnless(sys.platform == 'win32', 'these tests require Windows')
class BDistMSITestCase(support.TempdirManager,
support.LoggingSilencer,
unittest.TestCase):
def test_minimal(self):
# minimal test XXX need more tests
from distutils.command.bdist_msi import bdist_msi
project_dir, dist = self.create_dist()
with check_warnings(("", DeprecationWarning)):
cmd = bdist_msi(dist)
cmd.ensure_finalized()
def test_suite():
return unittest.makeSuite(BDistMSITestCase)
if __name__ == '__main__':
run_unittest(test_suite())