Commits

holger krekel committed c5b20c2

don't use a __version__ default,
bump version to 1.1, add to CHANGELOG

Comments (0)

Files changed (4)

+1.1
+----------------------------------------
+
+- copy __doc__ and introduce a new argument to initpkg()
+  (thanks Ralf Schmitt)
+
+- don't use a "0" default for __version__
+
 1.0
 ----------------------------------------
 
 import sys
 from types import ModuleType
 
-__version__ = "1.0"
+__version__ = "1.1"
 
 def initpkg(pkgname, exportdefs, attr=dict()):
     """ initialize given package from the export definitions. """
     if f:
         f = os.path.abspath(f)
     d['__file__'] = f
-    d['__version__'] = getattr(oldmod, '__version__', '0')
+    if hasattr(oldmod, '__version__'):
+        d['__version__'] = oldmod.__version__
     if hasattr(oldmod, '__loader__'):
         d['__loader__'] = oldmod.__loader__
     if hasattr(oldmod, '__path__'):
     apipkg.initpkg('hello', {})
     newmod = sys.modules['hello']
     assert newmod.__file__ == None
-    assert newmod.__version__ == '0'
+    assert not hasattr(newmod, '__version__')
 
 def test_name_attribute():
     api = apipkg.ApiModule('name_test', {
 sdistsrc={distshare}/apipkg-*
 
 [testenv]
-commands=
-  py.test --junitxml={envlogdir}/junit-{envname}.xml []
-deps=
-    {distshare}/py-*
-
+commands=py.test --junitxml={envlogdir}/junit-{envname}.xml []
+deps= py