Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

removed handling of iterables in plugin_pool.register_plugin and plug…

…in_pool.unregister_plugin
  • Loading branch information...
commit 989354e5020e932526f6f6a5ca987679d722b6c3 1 parent dc363d7
@piquadrat piquadrat authored
Showing with 12 additions and 10 deletions.
  1. +0 −10 cms/plugin_pool.py
  2. +12 −0 docs/upgrade/2.3.rst
View
10 cms/plugin_pool.py
@@ -25,11 +25,6 @@ def register_plugin(self, plugin):
If a plugin is already registered, this will raise PluginAlreadyRegistered.
"""
- if hasattr(plugin,'__iter__'):
- warnings.warn("Registering more than one plugin at once will be deprecated in 2.3", DeprecationWarning)
- for single_plugin in plugin:
- self.register_plugin(single_plugin)
- return
if not issubclass(plugin, CMSPluginBase):
raise ImproperlyConfigured(
"CMS Plugins must be subclasses of CMSPluginBase, %r is not."
@@ -60,11 +55,6 @@ def unregister_plugin(self, plugin):
If a plugin isn't already registered, this will raise PluginNotRegistered.
"""
- if hasattr(plugin,'__iter__'):
- warnings.warn("Unregistering more than one plugin at once will be deprecated in 2.3", DeprecationWarning)
- for single_plugin in plugin:
- self.unregister_plugin(single_plugin)
- return
plugin_name = plugin.__name__
if plugin_name not in self.plugins:
raise PluginNotRegistered(
View
12 docs/upgrade/2.3.rst
@@ -78,6 +78,18 @@ New minimum requirements for dependencies
* ``django-reversion`` must now be at version 1.6
* ``django-sekizai`` must be at least at version 0.6.1
+Registering a list of plugins in the plugin pool
+================================================
+This feature was deprecated in version 2.2 and removed in 2.3. Code like this
+will not work anymore::
+
+ plugin_pool.register_plugin([FooPlugin, BarPlugin])
+
+Instead, use multiple calls to ``register_plugin``::
+
+ plugin_pool.register_plugin(FooPlugin)
+ plugin_pool.register_plugin(BarPlugin)
+
********************
Pending deprecations
Please sign in to comment.
Something went wrong with that request. Please try again.