Hello community,

here is the log from the commit of package python-Yapsy for openSUSE:Factory 
checked in at 2019-07-30 12:38:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Yapsy (Old)
 and      /work/SRC/openSUSE:Factory/.python-Yapsy.new.4126 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-Yapsy"

Tue Jul 30 12:38:03 2019 rev:4 rq:719618 version:1.12.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Yapsy/python-Yapsy.changes        
2019-07-26 12:42:12.237859736 +0200
+++ /work/SRC/openSUSE:Factory/.python-Yapsy.new.4126/python-Yapsy.changes      
2019-07-30 12:38:04.926944444 +0200
@@ -1,0 +2,6 @@
+Mon Jul 29 14:17:06 UTC 2019 - pgaj...@suse.com
+
+- version update to 1.12.2
+  * no upstream change log
+
+-------------------------------------------------------------------

Old:
----
  Yapsy-1.12.0.tar.gz

New:
----
  Yapsy-1.12.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-Yapsy.spec ++++++
--- /var/tmp/diff_new_pack.AemBzY/_old  2019-07-30 12:38:06.226944279 +0200
+++ /var/tmp/diff_new_pack.AemBzY/_new  2019-07-30 12:38:06.230944278 +0200
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-Yapsy
-Version:        1.12.0
+Version:        1.12.2
 Release:        0
 Summary:        Yet another plugin system
 License:        BSD-2-Clause

++++++ Yapsy-1.12.0.tar.gz -> Yapsy-1.12.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Yapsy-1.12.0/CHANGELOG.txt 
new/Yapsy-1.12.2/CHANGELOG.txt
--- old/Yapsy-1.12.0/CHANGELOG.txt      2015-09-12 15:09:22.000000000 +0200
+++ new/Yapsy-1.12.2/CHANGELOG.txt      2018-09-18 21:57:52.000000000 +0200
@@ -1,3 +1,17 @@
+version-1.12.0 [2018-09-02]
+  - code: fix yapsy on python3.6
+  - code: Make the test more robust to "unusual" unpacking of the module (see: 
https://sourceforge.net/p/yapsy/bugs/32/)
+  - code: Protect against providing a single string to setPluginPlaces (see: 
https://sourceforge.net/p/yapsy/bugs/38/)
+  - code: Enforce the exact directory list provided at construction time (see: 
https://sourceforge.net/p/yapsy/bugs/36/)
+  - code: Make multiprocess plugin work on windows too ! (see: 
https://sourceforge.net/p/yapsy/bugs/33/)
+  - code: add a filter-based getter selecting plugins on plugininfo properties 
(see: https://sourceforge.net/p/yapsy/feature-requests/16/)
+  - code: Add callback_after argument to the LoadPlugins method in 
PluginManager (contrib https://sourceforge.net/p/yapsy/feature-requests/9/)
+  - code: Rejecting a candidate should not be a warning (contrib Guillaume 
Binet:  https://github.com/tibonihoo/yapsy/pull/7)
+  - code: fix PluginFileLocator __init__ should assignment of plugin_info_cls 
(contrib Xuecheng Zhang: https://github.com/tibonihoo/yapsy/pull/8)
+
+version-1.11.223 [2015-06-25]
+  - doc: minor doc fixes
+
 version-1.11.123 [2015-05-08]
 
   - code: Make _extractCorePluginInfo accept Unicode filenames (bug 
https://sourceforge.net/p/yapsy/bugs/30/)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Yapsy-1.12.0/PKG-INFO new/Yapsy-1.12.2/PKG-INFO
--- old/Yapsy-1.12.0/PKG-INFO   2018-09-02 18:41:16.000000000 +0200
+++ new/Yapsy-1.12.2/PKG-INFO   2019-07-27 19:51:14.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: Yapsy
-Version: 1.12.0
+Version: 1.12.2
 Summary: Yet another plugin system
 Home-page: http://yapsy.sourceforge.net
 Author: Thibauld Nion
@@ -41,7 +41,7 @@
           - Guillaume Binet (gbin)
           - Blake Oliver (Oliver2213)
           - Xuecheng Zhang (csuzhangxc)
-          
+          - Marc Brooks (mbrooks-public)
         
         
         Contributions are welcome as pull requests, patches or tickets on the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Yapsy-1.12.0/README.txt new/Yapsy-1.12.2/README.txt
--- old/Yapsy-1.12.0/README.txt 2018-09-02 18:13:44.000000000 +0200
+++ new/Yapsy-1.12.2/README.txt 2019-07-27 19:33:36.000000000 +0200
@@ -33,7 +33,7 @@
   - Guillaume Binet (gbin)
   - Blake Oliver (Oliver2213)
   - Xuecheng Zhang (csuzhangxc)
-  
+  - Marc Brooks (mbrooks-public)
 
 
 Contributions are welcome as pull requests, patches or tickets on the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Yapsy-1.12.0/Yapsy.egg-info/PKG-INFO 
new/Yapsy-1.12.2/Yapsy.egg-info/PKG-INFO
--- old/Yapsy-1.12.0/Yapsy.egg-info/PKG-INFO    2018-09-02 18:41:16.000000000 
+0200
+++ new/Yapsy-1.12.2/Yapsy.egg-info/PKG-INFO    2019-07-27 19:51:13.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: Yapsy
-Version: 1.12.0
+Version: 1.12.2
 Summary: Yet another plugin system
 Home-page: http://yapsy.sourceforge.net
 Author: Thibauld Nion
@@ -41,7 +41,7 @@
           - Guillaume Binet (gbin)
           - Blake Oliver (Oliver2213)
           - Xuecheng Zhang (csuzhangxc)
-          
+          - Marc Brooks (mbrooks-public)
         
         
         Contributions are welcome as pull requests, patches or tickets on the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Yapsy-1.12.0/Yapsy.egg-info/SOURCES.txt 
new/Yapsy-1.12.2/Yapsy.egg-info/SOURCES.txt
--- old/Yapsy-1.12.0/Yapsy.egg-info/SOURCES.txt 2018-09-02 18:41:16.000000000 
+0200
+++ new/Yapsy-1.12.2/Yapsy.egg-info/SOURCES.txt 2019-07-27 19:51:13.000000000 
+0200
@@ -91,4 +91,5 @@
 yapsy/PluginManagerDecorator.py
 yapsy/VersionedPluginManager.py
 yapsy/__init__.py
+yapsy/__init___flymake.py
 yapsy/compat.py
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Yapsy-1.12.0/doc/conf.py new/Yapsy-1.12.2/doc/conf.py
--- old/Yapsy-1.12.0/doc/conf.py        2015-09-12 15:09:22.000000000 +0200
+++ new/Yapsy-1.12.2/doc/conf.py        2019-07-27 18:27:24.000000000 +0200
@@ -41,7 +41,7 @@
 
 # General information about the project.
 project = 'Yapsy'
-copyright = '2007-2015, Thibauld Nion'
+copyright = '2007-2018, Thibauld Nion'
 
 # The version info for the project you're documenting, acts as replacement for
 # |version| and |release|, also used in various other places throughout the
@@ -135,7 +135,7 @@
 # Add any paths that contain custom static files (such as style sheets) here,
 # relative to this directory. They are copied after the builtin static files,
 # so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ['_static']
+html_static_path = []
 
 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
 # using the given strftime format.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Yapsy-1.12.0/yapsy/MultiprocessPluginManager.py 
new/Yapsy-1.12.2/yapsy/MultiprocessPluginManager.py
--- old/Yapsy-1.12.0/yapsy/MultiprocessPluginManager.py 2018-09-02 
17:52:22.000000000 +0200
+++ new/Yapsy-1.12.2/yapsy/MultiprocessPluginManager.py 2019-07-27 
18:21:18.000000000 +0200
@@ -49,13 +49,14 @@
                the ``MultiprocessPluginProxy`` class that hold the information
                about the child process and the pipe to communicate with it.
 
-               :warning: The plugin code should only use the pipe to
-               communicate with the rest of the applica`tion and should not
-               assume any kind of shared memory, not any specific functionality
-               of the `multiprocessing.Process` parent class (its behaviour is
-               different between platforms !)
+               .. warning:: 
+                   The plugin code should only use the pipe to
+                       communicate with the rest of the applica`tion and 
should not
+                       assume any kind of shared memory, not any specific 
functionality
+                       of the `multiprocessing.Process` parent class (its 
behaviour is
+                       different between platforms !)
                
-               See :doc:`IMultiprocessPlugin`
+               See ``IMultiprocessPlugin``.
                """
                if element is IMultiprocessChildPlugin:
                        # The following will keep retro compatibility for 
IMultiprocessChildPlugin
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Yapsy-1.12.0/yapsy/PluginInfo.py 
new/Yapsy-1.12.2/yapsy/PluginInfo.py
--- old/Yapsy-1.12.0/yapsy/PluginInfo.py        2017-01-29 20:58:27.000000000 
+0100
+++ new/Yapsy-1.12.2/yapsy/PluginInfo.py        2019-07-27 18:23:46.000000000 
+0200
@@ -29,27 +29,29 @@
        still be accessed though the ``details`` member variables that
        behaves like Python's ``ConfigParser.ConfigParser``.
 
-       Warning: the instance associated with the ``details`` member
-       variable is never copied and used to store all plugin infos. If
-       you set it to a custom instance, it will be modified as soon as
-       another member variale of the plugin info is
-       changed. Alternatively, if you change the instance "outside" the
-       plugin info, it will also change the plugin info.
-
+       .. warning:: 
+           The instance associated with the ``details`` member
+               variable is never copied and used to store all plugin infos. If
+               you set it to a custom instance, it will be modified as soon as
+               another member variale of the plugin info is
+               changed. Alternatively, if you change the instance "outside" the
+               plugin info, it will also change the plugin info.
+               
        Ctor Arguments:
 
-               *plugin_name* is  a simple string describing the name of
-         the plugin.
+       :plugin_name: is  a simple string describing the name of
+                     the plugin.
 
-               *plugin_path* describe the location where the plugin can be
-         found.
+       :plugin_path: describe the location where the plugin can be
+                  found.
                
-       .. warning:: The ``path`` attribute is the full path to the
-                    plugin if it is organised as a directory or the
-                    full path to a file without the ``.py`` extension
-                    if the plugin is defined by a simple file. In the
-                    later case, the actual plugin is reached via
-                    ``plugin_info.path+'.py'``.
+       .. warning:: 
+           The ``path`` attribute is the full path to the
+               plugin if it is organised as a directory or the
+               full path to a file without the ``.py`` extension
+               if the plugin is defined by a simple file. In the
+               later case, the actual plugin is reached via
+               ``plugin_info.path+'.py'``.
        """
        
        def __init__(self, plugin_name, plugin_path):
@@ -67,11 +69,12 @@
                """
                Fill in all details by storing a ``ConfigParser`` instance.
 
-               .. warning: The values for ``plugin_name`` and
-                           ``plugin_path`` given a init time will superseed
-                           any value found in ``cfDetails`` in section
-                           'Core' for the options 'Name' and 'Module' (this
-                           is mostly for backward compatibility).
+               .. warning:: 
+                   The values for ``plugin_name`` and
+                       ``plugin_path`` given a init time will superseed
+                       any value found in ``cfDetails`` in section
+                       'Core' for the options 'Name' and 'Module' (this
+                       is mostly for backward compatibility).
                """     
                bkp_name = self.name
                bkp_path = self.path
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Yapsy-1.12.0/yapsy/PluginManager.py 
new/Yapsy-1.12.2/yapsy/PluginManager.py
--- old/Yapsy-1.12.0/yapsy/PluginManager.py     2018-09-02 17:52:22.000000000 
+0200
+++ new/Yapsy-1.12.2/yapsy/PluginManager.py     2019-07-27 18:41:13.000000000 
+0200
@@ -128,7 +128,10 @@
 
 import sys
 import os
-import imp
+try:
+       import importlib.abc.Loader as imp
+except ImportError:
+       import imp
 
 from yapsy import log
 from yapsy import NormalizePluginNameForModuleName
@@ -296,10 +299,11 @@
                """
                Sets the strategy used to locate the basic information.
 
-               .. note: If a dir_list is provided it overrides the directory 
list
-               that may have been previously set in the locator.
+               .. note: 
+                   If a `dir_list` is provided it overrides the directory list
+                   that may have been previously set in the locator.
 
-               See ``IPluginLocator`` for the policy that plugin_locator must 
enforce.
+               See :doc:`IPluginLocator` for the policy that `plugin_locator` 
must enforce.
                """
                if isinstance(plugin_locator, IPluginLocator):
                        self._plugin_locator = plugin_locator
@@ -344,24 +348,28 @@
                content of the info file that describes it and which
                is stored in infoFileObject.
                
-               .. note:: Prefer using ``_gatherCorePluginInfo``
-               instead, whenever possible...
-               
-               .. warning:: ``infoFileObject`` must be a file-like
-               object: either an opened file for instance or a string
-               buffer wrapped in a StringIO instance as another
-               example.
-
-               .. note:: ``candidate_infofile`` must be provided
-               whenever possible to get better error messages.
+               .. note:: 
+                   Prefer using ``_gatherCorePluginInfo``
+                   instead, whenever possible...
+               
+               .. warning:: 
+                   ``infoFileObject`` must be a file-like
+                   object: either an opened file for instance or a string
+                       buffer wrapped in a StringIO instance as another
+                       example.
+
+               .. note:: 
+                   ``candidate_infofile`` must be provided
+                       whenever possible to get better error messages.
                        
                Return a 3-uple with the name of the plugin, its
                module and the config_parser used to gather the core
                data *in a tuple*, if the required info could be
                localised, else return ``(None,None,None)``.
 
-               .. note:: This is supposed to be used internally by subclasses
-               and decorators.
+               .. note:: 
+                   This is supposed to be used internally by subclasses
+                       and decorators.
                """
                return 
self.getPluginLocator().getPluginNameAndModuleFromStream(infoFileObject, 
candidate_infofile)
        
@@ -431,7 +439,7 @@
                Each possible plugin (ie a candidate) is described by a 3-uple:
                (info file path, python file path, plugin info instance)
 
-               .. warning: locatePlugins must be called before !
+               .. warning: ``locatePlugins`` must be called before !
                """
                if not hasattr(self, '_candidates'):
                        raise RuntimeError("locatePlugins must be called before 
getPluginCandidates")
@@ -444,7 +452,7 @@
                The candidate must be represented by the same tuple described
                in ``getPluginCandidates``.
 
-               .. warning: locatePlugins must be called before !
+               .. warning: ``locatePlugins`` must be called before !
                """
                if not hasattr(self, '_candidates'):
                        raise ValueError("locatePlugins must be called before 
removePluginCandidate")
@@ -457,7 +465,7 @@
                The candidate must be represented by the same tuple described
                in ``getPluginCandidates``.
 
-               .. warning: locatePlugins must be called before !
+               .. warning: ``locatePlugins`` must be called before !
                """
                if not hasattr(self, '_candidates'):
                        raise ValueError("locatePlugins must be called before 
removePluginCandidate")
@@ -566,7 +574,7 @@
                """
                Import a module, trying either to find it as a single file or 
as a directory.
 
-               :note: Isolated and provided to be reused, but not to be 
reimplemented !
+               .. note:: Isolated and provided to be reused, but not to be 
reimplemented !
                """
                # use imp to correctly load the plugin as a module
                if os.path.isdir(candidate_filepath):
@@ -580,20 +588,22 @@
                                                                                
 plugin_module_name, candidate_filepath):
                """Override this method to customize how plugins are 
instanciated.
                
-               :note: This methods recieves the 'element' that is a candidate
-               as the plugin's main file, but also enough information to reload
-               its containing module and this element.
+               .. note:: 
+                   This methods recieves the 'element' that is a candidate
+                   as the plugin's main file, but also enough information to 
reload
+                   its containing module and this element.
                """
                return self.instanciateElement(element)
        
        def instanciateElement(self, element):
                """
-               DEPRECATED(>1.11): reimplement instead 
`instanciateElementWithImportInfo` !
+               DEPRECATED(>1.11): reimplement instead 
``instanciateElementWithImportInfo`` !
                
                Override this method to customize how plugins are instanciated.
 
-               :warning: This method is called only if
-               `instanciateElementWithImportInfo` has not been reimplemented !
+               .. warning::
+                   This method is called only if
+                   ``instanciateElementWithImportInfo`` has not been 
reimplemented !
                """
                return element()
        
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Yapsy-1.12.0/yapsy/__init__.py 
new/Yapsy-1.12.2/yapsy/__init__.py
--- old/Yapsy-1.12.0/yapsy/__init__.py  2018-09-02 18:23:56.000000000 +0200
+++ new/Yapsy-1.12.2/yapsy/__init__.py  2019-07-27 19:47:36.000000000 +0200
@@ -52,7 +52,7 @@
 
 """
 
-__version__="1.12.0"
+__version__="1.12.2"
 
 # tell epydoc that the documentation is in the reStructuredText format
 __docformat__ = "restructuredtext en"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Yapsy-1.12.0/yapsy/__init___flymake.py 
new/Yapsy-1.12.2/yapsy/__init___flymake.py
--- old/Yapsy-1.12.0/yapsy/__init___flymake.py  1970-01-01 01:00:00.000000000 
+0100
+++ new/Yapsy-1.12.2/yapsy/__init___flymake.py  2019-07-27 19:47:40.000000000 
+0200
@@ -0,0 +1,97 @@
+# -*- coding: utf-8; tab-width: 4; indent-tabs-mode: t; python-indent: 4 -*-
+
+"""
+
+Overview
+========
+
+Yapsy's main purpose is to offer a way to easily design a plugin
+system in Python, and motivated by the fact that many other Python
+plugin system are either too complicated for a basic use or depend on
+a lot of libraries. Yapsy only depends on Python's standard library.
+
+|yapsy| basically defines two core classes:
+
+- a fully functional though very simple ``PluginManager`` class
+
+- an interface ``IPlugin`` which defines the interface of plugin
+  instances handled by the ``PluginManager``
+
+
+Getting started
+===============
+
+The basic classes defined by |yapsy| should work "as is" and enable
+you to load and activate your plugins. So that the following code
+should get you a fully working plugin management system::
+
+   from yapsy.PluginManager import PluginManager
+   
+   # Build the manager
+   simplePluginManager = PluginManager()
+   # Tell it the default place(s) where to find plugins
+   simplePluginManager.setPluginPlaces(["path/to/myplugins"])
+   # Load all plugins
+   simplePluginManager.collectPlugins()
+
+   # Activate all loaded plugins
+   for pluginInfo in simplePluginManager.getAllPlugins():
+      simplePluginManager.activatePluginByName(pluginInfo.name)
+
+
+.. note:: The ``plugin_info`` object (typically an instance of
+          ``IPlugin``) plays as *the entry point of each
+          plugin*. That's also where |yapsy| ceases to guide you: it's
+          up to you to define what your plugins can do and how you
+          want to talk to them ! Talking to your plugin will then look
+          very much like the following::
+
+             # Trigger 'some action' from the loaded plugins
+             for pluginInfo in simplePluginManager.getAllPlugins():
+                pluginInfo.plugin_object.doSomething(...)
+
+"""
+
+__version__="1.12.2"
+
+# tell epydoc that the documentation is in the reStructuredText format
+__docformat__ = "restructuredtext en"
+
+# provide a default named log for package-wide use
+import logging
+log = logging.getLogger('yapsy')
+
+# Some constants concerning the plugins
+PLUGIN_NAME_FORBIDEN_STRING=";;"
+"""
+.. warning:: This string (';;' by default) is forbidden in plugin
+             names, and will be usable to describe lists of plugins
+             for instance (see :doc:`ConfigurablePluginManager`)
+"""
+
+import re
+from yapsy.compat import is_py2, str
+
+if is_py2:
+       RE_NON_ALPHANUM = re.compile("\W", re.U)
+else:
+       RE_NON_ALPHANUM = re.compile("\W")
+
+
+def NormalizePluginNameForModuleName(pluginName):
+       """
+       Normalize a plugin name into a safer name for a module name.
+       
+       .. note:: may do a little more modifications than strictly
+                 necessary and is not optimized for speed.
+       """
+       if is_py2:
+               pluginName = str(pluginName, 'utf-8')
+       if len(pluginName)==0:
+               return "_"
+       if pluginName[0].isdigit():
+               pluginName = "_" + pluginName
+       ret = RE_NON_ALPHANUM.sub("_",pluginName)
+       if is_py2:
+               ret = ret.encode('utf-8')
+       return ret


Reply via email to