Hello community,
here is the log from the commit of package python-stevedore for
openSUSE:Factory checked in at 2020-10-22 14:20:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-stevedore (Old)
and /work/SRC/openSUSE:Factory/.python-stevedore.new.3463 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-stevedore"
Thu Oct 22 14:20:09 2020 rev:36 rq:841229 version:3.2.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-stevedore/python-stevedore.changes
2020-05-28 09:05:20.651343689 +0200
+++
/work/SRC/openSUSE:Factory/.python-stevedore.new.3463/python-stevedore.changes
2020-10-22 14:20:13.318639256 +0200
@@ -1,0 +2,20 @@
+Fri Oct 9 19:19:31 UTC 2020 - [email protected]
+
+- update to version 3.2.2
+ - Drop Python 2.7 support
+ - sphinxext: fix warning message for detailed list
+ - Switch to newer openstackdocstheme and reno versions
+ - Replace external mock with built-in unittest.mock
+ - Remove Travis CI config
+ - switch to importlib.metadata package
+ - fix supported python versions in documentation
+ - Add Python3 victoria unit tests
+ - add release note before major version update
+ - add property methods to extension for more entry point values
+ - Stop to use the __future__ module.
+ - Remove dead files
+ - Mark sphinx extensions thread safe
+ - Update master for stable/ussuri
+ - Fix the bug 1892610. There're some syntax errors in the comment of
stevedore code.
+
+-------------------------------------------------------------------
Old:
----
stevedore-1.32.0.tar.gz
New:
----
stevedore-3.2.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-stevedore.spec ++++++
--- /var/tmp/diff_new_pack.Lt6V36/_old 2020-10-22 14:20:15.666641364 +0200
+++ /var/tmp/diff_new_pack.Lt6V36/_new 2020-10-22 14:20:15.670641368 +0200
@@ -17,19 +17,18 @@
Name: python-stevedore
-Version: 1.32.0
+Version: 3.2.2
Release: 0
Summary: Manage dynamic plugins for Python applications
License: Apache-2.0
Group: Development/Languages/Python
URL: https://docs.openstack.org/developer/stevedore/
-Source0:
https://files.pythonhosted.org/packages/source/s/stevedore/stevedore-1.32.0.tar.gz
+Source0:
https://files.pythonhosted.org/packages/source/s/stevedore/stevedore-3.2.2.tar.gz
BuildRequires: openstack-macros
BuildRequires: python3-docutils
BuildRequires: python3-mock
BuildRequires: python3-pbr >= 2.0.0
BuildRequires: python3-pytest
-BuildRequires: python3-setuptools
BuildRequires: python3-testtools
BuildArch: noarch
@@ -47,8 +46,9 @@
%package -n python3-stevedore
Summary: Manage dynamic plugins for Python applications
Group: Development/Languages/Python
+Requires: python3-importlib-metadata >= 1.7.0
Requires: python3-pbr >= 2.0.0
-Requires: python3-six >= 1.10.0
+Requires: python3-six
%description -n python3-stevedore
Python makes loading code dynamically easy, allowing you to configure
@@ -90,7 +90,7 @@
%py3_build
# generate html docs
-PBR_VERSION=1.32.0 PYTHONPATH=. %sphinx_build -b html doc/source doc/build/html
+PBR_VERSION=3.2.2 PYTHONPATH=. %sphinx_build -b html doc/source doc/build/html
# remove the Sphinx-build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}
++++++ _service ++++++
--- /var/tmp/diff_new_pack.Lt6V36/_old 2020-10-22 14:20:15.706641401 +0200
+++ /var/tmp/diff_new_pack.Lt6V36/_new 2020-10-22 14:20:15.706641401 +0200
@@ -1,8 +1,8 @@
<services>
<service mode="disabled" name="renderspec">
- <param
name="input-template">https://opendev.org/openstack/rpm-packaging/raw/branch/stable/ussuri/openstack/stevedore/stevedore.spec.j2</param>
+ <param
name="input-template">https://opendev.org/openstack/rpm-packaging/raw/branch/stable/victoria/openstack/stevedore/stevedore.spec.j2</param>
<param name="output-name">python-stevedore.spec</param>
- <param
name="requirements">https://opendev.org/openstack/stevedore/raw/branch/stable/ussuri/requirements.txt</param>
+ <param
name="requirements">https://opendev.org/openstack/stevedore/raw/branch/stable/victoria/requirements.txt</param>
<param name="changelog-email">[email protected]</param>
<param name="changelog-provider">gh,openstack,stevedore</param>
</service>
++++++ stevedore-1.32.0.tar.gz -> stevedore-3.2.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/.travis.yml
new/stevedore-3.2.2/.travis.yml
--- old/stevedore-1.32.0/.travis.yml 2020-02-11 11:55:45.000000000 +0100
+++ new/stevedore-3.2.2/.travis.yml 1970-01-01 01:00:00.000000000 +0100
@@ -1,13 +0,0 @@
-language: python
-python:
- - "2.7"
- - "3.2"
- - "3.3"
- - "pypy"
-install:
- - pip install flake8 --use-mirrors
- - pip install nose mock --use-mirrors
- - pip install -q . --use-mirrors
-before_script:
- - flake8 stevedore setup.py
-script: nosetests stevedore
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/.zuul.yaml
new/stevedore-3.2.2/.zuul.yaml
--- old/stevedore-1.32.0/.zuul.yaml 2020-02-11 11:55:45.000000000 +0100
+++ new/stevedore-3.2.2/.zuul.yaml 2020-09-11 21:19:46.000000000 +0200
@@ -1,11 +1,9 @@
- project:
templates:
- check-requirements
- - lib-forward-testing
- lib-forward-testing-python3
- openstack-lower-constraints-jobs
- - openstack-python-jobs
- - openstack-python3-ussuri-jobs
+ - openstack-python3-victoria-jobs
- periodic-stable-jobs
- publish-openstack-docs-pti
- release-notes-jobs-python3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/AUTHORS new/stevedore-3.2.2/AUTHORS
--- old/stevedore-1.32.0/AUTHORS 2020-02-11 11:56:35.000000000 +0100
+++ new/stevedore-3.2.2/AUTHORS 2020-09-11 21:22:08.000000000 +0200
@@ -15,6 +15,7 @@
Doug Hellmann <[email protected]>
Doug Hellmann <[email protected]>
Elod Illes <[email protected]>
+Evgeni Golov <[email protected]>
Flavio Percoco <[email protected]>
Ghanshyam Mann <[email protected]>
Hervé Beraud <[email protected]>
@@ -27,6 +28,7 @@
Louis Taylor <[email protected]>
Marc Koderer <[email protected]>
Marianne Linhares <[email protected]>
+Michał Górny <[email protected]>
OpenStack Release Bot <[email protected]>
Philip Tzou <[email protected]>
Ricardo Kirkner <[email protected]>
@@ -34,6 +36,7 @@
Sahid Orentino Ferdjaoui <[email protected]>
Sean McGinnis <[email protected]>
Sean McGinnis <[email protected]>
+Stephen Finucane <[email protected]>
Swapnil Kulkarni (coolsvap) <[email protected]>
Thomas Bechtold <[email protected]>
Thomas Goirand <[email protected]>
@@ -57,4 +60,5 @@
wu.chunyang <[email protected]>
zhang.lei <[email protected]>
zhangwen1 <[email protected]>
+zhangziwen <[email protected]>
Łukasz Jernaś <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/ChangeLog
new/stevedore-3.2.2/ChangeLog
--- old/stevedore-1.32.0/ChangeLog 2020-02-11 11:56:35.000000000 +0100
+++ new/stevedore-3.2.2/ChangeLog 2020-09-11 21:22:08.000000000 +0200
@@ -1,6 +1,49 @@
CHANGES
=======
+3.2.2
+-----
+
+* fix supported python versions in documentation
+
+3.2.1
+-----
+
+* Fix the bug 1892610. There're some syntax errors in the comment of stevedore
code
+
+3.2.0
+-----
+
+* add property methods to extension for more entry point values
+
+3.1.0
+-----
+
+* sphinxext: fix warning message for detailed list
+
+3.0.0
+-----
+
+* add release note before major version update
+* switch to importlib.metadata package
+
+2.0.1
+-----
+
+* Remove Travis CI config
+* Replace external mock with built-in unittest.mock
+
+2.0.0
+-----
+
+* Stop to use the \_\_future\_\_ module
+* Switch to newer openstackdocstheme and reno versions
+* Add Python3 victoria unit tests
+* Mark sphinx extensions thread safe
+* Remove dead files
+* Drop Python 2.7 support
+* Update master for stable/ussuri
+
1.32.0
------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/MANIFEST.in
new/stevedore-3.2.2/MANIFEST.in
--- old/stevedore-1.32.0/MANIFEST.in 2020-02-11 11:55:45.000000000 +0100
+++ new/stevedore-3.2.2/MANIFEST.in 1970-01-01 01:00:00.000000000 +0100
@@ -1,5 +0,0 @@
-include setup.py
-recursive-include docs *.rst *.py *.html *.css *.js *.png *.txt *.jpg
-recursive-include tests *.py
-include tox.ini
-include LICENSE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/PKG-INFO
new/stevedore-3.2.2/PKG-INFO
--- old/stevedore-1.32.0/PKG-INFO 2020-02-11 11:56:35.000000000 +0100
+++ new/stevedore-3.2.2/PKG-INFO 2020-09-11 21:22:09.000000000 +0200
@@ -1,6 +1,6 @@
-Metadata-Version: 1.1
+Metadata-Version: 1.2
Name: stevedore
-Version: 1.32.0
+Version: 3.2.2
Summary: Manage dynamic plugins for Python applications
Home-page: https://docs.openstack.org/stevedore/latest/
Author: OpenStack
@@ -39,10 +39,11 @@
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: Apache Software License
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.6
Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3 :: Only
+Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Intended Audience :: Developers
Classifier: Environment :: Console
+Requires-Python: >=3.6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/announce.rst
new/stevedore-3.2.2/announce.rst
--- old/stevedore-1.32.0/announce.rst 2020-02-11 11:55:45.000000000 +0100
+++ new/stevedore-3.2.2/announce.rst 1970-01-01 01:00:00.000000000 +0100
@@ -1,38 +0,0 @@
-================
- stevedore 0.14
-================
-
-.. tags:: stevedore release python
-
-What is stevedore?
-==================
-
-Python makes loading code dynamically easy, allowing you to configure
-and extend your application by discovering and loading extensions
-("*plugins*") at runtime. Many applications implement their own
-library for doing this, using ``__import__`` or
-``importlib``. stevedore_ avoids creating yet another extension
-mechanism by building on top of `setuptools entry points`_. The code
-for managing entry points tends to be repetitive, though, so stevedore
-provides manager classes for implementing common patterns for using
-dynamically loaded extensions.
-
-.. _stevedore: http://stevedore.readthedocs.org
-
-.. _setuptools entry points:
https://setuptools.readthedocs.io/en/latest/pkg_resources.html#convenience-api
-
-
-What's New?
-===========
-
-- Provide an option to control requirements checking when loading
- plugins, and disable it by default. This removes protection against
- loading the wrong version of a plugin, or that plugin's
- dependencies.
-
-
-Installing
-==========
-
-Visit the stevedore_ project page for download links and installation
-instructions.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/doc/requirements.txt
new/stevedore-3.2.2/doc/requirements.txt
--- old/stevedore-1.32.0/doc/requirements.txt 2020-02-11 11:55:45.000000000
+0100
+++ new/stevedore-3.2.2/doc/requirements.txt 2020-09-11 21:19:46.000000000
+0200
@@ -1,7 +1,6 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
-openstackdocstheme>=1.18.1 # Apache-2.0
-reno>=2.5.0 # Apache-2.0
-sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD
-sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2;python_version>='3.4' # BSD
+openstackdocstheme>=2.2.1 # Apache-2.0
+reno>=3.1.0 # Apache-2.0
+sphinx>=2.0.0,!=2.1.0 # BSD
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/doc/source/conf.py
new/stevedore-3.2.2/doc/source/conf.py
--- old/stevedore-1.32.0/doc/source/conf.py 2020-02-11 11:55:45.000000000
+0100
+++ new/stevedore-3.2.2/doc/source/conf.py 2020-09-11 21:19:46.000000000
+0200
@@ -12,7 +12,6 @@
# serve to show the default.
import datetime
-import subprocess
# make openstackdocstheme an optional dependency. stevedore is a low level lib
# that is used outside of OpenStack. Not having something OpenStack specific
@@ -47,10 +46,10 @@
extensions.append('openstackdocstheme')
# openstackdocstheme options
-repository_name = 'openstack/stevedore'
-bug_project = 'python-stevedore'
-bug_tag = ''
-html_last_updated_fmt = '%Y-%m-%d %H:%M'
+openstackdocs_repo_name = 'openstack/stevedore'
+openstackdocs_auto_name = False
+openstackdocs_bug_project = 'python-stevedore'
+openstackdocs_bug_tag = ''
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
@@ -68,16 +67,6 @@
project = u'stevedore'
copyright = u'2016, DreamHost'
-# The version info for the project you're documenting, acts as replacement for
-# |version| and |release|, also used in various other places throughout the
-# built documents.
-#
-# The short X.Y version.
-version = subprocess.Popen(['sh', '-c', 'cd ../..; python setup.py --version'],
-
stdout=subprocess.PIPE).stdout.read().decode('utf-8')
-version = version.strip()
-# The full version, including alpha/beta/rc tags.
-release = version
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@@ -108,7 +97,7 @@
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'sphinx'
+pygments_style = 'native'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
@@ -151,10 +140,6 @@
# so a file named "default.css" will overwrite the builtin "default.css".
#html_static_path = ['_static']
-# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
-# using the given strftime format.
-#html_last_updated_fmt = '%b %d, %Y'
-
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/doc/source/index.rst
new/stevedore-3.2.2/doc/source/index.rst
--- old/stevedore-1.32.0/doc/source/index.rst 2020-02-11 11:55:45.000000000
+0100
+++ new/stevedore-3.2.2/doc/source/index.rst 2020-09-11 21:19:46.000000000
+0200
@@ -7,7 +7,7 @@
("*plugins*") at runtime. Many applications implement their own
library for doing this, using ``__import__`` or
:mod:`importlib`. stevedore avoids creating yet another extension
-mechanism by building on top of `setuptools entry points`_. The code
+mechanism by building on top of `entry points`_. The code
for managing entry points tends to be repetitive, though, so stevedore
provides manager classes for implementing common patterns for using
dynamically loaded extensions.
@@ -21,7 +21,7 @@
install/index
-.. _setuptools entry points:
http://setuptools.readthedocs.io/en/latest/pkg_resources.html?#entry-points
+.. _entry points:
https://docs.python.org/3/library/importlib.metadata.html#entry-points
.. rubric:: Indices and tables
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/doc/source/install/index.rst
new/stevedore-3.2.2/doc/source/install/index.rst
--- old/stevedore-1.32.0/doc/source/install/index.rst 2020-02-11
11:55:45.000000000 +0100
+++ new/stevedore-3.2.2/doc/source/install/index.rst 2020-09-11
21:19:46.000000000 +0200
@@ -5,7 +5,7 @@
Python Versions
===============
-stevedore is tested under Python 2.7 and 3.4.
+stevedore is tested under Python 3.6 and 3.7.
.. _install-basic:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/stevedore-1.32.0/doc/source/user/patterns_loading.rst
new/stevedore-3.2.2/doc/source/user/patterns_loading.rst
--- old/stevedore-1.32.0/doc/source/user/patterns_loading.rst 2020-02-11
11:55:45.000000000 +0100
+++ new/stevedore-3.2.2/doc/source/user/patterns_loading.rst 2020-09-11
21:19:46.000000000 +0200
@@ -7,7 +7,7 @@
name, which does not have to be unique within a given namespace. The
flexibility of this name management system makes it possible to use
plugins in a variety of ways. The manager classes in stevedore wrap
-:mod:`pkg_resources` to apply different rules matching the patterns
+:mod:`importlib.metadata` to apply different rules matching the patterns
described here.
Drivers -- Single Name, Single Entry Point
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/stevedore-1.32.0/doc/source/user/tutorial/creating_plugins.rst
new/stevedore-3.2.2/doc/source/user/tutorial/creating_plugins.rst
--- old/stevedore-1.32.0/doc/source/user/tutorial/creating_plugins.rst
2020-02-11 11:55:45.000000000 +0100
+++ new/stevedore-3.2.2/doc/source/user/tutorial/creating_plugins.rst
2020-09-11 21:19:46.000000000 +0200
@@ -109,7 +109,7 @@
t2 = stevedore.tests.test_extension:FauxExtension
t1 = stevedore.tests.test_extension:FauxExtension
-:mod:`pkg_resources` uses the ``entry_points.txt`` file from all of
+:mod:`importlib.metadata` uses the ``entry_points.txt`` file from all of
the installed packages on the import path to find plugins. You should
not modify these files, except by changing the list of entry points in
``setup.py``.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/doc/source/user/tutorial/index.rst
new/stevedore-3.2.2/doc/source/user/tutorial/index.rst
--- old/stevedore-1.32.0/doc/source/user/tutorial/index.rst 2020-02-11
11:55:45.000000000 +0100
+++ new/stevedore-3.2.2/doc/source/user/tutorial/index.rst 2020-09-11
21:19:46.000000000 +0200
@@ -20,7 +20,9 @@
* `Using setuptools entry points`_
* `Package Discovery and Resource Access using pkg_resources`_
* `Using Entry Points to Write Plugins | Pylons`_
+ * `importlib.metadata`_
.. _Using setuptools entry points:
http://reinout.vanrees.org/weblog/2010/01/06/zest-releaser-entry-points.html
.. _Package Discovery and Resource Access using pkg_resources:
http://pythonhosted.org/distribute/pkg_resources.html
.. _Using Entry Points to Write Plugins | Pylons:
http://docs.pylonsproject.org/projects/pylons-webframework/en/latest/advanced_pylons/entry_points_and_plugins.html
+.. _importlib.metadata:
https://docs.python.org/3/library/importlib.metadata.html#entry-points
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/stevedore-1.32.0/doc/source/user/tutorial/loading.rst
new/stevedore-3.2.2/doc/source/user/tutorial/loading.rst
--- old/stevedore-1.32.0/doc/source/user/tutorial/loading.rst 2020-02-11
11:55:45.000000000 +0100
+++ new/stevedore-3.2.2/doc/source/user/tutorial/loading.rst 2020-09-11
21:19:46.000000000 +0200
@@ -41,7 +41,7 @@
.. literalinclude:: ../../../../stevedore/example/load_as_driver.py
:language: python
- :lines: 36-37
+ :lines: 34-35
Running the example program produces this output:
@@ -81,7 +81,7 @@
The :class:`Extension` passed :func:`format_data` is a class defined
by stevedore that wraps the plugin. It includes the name of the
-plugin, the :class:`EntryPoint` returned by :mod:`pkg_resources`, and
+plugin, the :class:`EntryPoint` returned by :mod:`importlib.metadata`, and
the plugin itself (the named object referenced by the plugin
definition). When ``invoke_on_load`` is true, the :class:`Extension`
will also have an :attr:`obj` attribute containing the value returned
@@ -95,7 +95,7 @@
.. literalinclude:: ../../../../stevedore/example/load_as_extension.py
:language: python
- :lines: 35-39
+ :lines: 33-37
The order the plugins are loaded is undefined, and depends on the
order packages are found on the import path as well as the way the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/lower-constraints.txt
new/stevedore-3.2.2/lower-constraints.txt
--- old/stevedore-1.32.0/lower-constraints.txt 2020-02-11 11:55:45.000000000
+0100
+++ new/stevedore-3.2.2/lower-constraints.txt 2020-09-11 21:19:46.000000000
+0200
@@ -8,10 +8,10 @@
gitdb==0.6.4
GitPython==1.0.1
imagesize==0.7.1
+importlib_metadata==1.7.0
Jinja2==2.10
linecache2==1.0.0
MarkupSafe==1.0
-mock==2.0.0
pbr==2.0.0
Pygments==2.2.0
python-mimeparse==1.6.0
@@ -19,10 +19,9 @@
pytz==2013.6
PyYAML==3.12
requests==2.14.2
-six==1.10.0
smmap==0.9.0
snowballstemmer==1.2.1
-Sphinx==1.6.5
+Sphinx==2.0.0
sphinxcontrib-websupport==1.0.1
stestr==2.0.0
testtools==2.2.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/stevedore-1.32.0/releasenotes/notes/drop-python2-support-3f0f717570cad8cb.yaml
new/stevedore-3.2.2/releasenotes/notes/drop-python2-support-3f0f717570cad8cb.yaml
---
old/stevedore-1.32.0/releasenotes/notes/drop-python2-support-3f0f717570cad8cb.yaml
1970-01-01 01:00:00.000000000 +0100
+++
new/stevedore-3.2.2/releasenotes/notes/drop-python2-support-3f0f717570cad8cb.yaml
2020-09-11 21:19:46.000000000 +0200
@@ -0,0 +1,4 @@
+---
+upgrade:
+ - |
+ Support for Python 2.7 is removed. Python 3.6 or greater is now required.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/stevedore-1.32.0/releasenotes/notes/entry-point-type-change-06ca3b301ba7aad1.yaml
new/stevedore-3.2.2/releasenotes/notes/entry-point-type-change-06ca3b301ba7aad1.yaml
---
old/stevedore-1.32.0/releasenotes/notes/entry-point-type-change-06ca3b301ba7aad1.yaml
1970-01-01 01:00:00.000000000 +0100
+++
new/stevedore-3.2.2/releasenotes/notes/entry-point-type-change-06ca3b301ba7aad1.yaml
2020-09-11 21:19:46.000000000 +0200
@@ -0,0 +1,15 @@
+---
+features:
+ - |
+ Adds a caching layer. The cache is a single JSON file created
+ automatically in the user's home directory. It stores the parsed
+ text data from all of the metadata input files in a file with a
+ name based on the hash of the contents and `sys.path`, ensuring
+ uniqueness for applications installed into different virtual
+ environments.
+upgrade:
+ - |
+ The type of the entry point objects returned has changed from
+ `pkg_resources.EntryPoint` to `importlib.metadata.EntryPoint`. The
+ new objects still have a `load()` method, but some of the other
+ APIs are different.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/stevedore-1.32.0/releasenotes/notes/expose-entry-point-properties-6f2d868d4342fc0d.yaml
new/stevedore-3.2.2/releasenotes/notes/expose-entry-point-properties-6f2d868d4342fc0d.yaml
---
old/stevedore-1.32.0/releasenotes/notes/expose-entry-point-properties-6f2d868d4342fc0d.yaml
1970-01-01 01:00:00.000000000 +0100
+++
new/stevedore-3.2.2/releasenotes/notes/expose-entry-point-properties-6f2d868d4342fc0d.yaml
2020-09-11 21:19:46.000000000 +0200
@@ -0,0 +1,6 @@
+---
+features:
+ - |
+ Add `extras` and `attr` properties to the `Extension` class to
+ make it easier for consumers to access the underlying properties,
+ regardless of the version of `importlib.metadata` being used.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/stevedore-1.32.0/releasenotes/notes/module-name-property-d3b2d092259dadec.yaml
new/stevedore-3.2.2/releasenotes/notes/module-name-property-d3b2d092259dadec.yaml
---
old/stevedore-1.32.0/releasenotes/notes/module-name-property-d3b2d092259dadec.yaml
1970-01-01 01:00:00.000000000 +0100
+++
new/stevedore-3.2.2/releasenotes/notes/module-name-property-d3b2d092259dadec.yaml
2020-09-11 21:19:46.000000000 +0200
@@ -0,0 +1,5 @@
+---
+features:
+ - |
+ Add a `module_name` property to the `Extension` class to make it easier
+ for consumers to determine where the plugin is being loaded from.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/releasenotes/source/conf.py
new/stevedore-3.2.2/releasenotes/source/conf.py
--- old/stevedore-1.32.0/releasenotes/source/conf.py 2020-02-11
11:55:45.000000000 +0100
+++ new/stevedore-3.2.2/releasenotes/source/conf.py 2020-09-11
21:19:46.000000000 +0200
@@ -40,10 +40,10 @@
]
# openstackdocstheme options
-repository_name = 'openstack/stevedore'
-bug_project = 'python-stevedore'
-bug_tag = ''
-html_last_updated_fmt = '%Y-%m-%d %H:%M'
+openstackdocs_repo_name = 'openstack/stevedore'
+openstackdocs_auto_name = False
+openstackdocs_bug_project = 'python-stevedore'
+openstackdocs_bug_tag = ''
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
@@ -98,7 +98,7 @@
# show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'sphinx'
+pygments_style = 'native'
# A list of ignored prefixes for module index sorting.
# modindex_common_prefix = []
@@ -147,10 +147,6 @@
# directly to the root of the documentation.
# html_extra_path = []
-# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
-# using the given strftime format.
-# html_last_updated_fmt = '%b %d, %Y'
-
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
# html_use_smartypants = True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/releasenotes/source/index.rst
new/stevedore-3.2.2/releasenotes/source/index.rst
--- old/stevedore-1.32.0/releasenotes/source/index.rst 2020-02-11
11:55:45.000000000 +0100
+++ new/stevedore-3.2.2/releasenotes/source/index.rst 2020-09-11
21:19:46.000000000 +0200
@@ -6,6 +6,7 @@
:maxdepth: 1
unreleased
+ ussuri
train
stein
rocky
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/releasenotes/source/ussuri.rst
new/stevedore-3.2.2/releasenotes/source/ussuri.rst
--- old/stevedore-1.32.0/releasenotes/source/ussuri.rst 1970-01-01
01:00:00.000000000 +0100
+++ new/stevedore-3.2.2/releasenotes/source/ussuri.rst 2020-09-11
21:19:46.000000000 +0200
@@ -0,0 +1,6 @@
+===========================
+Ussuri Series Release Notes
+===========================
+
+.. release-notes::
+ :branch: stable/ussuri
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/requirements.txt
new/stevedore-3.2.2/requirements.txt
--- old/stevedore-1.32.0/requirements.txt 2020-02-11 11:55:45.000000000
+0100
+++ new/stevedore-3.2.2/requirements.txt 2020-09-11 21:19:46.000000000
+0200
@@ -3,4 +3,4 @@
# process, which may cause wedges in the gate later.
pbr!=2.1.0,>=2.0.0 # Apache-2.0
-six>=1.10.0 # MIT
+importlib_metadata>=1.7.0;python_version<'3.8' # Apache-2.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/setup.cfg
new/stevedore-3.2.2/setup.cfg
--- old/stevedore-1.32.0/setup.cfg 2020-02-11 11:56:35.000000000 +0100
+++ new/stevedore-3.2.2/setup.cfg 2020-09-11 21:22:09.000000000 +0200
@@ -5,22 +5,19 @@
author-email = [email protected]
summary = Manage dynamic plugins for Python applications
home-page = https://docs.openstack.org/stevedore/latest/
+python-requires = >=3.6
classifier =
Development Status :: 5 - Production/Stable
License :: OSI Approved :: Apache Software License
Programming Language :: Python
- Programming Language :: Python :: 2
- Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
+ Programming Language :: Python :: 3 :: Only
+ Programming Language :: Python :: Implementation :: CPython
Intended Audience :: Developers
Environment :: Console
-[global]
-setup-hooks =
- pbr.hooks.setup_hook
-
[files]
packages =
stevedore
@@ -36,12 +33,6 @@
e1 = stevedore.tests.test_extension:BrokenExtension
e2 = stevedore.tests.notfound:UnimportableExtension
-[pbr]
-warnerrors = True
-
-[wheel]
-universal = true
-
[egg_info]
tag_build =
tag_date = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/setup.py
new/stevedore-3.2.2/setup.py
--- old/stevedore-1.32.0/setup.py 2020-02-11 11:55:45.000000000 +0100
+++ new/stevedore-3.2.2/setup.py 2020-09-11 21:19:46.000000000 +0200
@@ -16,14 +16,6 @@
# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
import setuptools
-# In python < 2.7.4, a lazy loading of package `pbr` will break
-# setuptools if some other modules registered functions in `atexit`.
-# solution from: http://bugs.python.org/issue15881#msg170215
-try:
- import multiprocessing # noqa
-except ImportError:
- pass
-
setuptools.setup(
setup_requires=['pbr>=2.0.0'],
pbr=True)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/stevedore/__init__.py
new/stevedore-3.2.2/stevedore/__init__.py
--- old/stevedore-1.32.0/stevedore/__init__.py 2020-02-11 11:55:45.000000000
+0100
+++ new/stevedore-3.2.2/stevedore/__init__.py 2020-09-11 21:19:46.000000000
+0200
@@ -21,4 +21,3 @@
LOG = logging.getLogger('stevedore')
LOG.addHandler(logging.NullHandler())
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/stevedore/_cache.py
new/stevedore-3.2.2/stevedore/_cache.py
--- old/stevedore-1.32.0/stevedore/_cache.py 1970-01-01 01:00:00.000000000
+0100
+++ new/stevedore-3.2.2/stevedore/_cache.py 2020-09-11 21:19:46.000000000
+0200
@@ -0,0 +1,195 @@
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+"""Use a cache layer in front of entry point scanning."""
+
+import errno
+import glob
+import hashlib
+import itertools
+import json
+import logging
+import os
+import os.path
+import struct
+import sys
+
+try:
+ # For python 3.8 and later
+ import importlib.metadata as importlib_metadata
+except ImportError:
+ # For everyone else
+ import importlib_metadata
+
+
+log = logging.getLogger('stevedore._cache')
+
+
+def _get_cache_dir():
+ """Locate a platform-appropriate cache directory to use.
+
+ Does not ensure that the cache directory exists.
+ """
+ # Linux, Unix, AIX, etc.
+ if os.name == 'posix' and sys.platform != 'darwin':
+ # use ~/.cache if empty OR not set
+ base_path = os.environ.get("XDG_CACHE_HOME", None) \
+ or os.path.expanduser('~/.cache')
+ return os.path.join(base_path, 'python-entrypoints')
+
+ # Mac OS
+ elif sys.platform == 'darwin':
+ return os.path.expanduser('~/Library/Caches/Python Entry Points')
+
+ # Windows (hopefully)
+ else:
+ base_path = os.environ.get('LOCALAPPDATA', None) \
+ or os.path.expanduser('~\\AppData\\Local')
+ return os.path.join(base_path, 'Python Entry Points')
+
+
+def _get_mtime(name):
+ try:
+ s = os.stat(name)
+ return s.st_mtime
+ except OSError as err:
+ if err.errno != errno.ENOENT:
+ raise
+ return -1.0
+
+
+def _ftobytes(f):
+ return struct.Struct('f').pack(f)
+
+
+def _hash_settings_for_path(path):
+ """Return a hash and the path settings that created it.
+ """
+ paths = []
+ h = hashlib.sha256()
+
+ # Tie the cache to the python interpreter, in case it is part of a
+ # virtualenv.
+ h.update(sys.executable.encode('utf-8'))
+ h.update(sys.prefix.encode('utf-8'))
+
+ for entry in path:
+ mtime = _get_mtime(entry)
+ h.update(entry.encode('utf-8'))
+ h.update(_ftobytes(mtime))
+ paths.append((entry, mtime))
+
+ for ep_file in itertools.chain(
+ glob.iglob(os.path.join(entry,
+ '*.dist-info',
+ 'entry_points.txt')),
+ glob.iglob(os.path.join(entry,
+ '*.egg-info',
+ 'entry_points.txt'))
+ ):
+ mtime = _get_mtime(ep_file)
+ h.update(ep_file.encode('utf-8'))
+ h.update(_ftobytes(mtime))
+ paths.append((ep_file, mtime))
+
+ return (h.hexdigest(), paths)
+
+
+def _build_cacheable_data(path):
+ real_groups = importlib_metadata.entry_points()
+ # Convert the namedtuple values to regular tuples
+ groups = {}
+ for name, group_data in real_groups.items():
+ existing = set()
+ members = []
+ groups[name] = members
+ for ep in group_data:
+ # Filter out duplicates that can occur when testing a
+ # package that provides entry points using tox, where the
+ # package is installed in the virtualenv that tox builds
+ # and is present in the path as '.'.
+ item = ep[:] # convert namedtuple to tuple
+ if item in existing:
+ continue
+ existing.add(item)
+ members.append(item)
+ return {
+ 'groups': groups,
+ 'sys.executable': sys.executable,
+ 'sys.prefix': sys.prefix,
+ }
+
+
+class Cache:
+
+ def __init__(self, cache_dir=None):
+ if cache_dir is None:
+ cache_dir = _get_cache_dir()
+ self._dir = cache_dir
+ self._internal = {}
+
+ def _get_data_for_path(self, path):
+ if path is None:
+ path = sys.path
+
+ internal_key = tuple(path)
+ if internal_key in self._internal:
+ return self._internal[internal_key]
+
+ digest, path_values = _hash_settings_for_path(path)
+ filename = os.path.join(self._dir, digest)
+ try:
+ log.debug('reading %s', filename)
+ with open(filename, 'r') as f:
+ data = json.load(f)
+ except (IOError, json.JSONDecodeError):
+ data = _build_cacheable_data(path)
+ data['path_values'] = path_values
+ try:
+ log.debug('writing to %s', filename)
+ os.makedirs(self._dir, exist_ok=True)
+ with open(filename, 'w') as f:
+ json.dump(data, f)
+ except (IOError, OSError):
+ # Could not create cache dir or write file.
+ pass
+
+ self._internal[internal_key] = data
+ return data
+
+ def get_group_all(self, group, path=None):
+ result = []
+ data = self._get_data_for_path(path)
+ group_data = data.get('groups', {}).get(group, [])
+ for vals in group_data:
+ result.append(importlib_metadata.EntryPoint(*vals))
+ return result
+
+ def get_group_named(self, group, path=None):
+ result = {}
+ for ep in self.get_group_all(group, path=path):
+ if ep.name not in result:
+ result[ep.name] = ep
+ return result
+
+ def get_single(self, group, name, path=None):
+ for name, ep in self.get_group_named(group, path=path).items():
+ if name == name:
+ return ep
+ raise ValueError('No entrypoint {!r} in group {!r}'.format(
+ group, name))
+
+
+_c = Cache()
+get_group_all = _c.get_group_all
+get_group_named = _c.get_group_named
+get_single = _c.get_single
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/stevedore/dispatch.py
new/stevedore-3.2.2/stevedore/dispatch.py
--- old/stevedore-1.32.0/stevedore/dispatch.py 2020-02-11 11:55:45.000000000
+0100
+++ new/stevedore-3.2.2/stevedore/dispatch.py 2020-09-11 21:19:46.000000000
+0200
@@ -142,7 +142,7 @@
then ignored
:type invoke_on_load: bool
:param on_load_failure_callback: Callback function that will be called when
- a entrypoint can not be loaded. The arguments that will be provided
+ an entrypoint can not be loaded. The arguments that will be provided
when this is called (when an entrypoint fails to load) are
(manager, entrypoint, exception)
:type on_load_failure_callback: function
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/stevedore/driver.py
new/stevedore-3.2.2/stevedore/driver.py
--- old/stevedore-1.32.0/stevedore/driver.py 2020-02-11 11:55:45.000000000
+0100
+++ new/stevedore-3.2.2/stevedore/driver.py 2020-09-11 21:19:46.000000000
+0200
@@ -33,7 +33,7 @@
is True.
:type invoke_kwds: dict
:param on_load_failure_callback: Callback function that will be called when
- a entrypoint can not be loaded. The arguments that will be provided
+ an entrypoint can not be loaded. The arguments that will be provided
when this is called (when an entrypoint fails to load) are
(manager, entrypoint, exception)
:type on_load_failure_callback: function
@@ -85,7 +85,7 @@
and then ignored
:type propagate_map_exceptions: bool
:param on_load_failure_callback: Callback function that will
- be called when a entrypoint can not be loaded. The
+ be called when an entrypoint can not be loaded. The
arguments that will be provided when this is called (when
an entrypoint fails to load) are (manager, entrypoint,
exception)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/stevedore/enabled.py
new/stevedore-3.2.2/stevedore/enabled.py
--- old/stevedore-1.32.0/stevedore/enabled.py 2020-02-11 11:55:45.000000000
+0100
+++ new/stevedore-3.2.2/stevedore/enabled.py 2020-09-11 21:19:46.000000000
+0200
@@ -46,7 +46,7 @@
then ignored
:type propagate_map_exceptions: bool
:param on_load_failure_callback: Callback function that will be called when
- a entrypoint can not be loaded. The arguments that will be provided
+ an entrypoint can not be loaded. The arguments that will be provided
when this is called (when an entrypoint fails to load) are
(manager, entrypoint, exception)
:type on_load_failure_callback: function
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/stevedore/example/base.py
new/stevedore-3.2.2/stevedore/example/base.py
--- old/stevedore-1.32.0/stevedore/example/base.py 2020-02-11
11:55:45.000000000 +0100
+++ new/stevedore-3.2.2/stevedore/example/base.py 2020-09-11
21:19:46.000000000 +0200
@@ -1,10 +1,7 @@
import abc
-import six
-
[email protected]_metaclass(abc.ABCMeta)
-class FormatterBase(object):
+class FormatterBase(metaclass=abc.ABCMeta):
"""Base class for example plugin used in the tutorial.
"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/stevedore/example/load_as_driver.py
new/stevedore-3.2.2/stevedore/example/load_as_driver.py
--- old/stevedore-1.32.0/stevedore/example/load_as_driver.py 2020-02-11
11:55:45.000000000 +0100
+++ new/stevedore-3.2.2/stevedore/example/load_as_driver.py 2020-09-11
21:19:46.000000000 +0200
@@ -1,5 +1,3 @@
-from __future__ import print_function
-
import argparse
from stevedore import driver
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/stevedore-1.32.0/stevedore/example/load_as_extension.py
new/stevedore-3.2.2/stevedore/example/load_as_extension.py
--- old/stevedore-1.32.0/stevedore/example/load_as_extension.py 2020-02-11
11:55:45.000000000 +0100
+++ new/stevedore-3.2.2/stevedore/example/load_as_extension.py 2020-09-11
21:19:46.000000000 +0200
@@ -1,5 +1,3 @@
-from __future__ import print_function
-
import argparse
from stevedore import extension
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/stevedore/extension.py
new/stevedore-3.2.2/stevedore/extension.py
--- old/stevedore-1.32.0/stevedore/extension.py 2020-02-11 11:55:45.000000000
+0100
+++ new/stevedore-3.2.2/stevedore/extension.py 2020-09-11 21:19:46.000000000
+0200
@@ -14,10 +14,9 @@
"""
import operator
-import pkg_resources
-
import logging
+from . import _cache
from .exception import NoMatches
LOG = logging.getLogger(__name__)
@@ -34,7 +33,7 @@
:param name: The entry point name.
:type name: str
:param entry_point: The EntryPoint instance returned by
- :mod:`pkg_resources`.
+ :mod:`entrypoints`.
:type entry_point: EntryPoint
:param plugin: The value returned by entry_point.load()
:param obj: The object returned by ``plugin(*args, **kwds)`` if the
@@ -49,14 +48,45 @@
self.obj = obj
@property
+ def module_name(self):
+ """The name of the module from which the entry point is loaded.
+
+ :return: A string in 'dotted.module' format.
+ """
+ # NOTE: importlib_metadata from PyPI includes this but the
+ # Python 3.8 standard library does not.
+ match = self.entry_point.pattern.match(self.entry_point.value)
+ return match.group('module')
+
+ @property
+ def extras(self):
+ """The 'extras' settings for the plugin."""
+ # NOTE: The underlying package returns re.Match objects for
+ # some reason. Translate those to the matched strings, which
+ # seem more useful.
+ return [
+ # Python 3.6 returns _sre.SRE_Match objects. Later
+ # versions of python return re.Match objects. Both types
+ # have a 'string' attribute containing the text that
+ # matched the pattern.
+ getattr(e, 'string', e)
+ for e in self.entry_point.extras
+ ]
+
+ @property
+ def attr(self):
+ """The attribute of the module to be loaded."""
+ match = self.entry_point.pattern.match(self.entry_point.value)
+ return match.group('attr')
+
+ @property
def entry_point_target(self):
"""The module and attribute referenced by this extension's entry_point.
:return: A string representation of the target of the entry point in
'dotted.module:object' format.
"""
- return '%s:%s' % (self.entry_point.module_name,
- self.entry_point.attrs[0])
+ return self.entry_point.value
class ExtensionManager(object):
@@ -80,7 +110,7 @@
then ignored
:type propagate_map_exceptions: bool
:param on_load_failure_callback: Callback function that will be called when
- a entrypoint can not be loaded. The arguments that will be provided
+ an entrypoint can not be loaded. The arguments that will be provided
when this is called (when an entrypoint fails to load) are
(manager, entrypoint, exception)
:type on_load_failure_callback: function
@@ -126,7 +156,7 @@
are logged and then ignored
:type propagate_map_exceptions: bool
:param on_load_failure_callback: Callback function that will
- be called when a entrypoint can not be loaded. The
+ be called when an entrypoint can not be loaded. The
arguments that will be provided when this is called (when
an entrypoint fails to load) are (manager, entrypoint,
exception)
@@ -174,7 +204,7 @@
"""
if self.namespace not in self.ENTRY_POINT_CACHE:
- eps = list(pkg_resources.iter_entry_points(self.namespace))
+ eps = list(_cache.get_group_all(self.namespace))
self.ENTRY_POINT_CACHE[self.namespace] = eps
return self.ENTRY_POINT_CACHE[self.namespace]
@@ -222,7 +252,7 @@
ep.require()
plugin = ep.resolve()
else:
- plugin = ep.load(require=verify_requirements)
+ plugin = ep.load()
if invoke_on_load:
obj = plugin(*invoke_args, **invoke_kwds)
else:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/stevedore/hook.py
new/stevedore-3.2.2/stevedore/hook.py
--- old/stevedore-1.32.0/stevedore/hook.py 2020-02-11 11:55:45.000000000
+0100
+++ new/stevedore-3.2.2/stevedore/hook.py 2020-09-11 21:19:46.000000000
+0200
@@ -32,7 +32,7 @@
is True.
:type invoke_kwds: dict
:param on_load_failure_callback: Callback function that will be called when
- a entrypoint can not be loaded. The arguments that will be provided
+ an entrypoint can not be loaded. The arguments that will be provided
when this is called (when an entrypoint fails to load) are
(manager, entrypoint, exception)
:type on_load_failure_callback: function
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/stevedore/named.py
new/stevedore-3.2.2/stevedore/named.py
--- old/stevedore-1.32.0/stevedore/named.py 2020-02-11 11:55:45.000000000
+0100
+++ new/stevedore-3.2.2/stevedore/named.py 2020-09-11 21:19:46.000000000
+0200
@@ -46,7 +46,7 @@
then ignored
:type propagate_map_exceptions: bool
:param on_load_failure_callback: Callback function that will be called when
- a entrypoint can not be loaded. The arguments that will be provided
+ an entrypoint can not be loaded. The arguments that will be provided
when this is called (when an entrypoint fails to load) are
(manager, entrypoint, exception)
:type on_load_failure_callback: function
@@ -108,7 +108,7 @@
and then ignored
:type propagate_map_exceptions: bool
:param on_load_failure_callback: Callback function that will
- be called when a entrypoint can not be loaded. The
+ be called when an entrypoint can not be loaded. The
arguments that will be provided when this is called (when
an entrypoint fails to load) are (manager, entrypoint,
exception)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/stevedore/sphinxext.py
new/stevedore-3.2.2/stevedore/sphinxext.py
--- old/stevedore-1.32.0/stevedore/sphinxext.py 2020-02-11 11:55:45.000000000
+0100
+++ new/stevedore-3.2.2/stevedore/sphinxext.py 2020-09-11 21:19:46.000000000
+0200
@@ -10,8 +10,6 @@
# License for the specific language governing permissions and limitations
# under the License.
-from __future__ import unicode_literals
-
import inspect
from docutils import nodes
@@ -36,29 +34,32 @@
doc = _get_docstring(ext.plugin) or '\n'
summary = doc.splitlines()[0].strip()
yield('* %s -- %s' % (ext.name, summary),
- ext.entry_point.module_name)
+ ext.module_name)
def _detailed_list(mgr, over='', under='-', titlecase=False):
for name in sorted(mgr.names()):
ext = mgr[name]
if over:
- yield (over * len(ext.name), ext.entry_point.module_name)
+ yield (over * len(ext.name), ext.module_name)
if titlecase:
- yield (ext.name.title(), ext.entry_point.module_name)
+ yield (ext.name.title(), ext.module_name)
else:
- yield (ext.name, ext.entry_point.module_name)
+ yield (ext.name, ext.module_name)
if under:
- yield (under * len(ext.name), ext.entry_point.module_name)
- yield ('\n', ext.entry_point.module_name)
+ yield (under * len(ext.name), ext.module_name)
+ yield ('\n', ext.module_name)
doc = _get_docstring(ext.plugin)
if doc:
- yield (doc, ext.entry_point.module_name)
+ yield (doc, ext.module_name)
else:
- yield ('.. warning:: No documentation found in %s'
- % ext.entry_point,
- ext.entry_point.module_name)
- yield ('\n', ext.entry_point.module_name)
+ yield (
+ '.. warning:: No documentation found for {} in {}'.format(
+ ext.name, ext.entry_point_target,
+ ),
+ ext.module_name,
+ )
+ yield ('\n', ext.module_name)
class ListPluginsDirective(rst.Directive):
@@ -81,7 +82,7 @@
underline_style = self.options.get('underline-style', '=')
def report_load_failure(mgr, ep, err):
- LOG.warning(u'Failed to load %s: %s' % (ep.module_name, err))
+ LOG.warning(u'Failed to load %s: %s' % (ep.module, err))
mgr = extension.ExtensionManager(
namespace,
@@ -113,3 +114,7 @@
def setup(app):
LOG.info('loading stevedore.sphinxext')
app.add_directive('list-plugins', ListPluginsDirective)
+ return {
+ 'parallel_read_safe': True,
+ 'parallel_write_safe': True,
+ }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/stevedore/tests/test_callback.py
new/stevedore-3.2.2/stevedore/tests/test_callback.py
--- old/stevedore-1.32.0/stevedore/tests/test_callback.py 2020-02-11
11:55:45.000000000 +0100
+++ new/stevedore-3.2.2/stevedore/tests/test_callback.py 2020-09-11
21:19:46.000000000 +0200
@@ -12,8 +12,9 @@
"""Tests for failure loading callback
"""
+from unittest import mock
+
from testtools.matchers import GreaterThan
-import mock
from stevedore import extension
from stevedore import named
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/stevedore/tests/test_driver.py
new/stevedore-3.2.2/stevedore/tests/test_driver.py
--- old/stevedore-1.32.0/stevedore/tests/test_driver.py 2020-02-11
11:55:45.000000000 +0100
+++ new/stevedore-3.2.2/stevedore/tests/test_driver.py 2020-09-11
21:19:46.000000000 +0200
@@ -13,7 +13,12 @@
"""Tests for stevedore.extension
"""
-import pkg_resources
+try:
+ # For python 3.8 and later
+ import importlib.metadata as importlib_metadata
+except ImportError:
+ # For everyone else
+ import importlib_metadata
from stevedore import driver
from stevedore import exception
@@ -68,13 +73,15 @@
extensions = [
extension.Extension(
'backend',
- pkg_resources.EntryPoint.parse('backend = pkg1:driver'),
+ importlib_metadata.EntryPoint(
+ 'backend', 'pkg1:driver', 'backend'),
'pkg backend',
None,
),
extension.Extension(
'backend',
- pkg_resources.EntryPoint.parse('backend = pkg2:driver'),
+ importlib_metadata.EntryPoint(
+ 'backend', 'pkg2:driver', 'backend'),
'pkg backend',
None,
),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/stevedore/tests/test_extension.py
new/stevedore-3.2.2/stevedore/tests/test_extension.py
--- old/stevedore-1.32.0/stevedore/tests/test_extension.py 2020-02-11
11:55:45.000000000 +0100
+++ new/stevedore-3.2.2/stevedore/tests/test_extension.py 2020-09-11
21:19:46.000000000 +0200
@@ -14,8 +14,14 @@
"""
import operator
+from unittest import mock
-import mock
+try:
+ # For python 3.8 and later
+ import importlib.metadata as importlib_metadata
+except ImportError:
+ # For everyone else
+ import importlib_metadata
from stevedore import exception
from stevedore import extension
@@ -97,13 +103,13 @@
def test_use_cache(self):
# If we insert something into the cache of entry points,
- # the manager should not have to call into pkg_resources
+ # the manager should not have to call into entrypoints
# to find the plugins.
cache = extension.ExtensionManager.ENTRY_POINT_CACHE
cache['stevedore.test.faux'] = []
- with mock.patch('pkg_resources.iter_entry_points',
+ with mock.patch('stevedore._cache.get_group_all',
side_effect=
- AssertionError('called iter_entry_points')):
+ AssertionError('called get_group_all')):
em = extension.ExtensionManager('stevedore.test.faux')
names = em.names()
self.assertEqual(names, [])
@@ -236,9 +242,48 @@
def test_verify_requirements(self):
self.em._load_one_plugin(self.mock_ep, False, (), {},
verify_requirements=True)
- self.mock_ep.load.assert_called_once_with(require=True)
+ self.mock_ep.load.assert_called_once_with()
def test_no_verify_requirements(self):
self.em._load_one_plugin(self.mock_ep, False, (), {},
verify_requirements=False)
- self.mock_ep.load.assert_called_once_with(require=False)
+ self.mock_ep.load.assert_called_once_with()
+
+
+class TestExtensionProperties(utils.TestCase):
+
+ def setUp(self):
+ self.ext1 = extension.Extension(
+ 'name',
+ importlib_metadata.EntryPoint(
+ 'name', 'module.name:attribute.name [extra]', 'group_name',
+ ),
+ mock.Mock(),
+ None,
+ )
+ self.ext2 = extension.Extension(
+ 'name',
+ importlib_metadata.EntryPoint(
+ 'name', 'module:attribute', 'group_name',
+ ),
+ mock.Mock(),
+ None,
+ )
+
+ def test_module_name(self):
+ self.assertEqual('module.name', self.ext1.module_name)
+ self.assertEqual('module', self.ext2.module_name)
+
+ def test_extras(self):
+ self.assertEqual(['[extra]'], self.ext1.extras)
+ self.assertEqual([], self.ext2.extras)
+
+ def test_attr(self):
+ self.assertEqual('attribute.name', self.ext1.attr)
+ self.assertEqual('attribute', self.ext2.attr)
+
+ def test_entry_point_target(self):
+ self.assertEqual('module.name:attribute.name [extra]',
+ self.ext1.entry_point_target)
+ self.assertEqual('module:attribute',
+ self.ext2.entry_point_target)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/stevedore/tests/test_named.py
new/stevedore-3.2.2/stevedore/tests/test_named.py
--- old/stevedore-1.32.0/stevedore/tests/test_named.py 2020-02-11
11:55:45.000000000 +0100
+++ new/stevedore-3.2.2/stevedore/tests/test_named.py 2020-09-11
21:19:46.000000000 +0200
@@ -10,11 +10,11 @@
# License for the specific language governing permissions and limitations
# under the License.
+from unittest import mock
+
from stevedore import named
from stevedore.tests import utils
-import mock
-
class TestNamed(utils.TestCase):
def test_named(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/stevedore/tests/test_sphinxext.py
new/stevedore-3.2.2/stevedore/tests/test_sphinxext.py
--- old/stevedore-1.32.0/stevedore/tests/test_sphinxext.py 2020-02-11
11:55:45.000000000 +0100
+++ new/stevedore-3.2.2/stevedore/tests/test_sphinxext.py 2020-09-11
21:19:46.000000000 +0200
@@ -12,25 +12,26 @@
"""Tests for the sphinx extension
"""
-from __future__ import unicode_literals
+try:
+ # For python 3.8 and later
+ import importlib.metadata as importlib_metadata
+except ImportError:
+ # For everyone else
+ import importlib_metadata
from stevedore import extension
from stevedore import sphinxext
from stevedore.tests import utils
-import mock
-import pkg_resources
-
def _make_ext(name, docstring):
def inner():
pass
inner.__doc__ = docstring
- m1 = mock.Mock(spec=pkg_resources.EntryPoint)
- m1.module_name = '%s_module' % name
- s = mock.Mock(return_value='ENTRY_POINT(%s)' % name)
- m1.__str__ = s
+ m1 = importlib_metadata.EntryPoint(
+ name, '{}_module:{}'.format(name, name), 'group',
+ )
return extension.Extension(name, m1, inner, None)
@@ -112,7 +113,8 @@
('nodoc', 'nodoc_module'),
('-----', 'nodoc_module'),
('\n', 'nodoc_module'),
- ('.. warning:: No documentation found in ENTRY_POINT(nodoc)',
+ (('.. warning:: No documentation found for '
+ 'nodoc in nodoc_module:nodoc'),
'nodoc_module'),
('\n', 'nodoc_module'),
],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/stevedore-1.32.0/stevedore/tests/test_test_manager.py
new/stevedore-3.2.2/stevedore/tests/test_test_manager.py
--- old/stevedore-1.32.0/stevedore/tests/test_test_manager.py 2020-02-11
11:55:45.000000000 +0100
+++ new/stevedore-3.2.2/stevedore/tests/test_test_manager.py 2020-09-11
21:19:46.000000000 +0200
@@ -10,7 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-from mock import Mock, sentinel
+from unittest.mock import Mock, sentinel
+
from stevedore import (ExtensionManager, NamedExtensionManager, HookManager,
DriverManager, EnabledExtensionManager)
from stevedore.dispatch import (DispatchExtensionManager,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/stevedore.egg-info/PKG-INFO
new/stevedore-3.2.2/stevedore.egg-info/PKG-INFO
--- old/stevedore-1.32.0/stevedore.egg-info/PKG-INFO 2020-02-11
11:56:35.000000000 +0100
+++ new/stevedore-3.2.2/stevedore.egg-info/PKG-INFO 2020-09-11
21:22:09.000000000 +0200
@@ -1,6 +1,6 @@
-Metadata-Version: 1.1
+Metadata-Version: 1.2
Name: stevedore
-Version: 1.32.0
+Version: 3.2.2
Summary: Manage dynamic plugins for Python applications
Home-page: https://docs.openstack.org/stevedore/latest/
Author: OpenStack
@@ -39,10 +39,11 @@
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: Apache Software License
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.6
Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3 :: Only
+Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Intended Audience :: Developers
Classifier: Environment :: Console
+Requires-Python: >=3.6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/stevedore.egg-info/SOURCES.txt
new/stevedore-3.2.2/stevedore.egg-info/SOURCES.txt
--- old/stevedore-1.32.0/stevedore.egg-info/SOURCES.txt 2020-02-11
11:56:35.000000000 +0100
+++ new/stevedore-3.2.2/stevedore.egg-info/SOURCES.txt 2020-09-11
21:22:09.000000000 +0200
@@ -1,13 +1,10 @@
.stestr.conf
-.travis.yml
.zuul.yaml
AUTHORS
CONTRIBUTING.rst
ChangeLog
LICENSE
-MANIFEST.in
README.rst
-announce.rst
bindep.txt
lower-constraints.txt
requirements.txt
@@ -42,6 +39,10 @@
doc/source/user/tutorial/naming.rst
doc/source/user/tutorial/testing.rst
releasenotes/notes/add-reno-996dd44974d53238.yaml
+releasenotes/notes/drop-python2-support-3f0f717570cad8cb.yaml
+releasenotes/notes/entry-point-type-change-06ca3b301ba7aad1.yaml
+releasenotes/notes/expose-entry-point-properties-6f2d868d4342fc0d.yaml
+releasenotes/notes/module-name-property-d3b2d092259dadec.yaml
releasenotes/source/conf.py
releasenotes/source/index.rst
releasenotes/source/ocata.rst
@@ -51,9 +52,11 @@
releasenotes/source/stein.rst
releasenotes/source/train.rst
releasenotes/source/unreleased.rst
+releasenotes/source/ussuri.rst
releasenotes/source/_static/.placeholder
releasenotes/source/_templates/.placeholder
stevedore/__init__.py
+stevedore/_cache.py
stevedore/dispatch.py
stevedore/driver.py
stevedore/enabled.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/stevedore.egg-info/pbr.json
new/stevedore-3.2.2/stevedore.egg-info/pbr.json
--- old/stevedore-1.32.0/stevedore.egg-info/pbr.json 2020-02-11
11:56:35.000000000 +0100
+++ new/stevedore-3.2.2/stevedore.egg-info/pbr.json 2020-09-11
21:22:09.000000000 +0200
@@ -1 +1 @@
-{"git_version": "5165a27", "is_release": true}
\ No newline at end of file
+{"git_version": "274eaa6", "is_release": true}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/stevedore.egg-info/requires.txt
new/stevedore-3.2.2/stevedore.egg-info/requires.txt
--- old/stevedore-1.32.0/stevedore.egg-info/requires.txt 2020-02-11
11:56:35.000000000 +0100
+++ new/stevedore-3.2.2/stevedore.egg-info/requires.txt 2020-09-11
21:22:09.000000000 +0200
@@ -1,2 +1,4 @@
pbr!=2.1.0,>=2.0.0
-six>=1.10.0
+
+[:(python_version<'3.8')]
+importlib_metadata>=1.7.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/test-requirements.txt
new/stevedore-3.2.2/test-requirements.txt
--- old/stevedore-1.32.0/test-requirements.txt 2020-02-11 11:55:45.000000000
+0100
+++ new/stevedore-3.2.2/test-requirements.txt 2020-09-11 21:19:46.000000000
+0200
@@ -2,11 +2,7 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
-mock>=2.0.0 # BSD
coverage!=4.4,>=4.0 # Apache-2.0
stestr>=2.0.0 # Apache-2.0
# sphinx is needed for testing the sphinxext module
-sphinx!=1.6.6,!=1.6.7,>=1.6.5,<2.0.0;python_version=='2.7' # BSD
-sphinx!=1.6.6,!=1.6.7,>=1.6.5;python_version>='3.4' # BSD
-# Bandit security code scanner
-bandit>=1.1.0,<1.6.0 # Apache-2.0
+sphinx>=2.0.0,!=2.1.0 # BSD
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/stevedore-1.32.0/tox.ini new/stevedore-3.2.2/tox.ini
--- old/stevedore-1.32.0/tox.ini 2020-02-11 11:55:45.000000000 +0100
+++ new/stevedore-3.2.2/tox.ini 2020-09-11 21:19:46.000000000 +0200
@@ -1,18 +1,17 @@
[tox]
-minversion = 2.0
-envlist = py27,py37,pep8,docs
+minversion = 3.2
+envlist = py37,pep8,docs
+ignore_basepython_conflict = true
[testenv]
-install_command = pip install {opts} {packages}
+basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
-distribute = False
commands = stestr run {posargs}
[testenv:venv]
-basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/test-requirements.txt
@@ -21,35 +20,31 @@
commands = {posargs}
[testenv:pep8]
-basepython = python3
deps =
- -r{toxinidir}/test-requirements.txt
- flake8
+ flake8 # MIT
+ bandit>=1.1.0,<1.6.0 # Apache-2.0
ignore = E251
commands =
flake8 stevedore setup.py
# Run security linter
bandit -r stevedore -x tests -n5
-[testenv:docs]
-basepython = python3
-deps = -r{toxinidir}/doc/requirements.txt
-commands = sphinx-build -W -b html doc/source doc/build/html
-
[flake8]
ignore = E251
show-source = True
exclude=.venv,.git,.tox,dist,*lib/python*,*egg,build
-[testenv:releasenotes]
-basepython = python3
+[testenv:docs]
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
-commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html
releasenotes/source releasenotes/build/html
+commands = sphinx-build -a -E -W doc/source doc/build/html
+
+[testenv:releasenotes]
+deps = {[testenv:docs]deps}
+commands = sphinx-build -a -E -W releasenotes/source releasenotes/build/html
[testenv:bindep]
-basepython = python3
# Do not install any requirements. We want this to be fast and work even if
# system dependencies are missing, since it's used to tell you what system
# dependencies are missing! This also means that bindep must be installed
@@ -61,7 +56,6 @@
usedevelop = False
[testenv:lower-constraints]
-basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt