Skip to content

Commit

Permalink
Merge branch 'release/v0.5.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
daltonmatos committed Nov 6, 2012
2 parents cdaad7d + 012f5eb commit 2e4f8bd
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
12 changes: 12 additions & 0 deletions README.rst
Expand Up @@ -70,6 +70,18 @@ And an example of one such listener would be:
# Do something very useful! =)


New in version 0.5.2
********************

Fixes
-----

* Issue [#16](https://github.com/daltonmatos/plugnplay/issues/16) - [Python 3.2] Unable to install 0.5.1 via pip or setup.py
* Issue [#18](https://github.com/daltonmatos/plugnplay/issues/18) - Incompatibility with py3k filter() function




New in version 0.5.1
********************

Expand Down
8 changes: 5 additions & 3 deletions plugnplay/__init__.py
Expand Up @@ -6,7 +6,7 @@

from .manager import Manager

__version__ = "0.5.1"
__version__ = "0.5.2"

__all__ = ['Interface', 'Plugin']
PNP_SYS_MODULES_PREFIX = 'pnp'
Expand Down Expand Up @@ -39,7 +39,8 @@ class InterfaceMeta(type):

def __new__(metaclass, classname, bases, attrs):
new_class = super(InterfaceMeta, metaclass).__new__(metaclass, classname, bases, attrs)
for k, v in new_class.__dict__.iteritems():
for k in new_class.__dict__:
v = new_class.__dict__[k]
if _is_method(v):
setattr(new_class, k, classmethod(method_name(k)))

Expand Down Expand Up @@ -86,7 +87,8 @@ def set_plugin_dirs(*dirs):

def normalize_path(path):
if path:
parts = filter(None, path.replace('.', '').split('/'))
_parts = filter(None, path.replace('.', '').split('/'))
parts = [p for p in _parts] # Exhaust the generator, returned by py3k's filter() function
# Prefix all modules imported by plugnplay with a common value
return '.'.join([PNP_SYS_MODULES_PREFIX] + parts)
return None
Expand Down
2 changes: 0 additions & 2 deletions tests/loading.py
Expand Up @@ -64,11 +64,9 @@ def test_load_same_name_different_folders(self):
self.assertTrue(dir2_norm + '.otherplugin' in sys.modules)

mod1 = sys.modules[dir1_norm + '.otherplugin']
print mod1
self.assertTrue(mod1.MyPlugin.dir1)

mod2 = sys.modules[dir2_norm + '.otherplugin']
print mod2
self.assertTrue(mod2.MyPlugin.dir2)

def test_find_implementors_different_import(self):
Expand Down

0 comments on commit 2e4f8bd

Please sign in to comment.