[Python-checkins] distutils2: Remove deprecated code o/
tarek.ziade
python-checkins at python.org
Sun Dec 26 14:21:45 CET 2010
tarek.ziade pushed 3e0ea70bb662 to distutils2:
http://hg.python.org/distutils2/rev/3e0ea70bb662
changeset: 844:3e0ea70bb662
parent: 842:d3c6afbb4629
user: ?ric Araujo <merwok at netwok.org>
date: Fri Nov 26 03:54:59 2010 +0100
summary:
Remove deprecated code o/
files:
distutils2/command/register.py
distutils2/compiler/cygwinccompiler.py
distutils2/tests/test_cygwinccompiler.py
diff --git a/distutils2/command/register.py b/distutils2/command/register.py
--- a/distutils2/command/register.py
+++ b/distutils2/command/register.py
@@ -11,7 +11,6 @@
import urlparse
import StringIO
import logging
-from warnings import warn
from distutils2.command.cmd import Command
from distutils2 import logger
@@ -33,25 +32,19 @@
"stop the registration if the metadata is not fully compliant")
]
- boolean_options = ['show-response', 'verify', 'list-classifiers',
- 'strict']
+ boolean_options = ['show-response', 'list-classifiers', 'strict']
def initialize_options(self):
self.repository = None
self.realm = None
self.show_response = 0
self.list_classifiers = 0
- self.strict = 0
def finalize_options(self):
if self.repository is None:
self.repository = DEFAULT_REPOSITORY
if self.realm is None:
self.realm = DEFAULT_REALM
- # setting options for the `check` subcommand
- check_options = {'strict': ('register', self.strict),
- 'all': ('register', 1)}
- self.distribution.command_options['check'] = check_options
def run(self):
self.finalize_options()
@@ -67,16 +60,6 @@
else:
self.send_metadata()
- def check_metadata(self):
- """Deprecated API."""
- warn("distutils.command.register.check_metadata is deprecated, \
- use the check command instead", PendingDeprecationWarning)
- check = self.distribution.get_command_obj('check')
- check.ensure_finalized()
- check.strict = self.strict
- check.all = 1
- check.run()
-
def _set_config(self):
''' Reads the configuration file and set attributes.
'''
diff --git a/distutils2/compiler/cygwinccompiler.py b/distutils2/compiler/cygwinccompiler.py
--- a/distutils2/compiler/cygwinccompiler.py
+++ b/distutils2/compiler/cygwinccompiler.py
@@ -358,27 +358,3 @@
except IOError, exc:
return (CONFIG_H_UNCERTAIN,
"couldn't read '%s': %s" % (fn, exc.strerror))
-
-class _Deprecated_SRE_Pattern(object):
- def __init__(self, pattern):
- self.pattern = pattern
-
- def __getattr__(self, name):
- if name in ('findall', 'finditer', 'match', 'scanner', 'search',
- 'split', 'sub', 'subn'):
- warn("'distutils.cygwinccompiler.RE_VERSION' is deprecated "
- "and will be removed in the next version", DeprecationWarning)
- return getattr(self.pattern, name)
-
-RE_VERSION = _Deprecated_SRE_Pattern(re.compile('(\d+\.\d+(\.\d+)*)'))
-
-def get_versions():
- """ Try to find out the versions of gcc, ld and dllwrap.
-
- If not possible it returns None for it.
- """
- warn("'distutils.cygwinccompiler.get_versions' is deprecated "
- "use 'distutils.util.get_compiler_versions' instead",
- DeprecationWarning)
-
- return get_compiler_versions()
diff --git a/distutils2/tests/test_cygwinccompiler.py b/distutils2/tests/test_cygwinccompiler.py
--- a/distutils2/tests/test_cygwinccompiler.py
+++ b/distutils2/tests/test_cygwinccompiler.py
@@ -8,10 +8,9 @@
from distutils2.tests import captured_stdout
from distutils2.compiler import cygwinccompiler
-from distutils2.compiler.cygwinccompiler import (CygwinCCompiler, check_config_h,
- CONFIG_H_OK, CONFIG_H_NOTOK,
- CONFIG_H_UNCERTAIN, get_versions,
- get_msvcr, RE_VERSION)
+from distutils2.compiler.cygwinccompiler import (
+ CygwinCCompiler, check_config_h, get_msvcr,
+ CONFIG_H_OK, CONFIG_H_NOTOK, CONFIG_H_UNCERTAIN)
from distutils2.util import get_compiler_versions
from distutils2.tests import unittest, support
--
Repository URL: http://hg.python.org/distutils2
More information about the Python-checkins
mailing list