Skip to content

Commit

Permalink
Mark use of format_commands.append as deprecated. Ref anxuae/setuptoo…
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Aug 3, 2022
1 parent 07ffb8f commit 274758f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions distutils/command/bdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
distribution)."""

import os
import warnings

from distutils.core import Command
from distutils.errors import DistutilsPlatformError, DistutilsOptionError
from distutils.util import get_platform
Expand All @@ -23,7 +25,11 @@ def show_formats():
class ListCompat(dict):
# adapter to allow for Setuptools compatibility in format_commands
def append(self, item):
return
warnings.warn(
"""format_commands is now a dict. append is deprecated.""",
DeprecationWarning,
stacklevel=2,
)


class bdist(Command):
Expand Down Expand Up @@ -85,7 +91,7 @@ class bdist(Command):
}
)

# for compatibility until Setuptools references only format_commands
# for compatibility until consumers only reference format_commands
format_command = format_commands

def initialize_options(self):
Expand Down

0 comments on commit 274758f

Please sign in to comment.