mirror of
https://github.com/python/cpython.git
synced 2025-09-15 13:16:12 +00:00
Removed uses of dict.has_key() from distutils, and uses of
callable() from copy_reg.py, so the interpreter now starts up without warnings when '-3' is given. More work like this needs to be done in the rest of the stdlib.
This commit is contained in:
parent
b5e2684a1a
commit
8bc0965adf
17 changed files with 44 additions and 39 deletions
|
@ -101,9 +101,9 @@ def setup (**attrs):
|
|||
else:
|
||||
klass = Distribution
|
||||
|
||||
if not attrs.has_key('script_name'):
|
||||
if 'script_name' not in attrs:
|
||||
attrs['script_name'] = os.path.basename(sys.argv[0])
|
||||
if not attrs.has_key('script_args'):
|
||||
if 'script_args' not in attrs:
|
||||
attrs['script_args'] = sys.argv[1:]
|
||||
|
||||
# Create the Distribution instance, using the remaining arguments
|
||||
|
@ -111,7 +111,7 @@ def setup (**attrs):
|
|||
try:
|
||||
_setup_distribution = dist = klass(attrs)
|
||||
except DistutilsSetupError, msg:
|
||||
if attrs.has_key('name'):
|
||||
if 'name' in attrs:
|
||||
raise SystemExit, "error in %s setup command: %s" % \
|
||||
(attrs['name'], msg)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue