Hello community, here is the log from the commit of package python-apipkg for openSUSE:Factory checked in at 2018-08-08 14:45:37 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-apipkg (Old) and /work/SRC/openSUSE:Factory/.python-apipkg.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-apipkg" Wed Aug 8 14:45:37 2018 rev:4 rq:627536 version:1.5 Changes: -------- --- /work/SRC/openSUSE:Factory/python-apipkg/python-apipkg.changes 2017-05-06 18:29:30.884384793 +0200 +++ /work/SRC/openSUSE:Factory/.python-apipkg.new/python-apipkg.changes 2018-08-08 14:45:38.268776530 +0200 @@ -1,0 +2,9 @@ +Sun Aug 5 17:06:32 UTC 2018 - [email protected] + +- update to 1.5 +- fixed dependencies + * switch to setuptools_scm + * avoid dict iteration (fixes issue on python3) + * preserve __package__ - ths gets us better pep 302 compliance + +------------------------------------------------------------------- Old: ---- apipkg-1.4.tar.gz New: ---- apipkg-1.5.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-apipkg.spec ++++++ --- /var/tmp/diff_new_pack.yR2O47/_old 2018-08-08 14:45:38.704777240 +0200 +++ /var/tmp/diff_new_pack.yR2O47/_new 2018-08-08 14:45:38.712777254 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-apipkg # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,23 +18,19 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-apipkg -Version: 1.4 +Version: 1.5 Release: 0 Summary: Namespace control and lazy-import mechanism License: MIT Group: Development/Languages/Python -Url: http://bitbucket.org/hpk42/apipkg +URL: https://github.com/pytest-dev/apipkg/ Source: https://files.pythonhosted.org/packages/source/a/apipkg/apipkg-%{version}.tar.gz -BuildRequires: %{python_module devel} +BuildRequires: %{python_module base} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools_scm} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros -BuildRequires: unzip -# Testsuite BuildRequires: -BuildRequires: %{python_module nose} -BuildRequires: %{python_module pytest} -BuildRequires: %{python_module py} -BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch %python_subpackages @@ -60,13 +56,14 @@ %python_expand %fdupes -s %{buildroot}%{$python_sitelib} %check -%python_expand py.test-%{$python_version} +export PYTHONPATH="${PWD}/src" +%python_exec -mpytest %files %{python_files} -%defattr(-,root,root,-) -%doc README.txt LICENSE CHANGELOG -%pycache_only %{python_sitelib}/__pycache__ -%{python_sitelib}/apipkg.py* +%license LICENSE +%doc README.rst CHANGELOG +%dir %{python_sitelib}/apipkg +%{python_sitelib}/apipkg/* %{python_sitelib}/apipkg-%{version}-py%{python_version}.egg-info %changelog ++++++ apipkg-1.4.tar.gz -> apipkg-1.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/apipkg-1.4/.gitignore new/apipkg-1.5/.gitignore --- old/apipkg-1.4/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/apipkg-1.5/.gitignore 2018-04-06 08:25:21.000000000 +0200 @@ -0,0 +1,5 @@ +src/apipkg/version.py +__pycache__ +*.egg-info +.cache/ +.eggs/ \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/apipkg-1.4/.hgignore new/apipkg-1.5/.hgignore --- old/apipkg-1.4/.hgignore 2015-02-15 20:01:38.000000000 +0100 +++ new/apipkg-1.5/.hgignore 1970-01-01 01:00:00.000000000 +0100 @@ -1,18 +0,0 @@ - -# These lines are suggested according to the svn:ignore property -# Feel free to enable them by uncommenting them -syntax:glob -*.pyc -*.pyo -*.swp -*.html -*.class - -.tox - -build -dist -apipkg.egg-info -.cache/ -.eggs/ -.env/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/apipkg-1.4/.hgtags new/apipkg-1.5/.hgtags --- old/apipkg-1.4/.hgtags 2015-02-15 23:42:34.000000000 +0100 +++ new/apipkg-1.5/.hgtags 1970-01-01 01:00:00.000000000 +0100 @@ -1,6 +0,0 @@ -4e25c6a58cb618bdcd061289dd66b3ceb11a495a 1.0.0b5 -976aa691cfaeeb9793057d09ae9f9e6fd162be69 1.0b5 -6cb3976c8d8aac3d332ed8f507cfdad34b4279a1 1.0b6 -d83f3dccbd847d054cacaaca24f4a93e04f57219 1.0 -99c97a16360ab551455e00861c3e92269d3fa3f7 1.2 -82fd1ef6991cfb25b903944684291bf146c86f95 1.3 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/apipkg-1.4/.travis.yml new/apipkg-1.5/.travis.yml --- old/apipkg-1.4/.travis.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/apipkg-1.5/.travis.yml 2018-04-06 08:25:21.000000000 +0200 @@ -0,0 +1,19 @@ +language: python +python: + - "2.7" + - "3.4" + - "3.5" + - "3.5-dev" # 3.5 development branch + - "3.6" + - "3.6-dev" # 3.6 development branch + - "3.7-dev" # 3.7 development branch + - "nightly" # currently points to 3.7-dev +# command to install dependencies +env: + - EDITABLE=-e + - EDITABLE= +install: +- pip install -U setuptools pip setuptools_scm pytest +- pip install $EDITABLE . +# command to run tests +script: pytest diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/apipkg-1.4/CHANGELOG new/apipkg-1.5/CHANGELOG --- old/apipkg-1.4/CHANGELOG 2015-03-25 10:16:44.000000000 +0100 +++ new/apipkg-1.5/CHANGELOG 2018-07-05 07:39:29.000000000 +0200 @@ -1,3 +1,13 @@ +1.5 +---- + +- switch to setuptools_scm +- move to github +- fix up python compat matrix +- avoid dict iteration (fixes issue on python3) +- preserve __package__ - ths gets us better pep 302 compliance + + 1.4 ----------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/apipkg-1.4/PKG-INFO new/apipkg-1.5/PKG-INFO --- old/apipkg-1.4/PKG-INFO 2015-04-01 16:30:20.000000000 +0200 +++ new/apipkg-1.5/PKG-INFO 2018-07-05 07:49:42.000000000 +0200 @@ -1,23 +1,23 @@ -Metadata-Version: 1.1 +Metadata-Version: 1.2 Name: apipkg -Version: 1.4 +Version: 1.5 Summary: apipkg: namespace control and lazy-import mechanism -Home-page: http://bitbucket.org/hpk42/apipkg +Home-page: https://github.com/pytest-dev/apipkg Author: holger krekel -Author-email: holger at merlinux.eu +Maintainer: Ronny Pfannschmidt +Maintainer-email: [email protected] License: MIT License Description: Welcome to apipkg! ------------------------ - With apipkg you can control the exported namespace of a - python package and greatly reduce the number of imports for your users. - It is a `small pure python module`_ that works on virtually all Python - versions, including CPython2.3 to Python3.1, Jython and PyPy. It co-operates - well with Python's ``help()`` system, custom importers (PEP302) and common - command line completion tools. + With apipkg you can control the exported namespace of a Python package and + greatly reduce the number of imports for your users. + It is a `small pure Python module`_ that works on CPython 2.7 and 3.4+, + Jython and PyPy. It cooperates well with Python's ``help()`` system, + custom importers (PEP302) and common command-line completion tools. Usage is very simple: you can require 'apipkg' as a dependency or you - can copy paste the <200 Lines of code into your project. + can copy paste the ~200 lines of code into your project. Tutorial example @@ -40,7 +40,7 @@ You need to create a ``_mypkg`` package with a ``somemodule.py`` and ``othermodule.py`` containing the respective classes. The ``_mypkg`` is not special - it's a completely - regular python package. + regular Python package. Namespace dictionaries contain ``name: value`` mappings where the value may be another namespace dictionary or @@ -61,7 +61,7 @@ * lazy loading - only what is actually needed is ever loaded * only the root "mypkg" ever needs to be imported to get - access to the complete functionality. + access to the complete functionality * the underlying modules are also accessible, for example:: @@ -77,8 +77,8 @@ then import the ``initpkg`` function from that new place and are good to go. - .. _`small pure python module`: - .. _`apipkg.py`: http://bitbucket.org/hpk42/apipkg/src/tip/apipkg.py + .. _`small pure Python module`: + .. _`apipkg.py`: https://github.com/pytest-dev/apipkg/blob/master/src/apipkg/__init__.py Feedback? ----------------------- @@ -86,8 +86,7 @@ If you have questions you are welcome to * join the #pylib channel on irc.freenode.net - * subscribe to the http://codespeak.net/mailman/listinfo/py-dev list. - * create an issue on http://bitbucket.org/hpk42/apipkg/issues + * create an issue on https://github.com/pytest-dev/apipkg/issues have fun, holger krekel @@ -105,3 +104,10 @@ Classifier: Operating System :: MacOS :: MacOS X Classifier: Topic :: Software Development :: Libraries Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 2 +Classifier: Programming Language :: Python :: 2.7 +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.4 +Classifier: Programming Language :: Python :: 3.5 +Classifier: Programming Language :: Python :: 3.6 +Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/apipkg-1.4/README.rst new/apipkg-1.5/README.rst --- old/apipkg-1.4/README.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/apipkg-1.5/README.rst 2018-04-06 08:25:21.000000000 +0200 @@ -0,0 +1,83 @@ +Welcome to apipkg! +------------------------ + +With apipkg you can control the exported namespace of a Python package and +greatly reduce the number of imports for your users. +It is a `small pure Python module`_ that works on CPython 2.7 and 3.4+, +Jython and PyPy. It cooperates well with Python's ``help()`` system, +custom importers (PEP302) and common command-line completion tools. + +Usage is very simple: you can require 'apipkg' as a dependency or you +can copy paste the ~200 lines of code into your project. + + +Tutorial example +------------------- + +Here is a simple ``mypkg`` package that specifies one namespace +and exports two objects imported from different modules:: + + # mypkg/__init__.py + import apipkg + apipkg.initpkg(__name__, { + 'path': { + 'Class1': "_mypkg.somemodule:Class1", + 'clsattr': "_mypkg.othermodule:Class2.attr", + } + } + +The package is initialized with a dictionary as namespace. + +You need to create a ``_mypkg`` package with a ``somemodule.py`` +and ``othermodule.py`` containing the respective classes. +The ``_mypkg`` is not special - it's a completely +regular Python package. + +Namespace dictionaries contain ``name: value`` mappings +where the value may be another namespace dictionary or +a string specifying an import location. On accessing +an namespace attribute an import will be performed:: + + >>> import mypkg + >>> mypkg.path + <ApiModule 'mypkg.path'> + >>> mypkg.path.Class1 # '_mypkg.somemodule' gets imported now + <class _mypkg.somemodule.Class1 at 0xb7d428fc> + >>> mypkg.path.clsattr # '_mypkg.othermodule' gets imported now + 4 # the value of _mypkg.othermodule.Class2.attr + +The ``mypkg.path`` namespace and its two entries are +loaded when they are accessed. This means: + +* lazy loading - only what is actually needed is ever loaded + +* only the root "mypkg" ever needs to be imported to get + access to the complete functionality + +* the underlying modules are also accessible, for example:: + + from mypkg.sub import Class1 + + +Including apipkg in your package +-------------------------------------- + +If you don't want to add an ``apipkg`` dependency to your package you +can copy the `apipkg.py`_ file somewhere to your own package, +for example ``_mypkg/apipkg.py`` in the above example. You +then import the ``initpkg`` function from that new place and +are good to go. + +.. _`small pure Python module`: +.. _`apipkg.py`: https://github.com/pytest-dev/apipkg/blob/master/src/apipkg/__init__.py + +Feedback? +----------------------- + +If you have questions you are welcome to + +* join the #pylib channel on irc.freenode.net +* create an issue on https://github.com/pytest-dev/apipkg/issues + +have fun, +holger krekel diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/apipkg-1.4/README.txt new/apipkg-1.5/README.txt --- old/apipkg-1.4/README.txt 2015-03-31 17:38:07.000000000 +0200 +++ new/apipkg-1.5/README.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1,85 +0,0 @@ -Welcome to apipkg! ------------------------- - -With apipkg you can control the exported namespace of a -python package and greatly reduce the number of imports for your users. -It is a `small pure python module`_ that works on virtually all Python -versions, including CPython2.3 to Python3.1, Jython and PyPy. It co-operates -well with Python's ``help()`` system, custom importers (PEP302) and common -command line completion tools. - -Usage is very simple: you can require 'apipkg' as a dependency or you -can copy paste the <200 Lines of code into your project. - - -Tutorial example -------------------- - -Here is a simple ``mypkg`` package that specifies one namespace -and exports two objects imported from different modules:: - - # mypkg/__init__.py - import apipkg - apipkg.initpkg(__name__, { - 'path': { - 'Class1': "_mypkg.somemodule:Class1", - 'clsattr': "_mypkg.othermodule:Class2.attr", - } - } - -The package is initialized with a dictionary as namespace. - -You need to create a ``_mypkg`` package with a ``somemodule.py`` -and ``othermodule.py`` containing the respective classes. -The ``_mypkg`` is not special - it's a completely -regular python package. - -Namespace dictionaries contain ``name: value`` mappings -where the value may be another namespace dictionary or -a string specifying an import location. On accessing -an namespace attribute an import will be performed:: - - >>> import mypkg - >>> mypkg.path - <ApiModule 'mypkg.path'> - >>> mypkg.path.Class1 # '_mypkg.somemodule' gets imported now - <class _mypkg.somemodule.Class1 at 0xb7d428fc> - >>> mypkg.path.clsattr # '_mypkg.othermodule' gets imported now - 4 # the value of _mypkg.othermodule.Class2.attr - -The ``mypkg.path`` namespace and its two entries are -loaded when they are accessed. This means: - -* lazy loading - only what is actually needed is ever loaded - -* only the root "mypkg" ever needs to be imported to get - access to the complete functionality. - -* the underlying modules are also accessible, for example:: - - from mypkg.sub import Class1 - - -Including apipkg in your package --------------------------------------- - -If you don't want to add an ``apipkg`` dependency to your package you -can copy the `apipkg.py`_ file somewhere to your own package, -for example ``_mypkg/apipkg.py`` in the above example. You -then import the ``initpkg`` function from that new place and -are good to go. - -.. _`small pure python module`: -.. _`apipkg.py`: http://bitbucket.org/hpk42/apipkg/src/tip/apipkg.py - -Feedback? ------------------------ - -If you have questions you are welcome to - -* join the #pylib channel on irc.freenode.net -* subscribe to the http://codespeak.net/mailman/listinfo/py-dev list. -* create an issue on http://bitbucket.org/hpk42/apipkg/issues - -have fun, -holger krekel diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/apipkg-1.4/apipkg.egg-info/PKG-INFO new/apipkg-1.5/apipkg.egg-info/PKG-INFO --- old/apipkg-1.4/apipkg.egg-info/PKG-INFO 2015-04-01 16:30:20.000000000 +0200 +++ new/apipkg-1.5/apipkg.egg-info/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 @@ -1,107 +0,0 @@ -Metadata-Version: 1.1 -Name: apipkg -Version: 1.4 -Summary: apipkg: namespace control and lazy-import mechanism -Home-page: http://bitbucket.org/hpk42/apipkg -Author: holger krekel -Author-email: holger at merlinux.eu -License: MIT License -Description: Welcome to apipkg! - ------------------------ - - With apipkg you can control the exported namespace of a - python package and greatly reduce the number of imports for your users. - It is a `small pure python module`_ that works on virtually all Python - versions, including CPython2.3 to Python3.1, Jython and PyPy. It co-operates - well with Python's ``help()`` system, custom importers (PEP302) and common - command line completion tools. - - Usage is very simple: you can require 'apipkg' as a dependency or you - can copy paste the <200 Lines of code into your project. - - - Tutorial example - ------------------- - - Here is a simple ``mypkg`` package that specifies one namespace - and exports two objects imported from different modules:: - - # mypkg/__init__.py - import apipkg - apipkg.initpkg(__name__, { - 'path': { - 'Class1': "_mypkg.somemodule:Class1", - 'clsattr': "_mypkg.othermodule:Class2.attr", - } - } - - The package is initialized with a dictionary as namespace. - - You need to create a ``_mypkg`` package with a ``somemodule.py`` - and ``othermodule.py`` containing the respective classes. - The ``_mypkg`` is not special - it's a completely - regular python package. - - Namespace dictionaries contain ``name: value`` mappings - where the value may be another namespace dictionary or - a string specifying an import location. On accessing - an namespace attribute an import will be performed:: - - >>> import mypkg - >>> mypkg.path - <ApiModule 'mypkg.path'> - >>> mypkg.path.Class1 # '_mypkg.somemodule' gets imported now - <class _mypkg.somemodule.Class1 at 0xb7d428fc> - >>> mypkg.path.clsattr # '_mypkg.othermodule' gets imported now - 4 # the value of _mypkg.othermodule.Class2.attr - - The ``mypkg.path`` namespace and its two entries are - loaded when they are accessed. This means: - - * lazy loading - only what is actually needed is ever loaded - - * only the root "mypkg" ever needs to be imported to get - access to the complete functionality. - - * the underlying modules are also accessible, for example:: - - from mypkg.sub import Class1 - - - Including apipkg in your package - -------------------------------------- - - If you don't want to add an ``apipkg`` dependency to your package you - can copy the `apipkg.py`_ file somewhere to your own package, - for example ``_mypkg/apipkg.py`` in the above example. You - then import the ``initpkg`` function from that new place and - are good to go. - - .. _`small pure python module`: - .. _`apipkg.py`: http://bitbucket.org/hpk42/apipkg/src/tip/apipkg.py - - Feedback? - ----------------------- - - If you have questions you are welcome to - - * join the #pylib channel on irc.freenode.net - * subscribe to the http://codespeak.net/mailman/listinfo/py-dev list. - * create an issue on http://bitbucket.org/hpk42/apipkg/issues - - have fun, - holger krekel - -Platform: unix -Platform: linux -Platform: osx -Platform: cygwin -Platform: win32 -Classifier: Development Status :: 4 - Beta -Classifier: Intended Audience :: Developers -Classifier: License :: OSI Approved :: MIT License -Classifier: Operating System :: POSIX -Classifier: Operating System :: Microsoft :: Windows -Classifier: Operating System :: MacOS :: MacOS X -Classifier: Topic :: Software Development :: Libraries -Classifier: Programming Language :: Python diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/apipkg-1.4/apipkg.egg-info/SOURCES.txt new/apipkg-1.5/apipkg.egg-info/SOURCES.txt --- old/apipkg-1.4/apipkg.egg-info/SOURCES.txt 2015-04-01 16:30:20.000000000 +0200 +++ new/apipkg-1.5/apipkg.egg-info/SOURCES.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1,21 +0,0 @@ -.hgignore -.hgtags -CHANGELOG -LICENSE -MANIFEST.in -README.txt -apipkg.py -setup.cfg -setup.py -test_apipkg.py -tox.ini -apipkg.egg-info/PKG-INFO -apipkg.egg-info/SOURCES.txt -apipkg.egg-info/dependency_links.txt -apipkg.egg-info/top_level.txt -example/_mypkg/__init__.py -example/_mypkg/othermodule.py -example/_mypkg/somemodule.py -example/mypkg/__init__.py -example/mypkg/othermodule.py -example/mypkg/somemodule.py \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/apipkg-1.4/apipkg.egg-info/dependency_links.txt new/apipkg-1.5/apipkg.egg-info/dependency_links.txt --- old/apipkg-1.4/apipkg.egg-info/dependency_links.txt 2015-04-01 16:30:20.000000000 +0200 +++ new/apipkg-1.5/apipkg.egg-info/dependency_links.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/apipkg-1.4/apipkg.egg-info/top_level.txt new/apipkg-1.5/apipkg.egg-info/top_level.txt --- old/apipkg-1.4/apipkg.egg-info/top_level.txt 2015-04-01 16:30:20.000000000 +0200 +++ new/apipkg-1.5/apipkg.egg-info/top_level.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -apipkg diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/apipkg-1.4/apipkg.py new/apipkg-1.5/apipkg.py --- old/apipkg-1.4/apipkg.py 2015-03-31 20:51:45.000000000 +0200 +++ new/apipkg-1.5/apipkg.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,205 +0,0 @@ -""" -apipkg: control the exported namespace of a python package. - -see http://pypi.python.org/pypi/apipkg - -(c) holger krekel, 2009 - MIT license -""" -import os -import sys -from types import ModuleType - - -__version__ = '1.4' - - -def _py_abspath(path): - """ - special version of abspath - that will leave paths from jython jars alone - """ - if path.startswith('__pyclasspath__'): - - return path - else: - return os.path.abspath(path) - - -def distribution_version(name): - """try to get the version of the named distribution, - returs None on failure""" - from pkg_resources import get_distribution, DistributionNotFound - try: - dist = get_distribution(name) - except DistributionNotFound: - pass - else: - return dist.version - - -def initpkg(pkgname, exportdefs, attr=dict(), eager=False): - """ initialize given package from the export definitions. """ - oldmod = sys.modules.get(pkgname) - d = {} - f = getattr(oldmod, '__file__', None) - if f: - f = _py_abspath(f) - d['__file__'] = f - if hasattr(oldmod, '__version__'): - d['__version__'] = oldmod.__version__ - if hasattr(oldmod, '__loader__'): - d['__loader__'] = oldmod.__loader__ - if hasattr(oldmod, '__path__'): - d['__path__'] = [_py_abspath(p) for p in oldmod.__path__] - if '__doc__' not in exportdefs and getattr(oldmod, '__doc__', None): - d['__doc__'] = oldmod.__doc__ - d.update(attr) - if hasattr(oldmod, "__dict__"): - oldmod.__dict__.update(d) - mod = ApiModule(pkgname, exportdefs, implprefix=pkgname, attr=d) - sys.modules[pkgname] = mod - # eagerload in bypthon to avoid their monkeypatching breaking packages - if 'bpython' in sys.modules or eager: - for module in sys.modules.values(): - if isinstance(module, ApiModule): - module.__dict__ - - -def importobj(modpath, attrname): - module = __import__(modpath, None, None, ['__doc__']) - if not attrname: - return module - - retval = module - names = attrname.split(".") - for x in names: - retval = getattr(retval, x) - return retval - - -class ApiModule(ModuleType): - def __docget(self): - try: - return self.__doc - except AttributeError: - if '__doc__' in self.__map__: - return self.__makeattr('__doc__') - - def __docset(self, value): - self.__doc = value - __doc__ = property(__docget, __docset) - - def __init__(self, name, importspec, implprefix=None, attr=None): - self.__name__ = name - self.__all__ = [x for x in importspec if x != '__onfirstaccess__'] - self.__map__ = {} - self.__implprefix__ = implprefix or name - if attr: - for name, val in attr.items(): - # print "setting", self.__name__, name, val - setattr(self, name, val) - for name, importspec in importspec.items(): - if isinstance(importspec, dict): - subname = '%s.%s' % (self.__name__, name) - apimod = ApiModule(subname, importspec, implprefix) - sys.modules[subname] = apimod - setattr(self, name, apimod) - else: - parts = importspec.split(':') - modpath = parts.pop(0) - attrname = parts and parts[0] or "" - if modpath[0] == '.': - modpath = implprefix + modpath - - if not attrname: - subname = '%s.%s' % (self.__name__, name) - apimod = AliasModule(subname, modpath) - sys.modules[subname] = apimod - if '.' not in name: - setattr(self, name, apimod) - else: - self.__map__[name] = (modpath, attrname) - - def __repr__(self): - l = [] - if hasattr(self, '__version__'): - l.append("version=" + repr(self.__version__)) - if hasattr(self, '__file__'): - l.append('from ' + repr(self.__file__)) - if l: - return '<ApiModule %r %s>' % (self.__name__, " ".join(l)) - return '<ApiModule %r>' % (self.__name__,) - - def __makeattr(self, name): - """lazily compute value for name or raise AttributeError if unknown.""" - # print "makeattr", self.__name__, name - target = None - if '__onfirstaccess__' in self.__map__: - target = self.__map__.pop('__onfirstaccess__') - importobj(*target)() - try: - modpath, attrname = self.__map__[name] - except KeyError: - if target is not None and name != '__onfirstaccess__': - # retry, onfirstaccess might have set attrs - return getattr(self, name) - raise AttributeError(name) - else: - result = importobj(modpath, attrname) - setattr(self, name, result) - try: - del self.__map__[name] - except KeyError: - pass # in a recursive-import situation a double-del can happen - return result - - __getattr__ = __makeattr - - @property - def __dict__(self): - # force all the content of the module - # to be loaded when __dict__ is read - dictdescr = ModuleType.__dict__['__dict__'] - dict = dictdescr.__get__(self) - if dict is not None: - hasattr(self, 'some') - for name in self.__all__: - try: - self.__makeattr(name) - except AttributeError: - pass - return dict - - -def AliasModule(modname, modpath, attrname=None): - mod = [] - - def getmod(): - if not mod: - x = importobj(modpath, None) - if attrname is not None: - x = getattr(x, attrname) - mod.append(x) - return mod[0] - - class AliasModule(ModuleType): - - def __repr__(self): - x = modpath - if attrname: - x += "." + attrname - return '<AliasModule %r for %r>' % (modname, x) - - def __getattribute__(self, name): - try: - return getattr(getmod(), name) - except ImportError: - return None - - def __setattr__(self, name, value): - setattr(getmod(), name, value) - - def __delattr__(self, name): - delattr(getmod(), name) - - return AliasModule(str(modname)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/apipkg-1.4/conftest.py new/apipkg-1.5/conftest.py --- old/apipkg-1.4/conftest.py 1970-01-01 01:00:00.000000000 +0100 +++ new/apipkg-1.5/conftest.py 2018-04-06 08:25:21.000000000 +0200 @@ -0,0 +1,9 @@ +import py +import apipkg +LOCAL_APIPKG = py.path.local(__file__).dirpath().join('src/apipkg/__init__.py') +INSTALL_TYPE = 'editable' if apipkg.__file__ == LOCAL_APIPKG else 'full' + + +def pytest_report_header(startdir): + return "apipkg {install_type} install version={version}".format( + install_type=INSTALL_TYPE, version=apipkg.__version__) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/apipkg-1.4/setup.cfg new/apipkg-1.5/setup.cfg --- old/apipkg-1.4/setup.cfg 2015-04-01 16:30:20.000000000 +0200 +++ new/apipkg-1.5/setup.cfg 2018-07-05 07:49:42.000000000 +0200 @@ -4,5 +4,4 @@ [egg_info] tag_build = tag_date = 0 -tag_svn_revision = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/apipkg-1.4/setup.py new/apipkg-1.5/setup.py --- old/apipkg-1.4/setup.py 2015-03-31 20:39:48.000000000 +0200 +++ new/apipkg-1.5/setup.py 2018-07-05 07:48:55.000000000 +0200 @@ -1,24 +1,30 @@ -import re -from setuptools import setup +from setuptools import setup, find_packages -def get_version(): - VERSION_RE = re.compile("__version__ = \'(.*)\'", re.M) - with open('apipkg.py') as fp: - return VERSION_RE.search(fp.read()).group(1) +def readme(): + with open('README.rst') as fp: + return fp.read() def main(): setup( name='apipkg', description='apipkg: namespace control and lazy-import mechanism', - long_description=open('README.txt').read(), - version=get_version(), - url='http://bitbucket.org/hpk42/apipkg', + long_description=readme(), + python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*', + setup_requires=[ + 'setuptools_scm', + 'setuptools>=30.3.0', # introduced setup.cfg metadata + ], + use_scm_version={ + 'write_to': 'src/apipkg/version.py' + }, + url='https://github.com/pytest-dev/apipkg', license='MIT License', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], author='holger krekel', - author_email='holger at merlinux.eu', + maintainer="Ronny Pfannschmidt", + maintainer_email="[email protected]", classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', @@ -27,9 +33,21 @@ 'Operating System :: Microsoft :: Windows', 'Operating System :: MacOS :: MacOS X', 'Topic :: Software Development :: Libraries', - 'Programming Language :: Python'], - py_modules=['apipkg'], + # Specify the Python versions you support here. + # In particular, ensure that you indicate whether + # you support Python 2, Python 3 or both. + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + ], + packages=find_packages('src'), + package_dir={'': 'src'}, ) + if __name__ == '__main__': main() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/apipkg-1.4/src/apipkg/__init__.py new/apipkg-1.5/src/apipkg/__init__.py --- old/apipkg-1.4/src/apipkg/__init__.py 1970-01-01 01:00:00.000000000 +0100 +++ new/apipkg-1.5/src/apipkg/__init__.py 2018-07-05 07:28:24.000000000 +0200 @@ -0,0 +1,209 @@ +""" +apipkg: control the exported namespace of a Python package. + +see https://pypi.python.org/pypi/apipkg + +(c) holger krekel, 2009 - MIT license +""" +import os +import sys +from types import ModuleType + +from .version import version as __version__ + + +def _py_abspath(path): + """ + special version of abspath + that will leave paths from jython jars alone + """ + if path.startswith('__pyclasspath__'): + + return path + else: + return os.path.abspath(path) + + +def distribution_version(name): + """try to get the version of the named distribution, + returs None on failure""" + from pkg_resources import get_distribution, DistributionNotFound + try: + dist = get_distribution(name) + except DistributionNotFound: + pass + else: + return dist.version + + +def initpkg(pkgname, exportdefs, attr=None, eager=False): + """ initialize given package from the export definitions. """ + attr = attr or {} + oldmod = sys.modules.get(pkgname) + d = {} + f = getattr(oldmod, '__file__', None) + if f: + f = _py_abspath(f) + d['__file__'] = f + if hasattr(oldmod, '__version__'): + d['__version__'] = oldmod.__version__ + if hasattr(oldmod, '__loader__'): + d['__loader__'] = oldmod.__loader__ + if hasattr(oldmod, '__path__'): + d['__path__'] = [_py_abspath(p) for p in oldmod.__path__] + if hasattr(oldmod, '__package__'): + d['__package__'] = oldmod.__package__ + if '__doc__' not in exportdefs and getattr(oldmod, '__doc__', None): + d['__doc__'] = oldmod.__doc__ + d.update(attr) + if hasattr(oldmod, "__dict__"): + oldmod.__dict__.update(d) + mod = ApiModule(pkgname, exportdefs, implprefix=pkgname, attr=d) + sys.modules[pkgname] = mod + # eagerload in bypthon to avoid their monkeypatching breaking packages + if 'bpython' in sys.modules or eager: + for module in list(sys.modules.values()): + if isinstance(module, ApiModule): + module.__dict__ + + +def importobj(modpath, attrname): + """imports a module, then resolves the attrname on it""" + module = __import__(modpath, None, None, ['__doc__']) + if not attrname: + return module + + retval = module + names = attrname.split(".") + for x in names: + retval = getattr(retval, x) + return retval + + +class ApiModule(ModuleType): + """the magical lazy-loading module standing""" + def __docget(self): + try: + return self.__doc + except AttributeError: + if '__doc__' in self.__map__: + return self.__makeattr('__doc__') + + def __docset(self, value): + self.__doc = value + __doc__ = property(__docget, __docset) + + def __init__(self, name, importspec, implprefix=None, attr=None): + self.__name__ = name + self.__all__ = [x for x in importspec if x != '__onfirstaccess__'] + self.__map__ = {} + self.__implprefix__ = implprefix or name + if attr: + for name, val in attr.items(): + # print "setting", self.__name__, name, val + setattr(self, name, val) + for name, importspec in importspec.items(): + if isinstance(importspec, dict): + subname = '%s.%s' % (self.__name__, name) + apimod = ApiModule(subname, importspec, implprefix) + sys.modules[subname] = apimod + setattr(self, name, apimod) + else: + parts = importspec.split(':') + modpath = parts.pop(0) + attrname = parts and parts[0] or "" + if modpath[0] == '.': + modpath = implprefix + modpath + + if not attrname: + subname = '%s.%s' % (self.__name__, name) + apimod = AliasModule(subname, modpath) + sys.modules[subname] = apimod + if '.' not in name: + setattr(self, name, apimod) + else: + self.__map__[name] = (modpath, attrname) + + def __repr__(self): + repr_list = [] + if hasattr(self, '__version__'): + repr_list.append("version=" + repr(self.__version__)) + if hasattr(self, '__file__'): + repr_list.append('from ' + repr(self.__file__)) + if repr_list: + return '<ApiModule %r %s>' % (self.__name__, " ".join(repr_list)) + return '<ApiModule %r>' % (self.__name__,) + + def __makeattr(self, name): + """lazily compute value for name or raise AttributeError if unknown.""" + # print "makeattr", self.__name__, name + target = None + if '__onfirstaccess__' in self.__map__: + target = self.__map__.pop('__onfirstaccess__') + importobj(*target)() + try: + modpath, attrname = self.__map__[name] + except KeyError: + if target is not None and name != '__onfirstaccess__': + # retry, onfirstaccess might have set attrs + return getattr(self, name) + raise AttributeError(name) + else: + result = importobj(modpath, attrname) + setattr(self, name, result) + try: + del self.__map__[name] + except KeyError: + pass # in a recursive-import situation a double-del can happen + return result + + __getattr__ = __makeattr + + @property + def __dict__(self): + # force all the content of the module + # to be loaded when __dict__ is read + dictdescr = ModuleType.__dict__['__dict__'] + dict = dictdescr.__get__(self) + if dict is not None: + hasattr(self, 'some') + for name in self.__all__: + try: + self.__makeattr(name) + except AttributeError: + pass + return dict + + +def AliasModule(modname, modpath, attrname=None): + mod = [] + + def getmod(): + if not mod: + x = importobj(modpath, None) + if attrname is not None: + x = getattr(x, attrname) + mod.append(x) + return mod[0] + + class AliasModule(ModuleType): + + def __repr__(self): + x = modpath + if attrname: + x += "." + attrname + return '<AliasModule %r for %r>' % (modname, x) + + def __getattribute__(self, name): + try: + return getattr(getmod(), name) + except ImportError: + return None + + def __setattr__(self, name, value): + setattr(getmod(), name, value) + + def __delattr__(self, name): + delattr(getmod(), name) + + return AliasModule(str(modname)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/apipkg-1.4/src/apipkg/version.py new/apipkg-1.5/src/apipkg/version.py --- old/apipkg-1.4/src/apipkg/version.py 1970-01-01 01:00:00.000000000 +0100 +++ new/apipkg-1.5/src/apipkg/version.py 2018-07-05 07:49:41.000000000 +0200 @@ -0,0 +1,4 @@ +# coding: utf-8 +# file generated by setuptools_scm +# don't change, don't track in version control +version = '1.5' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/apipkg-1.4/src/apipkg.egg-info/PKG-INFO new/apipkg-1.5/src/apipkg.egg-info/PKG-INFO --- old/apipkg-1.4/src/apipkg.egg-info/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 +++ new/apipkg-1.5/src/apipkg.egg-info/PKG-INFO 2018-07-05 07:49:41.000000000 +0200 @@ -0,0 +1,113 @@ +Metadata-Version: 1.2 +Name: apipkg +Version: 1.5 +Summary: apipkg: namespace control and lazy-import mechanism +Home-page: https://github.com/pytest-dev/apipkg +Author: holger krekel +Maintainer: Ronny Pfannschmidt +Maintainer-email: [email protected] +License: MIT License +Description: Welcome to apipkg! + ------------------------ + + With apipkg you can control the exported namespace of a Python package and + greatly reduce the number of imports for your users. + It is a `small pure Python module`_ that works on CPython 2.7 and 3.4+, + Jython and PyPy. It cooperates well with Python's ``help()`` system, + custom importers (PEP302) and common command-line completion tools. + + Usage is very simple: you can require 'apipkg' as a dependency or you + can copy paste the ~200 lines of code into your project. + + + Tutorial example + ------------------- + + Here is a simple ``mypkg`` package that specifies one namespace + and exports two objects imported from different modules:: + + # mypkg/__init__.py + import apipkg + apipkg.initpkg(__name__, { + 'path': { + 'Class1': "_mypkg.somemodule:Class1", + 'clsattr': "_mypkg.othermodule:Class2.attr", + } + } + + The package is initialized with a dictionary as namespace. + + You need to create a ``_mypkg`` package with a ``somemodule.py`` + and ``othermodule.py`` containing the respective classes. + The ``_mypkg`` is not special - it's a completely + regular Python package. + + Namespace dictionaries contain ``name: value`` mappings + where the value may be another namespace dictionary or + a string specifying an import location. On accessing + an namespace attribute an import will be performed:: + + >>> import mypkg + >>> mypkg.path + <ApiModule 'mypkg.path'> + >>> mypkg.path.Class1 # '_mypkg.somemodule' gets imported now + <class _mypkg.somemodule.Class1 at 0xb7d428fc> + >>> mypkg.path.clsattr # '_mypkg.othermodule' gets imported now + 4 # the value of _mypkg.othermodule.Class2.attr + + The ``mypkg.path`` namespace and its two entries are + loaded when they are accessed. This means: + + * lazy loading - only what is actually needed is ever loaded + + * only the root "mypkg" ever needs to be imported to get + access to the complete functionality + + * the underlying modules are also accessible, for example:: + + from mypkg.sub import Class1 + + + Including apipkg in your package + -------------------------------------- + + If you don't want to add an ``apipkg`` dependency to your package you + can copy the `apipkg.py`_ file somewhere to your own package, + for example ``_mypkg/apipkg.py`` in the above example. You + then import the ``initpkg`` function from that new place and + are good to go. + + .. _`small pure Python module`: + .. _`apipkg.py`: https://github.com/pytest-dev/apipkg/blob/master/src/apipkg/__init__.py + + Feedback? + ----------------------- + + If you have questions you are welcome to + + * join the #pylib channel on irc.freenode.net + * create an issue on https://github.com/pytest-dev/apipkg/issues + + have fun, + holger krekel + +Platform: unix +Platform: linux +Platform: osx +Platform: cygwin +Platform: win32 +Classifier: Development Status :: 4 - Beta +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: MIT License +Classifier: Operating System :: POSIX +Classifier: Operating System :: Microsoft :: Windows +Classifier: Operating System :: MacOS :: MacOS X +Classifier: Topic :: Software Development :: Libraries +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 2 +Classifier: Programming Language :: Python :: 2.7 +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.4 +Classifier: Programming Language :: Python :: 3.5 +Classifier: Programming Language :: Python :: 3.6 +Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/apipkg-1.4/src/apipkg.egg-info/SOURCES.txt new/apipkg-1.5/src/apipkg.egg-info/SOURCES.txt --- old/apipkg-1.4/src/apipkg.egg-info/SOURCES.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/apipkg-1.5/src/apipkg.egg-info/SOURCES.txt 2018-07-05 07:49:41.000000000 +0200 @@ -0,0 +1,41 @@ +.gitignore +.travis.yml +CHANGELOG +LICENSE +MANIFEST.in +README.rst +conftest.py +setup.cfg +setup.py +test_apipkg.py +tox.ini +./.gitignore +./.travis.yml +./CHANGELOG +./LICENSE +./MANIFEST.in +./README.rst +./conftest.py +./setup.cfg +./setup.py +./test_apipkg.py +./tox.ini +./example/_mypkg/__init__.py +./example/_mypkg/othermodule.py +./example/_mypkg/somemodule.py +./example/mypkg/__init__.py +./example/mypkg/othermodule.py +./example/mypkg/somemodule.py +./src/apipkg/__init__.py +example/_mypkg/__init__.py +example/_mypkg/othermodule.py +example/_mypkg/somemodule.py +example/mypkg/__init__.py +example/mypkg/othermodule.py +example/mypkg/somemodule.py +src/apipkg/__init__.py +src/apipkg/version.py +src/apipkg.egg-info/PKG-INFO +src/apipkg.egg-info/SOURCES.txt +src/apipkg.egg-info/dependency_links.txt +src/apipkg.egg-info/top_level.txt \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/apipkg-1.4/src/apipkg.egg-info/dependency_links.txt new/apipkg-1.5/src/apipkg.egg-info/dependency_links.txt --- old/apipkg-1.4/src/apipkg.egg-info/dependency_links.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/apipkg-1.5/src/apipkg.egg-info/dependency_links.txt 2018-07-05 07:49:41.000000000 +0200 @@ -0,0 +1 @@ + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/apipkg-1.4/src/apipkg.egg-info/top_level.txt new/apipkg-1.5/src/apipkg.egg-info/top_level.txt --- old/apipkg-1.4/src/apipkg.egg-info/top_level.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/apipkg-1.5/src/apipkg.egg-info/top_level.txt 2018-07-05 07:49:41.000000000 +0200 @@ -0,0 +1 @@ +apipkg diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/apipkg-1.4/test_apipkg.py new/apipkg-1.5/test_apipkg.py --- old/apipkg-1.4/test_apipkg.py 2015-03-31 17:51:06.000000000 +0200 +++ new/apipkg-1.5/test_apipkg.py 2018-07-05 07:28:24.000000000 +0200 @@ -85,7 +85,7 @@ def test_realmodule___doc__(self): """test whether the __doc__ attribute is set properly from initpkg""" import realtest.x.module - print (realtest.x.module.__map__) + print(realtest.x.module.__map__) assert realtest.x.module.__doc__ == 'test module' @@ -121,7 +121,7 @@ pkgdir.join('submod.py').write(py.code.Source(""" import recmodule class someclass: pass - print (recmodule.__dict__) + print(recmodule.__dict__) """)) monkeypatch.syspath_prepend(tmpdir) import recmodule @@ -174,7 +174,7 @@ test.raises __.test.outcome::raises """ d = parsenamespace(spec) - print (d) + print(d) assert d == { 'test': {'raises': '__.test.outcome::raises'}, 'path': { @@ -227,6 +227,7 @@ mod.__version__ = 10 mod.__file__ = "hello.py" mod.__loader__ = "loader" + mod.__package__ = "package" mod.__doc__ = "this is the documentation" monkeypatch.setitem(sys.modules, 'hello', mod) apipkg.initpkg('hello', {}) @@ -235,6 +236,7 @@ assert newmod.__file__ == py.path.local(mod.__file__) assert newmod.__version__ == mod.__version__ assert newmod.__loader__ == mod.__loader__ + assert newmod.__package__ == mod.__package__ assert newmod.__doc__ == mod.__doc__ @@ -261,12 +263,14 @@ mod = ModuleType('hello') mod.__file__ = "hello.py" assert not hasattr(mod, '__path__') + assert not hasattr(mod, '__package__') or mod.__package__ is None monkeypatch.setitem(sys.modules, 'hello', mod) apipkg.initpkg('hello', {}) newmod = sys.modules['hello'] assert newmod != mod assert newmod.__file__ == py.path.local(mod.__file__) assert not hasattr(newmod, '__path__') + assert not hasattr(newmod, '__package__') or mod.__package__ is None def test_initpkg_not_changing_jython_paths(monkeypatch): @@ -364,7 +368,7 @@ if mode == 'attr': assert mod.newattr == 42 elif mode == "dict": - print (list(mod.__dict__.keys())) + print(list(mod.__dict__.keys())) assert 'newattr' in mod.__dict__ elif mode == "onfirst": assert not hasattr(mod, '__onfirstaccess__') @@ -383,8 +387,8 @@ assert 'abspath' in d -def test_chdir_with_relative_imports_shouldnt_break_lazy_loading(tmpdir): - tmpdir.join('apipkg.py').write(py.code.Source(apipkg)) +def test_chdir_with_relative_imports_support_lazy_loading(tmpdir, monkeypatch): + monkeypatch.syspath_prepend(py.path.local('src')) pkg = tmpdir.mkdir('pkg') tmpdir.mkdir('messy') pkg.join('__init__.py').write(py.code.Source(""" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/apipkg-1.4/tox.ini new/apipkg-1.5/tox.ini --- old/apipkg-1.4/tox.ini 2015-03-31 17:51:58.000000000 +0200 +++ new/apipkg-1.5/tox.ini 2018-04-06 08:25:21.000000000 +0200 @@ -1,5 +1,5 @@ [tox] -envlist=py27,py26,py33,py34,jython,flakes +envlist=py27,py34,py35,py36,jython,flakes [tox:hudson] sdistsrc={distshare}/apipkg-* @@ -16,7 +16,6 @@ deps=flake8 commands=flake8 - [flake8] exclude=.tox/,.env/,dist/,build/,example/ max_complexity=11
