Hello community,

here is the log from the commit of package python-entrypoints for 
openSUSE:Factory checked in at 2019-02-08 13:46:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-entrypoints (Old)
 and      /work/SRC/openSUSE:Factory/.python-entrypoints.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-entrypoints"

Fri Feb  8 13:46:12 2019 rev:5 rq:671318 version:0.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-entrypoints/python-entrypoints.changes    
2018-12-06 12:14:49.065680908 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-entrypoints.new.28833/python-entrypoints.changes
 2019-02-08 13:46:13.738819789 +0100
@@ -1,0 +2,6 @@
+Mon Feb  4 17:49:04 UTC 2019 - Hans-Peter Jansen <h...@urpla.net>
+
+- update to version 0.3:
+  Check: https://github.com/takluyver/entrypoints/commits/master
+
+-------------------------------------------------------------------

Old:
----
  entrypoints-0.2.3.tar.gz

New:
----
  entrypoints-0.3.tar.gz

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

Other differences:
------------------
++++++ python-entrypoints.spec ++++++
--- /var/tmp/diff_new_pack.oefGiN/_old  2019-02-08 13:46:14.390819587 +0100
+++ /var/tmp/diff_new_pack.oefGiN/_new  2019-02-08 13:46:14.398819585 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-entrypoints
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 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
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %bcond_without  test
 Name:           python-entrypoints
-Version:        0.2.3
+Version:        0.3
 Release:        0
 Summary:        Discover and load entry points from installed packages
 License:        MIT
@@ -29,6 +29,7 @@
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 BuildArch:      noarch
+BuildRequires:  %{python_module devel}
 %if %{with test}
 BuildRequires:  %{python_module pytest}
 BuildRequires:  python-configparser

++++++ entrypoints-0.2.3.tar.gz -> entrypoints-0.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/entrypoints-0.2.3/.travis.yml 
new/entrypoints-0.3/.travis.yml
--- old/entrypoints-0.2.3/.travis.yml   2016-02-03 12:55:43.000000000 +0100
+++ new/entrypoints-0.3/.travis.yml     2018-04-09 13:59:57.228085800 +0200
@@ -1,7 +1,8 @@
 language: python
 python:
+  - "3.6"
+  - "3.5"
   - "3.4"
-  - "3.3"
   - "2.7"
 install:
   - if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then pip install configparser; fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/entrypoints-0.2.3/PKG-INFO 
new/entrypoints-0.3/PKG-INFO
--- old/entrypoints-0.2.3/PKG-INFO      1970-01-01 01:00:00.000000000 +0100
+++ new/entrypoints-0.3/PKG-INFO        1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: entrypoints
-Version: 0.2.3
+Version: 0.3
 Summary: Discover and load entry points from installed packages.
 Home-page: https://github.com/takluyver/entrypoints
 Author: Thomas Kluyver
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/entrypoints-0.2.3/README.rst 
new/entrypoints-0.3/README.rst
--- old/entrypoints-0.2.3/README.rst    1970-01-01 01:00:00.000000000 +0100
+++ new/entrypoints-0.3/README.rst      2019-01-07 18:59:21.456033700 +0100
@@ -0,0 +1,14 @@
+Entry points are a way for Python packages to advertise objects with some
+common interface. The most common examples are ``console_scripts`` entry 
points,
+which define shell commands by identifying a Python function to run.
+
+*Groups* of entry points, such as ``console_scripts``, point to objects with
+similar interfaces. An application might use a group to find its plugins, or
+multiple groups if it has different kinds of plugins.
+
+The **entrypoints** module contains functions to find and load entry points.
+You can install it from PyPI with ``pip install entrypoints``.
+
+To advertise entry points when distributing a package, see
+`entry_points in the Python Packaging User Guide
+<https://packaging.python.org/en/latest/distributing.html#entry-points>`_.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/entrypoints-0.2.3/doc/api.rst 
new/entrypoints-0.3/doc/api.rst
--- old/entrypoints-0.2.3/doc/api.rst   2016-06-20 14:51:34.000000000 +0200
+++ new/entrypoints-0.3/doc/api.rst     2019-01-07 17:24:28.195990800 +0100
@@ -32,13 +32,13 @@
    .. attribute:: object_name
 
       The dotted object name within the module, or *None* if the entry point
-      refers to a module itselfs.
+      refers to a module itself.
 
    .. attribute:: extras
 
       Extra setuptools features related to this entry point as a list, or 
*None*
 
-   .. attribute:: distribution
+   .. attribute:: distro
 
       The distribution which advertised this entry point -
       a :class:`Distribution` instance or None
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/entrypoints-0.2.3/doc/conf.py 
new/entrypoints-0.3/doc/conf.py
--- old/entrypoints-0.2.3/doc/conf.py   2017-06-08 12:52:27.000000000 +0200
+++ new/entrypoints-0.3/doc/conf.py     2019-01-07 19:03:51.848916300 +0100
@@ -60,9 +60,9 @@
 # built documents.
 #
 # The short X.Y version.
-version = '0.2'
+from entrypoints import __version__ as version
 # The full version, including alpha/beta/rc tags.
-release = version + '.3'
+release = version
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/entrypoints-0.2.3/doc/index.rst 
new/entrypoints-0.3/doc/index.rst
--- old/entrypoints-0.2.3/doc/index.rst 2016-02-03 12:55:43.000000000 +0100
+++ new/entrypoints-0.3/doc/index.rst   2019-01-07 19:00:26.420269500 +0100
@@ -1,20 +1,7 @@
 entrypoints |version|
 =====================
 
-Entry points are a way for Python packages to advertise objects with some
-common interface. The most common examples are ``console_scripts`` entry 
points,
-which define shell commands by identifying a Python function to run.
-
-*Groups* of entry points, such as ``console_scripts``, point to objects with
-similar interfaces. An application might use a group to find its plugins, or
-multiple groups if it has different kinds of plugins.
-
-The **entrypoints** module contains functions to find and load entry points.
-You can install it from PyPI with ``pip install entrypoints``.
-
-To advertise entry points when distributing a package, see
-`entry_points in the Python Packaging User Guide
-<https://packaging.python.org/en/latest/distributing.html#entry-points>`_.
+.. include:: ../README.rst
 
 Contents:
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/entrypoints-0.2.3/entrypoints.py 
new/entrypoints-0.3/entrypoints.py
--- old/entrypoints-0.2.3/entrypoints.py        2017-06-08 12:52:27.000000000 
+0200
+++ new/entrypoints-0.3/entrypoints.py  2019-01-07 19:02:53.261767600 +0100
@@ -26,7 +26,12 @@
 $
 """, re.VERBOSE)
 
-__version__ = '0.2.3'
+file_in_zip_pattern = re.compile(r"""
+(?P<dist_version>[^/\\]+)\.(dist|egg)-info
+[/\\]entry_points.txt$
+""", re.VERBOSE)
+
+__version__ = '0.3'
 
 class BadEntryPoint(Exception):
     """Raised when an entry point can't be parsed.
@@ -80,7 +85,7 @@
             for attr in self.object_name.split('.'):
                 obj = getattr(obj, attr)
         return obj
-    
+
     @classmethod
     def from_string(cls, epstr, name, distro=None):
         """Parse an entry point from the syntax in entry_points.txt
@@ -95,7 +100,7 @@
         if m:
             mod, obj, extras = m.group('modulename', 'objectname', 'extras')
             if extras is not None:
-                extras = re.split(',\s*', extras)
+                extras = re.split(r',\s*', extras)
             return cls(name, mod, obj, extras, distro)
         else:
             raise BadEntryPoint(epstr)
@@ -104,7 +109,7 @@
     def __init__(self, name, version):
         self.name = name
         self.version = version
-    
+
     def __repr__(self):
         return "Distribution(%r, %r)" % (self.name, self.version)
 
@@ -132,12 +137,12 @@
                 distro_names_seen.add(distro.name)
             else:
                 distro = None
-            
+
             if osp.isdir(folder):
                 ep_path = osp.join(folder, 'EGG-INFO', 'entry_points.txt')
                 if osp.isfile(ep_path):
-                    cp = CaseSensitiveConfigParser()
-                    cp.read(ep_path)
+                    cp = CaseSensitiveConfigParser(delimiters=('=',))
+                    cp.read([ep_path])
                     yield cp, distro
 
             elif zipfile.is_zipfile(folder):
@@ -146,13 +151,39 @@
                     info = z.getinfo('EGG-INFO/entry_points.txt')
                 except KeyError:
                     continue
-                cp = CaseSensitiveConfigParser()
+                cp = CaseSensitiveConfigParser(delimiters=('=',))
                 with z.open(info) as f:
                     fu = io.TextIOWrapper(f)
                     cp.read_file(fu,
                         source=osp.join(folder, 'EGG-INFO', 
'entry_points.txt'))
                 yield cp, distro
-            
+
+        # zip imports, not egg
+        elif zipfile.is_zipfile(folder):
+            with zipfile.ZipFile(folder) as zf:
+                for info in zf.infolist():
+                    m = file_in_zip_pattern.match(info.filename)
+                    if not m:
+                        continue
+
+                    distro_name_version = m.group('dist_version')
+                    if '-' in distro_name_version:
+                        distro = Distribution(*distro_name_version.split('-', 
1))
+
+                        if (repeated_distro == 'first') \
+                                and (distro.name in distro_names_seen):
+                            continue
+                        distro_names_seen.add(distro.name)
+                    else:
+                        distro = None
+
+                    cp = CaseSensitiveConfigParser(delimiters=('=',))
+                    with zf.open(info) as f:
+                        fu = io.TextIOWrapper(f)
+                        cp.read_file(fu, source=osp.join(folder, 
info.filename))
+                    yield cp, distro
+
+        # Regular file imports (not egg, not zip file)
         for path in itertools.chain(
             glob.iglob(osp.join(folder, '*.dist-info', 'entry_points.txt')),
             glob.iglob(osp.join(folder, '*.egg-info', 'entry_points.txt'))
@@ -167,8 +198,8 @@
                 distro_names_seen.add(distro.name)
             else:
                 distro = None
-            cp = CaseSensitiveConfigParser()
-            cp.read(path)
+            cp = CaseSensitiveConfigParser(delimiters=('=',))
+            cp.read([path])
             yield cp, distro
 
 def get_single(group, name, path=None):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/entrypoints-0.2.3/flit.ini 
new/entrypoints-0.3/flit.ini
--- old/entrypoints-0.2.3/flit.ini      2016-06-20 14:51:34.000000000 +0200
+++ new/entrypoints-0.3/flit.ini        1970-01-01 01:00:00.000000000 +0100
@@ -1,8 +0,0 @@
-[metadata]
-module = entrypoints
-author = Thomas Kluyver
-author-email = tho...@kluyver.me.uk
-home-page = https://github.com/takluyver/entrypoints
-classifiers = License :: OSI Approved :: MIT License
-requires-python = >=2.7
-requires = configparser (>=3.5); python_version == '2.7'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/entrypoints-0.2.3/pyproject.toml 
new/entrypoints-0.3/pyproject.toml
--- old/entrypoints-0.2.3/pyproject.toml        1970-01-01 01:00:00.000000000 
+0100
+++ new/entrypoints-0.3/pyproject.toml  2019-01-07 19:01:25.197482800 +0100
@@ -0,0 +1,20 @@
+[build-system]
+requires = ["flit"]
+build-backend = "flit.buildapi"
+
+[tool.flit.metadata]
+module = "entrypoints"
+author = "Thomas Kluyver"
+author-email = "tho...@kluyver.me.uk"
+home-page = "https://github.com/takluyver/entrypoints";
+description-file = "README.rst"
+classifiers = [
+    "License :: OSI Approved :: MIT License",
+    "Programming Language :: Python :: 2",
+    "Programming Language :: Python :: 3"
+]
+requires-python = ">=2.7"
+requires = ["configparser (>=3.5); python_version == '2.7'"]
+
+[tool.flit.metadata.urls]
+Documentation = "https://entrypoints.readthedocs.io/en/latest/";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/entrypoints-0.2.3/setup.py 
new/entrypoints-0.3/setup.py
--- old/entrypoints-0.2.3/setup.py      1970-01-01 01:00:00.000000000 +0100
+++ new/entrypoints-0.3/setup.py        1970-01-01 01:00:00.000000000 +0100
@@ -7,7 +7,7 @@
 {":python_version == '2.7'": ['configparser>=3.5']}
 
 setup(name='entrypoints',
-      version='0.2.3',
+      version='0.3',
       description='Discover and load entry points from installed packages.',
       author='Thomas Kluyver',
       author_email='tho...@kluyver.me.uk',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/entrypoints-0.2.3/tests/test_entrypoints.py 
new/entrypoints-0.3/tests/test_entrypoints.py
--- old/entrypoints-0.2.3/tests/test_entrypoints.py     2016-10-03 
10:56:28.000000000 +0200
+++ new/entrypoints-0.3/tests/test_entrypoints.py       2019-01-07 
18:00:27.146827000 +0100
@@ -4,6 +4,7 @@
 import os.path as osp
 import pytest
 import warnings
+from zipfile import ZipFile
 
 import entrypoints
 
@@ -35,8 +36,8 @@
     assert ep.object_name == 'abc'
 
     ep2 = entrypoints.get_single('entrypoints.test1', 'njn', sample_path)
-    assert ep.module_name == 'foo'
-    assert ep.object_name == 'abc'
+    assert ep2.module_name == 'qux.extn'
+    assert ep2.object_name == 'Njn.load'
 
 def test_dot_prefix():
     ep = entrypoints.get_single('blogtool.parsers', '.rst', sample_path)
@@ -50,6 +51,26 @@
     group = entrypoints.get_group_named('test.case_sensitive', sample_path)
     assert set(group.keys()) == {'Ptangle', 'ptangle'}
 
+def test_load_zip(tmpdir):
+    whl_file = str(tmpdir / 'parmesan-1.2.whl')
+    with ZipFile(whl_file, 'w') as whl:
+        whl.writestr('parmesan-1.2.dist-info/entry_points.txt',
+                     b'[entrypoints.test.inzip]\na = edam:gouda')
+        whl.writestr('gruyere-2!1b4.dev0.egg-info/entry_points.txt',
+                     b'[entrypoints.test.inzip]\nb = wensleydale:gouda')
+
+    ep = entrypoints.get_single('entrypoints.test.inzip', 'a', [str(whl_file)])
+    assert ep.module_name == 'edam'
+    assert ep.object_name == 'gouda'
+    assert ep.distro.name == 'parmesan'
+    assert ep.distro.version == '1.2'
+
+    ep2 = entrypoints.get_single('entrypoints.test.inzip', 'b', 
[str(whl_file)])
+    assert ep2.module_name == 'wensleydale'
+    assert ep2.object_name == 'gouda'
+    assert ep2.distro.name == 'gruyere'
+    assert ep2.distro.version == '2!1b4.dev0'
+
 def test_load():
     ep = entrypoints.EntryPoint('get_ep', 'entrypoints', 'get_single', None)
     obj = ep.load()


Reply via email to