From 292d21ca867c469bd1d69f9144152e8cc95f99d1 Mon Sep 17 00:00:00 2001 From: Mikhail Korobov Date: Wed, 1 Jan 2014 11:52:07 +0600 Subject: [PATCH] spelling: instanciated -> instantiated --- scrapy/contrib/loader/__init__.py | 2 +- scrapy/selector/lxmlsel.py | 6 +++--- scrapy/tests/test_utils_deprecate.py | 2 +- scrapy/utils/deprecate.py | 6 +++--- sep/sep-001.trac | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/scrapy/contrib/loader/__init__.py b/scrapy/contrib/loader/__init__.py index 2a15661b3..331443854 100644 --- a/scrapy/contrib/loader/__init__.py +++ b/scrapy/contrib/loader/__init__.py @@ -170,7 +170,7 @@ class XPathItemLoader(ItemLoader): def __init__(self, *a, **kw): import warnings from scrapy.exceptions import ScrapyDeprecationWarning - warnings.warn('%s is deprecated, instanciate scrapy.contrib.loader.ItemLoader ' + warnings.warn('%s is deprecated, instantiate scrapy.contrib.loader.ItemLoader ' 'instead' % type(self).__name__, category=ScrapyDeprecationWarning, stacklevel=1) super(XPathItemLoader, self).__init__(*a, **kw) diff --git a/scrapy/selector/lxmlsel.py b/scrapy/selector/lxmlsel.py index de897d2fd..ca56829f8 100644 --- a/scrapy/selector/lxmlsel.py +++ b/scrapy/selector/lxmlsel.py @@ -15,14 +15,14 @@ class XPathSelector(Selector): def __init__(self, *a, **kw): import warnings from scrapy.exceptions import ScrapyDeprecationWarning - warnings.warn('%s is deprecated, instanciate scrapy.selector.Selector ' + warnings.warn('%s is deprecated, instantiate scrapy.selector.Selector ' 'instead' % type(self).__name__, category=ScrapyDeprecationWarning, stacklevel=1) super(XPathSelector, self).__init__(*a, **kw) def css(self, *a, **kw): raise RuntimeError('.css() method not available for %s, ' - 'instanciate scrapy.selector.Selector ' + 'instantiate scrapy.selector.Selector ' 'instead' % type(self).__name__) @@ -41,7 +41,7 @@ class XPathSelectorList(SelectorList): def __init__(self, *a, **kw): import warnings from scrapy.exceptions import ScrapyDeprecationWarning - warnings.warn('XPathSelectorList is deprecated, instanciate ' + warnings.warn('XPathSelectorList is deprecated, instantiate ' 'scrapy.selector.SelectorList instead', category=ScrapyDeprecationWarning, stacklevel=1) super(XPathSelectorList, self).__init__(*a, **kw) diff --git a/scrapy/tests/test_utils_deprecate.py b/scrapy/tests/test_utils_deprecate.py index 4e95069e5..35aae8335 100644 --- a/scrapy/tests/test_utils_deprecate.py +++ b/scrapy/tests/test_utils_deprecate.py @@ -59,7 +59,7 @@ class WarnWhenSubclassedTest(unittest.TestCase): self.assertEqual( str(msg.message), "scrapy.tests.test_utils_deprecate.Deprecated is deprecated, " - "instanciate scrapy.tests.test_utils_deprecate.NewName instead." + "instantiate scrapy.tests.test_utils_deprecate.NewName instead." ) self.assertEqual(msg.lineno, lineno) diff --git a/scrapy/utils/deprecate.py b/scrapy/utils/deprecate.py index 7a0098ddf..20f4f1796 100644 --- a/scrapy/utils/deprecate.py +++ b/scrapy/utils/deprecate.py @@ -18,12 +18,12 @@ def create_deprecated_class(name, new_class, clsdict=None, "deprecated class {old}, please inherit "\ "from {new}.", instance_warn_message="{cls} is deprecated, "\ - "instanciate {new} instead."): + "instantiate {new} instead."): """ Return a "deprecated" class that causes its subclasses to issue a warning. Subclasses of ``new_class`` are considered subclasses of this class. - It also warns when the deprecated class is instanciated, but do not when - its subclasses are instanciated. + It also warns when the deprecated class is instantiated, but do not when + its subclasses are instantiated. It can be used to rename a base class in a library. For example, if we have diff --git a/sep/sep-001.trac b/sep/sep-001.trac index a56c78510..d18735da6 100644 --- a/sep/sep-001.trac +++ b/sep/sep-001.trac @@ -26,7 +26,7 @@ This page shows different usage scenarios for the two new proposed API for popul * {{{__setitem__(field_name, selector_or_value)}}} * set field value * {{{__getitem__(field_name)}}} - * return the "computed" value of a field (the one that would be set to the item). returns None if not set. + * return the "computed" value of a field (the one that would be set to the item). returns None if not set. * {{{get_item()}}} * return the item populated with the data provided so far @@ -39,7 +39,7 @@ This page shows different usage scenarios for the two new proposed API for popul * {{{replace_value(field_name, selector_or_value, **adaptor_args)}}} * replace existing field value * {{{get_value(field_name)}}} - * return the "computed" value of a field (the one that would be set to the item). returns None if not set. + * return the "computed" value of a field (the one that would be set to the item). returns None if not set. * {{{get_item()}}} * return the item populated with the data provided so far @@ -192,7 +192,7 @@ il.add_value('headline', x.x('//h1[@class="headline"]')) {{{ #!python -# Only approach is passing arguments when instanciating the form +# Only approach is passing arguments when instantiating the form ia = NewsForm(response, default_unit='cm') ia['width'] = x.x('//p[@class="width"]') }}}