openSUSE Commits
Threads by month
- ----- 2024 -----
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
March 2019
- 1 participants
- 2391 discussions
Hello community,
here is the log from the commit of package python-tempora for openSUSE:Factory checked in at 2019-03-29 20:36:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-tempora (Old)
and /work/SRC/openSUSE:Factory/.python-tempora.new.25356 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-tempora"
Fri Mar 29 20:36:10 2019 rev:4 rq:686862 version:1.14
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-tempora/python-tempora.changes 2018-12-27 00:28:44.323695149 +0100
+++ /work/SRC/openSUSE:Factory/.python-tempora.new.25356/python-tempora.changes 2019-03-29 20:36:11.454555844 +0100
@@ -1,0 +2,34 @@
+Wed Mar 20 01:58:47 UTC 2019 - John Vandenberg <jayvdb(a)gmail.com>
+
+- Add missing %license
+- Re-activate test suite
+- Remove bcond python2
+- Add missing build dependency jaraco.functools >= 1.20
+- Remove inappropriate build dependency pytest-flake8
+
+-------------------------------------------------------------------
+Mon Mar 18 09:31:58 UTC 2019 - Dirk Mueller <dmueller(a)suse.com>
+
+- fix last version update missing new runtime requires
+
+-------------------------------------------------------------------
+Thu Mar 14 18:11:24 CET 2019 - Matej Cepl <mcepl(a)suse.com>
+
+- Upgrade all the way to 1.14:
+ - Package refresh, including use of declarative config in the package metadata.
+ - Enhancements to BackoffDelay: Added .reset method and Made
+ iterable to retrieve delay values.
+ - Added UTC module (Python 3 only), inspired by the utc project.
+ - Scheduler now honors daylight savings times in the PeriodicCommands.
+ - Added timing.BackoffDelay, suitable for implementing
+ exponential backoff delays, such as those between retries.
+ - Added support for months, years to parse_timedelta.
+ - Introducing timing.Timer, featuring a expired method for
+ detecting when a certain duration has been exceeded.
+ - Stopwatch now behaves reliably during timezone changes and
+ (presumably) daylight savings time changes.
+ - Update project skeleton.
+- Run the SPEC file through spec-cleaner
+- Switched off test suite run temporarily. gh#jaraco/tempora#6
+
+-------------------------------------------------------------------
Old:
----
tempora-1.6.1.tar.gz
New:
----
tempora-1.14.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-tempora.spec ++++++
--- /var/tmp/diff_new_pack.ZG60QY/_old 2019-03-29 20:36:12.062556720 +0100
+++ /var/tmp/diff_new_pack.ZG60QY/_new 2019-03-29 20:36:12.062556720 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-tempora
#
-# 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
@@ -17,28 +17,28 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
-%bcond_without python2
Name: python-tempora
-Version: 1.6.1
+Version: 1.14
Release: 0
Summary: Objects and routines pertaining to date and time (tempora)
License: MIT
Group: Development/Languages/Python
-Url: https://github.com/jaraco/tempora
+URL: https://github.com/jaraco/tempora
Source: https://files.pythonhosted.org/packages/source/t/tempora/tempora-%{version}…
+BuildRequires: %{python_module jaraco.functools >= 1.20}
BuildRequires: %{python_module pytest-runner}
BuildRequires: %{python_module pytz}
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six}
+BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
+BuildRequires: python2-backports.unittest_mock
+Requires: python-jaraco.functools >= 1.20
Requires: python-pytz
Requires: python-six
BuildArch: noarch
-%if %{with python2}
-BuildRequires: python2-backports.unittest_mock
-%endif
%python_subpackages
%description
@@ -60,9 +60,10 @@
%fdupes %{buildroot}
%check
-%python_exec -m pytest tests
+%python_exec setup.py test
%files %{python_files}
+%license LICENSE
%doc CHANGES.rst README.rst docs/*rst
%python3_only %{_bindir}/calc-prorate
%{python_sitelib}/*
++++++ tempora-1.6.1.tar.gz -> tempora-1.14.tar.gz ++++++
++++ 2063 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package python-recommonmark for openSUSE:Factory checked in at 2019-03-29 20:36:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-recommonmark (Old)
and /work/SRC/openSUSE:Factory/.python-recommonmark.new.25356 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-recommonmark"
Fri Mar 29 20:36:05 2019 rev:6 rq:686480 version:0.5.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-recommonmark/python-recommonmark.changes 2019-01-21 11:03:17.495047745 +0100
+++ /work/SRC/openSUSE:Factory/.python-recommonmark.new.25356/python-recommonmark.changes 2019-03-29 20:36:06.422548584 +0100
@@ -1,0 +2,7 @@
+Sat Mar 16 11:01:07 UTC 2019 - Sebastian Wagner <sebix+novell.com(a)sebix.at>
+
+- Use github tarball including the tests.
+- Enable the tests
+- Fix compatibility with recent commonmark.
+
+-------------------------------------------------------------------
Old:
----
license.md
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-recommonmark.spec ++++++
--- /var/tmp/diff_new_pack.vxV5iq/_old 2019-03-29 20:36:07.038549473 +0100
+++ /var/tmp/diff_new_pack.vxV5iq/_new 2019-03-29 20:36:07.038549473 +0100
@@ -25,15 +25,18 @@
License: MIT
Group: Development/Languages/Python
URL: https://github.com/rtfd/recommonmark
-Source0: https://files.pythonhosted.org/packages/source/r/recommonmark/recommonmark-…
-Source1: https://raw.githubusercontent.com/rtfd/recommonmark/master/license.md
+# The tests in the pypi tarball are missing all testdata, fixed in the next version: https://github.com/rtfd/recommonmark/commit/8e02e8309a011a7592d6b88c9a95606…
+#Source0: https://files.pythonhosted.org/packages/source/r/recommonmark/recommonmark-…
+Source0: https://github.com/rtfd/recommonmark/archive/0.5.0.tar.gz#/recommonmark-%{v…
+#Source1: https://raw.githubusercontent.com/rtfd/recommonmark/master/license.md
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
# SECTION tests
-#BuildRequires: %%{python_module CommonMark >= 0.7.3}
-#BuildRequires: %%{python_module Sphinx >= 1.3.1}
-#BuildRequires: %%{python_module docutils >= 0.11}
+BuildRequires: %{python_module CommonMark >= 0.7.3}
+BuildRequires: %{python_module Sphinx >= 1.3.1}
+BuildRequires: %{python_module docutils >= 0.11}
+BuildRequires: %{python_module future}
# /SECTION tests
Requires: python-CommonMark >= 0.7.3
Requires: python-Sphinx >= 1.3.1
@@ -62,10 +65,9 @@
# Remove upstream's egg-info
rm -rf %{pypi_name}.egg-info
#Add missing license and readme
-cp -a %{SOURCE1} .
+#cp -a %%{SOURCE1} .
# find and remove unneeded shebangs
find recommonmark -name "*.py" | xargs sed -i '1 {/^#!/ d}'
-sed -i 's/from commonmark import Parser/from CommonMark import Parser/' recommonmark/parser.py
%build
%python_build
@@ -81,9 +83,8 @@
%python_clone -a %{buildroot}%{_bindir}/cm2xetex
%python_clone -a %{buildroot}%{_bindir}/cm2xml
-# The tests in the tarball are missing all testdata, fixed in the next version: https://github.com/rtfd/recommonmark/commit/8e02e8309a011a7592d6b88c9a95606…
-#%%check
-#%%python_exec setup.py test
+%check
+%python_exec setup.py test
%post
%{python_install_alternative cm2man cm2latex cm2xetex cm2pseudoxml cm2html cm2xml}
@@ -101,6 +102,6 @@
%python_alternative %{_bindir}/cm2xml
%{python_sitelib}/recommonmark/
%{python_sitelib}/recommonmark-%{version}-py*.egg-info
-%doc README.md
+%doc README.md CHANGELOG.md
%changelog
++++++ recommonmark-0.5.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/recommonmark-0.5.0/.gitignore new/recommonmark-0.5.0/.gitignore
--- old/recommonmark-0.5.0/.gitignore 1970-01-01 01:00:00.000000000 +0100
+++ new/recommonmark-0.5.0/.gitignore 2019-01-08 22:45:59.000000000 +0100
@@ -0,0 +1,4 @@
+*.pyc
+*egg-info
+_build
+*~
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/recommonmark-0.5.0/.travis.yml new/recommonmark-0.5.0/.travis.yml
--- old/recommonmark-0.5.0/.travis.yml 1970-01-01 01:00:00.000000000 +0100
+++ new/recommonmark-0.5.0/.travis.yml 2019-01-08 22:45:59.000000000 +0100
@@ -0,0 +1,19 @@
+language: python
+python:
+ - 2.7
+ - 3.5
+ - 3.6
+sudo: false
+install:
+ - pip install tox-travis
+script:
+ - tox
+notifications:
+ slack:
+ rooms:
+ - readthedocs:y3hjODOi7EIz1JAbD1Zb41sz#random
+ on_success: change
+ on_failure: always
+branches:
+ only:
+ - master
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/recommonmark-0.5.0/PKG-INFO new/recommonmark-0.5.0/PKG-INFO
--- old/recommonmark-0.5.0/PKG-INFO 2019-01-08 22:46:46.000000000 +0100
+++ new/recommonmark-0.5.0/PKG-INFO 1970-01-01 01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
-Metadata-Version: 1.1
-Name: recommonmark
-Version: 0.5.0
-Summary: A docutils-compatibility bridge to CommonMark, enabling you to write CommonMark inside of Docutils & Sphinx projects.
-Home-page: https://github.com/rtfd/recommonmark
-Author: UNKNOWN
-Author-email: UNKNOWN
-License: MIT
-Description: UNKNOWN
-Platform: UNKNOWN
-Classifier: License :: OSI Approved :: MIT License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/recommonmark-0.5.0/docs/index.md new/recommonmark-0.5.0/docs/index.md
--- old/recommonmark-0.5.0/docs/index.md 2018-10-24 15:10:12.000000000 +0200
+++ new/recommonmark-0.5.0/docs/index.md 2019-03-29 20:36:07.098549559 +0100
@@ -1,120 +1 @@
-# recommonmark
-
-A `docutils`-compatibility bridge to [CommonMark][cm].
-
-This allows you to write CommonMark inside of Docutils & Sphinx projects.
-
-Documentation is available on Read the Docs: <http://recommonmark.readthedocs.org>
-
-Contents
---------
-
-* [API Reference](api_ref.md)
-* [AutoStructify Component](auto_structify.md)
-
-## Getting Started
-
-To use `recommonmark` inside of Sphinx only takes 2 steps.
-First you install it:
-
-```
-pip install recommonmark
-```
-
-Then add this to your Sphinx conf.py:
-
-```
-# for Sphinx-1.4 or newer
-extensions = ['recommonmark']
-
-# for Sphinx-1.3
-from recommonmark.parser import CommonMarkParser
-
-source_parsers = {
- '.md': CommonMarkParser,
-}
-
-source_suffix = ['.rst', '.md']
-```
-
-This allows you to write both `.md` and `.rst` files inside of the same project.
-
-### Links
-
-For all links in commonmark that aren't explicit URLs, they are treated as cross references with the [`:any:`](http://www.sphinx-doc.org/en/stable/markup/inline.html#role-any) role. This allows referencing a lot of things including files, labels, and even objects in the loaded domain.
-
-### AutoStructify
-
-AutoStructify makes it possible to write your documentation in Markdown, and automatically convert this
-into rST at build time. See [the AutoStructify Documentation](http://recommonmark.readthedocs.org/en/latest/auto_structify…
-for more information about configuration and usage.
-
-To use the advanced markdown to rst transformations you must add `AutoStructify` to your Sphinx conf.py.
-
-```python
-# At top on conf.py (with other import statements)
-import recommonmark
-from recommonmark.transform import AutoStructify
-
-# At the bottom of conf.py
-def setup(app):
- app.add_config_value('recommonmark_config', {
- 'url_resolver': lambda url: github_doc_root + url,
- 'auto_toc_tree_section': 'Contents',
- }, True)
- app.add_transform(AutoStructify)
-```
-
-See https://github.com/rtfd/recommonmark/blob/master/docs/conf.py for a full example.
-
-AutoStructify comes with the following options. See [http://recommonmark.readthedocs.org/en/latest/auto_structify.html](http://r… for more information about the specific features.
-
-* __enable_auto_toc_tree__: enable the Auto Toc Tree feature.
-* __auto_toc_tree_section__: when True, Auto Toc Tree will only be enabled on section that matches the title.
-* __enable_auto_doc_ref__: enable the Auto Doc Ref feature. **Deprecated**
-* __enable_math__: enable the Math Formula feature.
-* __enable_inline_math__: enable the Inline Math feature.
-* __enable_eval_rst__: enable the evaluate embedded reStructuredText feature.
-* __url_resolver__: a function that maps a existing relative position in the document to a http link
-
-## Development
-
-You can run the tests by running `tox` in the top-level of the project.
-
-We are working to expand test coverage,
-but this will at least test basic Python 2 and 3 compatability.
-
-## Why a bridge?
-
-Many python tools (mostly for documentation creation) rely on `docutils`.
-But [docutils][dc] only supports a ReStructuredText syntax.
-
-For instance [this issue][sphinx-issue] and [this StackOverflow
-question][so-question] show that there is an interest in allowing `docutils`
-to use markdown as an alternative syntax.
-
-## Why another bridge to docutils?
-
-recommonmark uses the [python implementation][pcm] of [CommonMark][cm] while
-[remarkdown][rmd] implements a stand-alone parser leveraging [parsley][prs].
-
-Both output a [`docutils` document tree][dc] and provide scripts
-that leverage `docutils` for generation of different types of documents.
-
-## Acknowledgement
-
-recommonmark is mainly derived from [remarkdown][rmd] by Steve Genoud and
-leverages the python CommonMark implementation.
-
-It was originally created by [Luca Barbato][lu-zero],
-and is now maintained in the Read the Docs (rtfd) GitHub organization.
-
-[cm]: http://commonmark.org
-[pcm]: https://github.com/rtfd/CommonMark-py
-[rmd]: https://github.com/sgenoud/remarkdown
-[prs]: https://github.com/python-parsley/parsley
-[lu-zero]: https://github.com/lu-zero
-
-[dc]: http://docutils.sourceforge.net/docs/ref/doctree.html
-[sphinx-issue]: https://bitbucket.org/birkenfeld/sphinx/issue/825/markdown-capable-sphinx
-[so-question]: http://stackoverflow.com/questions/2471804/using-sphinx-with-markdown-inste…
+symbolic link to ../README.md
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/recommonmark-0.5.0/prospector.yml new/recommonmark-0.5.0/prospector.yml
--- old/recommonmark-0.5.0/prospector.yml 1970-01-01 01:00:00.000000000 +0100
+++ new/recommonmark-0.5.0/prospector.yml 2019-01-08 22:45:59.000000000 +0100
@@ -0,0 +1,31 @@
+strictness: medium
+
+test-warnings: false
+doc-warnings: true
+
+ignore-paths:
+ - docs
+
+pep8:
+ full: true
+ options:
+ max-line-length: 100
+
+pylint:
+ options:
+ max-line-length: 100
+ docstring-min-length: 20
+ disable:
+ - interface-not-implemented
+
+mccabe:
+ run: false
+
+pep257:
+ run: true
+ disable:
+ - D213
+ - D211
+ - D107
+ - D104
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/recommonmark-0.5.0/recommonmark.egg-info/PKG-INFO new/recommonmark-0.5.0/recommonmark.egg-info/PKG-INFO
--- old/recommonmark-0.5.0/recommonmark.egg-info/PKG-INFO 2019-01-08 22:46:46.000000000 +0100
+++ new/recommonmark-0.5.0/recommonmark.egg-info/PKG-INFO 1970-01-01 01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
-Metadata-Version: 1.1
-Name: recommonmark
-Version: 0.5.0
-Summary: A docutils-compatibility bridge to CommonMark, enabling you to write CommonMark inside of Docutils & Sphinx projects.
-Home-page: https://github.com/rtfd/recommonmark
-Author: UNKNOWN
-Author-email: UNKNOWN
-License: MIT
-Description: UNKNOWN
-Platform: UNKNOWN
-Classifier: License :: OSI Approved :: MIT License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/recommonmark-0.5.0/recommonmark.egg-info/SOURCES.txt new/recommonmark-0.5.0/recommonmark.egg-info/SOURCES.txt
--- old/recommonmark-0.5.0/recommonmark.egg-info/SOURCES.txt 2019-01-08 22:46:46.000000000 +0100
+++ new/recommonmark-0.5.0/recommonmark.egg-info/SOURCES.txt 1970-01-01 01:00:00.000000000 +0100
@@ -1,31 +0,0 @@
-CHANGELOG.md
-MANIFEST.in
-README.md
-license.md
-setup.cfg
-setup.py
-docs/Makefile
-docs/api_ref.md
-docs/auto_structify.md
-docs/conf.py
-docs/index.md
-recommonmark/__init__.py
-recommonmark/parser.py
-recommonmark/scripts.py
-recommonmark/states.py
-recommonmark/transform.py
-recommonmark.egg-info/PKG-INFO
-recommonmark.egg-info/SOURCES.txt
-recommonmark.egg-info/dependency_links.txt
-recommonmark.egg-info/entry_points.txt
-recommonmark.egg-info/requires.txt
-recommonmark.egg-info/top_level.txt
-tests/__init__.py
-tests/test_basic.py
-tests/test_sphinx.py
-tests/sphinx_code_block/conf.py
-tests/sphinx_custom_md/conf.py
-tests/sphinx_generic/conf.py
-tests/sphinx_indented_code/conf.py
-tests/sphinx_nested_header_block/conf.py
-tests/sphinx_xref/conf.py
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/recommonmark-0.5.0/recommonmark.egg-info/dependency_links.txt new/recommonmark-0.5.0/recommonmark.egg-info/dependency_links.txt
--- old/recommonmark-0.5.0/recommonmark.egg-info/dependency_links.txt 2019-01-08 22:46:46.000000000 +0100
+++ new/recommonmark-0.5.0/recommonmark.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/recommonmark-0.5.0/recommonmark.egg-info/entry_points.txt new/recommonmark-0.5.0/recommonmark.egg-info/entry_points.txt
--- old/recommonmark-0.5.0/recommonmark.egg-info/entry_points.txt 2019-01-08 22:46:46.000000000 +0100
+++ new/recommonmark-0.5.0/recommonmark.egg-info/entry_points.txt 1970-01-01 01:00:00.000000000 +0100
@@ -1,8 +0,0 @@
-[console_scripts]
-cm2html = recommonmark.scripts:cm2html
-cm2latex = recommonmark.scripts:cm2latex
-cm2man = recommonmark.scripts:cm2man
-cm2pseudoxml = recommonmark.scripts:cm2pseudoxml
-cm2xetex = recommonmark.scripts:cm2xetex
-cm2xml = recommonmark.scripts:cm2xml
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/recommonmark-0.5.0/recommonmark.egg-info/requires.txt new/recommonmark-0.5.0/recommonmark.egg-info/requires.txt
--- old/recommonmark-0.5.0/recommonmark.egg-info/requires.txt 2019-01-08 22:46:46.000000000 +0100
+++ new/recommonmark-0.5.0/recommonmark.egg-info/requires.txt 1970-01-01 01:00:00.000000000 +0100
@@ -1,3 +0,0 @@
-commonmark>=0.7.3
-docutils>=0.11
-sphinx>=1.3.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/recommonmark-0.5.0/recommonmark.egg-info/top_level.txt new/recommonmark-0.5.0/recommonmark.egg-info/top_level.txt
--- old/recommonmark-0.5.0/recommonmark.egg-info/top_level.txt 2019-01-08 22:46:46.000000000 +0100
+++ new/recommonmark-0.5.0/recommonmark.egg-info/top_level.txt 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-recommonmark
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/recommonmark-0.5.0/setup.cfg new/recommonmark-0.5.0/setup.cfg
--- old/recommonmark-0.5.0/setup.cfg 2019-01-08 22:46:46.000000000 +0100
+++ new/recommonmark-0.5.0/setup.cfg 2019-01-08 22:45:59.000000000 +0100
@@ -1,7 +1,2 @@
[bdist_wheel]
-universal = 1
-
-[egg_info]
-tag_build =
-tag_date = 0
-
+universal=1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/recommonmark-0.5.0/tests/sphinx_code_block/index.md new/recommonmark-0.5.0/tests/sphinx_code_block/index.md
--- old/recommonmark-0.5.0/tests/sphinx_code_block/index.md 1970-01-01 01:00:00.000000000 +0100
+++ new/recommonmark-0.5.0/tests/sphinx_code_block/index.md 2019-01-08 22:45:59.000000000 +0100
@@ -0,0 +1,11 @@
+Header
+======
+
+A paragraph
+```
+def f():
+ pass
+```
+Another paragraph
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/recommonmark-0.5.0/tests/sphinx_custom_md/index.markdown new/recommonmark-0.5.0/tests/sphinx_custom_md/index.markdown
--- old/recommonmark-0.5.0/tests/sphinx_custom_md/index.markdown 1970-01-01 01:00:00.000000000 +0100
+++ new/recommonmark-0.5.0/tests/sphinx_custom_md/index.markdown 2019-01-08 22:45:59.000000000 +0100
@@ -0,0 +1,22 @@
+Header
+======
+
+A paragraph
+
+```eval_rst
++-----+------+
+| abc | data |
++=====+======+
+| a | 1 |
++-----+------+
+```
+
+Another paragraph
+
+
+```eval_rst
+.. contents:: Contents
+```
+
+Header 2
+----------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/recommonmark-0.5.0/tests/sphinx_generic/index.md new/recommonmark-0.5.0/tests/sphinx_generic/index.md
--- old/recommonmark-0.5.0/tests/sphinx_generic/index.md 1970-01-01 01:00:00.000000000 +0100
+++ new/recommonmark-0.5.0/tests/sphinx_generic/index.md 2019-01-08 22:45:59.000000000 +0100
@@ -0,0 +1,37 @@
+# Heading 1
+
+## Heading 2
+
+### Heading 3
+
+#### Heading 4
+
+This is a [link](http://example.com "Example")
+
+This is a [ref link][example]
+
+This is a [relative link](/example)
+
+This is a [pending ref](index)
+
+
+[example]: http://example.com/foobar "Example"
+
+Foo
+
+----
+
+Bar
+
+![foo](/image.png "Example")
+
+ #!/bin/sh
+ python
+
+* Item A
+* Item B
+* Item C
+
+1. Item 1
+2. Item 2
+3. Item 3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/recommonmark-0.5.0/tests/sphinx_indented_code/index.md new/recommonmark-0.5.0/tests/sphinx_indented_code/index.md
--- old/recommonmark-0.5.0/tests/sphinx_indented_code/index.md 1970-01-01 01:00:00.000000000 +0100
+++ new/recommonmark-0.5.0/tests/sphinx_indented_code/index.md 2019-01-08 22:45:59.000000000 +0100
@@ -0,0 +1,10 @@
+Header
+======
+
+A paragraph
+
+ def f():
+ pass
+
+Another paragraph
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/recommonmark-0.5.0/tests/sphinx_nested_header_block/index.md new/recommonmark-0.5.0/tests/sphinx_nested_header_block/index.md
--- old/recommonmark-0.5.0/tests/sphinx_nested_header_block/index.md 1970-01-01 01:00:00.000000000 +0100
+++ new/recommonmark-0.5.0/tests/sphinx_nested_header_block/index.md 2019-01-08 22:45:59.000000000 +0100
@@ -0,0 +1 @@
+> # Header
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/recommonmark-0.5.0/tests/sphinx_xref/index.md new/recommonmark-0.5.0/tests/sphinx_xref/index.md
--- old/recommonmark-0.5.0/tests/sphinx_xref/index.md 1970-01-01 01:00:00.000000000 +0100
+++ new/recommonmark-0.5.0/tests/sphinx_xref/index.md 2019-01-08 22:45:59.000000000 +0100
@@ -0,0 +1,5 @@
+Header
+======
+
+A paragraph [link](link) and [absolute link](/link). An [external link](http://www.google.com).
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/recommonmark-0.5.0/tests/sphinx_xref/link.md new/recommonmark-0.5.0/tests/sphinx_xref/link.md
--- old/recommonmark-0.5.0/tests/sphinx_xref/link.md 1970-01-01 01:00:00.000000000 +0100
+++ new/recommonmark-0.5.0/tests/sphinx_xref/link.md 2019-01-08 22:45:59.000000000 +0100
@@ -0,0 +1,4 @@
+link
+====
+
+The link file.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/recommonmark-0.5.0/tox.ini new/recommonmark-0.5.0/tox.ini
--- old/recommonmark-0.5.0/tox.ini 1970-01-01 01:00:00.000000000 +0100
+++ new/recommonmark-0.5.0/tox.ini 2019-01-08 22:45:59.000000000 +0100
@@ -0,0 +1,41 @@
+[tox]
+envlist =
+ py{27,35,36}-sphinx{16,17,18},
+ # Workaround https://github.com/tox-dev/tox/issues/706
+ lint-sphinx18
+ docs-sphinx18
+
+[tox:travis]
+2.7 = py27-sphinx{16,17,18}, docs-sphinx16, lint-sphinx16
+3.5 = py35-sphinx{16,17,18}
+3.6 = py36-sphinx{16,17,18}
+
+[testenv]
+setenv =
+ LANG=C
+deps =
+ .
+ pytest
+ sphinx16: Sphinx < 1.7
+ sphinx17: Sphinx < 1.8
+ sphinx18: Sphinx < 1.9
+commands =
+ py.test {posargs}
+
+[testenv:docs]
+deps =
+ {[testenv]deps}
+ sphinx_rtd_theme
+changedir = {toxinidir}/docs
+commands =
+ sphinx-build -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
+
+[testenv:lint]
+deps =
+ {[testenv]deps}
+ prospector
+commands =
+ prospector \
+ --profile-path={toxinidir} \
+ --profile=prospector \
+ --die-on-tool-error
1
0
Hello community,
here is the log from the commit of package python-decorator for openSUSE:Factory checked in at 2019-03-29 20:36:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-decorator (Old)
and /work/SRC/openSUSE:Factory/.python-decorator.new.25356 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-decorator"
Fri Mar 29 20:36:01 2019 rev:20 rq:686454 version:4.4.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-decorator/python-decorator.changes 2019-02-25 17:44:36.298926051 +0100
+++ /work/SRC/openSUSE:Factory/.python-decorator.new.25356/python-decorator.changes 2019-03-29 20:36:02.698543212 +0100
@@ -1,0 +2,7 @@
+Tue Mar 19 15:15:40 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Update to 4.4.0:
+ * Fixed a regression with decorator factories breaking the case with no
+ arguments by going back to the syntax used in version 4.2.
+
+-------------------------------------------------------------------
Old:
----
decorator-4.3.2.tar.gz
New:
----
decorator-4.4.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-decorator.spec ++++++
--- /var/tmp/diff_new_pack.m3Mye4/_old 2019-03-29 20:36:03.310544095 +0100
+++ /var/tmp/diff_new_pack.m3Mye4/_new 2019-03-29 20:36:03.310544095 +0100
@@ -20,14 +20,15 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-decorator
-Version: 4.3.2
+Version: 4.4.0
Release: 0
Summary: Non-nested signature-retaining Python decorators
License: BSD-2-Clause
Group: Development/Languages/Python
-URL: http://pypi.python.org/pypi/decorator
+URL: https://github.com/micheles/decorator
Source: https://files.pythonhosted.org/packages/source/d/decorator/decorator-%{vers…
BuildRequires: %{python_module setuptools}
+BuildRequires: dos2unix
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildArch: noarch
@@ -44,7 +45,6 @@
%prep
%setup -q -n decorator-%{version}
-sed -i 's/\r//' README.rst # Fix EOL encoding
%build
%python_build
@@ -53,9 +53,12 @@
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
+%check
+%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python src/tests/test.py -v
+
%files %{python_files}
%license LICENSE.txt
-%doc CHANGES.md README.rst
+%doc CHANGES.md README.md
%{python_sitelib}/decorator.py*
%pycache_only %{python_sitelib}/__pycache__/decorator.*.py*
%{python_sitelib}/decorator-%{version}-py*.egg-info
++++++ decorator-4.3.2.tar.gz -> decorator-4.4.0.tar.gz ++++++
++++ 1816 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package python-trustme for openSUSE:Factory checked in at 2019-03-29 20:35:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-trustme (Old)
and /work/SRC/openSUSE:Factory/.python-trustme.new.25356 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-trustme"
Fri Mar 29 20:35:57 2019 rev:2 rq:686322 version:0.5.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-trustme/python-trustme.changes 2019-02-27 17:29:37.727310453 +0100
+++ /work/SRC/openSUSE:Factory/.python-trustme.new.25356/python-trustme.changes 2019-03-29 20:35:58.378536980 +0100
@@ -1,0 +2,6 @@
+Mon Mar 18 18:02:03 UTC 2019 - Jan Engelhardt <jengelh(a)inai.de>
+
+- Replace nonsense summary. Trim storytelling write style
+ from description.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-trustme.spec ++++++
--- /var/tmp/diff_new_pack.DyUtK9/_old 2019-03-29 20:35:58.858537672 +0100
+++ /var/tmp/diff_new_pack.DyUtK9/_new 2019-03-29 20:35:58.862537678 +0100
@@ -20,7 +20,7 @@
Name: python-trustme
Version: 0.5.0
Release: 0
-Summary: #1 quality TLS certs while you wait, for the discerning tester
+Summary: Fake CA provider for Python tests
License: MIT OR Apache-2.0
Group: Development/Languages/Python
URL: https://github.com/python-trio/trustme
@@ -44,12 +44,11 @@
%python_subpackages
%description
-trustme is a tiny Python package that does one thing: it gives you
-a `fake <https://martinfowler.com/bliki/TestDouble.html>`__
-certificate authority (CA) that you can use to generate fake TLS certs
-to use in your tests. Well, technically they're real certs, they're
-just signed by your CA, which nobody trusts. But you can trust
-it. Trust me.
+trustme is a Python package that provides a fake certificate
+authority (CA) that can be used to generate "fake" TLS certs to use
+in tests. The CA and certificates are fake in the sense of
+https://martinfowler.com/bliki/TestDouble.html, that is, the trust
+circle of the CA is limited to the test environment.
%prep
%setup -q -n trustme-%{version}
1
0
Hello community,
here is the log from the commit of package python-Faker for openSUSE:Factory checked in at 2019-03-29 20:35:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Faker (Old)
and /work/SRC/openSUSE:Factory/.python-Faker.new.25356 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-Faker"
Fri Mar 29 20:35:53 2019 rev:9 rq:685834 version:1.0.4
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Faker/python-Faker.changes 2019-02-24 17:14:46.304457271 +0100
+++ /work/SRC/openSUSE:Factory/.python-Faker.new.25356/python-Faker.changes 2019-03-29 20:35:54.846531884 +0100
@@ -1,0 +2,30 @@
+Fri Mar 15 13:15:47 UTC 2019 - Jan Engelhardt <jengelh(a)inai.de>
+
+- Trim duplicated name from summary.
+
+-------------------------------------------------------------------
+Fri Mar 15 12:02:12 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Add patch ipaddress.patch to fix its runtime detection
+
+-------------------------------------------------------------------
+Thu Mar 14 14:26:07 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Update to 1.0.4:
+ * Various small fixes, see CHANGELOG.rst
+- Merge patch faker-32bit.patch
+
+-------------------------------------------------------------------
+Tue Mar 12 09:24:13 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Add patch to fix 32bit builds:
+ * faker-32bit.patch
+
+-------------------------------------------------------------------
+Sun Mar 10 10:15:00 UTC 2019 - John Vandenberg <jayvdb(a)gmail.com>
+
+- Remove pre-existing bytecode files in the sdist, which were
+ being included in the runtime package and causing lint warnings
+ on Leap 42.3 & SLE 12 SP4, and they were breaking tests on Leap 15.
+
+-------------------------------------------------------------------
@@ -4 +34 @@
-- Update to 1.0.10:
+- Update to 1.0.2:
Old:
----
Faker-1.0.2.tar.gz
New:
----
Faker-1.0.4.tar.gz
ipaddress.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-Faker.spec ++++++
--- /var/tmp/diff_new_pack.PeI8hc/_old 2019-03-29 20:35:55.442532745 +0100
+++ /var/tmp/diff_new_pack.PeI8hc/_new 2019-03-29 20:35:55.442532745 +0100
@@ -19,19 +19,22 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define oldpython python
Name: python-Faker
-Version: 1.0.2
+Version: 1.0.4
Release: 0
-Summary: Faker is a Python package that generates fake data
+Summary: Python package that generates fake data
License: MIT
Group: Development/Languages/Python
URL: https://github.com/joke2k/faker
Source: https://files.pythonhosted.org/packages/source/F/Faker/Faker-%{version}.tar…
+Patch0: ipaddress.patch
BuildRequires: %{python_module UkPostcodeParser >= 1.1.1}
BuildRequires: %{python_module email_validator >= 1.0.2}
+BuildRequires: %{python_module freezegun >= 0.3.11}
BuildRequires: %{python_module mock}
BuildRequires: %{python_module more-itertools}
BuildRequires: %{python_module pytest >= 3.8.0}
BuildRequires: %{python_module python-dateutil >= 2.4}
+BuildRequires: %{python_module random2 >= 1.0.1}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six >= 1.10}
BuildRequires: %{python_module text-unidecode >= 1.2}
@@ -63,8 +66,12 @@
%prep
%setup -q -n Faker-%{version}
-# do not hardcode pytest version
+%patch0 -p1
+# Remove pre-existing bytecode files in the sdist
+find . -name '*.py[co]' -delete
+# do not hardcode versions
sed -i -e 's:"pytest>=3.8.0,<3.9":"pytest>=3.8.0":g' setup.py
+sed -i -e 's:==:>=:g' setup.py
%build
%python_build
@@ -81,7 +88,7 @@
%python_uninstall_alternative faker
%check
-%python_exec setup.py test
+%pytest
%files %{python_files}
%license LICENSE.txt
++++++ Faker-1.0.2.tar.gz -> Faker-1.0.4.tar.gz ++++++
++++ 2066 lines of diff (skipped)
++++++ ipaddress.patch ++++++
Index: Faker-1.0.4/setup.py
===================================================================
--- Faker-1.0.4.orig/setup.py
+++ Faker-1.0.4/setup.py
@@ -78,7 +78,7 @@ setup(
"freezegun==0.3.11",
],
extras_require={
- ':python_version=="2.7"': [
+ ':python_version<"3.3"': [
'ipaddress',
],
},
1
0
Hello community,
here is the log from the commit of package python-bottle for openSUSE:Factory checked in at 2019-03-29 20:35:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-bottle (Old)
and /work/SRC/openSUSE:Factory/.python-bottle.new.25356 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-bottle"
Fri Mar 29 20:35:48 2019 rev:14 rq:685818 version:0.12.16
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-bottle/python-bottle.changes 2019-03-04 09:09:54.944712539 +0100
+++ /work/SRC/openSUSE:Factory/.python-bottle.new.25356/python-bottle.changes 2019-03-29 20:35:50.662525849 +0100
@@ -1,0 +2,6 @@
+Sun Mar 17 14:57:13 UTC 2019 - Jan Engelhardt <jengelh(a)inai.de>
+
+- Ensure neutrality of description and fixup some
+ spelling/grammar issues.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-bottle.spec ++++++
--- /var/tmp/diff_new_pack.d1NP6J/_old 2019-03-29 20:35:51.158526564 +0100
+++ /var/tmp/diff_new_pack.d1NP6J/_new 2019-03-29 20:35:51.162526570 +0100
@@ -20,7 +20,7 @@
Name: python-bottle
Version: 0.12.16
Release: 0
-Summary: Fast and simple WSGI-framework for small web-applications
+Summary: WSGI framework for small web applications
License: MIT
Group: Development/Languages/Python
URL: http://bottlepy.org/
@@ -32,11 +32,11 @@
%python_subpackages
%description
-Bottle is a fast and simple micro-framework for small web-applications. It
-offers request dispatching (Routes) with url parameter support, Templates, a
-built-in HTTP Server and adapters for many third party WSGI/HTTP-server and
-template engines. All in a single file and with no dependencies other than the
-Python Standard Library.
+Bottle is a micro-framework for small web applications. It offers
+request dispatching (routes) with URL parameter support, templates, a
+built-in HTTP server, and adapters for many third party WSGI/HTTP
+servers and template engines. This is all in a single file and with
+no dependencies other than the Python Standard Library.
%package -n %{name}-doc
Summary: Documentation for %{name}
@@ -45,11 +45,11 @@
Provides: %{python_module bottle-doc = %{version}}
%description -n %{name}-doc
-Bottle is a fast and simple micro-framework for small web-applications. It
-offers request dispatching (Routes) with url parameter support, Templates, a
-built-in HTTP Server and adapters for many third party WSGI/HTTP-server and
-template engines. All in a single file and with no dependencies other than the
-Python Standard Library.
+Bottle is a micro-framework for small web applications. It offers
+request dispatching (routes) with URL parameter support, templates, a
+built-in HTTP server, and adapters for many third party WSGI/HTTP
+servers and template engines. This is all in a single file and with
+no dependencies other than the Python Standard Library.
This subpackage contains the PDF documentation for %{name}.
1
0
Hello community,
here is the log from the commit of package python-stestr for openSUSE:Factory checked in at 2019-03-29 20:35:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-stestr (Old)
and /work/SRC/openSUSE:Factory/.python-stestr.new.25356 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-stestr"
Fri Mar 29 20:35:44 2019 rev:9 rq:685817 version:2.3.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-stestr/python-stestr.changes 2019-01-28 20:45:54.802065005 +0100
+++ /work/SRC/openSUSE:Factory/.python-stestr.new.25356/python-stestr.changes 2019-03-29 20:35:45.594521189 +0100
@@ -1,0 +2,15 @@
+Sun Mar 17 15:17:55 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Add patch to work with PyYAML 5.x series:
+ * pyyaml5.patch
+
+-------------------------------------------------------------------
+Wed Mar 13 12:40:42 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Update to 2.3.1:
+ * tests expansion
+ * metadata updates
+ * minor bugfixes
+- Enable and run tests
+
+-------------------------------------------------------------------
Old:
----
stestr-2.2.0.tar.gz
New:
----
pyyaml5.patch
stestr-2.3.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-stestr.spec ++++++
--- /var/tmp/diff_new_pack.4LBE32/_old 2019-03-29 20:35:46.674521613 +0100
+++ /var/tmp/diff_new_pack.4LBE32/_new 2019-03-29 20:35:46.682521618 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-stestr
#
-# 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
@@ -18,20 +18,24 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-stestr
-Version: 2.2.0
+Version: 2.3.1
Release: 0
Summary: A test runner runner similar to testrepository
License: Apache-2.0
Group: Development/Languages/Python
URL: https://github.com/mtreinish/stestr
Source: https://files.pythonhosted.org/packages/source/s/stestr/stestr-%{version}.t…
+Patch0: pyyaml5.patch
BuildRequires: %{python_module PyYAML >= 3.10.0}
+BuildRequires: %{python_module SQLAlchemy}
BuildRequires: %{python_module cliff >= 2.8.0}
BuildRequires: %{python_module coverage >= 4.0}
BuildRequires: %{python_module ddt >= 1.0.1}
BuildRequires: %{python_module fixtures >= 3.0.0}
BuildRequires: %{python_module future}
+BuildRequires: %{python_module mock >= 2.0}
BuildRequires: %{python_module pbr >= 2.0.0}
+BuildRequires: %{python_module pytest}
BuildRequires: %{python_module python-subunit >= 1.3.0}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six >= 1.10.0}
@@ -39,6 +43,7 @@
BuildRequires: %{python_module voluptuous >= 0.8.9}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
+BuildRequires: python3-dbm
Requires: python-PyYAML >= 3.10.0
Requires: python-cliff >= 2.8.0
Requires: python-fixtures >= 3.0.0
@@ -49,12 +54,13 @@
Requires: python-testtools >= 2.2.0
Requires: python-voluptuous >= 0.8.9
%ifpython3
-Requires: python3-dbm
+Requires: python-dbm
%endif
Requires(post): update-alternatives
Requires(postun): update-alternatives
%if !0%{?_no_weakdeps}
-Suggests: python-subunit2sql >= 1.8.0
+Recommends: python-SQLAlchemy
+Recommends: python-subunit2sql >= 1.8.0
%endif
BuildArch: noarch
%python_subpackages
@@ -69,6 +75,9 @@
%prep
%setup -q -n stestr-%{version}
+%patch0 -p1
+# do not test sql
+rm stestr/tests/repository/test_sql.py
%build
%python_build
@@ -78,6 +87,19 @@
%python_clone -a %{buildroot}%{_bindir}/stestr
%python_expand %fdupes %{buildroot}%{$python_sitelib}
+%check
+%{python_expand mkdir build/bin
+for filepath in %{buildroot}/%{_bindir}/stestr*-%{$python_bin_suffix}; do
+ filename=$(basename $filepath)
+ unsuffixed=${filename/-%{$python_bin_suffix}/}
+ cp $filepath build/bin/$unsuffixed
+done
+export PATH="$(pwd)/build/bin:$PATH"
+export PYTHONPATH=%{buildroot}%{$python_sitelib}
+py.test-%{$python_bin_suffix} -v stestr/tests
+rm -r build/bin
+}
+
%post
%python_install_alternative stestr
++++++ pyyaml5.patch ++++++
>From f0c8c1112677367345e9b672ed6716b7b9e4d919 Mon Sep 17 00:00:00 2001
From: Masayuki Igawa <masayuki(a)igawa.io>
Date: Sat, 16 Mar 2019 10:47:47 +0800
Subject: [PATCH] Use yaml.safe_load instead of yaml.load
yaml.load(input) is deprecated from PyYAML 5.1[0]. Therefore, some
warnings are showed up in a stestr unit test case which causes a failure
in test_load_from_stdin_quiet() because it expects empty string.
This commit makes it to use yaml.safe_load instead of yaml.load. Because
it doesn't show the deprecation warnings.
[0] https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation
Closes: #234
---
stestr/scheduler.py | 2 +-
stestr/tests/test_scheduler.py | 12 ++++++------
stestr/tests/test_user_config.py | 8 +++++---
stestr/user_config.py | 2 +-
4 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/stestr/scheduler.py b/stestr/scheduler.py
index 71a4468..b7c5631 100644
--- a/stestr/scheduler.py
+++ b/stestr/scheduler.py
@@ -155,7 +155,7 @@ def generate_worker_partitions(ids, worker_path, repository=None,
:returns: A list where each element is a distinct subset of test_ids.
"""
with open(worker_path, 'r') as worker_file:
- workers_desc = yaml.load(worker_file.read())
+ workers_desc = yaml.safe_load(worker_file.read())
worker_groups = []
for worker in workers_desc:
if isinstance(worker, dict) and 'worker' in worker.keys():
diff --git a/stestr/tests/test_scheduler.py b/stestr/tests/test_scheduler.py
index 2df3593..5959759 100644
--- a/stestr/tests/test_scheduler.py
+++ b/stestr/tests/test_scheduler.py
@@ -124,7 +124,7 @@ def test_generate_worker_partitions(self):
{'worker': ['test_']},
{'worker': ['test']},
]
- with mock.patch('yaml.load', return_value=fake_worker_yaml):
+ with mock.patch('yaml.safe_load', return_value=fake_worker_yaml):
groups = scheduler.generate_worker_partitions(test_ids, 'fakepath')
expected_grouping = [
['test_a', 'test_b'],
@@ -139,7 +139,7 @@ def test_generate_worker_partitions_group_without_list(self):
{'worker': ['test_']},
{'worker': 'test'},
]
- with mock.patch('yaml.load', return_value=fake_worker_yaml):
+ with mock.patch('yaml.safe_load', return_value=fake_worker_yaml):
self.assertRaises(TypeError, scheduler.generate_worker_partitions,
test_ids, 'fakepath')
@@ -150,7 +150,7 @@ def test_generate_worker_partitions_no_worker_tag(self):
{'worker-foo': ['test_']},
{'worker': ['test']},
]
- with mock.patch('yaml.load', return_value=fake_worker_yaml):
+ with mock.patch('yaml.safe_load', return_value=fake_worker_yaml):
self.assertRaises(TypeError, scheduler.generate_worker_partitions,
test_ids, 'fakepath')
@@ -162,7 +162,7 @@ def test_generate_worker_partitions_group_without_match(self):
{'worker': ['test']},
{'worker': ['foo']}
]
- with mock.patch('yaml.load', return_value=fake_worker_yaml):
+ with mock.patch('yaml.safe_load', return_value=fake_worker_yaml):
groups = scheduler.generate_worker_partitions(test_ids, 'fakepath')
expected_grouping = [
['test_a', 'test_b'],
@@ -178,7 +178,7 @@ def test_generate_worker_partitions_with_count(self):
{'worker': ['test']},
{'worker': ['a_thing'], 'concurrency': 2},
]
- with mock.patch('yaml.load', return_value=fake_worker_yaml):
+ with mock.patch('yaml.safe_load', return_value=fake_worker_yaml):
groups = scheduler.generate_worker_partitions(test_ids, 'fakepath')
expected_grouping = [
['test_a', 'test_b'],
@@ -196,7 +196,7 @@ def test_generate_worker_partitions_with_count_1(self):
{'worker': ['test_']},
{'worker': ['test'], 'count': 1},
]
- with mock.patch('yaml.load', return_value=fake_worker_yaml):
+ with mock.patch('yaml.safe_load', return_value=fake_worker_yaml):
groups = scheduler.generate_worker_partitions(test_ids, 'fakepath')
expected_grouping = [
['test_a', 'test_b'],
diff --git a/stestr/tests/test_user_config.py b/stestr/tests/test_user_config.py
index 2758f76..ef329a2 100644
--- a/stestr/tests/test_user_config.py
+++ b/stestr/tests/test_user_config.py
@@ -96,13 +96,14 @@ def fake_isfile(path):
user_config.get_user_config()
user_mock.assert_called_once_with(self.home_path)
- @mock.patch('yaml.load', return_value={})
+ @mock.patch('yaml.safe_load', return_value={})
@mock.patch('six.moves.builtins.open', mock.mock_open())
def test_user_config_empty_schema(self, yaml_mock):
user_conf = user_config.UserConfig('/path')
self.assertEqual({}, user_conf.config)
- @mock.patch('yaml.load', return_value={'init': {'subunit-trace': True}})
+ @mock.patch('yaml.safe_load',
+ return_value={'init': {'subunit-trace': True}})
@mock.patch('sys.exit')
@mock.patch('six.moves.builtins.open', mock.mock_open())
def test_user_config_invalid_command(self, exit_mock, yaml_mock):
@@ -111,7 +112,8 @@ def test_user_config_invalid_command(self, exit_mock, yaml_mock):
"extra keys not allowed @ data['init']")
exit_mock.assert_called_once_with(error_string)
- @mock.patch('yaml.load', return_value={'run': {'subunit-trace': True}})
+ @mock.patch('yaml.safe_load',
+ return_value={'run': {'subunit-trace': True}})
@mock.patch('sys.exit')
@mock.patch('six.moves.builtins.open', mock.mock_open())
def test_user_config_invalid_option(self, exit_mock, yaml_mock):
diff --git a/stestr/user_config.py b/stestr/user_config.py
index c54be1b..02ef026 100644
--- a/stestr/user_config.py
+++ b/stestr/user_config.py
@@ -66,7 +66,7 @@ def __init__(self, path):
}
})
with open(path, 'r') as fd:
- self.config = yaml.load(fd.read())
+ self.config = yaml.safe_load(fd.read())
if self.config is None:
self.config = {}
try:
++++++ stestr-2.2.0.tar.gz -> stestr-2.3.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.2.0/AUTHORS new/stestr-2.3.1/AUTHORS
--- old/stestr-2.2.0/AUTHORS 2018-11-30 02:32:07.000000000 +0100
+++ new/stestr-2.3.1/AUTHORS 2019-03-06 02:23:39.000000000 +0100
@@ -23,8 +23,10 @@
Monty Taylor <mordred(a)inaugust.com>
Robert Collins <robertc(a)robertcollins.net>
Sean McGinnis <sean.mcginnis(a)huawei.com>
+Sergey Vilgelm <sergey(a)vilgelm.info>
Sorin Sbarnea <ssbarnea(a)users.noreply.github.com>
Steve Heyman <steve.heyman(a)rackspace.com>
Thomas Bechtold <tbechtold(a)suse.com>
+Tony Breeds <tony(a)bakeyournoodle.com>
Zane Bitter <zbitter(a)redhat.com>
afrittoli <afrittoli(a)users.noreply.github.com>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.2.0/ChangeLog new/stestr-2.3.1/ChangeLog
--- old/stestr-2.2.0/ChangeLog 2018-11-30 02:32:07.000000000 +0100
+++ new/stestr-2.3.1/ChangeLog 2019-03-06 02:23:39.000000000 +0100
@@ -1,6 +1,37 @@
CHANGES
=======
+2.3.1
+-----
+
+* Add sanity check unittests
+* Use to\_int in both CLI and Python API
+* Ensure concurrency is always an int
+
+2.3.0
+-----
+
+* Update package metadata in setup.cfg
+* Inline CONTRIBUTING.rst in README.rst and add to docs
+* Add links to GitHub repo and project-urls to metadata
+* Move from get\_description() to class docstrings part-2
+* Switch from get\_descripition() to class docstrings
+* Fix whitespace lint
+* Gracefully handle the case when sys.executable is None
+* Add error message for invalid concurrency value
+* Use default user config in unit tests
+* Turn on debug loggin by default
+* Run commands through the same python used for stestr
+* Improved test coverage for stestr run --subunit 0 exit status
+* Update docs for exit codes with --subunit flags
+* Put in quotes the top\_dir and test\_path
+* Clarify group\_regex explanation
+* Update MANUAL.rst for parallel\_class option
+* Update doc/source/MANUAL.rst
+* Update MANUAL.rst for parallel\_class option
+* Introduce parallel-class option
+* Tweak the README for readability
+
2.2.0
-----
@@ -311,6 +342,10 @@
* Pivot repo to stestr
* Release 0.0.20
* Tests will be reliably tagged with worker-%d
+
+0.0.19
+------
+
* Release 0.0.19
* Fix 0 timestamps for enumerated but not run tests
* Update docs for the move to github
@@ -324,10 +359,22 @@
* Improve error rendering of listing issues
* \* When list-tests encounters an error, a much clearer response will now be shown. (Robert Collins, #1271133)
* \* \`\`run\`\` was outputting bad MIME types - test/plain, not text/plain. (Robert Collins)
+
+0.0.18
+------
+
* Release 0.0.18
* \* \`\`run\`\` now accepts \`\`--isolated\`\` as a parameter, which will cause each selected test to be run independently. This can be useful to both workaround isolation bugs and detect tests that can not be run independently. (Robert Collins)
* \* \`\`capture\_ids\`\` in test\_run now returns a list of captures, permitting tests that need to test multiple runs to do so. (Robert Collins)
+
+0.0.17
+------
+
* 0.0.17 ++++++
+
+0.0.16
+------
+
* Release 0.0.16
* \* When test listing fails, testr will now report an error rather than incorrectly trying to run zero tests. A test listing failure is detected by the returncode of the test listing process. (Robert Collins, #1185231)
* \* A new testr.conf option \`\`group\_regex\`\` can be used for grouping tests so that they get run in the same backend runner. (Matthew Treinish)
@@ -353,6 +400,10 @@
* Drop the ExtendedToStream wrapping around UI.make\_result
* Move tag based test filtering into the UI: many test things won't be filtered, such as slow tests and pdb debugging, so the UI has to see the tests. Moving the responsibility into the UI may lead to repetition in other UI's if not made easy to reuse, but that seems like the lesser of evils for now
* Simplify commands.failing
+
+0.0.15
+------
+
* Release 0.0.15, with minimal subunit v2 support
* Fix subunit v1 parallel test execution
* Add test for --subunit support - the UI was previously only loosely tested
@@ -367,21 +418,41 @@
* Use ConcurrentStreamResult always
* Start getting streamresult into the innards
* \* Expects subunit v2 if the local library has v2 support in the subunit library. This should be seamless if the system under test shares the Python libraries. If it doesn't, either arrange to use \`\`subunit-2to1\`\` or upgrade the subunit libraries for the system under test. (Robert Collins)
+
+0.0.14
+------
+
* Update releasing docs and really release 0.0.14
* 0.0.14 ++++++
+
+0.0.13
+------
+
* Release 0.0.13
* \* \`\`setup.py testr\`\` was not indicating test failures via it's return code. (Monty Taylor)
* Actually return from \_run\_testr
+
+0.0.12
+------
+
* Release 0.0.12
* \* There is now a setuptools extension provided by \`\`testrespository\`\` making it easy to invoke testr from setup.py driven workflows. (Monty Taylor, Robert Collins)
* \* BSD license file incorrectly claimed copyright by subunit contributors. (Monty Taylor)
* Correct a typo in setup.py
* \* .testr.conf is now shipped in the source distribution to aid folk wanting to validate that testrepository works correctly on their machine. (Robert Collins)
* Add setuptools commands for running testr and coverage
+
+0.0.11
+------
+
* Release 0.0.11
* Tweak docs
* \* Fix another incompatability with Mac OS X - gdbm dbm modules don't support get. (Robert Collins, #1094330)
* ReST fixes for docs
+
+0.0.10
+------
+
* Release 0.0.10
* \* It's now possible to configure \`\`test\_run\_concurrency\`\` in \`\`.testr.conf\`\` to have concurrency defined by a callout. (Robert Collins)
* Update testr help run docs for new options
@@ -395,6 +466,10 @@
* \* TestCommand is now a fixture. This is used to ensure cached test instances are disposed of - if using the object to run or list tests, you will need to adjust your calls. (Robert Collins)
* \* It's now possible to configure \`\`test\_run\_concurrency\`\` in \`\`.testr.conf\`\` to have concurrency defined by a callout. (Robert Collins)
* Document overview
+
+0.0.9
+-----
+
* Release 0.0.9
* \* On OSX the \`\`anydbm\`\` module by default returns an implementation that doesn't support update(). Workaround that by falling back to a loop. (Robert Collins, #1091500)
* Document workaround
@@ -403,6 +478,10 @@
* \* \`\`testr --analyze-improvements\`\` now honours test regex filters and only analyzes matching tests. (Robert Collins)
* Better documentation for setup of .testr.conf
* Better keywords
+
+0.0.8
+-----
+
* Release 0.0.8
* \* \`\`testr run --analyze-isolation\`\` will search the current failing tests for spurious failures caused by interactions with other tests. (Robert Collins, #684069)
* First, horribly untested, version of --analyze-failures
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.2.0/PKG-INFO new/stestr-2.3.1/PKG-INFO
--- old/stestr-2.2.0/PKG-INFO 2018-11-30 02:32:07.000000000 +0100
+++ new/stestr-2.3.1/PKG-INFO 2019-03-06 02:23:39.000000000 +0100
@@ -1,11 +1,14 @@
Metadata-Version: 2.1
Name: stestr
-Version: 2.2.0
+Version: 2.3.1
Summary: A parallel Python test runner built around subunit
Home-page: http://stestr.readthedocs.io/en/latest/
Author: Matthew Treinish
Author-email: mtreinish(a)kortar.org
License: UNKNOWN
+Project-URL: Documentation, https://stestr.readthedocs.io
+Project-URL: Source Code, https://github.com/mtreinish/stestr
+Project-URL: Bug Tracker, https://github.com/mtreinish/stestr/issues
Description: stestr
======
@@ -25,7 +28,8 @@
:target: https://pypi.python.org/pypi/stestr
:alt: Latest Version
- You can see the full rendered docs at: http://stestr.readthedocs.io/en/latest/
+ * You can see the full rendered docs at: http://stestr.readthedocs.io/en/latest/
+ * The code of the project is on Github: https://github.com/mtreinish/stestr
Overview
--------
@@ -40,19 +44,16 @@
.. _unittest: https://docs.python.org/3/library/unittest.html
.. _subunit: https://github.com/testing-cabal/subunit
- stestr originally started as a fork of the `testrepository`_ that concentrates
- on being a dedicated test runner for python projects. The generic abstraction
- layers which enabled testrepository to work with any subunit emitting runner
- are gone. stestr hard codes python-subunit-isms into how it works. The code
- base is also designed to try and be explicit, and to provide a python api that
- is documented and has examples.
+ stestr originally started as a fork of the `testrepository`_ project. But,
+ instead of being an interface for any test runner that used subunit, like
+ testrepository, stestr concentrated on being a dedicated test runner for python
+ projects. While stestr was originally forked from testrepository it is not
+ backwards compatible with testrepository. At a high level the basic concepts of
+ operation are shared between the two projects but the actual usage is not
+ exactly the same.
.. _testrepository: https://testrepository.readthedocs.org/en/latest
- While stestr was originally forked from testrepository it is not 100% backwards
- compatible with testrepository. At a high level the basic concepts of operation
- are shared between the 2 projects but the actual usage between the 2 is not
- exactly the same.
Installing stestr
-----------------
@@ -73,7 +74,7 @@
------------
After you install stestr to use it to run tests is pretty straightforward. The
- first thing you'll need to do is create a ``.stestr.conf`` file for your
+ first thing you'll want to do is create a ``.stestr.conf`` file for your
project. This file is used to tell stestr where to find tests and basic
information about how tests are run. A basic minimal example of the
contents of this is::
@@ -83,25 +84,20 @@
which just tells stestr the relative path for the directory to use for
test discovery. This is the same as ``--start-directory`` in the standard
- `unittest discovery`_
+ `unittest discovery`_.
.. _unittest discovery: https://docs.python.org/3/library/unittest.html#test-discovery
After this file is created you should be all set to start using stestr to run
- tests. You can create a repository for test results with the stestr init
- command, just run::
-
- stestr init
-
- and it will create a .stestr directory in your cwd that will be used to store
- test run results. (if you run stestr run it will create this if it doesn't
- exist) Then to run tests just use::
+ tests. To run tests just use::
stestr run
- it will then execute all the tests found by test discovery. If you're just
- running a single test (or module) and want to avoid the overhead of doing test
- discovery you can use the ``--no-discover``/``-n`` option.
+ it will first create a results repository at ``.stestr/`` in the current
+ working directory and then execute all the tests found by test discovery. If
+ you're just running a single test (or module) and want to avoid the overhead of
+ doing test discovery you can use the ``--no-discover``/``-n`` option to specify
+ that test.
For all the details on these commands and more thorough explanation of options
see the stestr manual: https://stestr.readthedocs.io/en/latest/MANUAL.html
@@ -134,13 +130,28 @@
which will generate the troff file in doc/build/man/stestr.1 which is ready to
be packaged and or put in your system's man pages.
+ Contributing
+ ------------
+
+ To browse the latest code, see: https://github.com/mtreinish/stestr
+ To clone the latest code, use: ``git clone https://github.com/mtreinish/stestr.git``
+
+ Guidelines for contribution are documented at: http://stestr.readthedocs.io/en/latest/developer_guidelines.html
+
+ Use `github pull requests`_ to submit patches. Before you submit a pull request
+ ensure that all the automated testing will pass by running ``tox`` locally.
+ This will run the test suite and also the automated style rule checks just as
+ they will in CI. If CI fails on your change it will not be able to merge.
+
+ .. _github pull requests: https://help.github.com/articles/about-pull-requests/
+
Platform: UNKNOWN
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
-Classifier: Operating System :: POSIX :: Linux
+Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
@@ -150,5 +161,5 @@
Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: Software Development :: Quality Assurance
-Provides-Extra: test
Provides-Extra: sql
+Provides-Extra: test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.2.0/README.rst new/stestr-2.3.1/README.rst
--- old/stestr-2.2.0/README.rst 2018-11-29 21:57:37.000000000 +0100
+++ new/stestr-2.3.1/README.rst 2019-03-01 19:22:55.000000000 +0100
@@ -17,7 +17,8 @@
:target: https://pypi.python.org/pypi/stestr
:alt: Latest Version
-You can see the full rendered docs at: http://stestr.readthedocs.io/en/latest/
+* You can see the full rendered docs at: http://stestr.readthedocs.io/en/latest/
+* The code of the project is on Github: https://github.com/mtreinish/stestr
Overview
--------
@@ -32,19 +33,16 @@
.. _unittest: https://docs.python.org/3/library/unittest.html
.. _subunit: https://github.com/testing-cabal/subunit
-stestr originally started as a fork of the `testrepository`_ that concentrates
-on being a dedicated test runner for python projects. The generic abstraction
-layers which enabled testrepository to work with any subunit emitting runner
-are gone. stestr hard codes python-subunit-isms into how it works. The code
-base is also designed to try and be explicit, and to provide a python api that
-is documented and has examples.
+stestr originally started as a fork of the `testrepository`_ project. But,
+instead of being an interface for any test runner that used subunit, like
+testrepository, stestr concentrated on being a dedicated test runner for python
+projects. While stestr was originally forked from testrepository it is not
+backwards compatible with testrepository. At a high level the basic concepts of
+operation are shared between the two projects but the actual usage is not
+exactly the same.
.. _testrepository: https://testrepository.readthedocs.org/en/latest
-While stestr was originally forked from testrepository it is not 100% backwards
-compatible with testrepository. At a high level the basic concepts of operation
-are shared between the 2 projects but the actual usage between the 2 is not
-exactly the same.
Installing stestr
-----------------
@@ -65,7 +63,7 @@
------------
After you install stestr to use it to run tests is pretty straightforward. The
-first thing you'll need to do is create a ``.stestr.conf`` file for your
+first thing you'll want to do is create a ``.stestr.conf`` file for your
project. This file is used to tell stestr where to find tests and basic
information about how tests are run. A basic minimal example of the
contents of this is::
@@ -75,25 +73,20 @@
which just tells stestr the relative path for the directory to use for
test discovery. This is the same as ``--start-directory`` in the standard
-`unittest discovery`_
+`unittest discovery`_.
.. _unittest discovery: https://docs.python.org/3/library/unittest.html#test-discovery
After this file is created you should be all set to start using stestr to run
-tests. You can create a repository for test results with the stestr init
-command, just run::
-
- stestr init
-
-and it will create a .stestr directory in your cwd that will be used to store
-test run results. (if you run stestr run it will create this if it doesn't
-exist) Then to run tests just use::
+tests. To run tests just use::
stestr run
-it will then execute all the tests found by test discovery. If you're just
-running a single test (or module) and want to avoid the overhead of doing test
-discovery you can use the ``--no-discover``/``-n`` option.
+it will first create a results repository at ``.stestr/`` in the current
+working directory and then execute all the tests found by test discovery. If
+you're just running a single test (or module) and want to avoid the overhead of
+doing test discovery you can use the ``--no-discover``/``-n`` option to specify
+that test.
For all the details on these commands and more thorough explanation of options
see the stestr manual: https://stestr.readthedocs.io/en/latest/MANUAL.html
@@ -125,3 +118,18 @@
which will generate the troff file in doc/build/man/stestr.1 which is ready to
be packaged and or put in your system's man pages.
+
+Contributing
+------------
+
+To browse the latest code, see: https://github.com/mtreinish/stestr
+To clone the latest code, use: ``git clone https://github.com/mtreinish/stestr.git``
+
+Guidelines for contribution are documented at: http://stestr.readthedocs.io/en/latest/developer_guidelines.html
+
+Use `github pull requests`_ to submit patches. Before you submit a pull request
+ensure that all the automated testing will pass by running ``tox`` locally.
+This will run the test suite and also the automated style rule checks just as
+they will in CI. If CI fails on your change it will not be able to merge.
+
+.. _github pull requests: https://help.github.com/articles/about-pull-requests/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.2.0/doc/source/CONTRIBUTING.rst new/stestr-2.3.1/doc/source/CONTRIBUTING.rst
--- old/stestr-2.2.0/doc/source/CONTRIBUTING.rst 1970-01-01 01:00:00.000000000 +0100
+++ new/stestr-2.3.1/doc/source/CONTRIBUTING.rst 2017-12-08 22:00:26.000000000 +0100
@@ -0,0 +1,14 @@
+Contributing
+============
+
+To browse the latest code, see: https://github.com/mtreinish/stestr
+To clone the latest code, use: ``git clone https://github.com/mtreinish/stestr.git``
+
+Guidelines for contribution are documented at: http://stestr.readthedocs.io/en/latest/developer_guidelines.html
+
+Use `github pull requests`_ to submit patches. Before you submit a pull request
+ensure that all the automated testing will pass by running ``tox`` locally.
+This will run the test suite and also the automated style rule checks just as
+they will in CI. If CI fails on your change it will not be able to merge.
+
+.. _github pull requests: https://help.github.com/articles/about-pull-requests/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.2.0/doc/source/MANUAL.rst new/stestr-2.3.1/doc/source/MANUAL.rst
--- old/stestr-2.2.0/doc/source/MANUAL.rst 2018-11-27 21:49:05.000000000 +0100
+++ new/stestr-2.3.1/doc/source/MANUAL.rst 2018-12-13 21:15:15.000000000 +0100
@@ -73,6 +73,11 @@
The ``group_regex`` option is used to specify is used to provide a scheduler
hint for how tests should be divided between test runners. See the
:ref:`group_regex` section for more information on how this works.
+You can also specify the ``parallel_class=True`` instead of
+group_regex to group tests in the stestr scheduler together by
+class. Since this is a common use case this enables that without
+needing to memorize the complicated regex for ``group_regex`` to do
+this.
There is also an option to specify all the options in the config file via the
CLI. This way you can run stestr directly without having to write a config file
@@ -352,6 +357,22 @@
group_regex=([^\.]+\.)+
+However, because grouping tests at the class level is a common use
+case there is also a config option, ``parallel_class``, to do
+this. For example, you can use::
+
+ parallel_class=True
+
+and it will group tests in the same class together.
+
+.. note::
+ This ``parallel_class`` option takes priority over the
+ ``group_regex`` option. And if both on the CLI and in the config
+ are set, we use the option on the CLI not in a config file. For
+ example, ``--group-regex`` on the CLI and ``parallel-class`` in a
+ config file are set, ``--group-regex`` is higer priority than
+ ``parallel-class`` in this case.
+
Test Scheduling
---------------
By default stestr schedules the tests by first checking if there is any
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.2.0/doc/source/README.rst new/stestr-2.3.1/doc/source/README.rst
--- old/stestr-2.2.0/doc/source/README.rst 2018-11-29 21:57:37.000000000 +0100
+++ new/stestr-2.3.1/doc/source/README.rst 2019-03-01 19:22:55.000000000 +0100
@@ -17,7 +17,8 @@
:target: https://pypi.python.org/pypi/stestr
:alt: Latest Version
-You can see the full rendered docs at: http://stestr.readthedocs.io/en/latest/
+* You can see the full rendered docs at: http://stestr.readthedocs.io/en/latest/
+* The code of the project is on Github: https://github.com/mtreinish/stestr
Overview
--------
@@ -32,19 +33,16 @@
.. _unittest: https://docs.python.org/3/library/unittest.html
.. _subunit: https://github.com/testing-cabal/subunit
-stestr originally started as a fork of the `testrepository`_ that concentrates
-on being a dedicated test runner for python projects. The generic abstraction
-layers which enabled testrepository to work with any subunit emitting runner
-are gone. stestr hard codes python-subunit-isms into how it works. The code
-base is also designed to try and be explicit, and to provide a python api that
-is documented and has examples.
+stestr originally started as a fork of the `testrepository`_ project. But,
+instead of being an interface for any test runner that used subunit, like
+testrepository, stestr concentrated on being a dedicated test runner for python
+projects. While stestr was originally forked from testrepository it is not
+backwards compatible with testrepository. At a high level the basic concepts of
+operation are shared between the two projects but the actual usage is not
+exactly the same.
.. _testrepository: https://testrepository.readthedocs.org/en/latest
-While stestr was originally forked from testrepository it is not 100% backwards
-compatible with testrepository. At a high level the basic concepts of operation
-are shared between the 2 projects but the actual usage between the 2 is not
-exactly the same.
Installing stestr
-----------------
@@ -65,7 +63,7 @@
------------
After you install stestr to use it to run tests is pretty straightforward. The
-first thing you'll need to do is create a ``.stestr.conf`` file for your
+first thing you'll want to do is create a ``.stestr.conf`` file for your
project. This file is used to tell stestr where to find tests and basic
information about how tests are run. A basic minimal example of the
contents of this is::
@@ -75,25 +73,20 @@
which just tells stestr the relative path for the directory to use for
test discovery. This is the same as ``--start-directory`` in the standard
-`unittest discovery`_
+`unittest discovery`_.
.. _unittest discovery: https://docs.python.org/3/library/unittest.html#test-discovery
After this file is created you should be all set to start using stestr to run
-tests. You can create a repository for test results with the stestr init
-command, just run::
-
- stestr init
-
-and it will create a .stestr directory in your cwd that will be used to store
-test run results. (if you run stestr run it will create this if it doesn't
-exist) Then to run tests just use::
+tests. To run tests just use::
stestr run
-it will then execute all the tests found by test discovery. If you're just
-running a single test (or module) and want to avoid the overhead of doing test
-discovery you can use the ``--no-discover``/``-n`` option.
+it will first create a results repository at ``.stestr/`` in the current
+working directory and then execute all the tests found by test discovery. If
+you're just running a single test (or module) and want to avoid the overhead of
+doing test discovery you can use the ``--no-discover``/``-n`` option to specify
+that test.
For all the details on these commands and more thorough explanation of options
see the stestr manual: https://stestr.readthedocs.io/en/latest/MANUAL.html
@@ -125,3 +118,18 @@
which will generate the troff file in doc/build/man/stestr.1 which is ready to
be packaged and or put in your system's man pages.
+
+Contributing
+------------
+
+To browse the latest code, see: https://github.com/mtreinish/stestr
+To clone the latest code, use: ``git clone https://github.com/mtreinish/stestr.git``
+
+Guidelines for contribution are documented at: http://stestr.readthedocs.io/en/latest/developer_guidelines.html
+
+Use `github pull requests`_ to submit patches. Before you submit a pull request
+ensure that all the automated testing will pass by running ``tox`` locally.
+This will run the test suite and also the automated style rule checks just as
+they will in CI. If CI fails on your change it will not be able to merge.
+
+.. _github pull requests: https://help.github.com/articles/about-pull-requests/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.2.0/doc/source/index.rst new/stestr-2.3.1/doc/source/index.rst
--- old/stestr-2.2.0/doc/source/index.rst 2018-02-18 00:39:04.000000000 +0100
+++ new/stestr-2.3.1/doc/source/index.rst 2019-03-01 19:22:55.000000000 +0100
@@ -13,12 +13,12 @@
README
MANUAL
+ CONTRIBUTING
developer_guidelines
internal_arch
api
-
Indices and tables
==================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.2.0/setup.cfg new/stestr-2.3.1/setup.cfg
--- old/stestr-2.2.0/setup.cfg 2018-11-30 02:32:07.000000000 +0100
+++ new/stestr-2.3.1/setup.cfg 2019-03-06 02:23:39.000000000 +0100
@@ -11,7 +11,7 @@
Intended Audience :: System Administrators
Intended Audience :: Developers
License :: OSI Approved :: Apache Software License
- Operating System :: POSIX :: Linux
+ Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
@@ -21,6 +21,11 @@
Programming Language :: Python :: 3.7
Topic :: Software Development :: Testing
Topic :: Software Development :: Quality Assurance
+project_urls =
+ Documentation = https://stestr.readthedocs.io
+ Source Code = https://github.com/mtreinish/stestr
+ Bug Tracker = https://github.com/mtreinish/stestr/issues
+requires-python = >=2.7
[files]
packages =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.2.0/stestr/cli.py new/stestr-2.3.1/stestr/cli.py
--- old/stestr-2.2.0/stestr/cli.py 2018-04-07 23:15:34.000000000 +0200
+++ new/stestr-2.3.1/stestr/cli.py 2019-02-15 20:02:23.000000000 +0100
@@ -30,10 +30,14 @@
)
def initialize_app(self, argv):
+ self.options.debug = True
self.LOG.debug('initialize_app')
def prepare_to_run_command(self, cmd):
self.LOG.debug('prepare_to_run_command %s', cmd.__class__.__name__)
+ group_regex = '([^\.]*\.)*' \
+ if cmd.app_args.parallel_class else cmd.app_args.group_regex
+ cmd.app_args.group_regex = group_regex
def clean_up(self, cmd, result, err):
self.LOG.debug('clean_up %s', cmd.__class__.__name__)
@@ -92,6 +96,12 @@
" together in the stestr scheduler. If "
"both this and the corresponding config file "
"option are set this value will be used.")
+ parser.add_argument('--parallel-class', '-p',
+ action='store_true',
+ default=False,
+ help="Set the flag to group tests by class. NOTE: "
+ "This flag takes priority over the "
+ "`--group-regex` option even if it's set.")
return parser
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.2.0/stestr/commands/failing.py new/stestr-2.3.1/stestr/commands/failing.py
--- old/stestr-2.2.0/stestr/commands/failing.py 2018-08-09 14:40:52.000000000 +0200
+++ new/stestr-2.3.1/stestr/commands/failing.py 2019-03-01 19:22:55.000000000 +0100
@@ -24,8 +24,18 @@
class Failing(command.Command):
- def get_description(self):
- return "Show the current failures known by the repository"
+ """Show the current failures known by the repository.
+
+ Without --subunit, the process exit code will be non-zero if the
+ previous test run was not successful and test failures are shown. But,
+ with --subunit, the process exit code is non-zero only if the subunit
+ stream could not be generated successfully from any failures. The test
+ results and run status are included in the subunit stream emitted for
+ the failed tests, so the stream should be used for interpretting the
+ failing tests. If no subunit stream is emitted with --subunit and a
+ zero exit code then there were no failures in the most recent run in
+ the repository.
+ """
def get_parser(self, prog_name):
parser = super(Failing, self).get_parser(prog_name)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.2.0/stestr/commands/init.py new/stestr-2.3.1/stestr/commands/init.py
--- old/stestr-2.2.0/stestr/commands/init.py 2018-02-18 00:39:04.000000000 +0100
+++ new/stestr-2.3.1/stestr/commands/init.py 2019-03-01 19:22:55.000000000 +0100
@@ -20,13 +20,11 @@
class Init(command.Command):
+ """Create a new repository."""
+
def take_action(self, parsed_args):
init(self.app_args.repo_type, self.app_args.repo_url)
- def get_description(self):
- help_str = "Create a new repository."
- return help_str
-
def init(repo_type='file', repo_url=None, stdout=sys.stdout):
"""Initialize a new repository
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.2.0/stestr/commands/last.py new/stestr-2.3.1/stestr/commands/last.py
--- old/stestr-2.2.0/stestr/commands/last.py 2018-08-09 14:40:52.000000000 +0200
+++ new/stestr-2.3.1/stestr/commands/last.py 2019-03-01 19:22:55.000000000 +0100
@@ -25,17 +25,18 @@
class Last(command.Command):
- def get_description(self):
- help_str = """Show the last run loaded into a repository.
+ """Show the last run loaded into a repository.
- Failing tests are shown on the console and a summary of the run is
- printed at the end.
+ Failing tests are shown on the console and a summary of the run is
+ printed at the end.
- Without --subunit, the process exit code will be non-zero if the test
- run was not successful. With --subunit, the process exit code is
- non-zero if the subunit stream could not be generated successfully.
- """
- return help_str
+ Without --subunit, the process exit code will be non-zero if the test
+ run was not successful. With --subunit, the process exit code is
+ non-zero only if the subunit stream could not be generated
+ successfully. The test results and run status are included in the
+ subunit stream, so the stream should be used to determining the result
+ of the run instead of the exit code when using the --subunit flag.
+ """
def get_parser(self, prog_name):
parser = super(Last, self).get_parser(prog_name)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.2.0/stestr/commands/list.py new/stestr-2.3.1/stestr/commands/list.py
--- old/stestr-2.2.0/stestr/commands/list.py 2018-02-18 00:39:04.000000000 +0100
+++ new/stestr-2.3.1/stestr/commands/list.py 2019-03-01 19:22:55.000000000 +0100
@@ -22,12 +22,11 @@
class List(command.Command):
+ """List the tests for a project.
- def get_description(self):
- help_str = ("List the tests for a project. You can use a filter just "
- "like with the run command to see exactly what tests "
- "match")
- return help_str
+ You can use a filter just like with the run command to see exactly what
+ tests match.
+ """
def get_parser(self, prog_name):
parser = super(List, self).get_parser(prog_name)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.2.0/stestr/commands/load.py new/stestr-2.3.1/stestr/commands/load.py
--- old/stestr-2.2.0/stestr/commands/load.py 2018-11-27 21:49:05.000000000 +0100
+++ new/stestr-2.3.1/stestr/commands/load.py 2019-03-01 19:22:55.000000000 +0100
@@ -32,6 +32,19 @@
class Load(command.Command):
+ """Load a subunit stream into a repository.
+
+ Failing tests are shown on the console and a summary of the stream
+ is printed at the end.
+
+ Without --subunit, the process exit code will be non-zero if the test
+ run was not successful. With --subunit, the process exit code is
+ non-zero if the subunit stream could not be generated successfully.
+ The test results and run status are included in the subunit stream, so
+ the stream should be used to determining the result of the run instead
+ of the exit code when using the --subunit flag.
+ """
+
def get_parser(self, prog_name):
parser = super(Load, self).get_parser(prog_name)
parser.add_argument("files", nargs="*", default=False,
@@ -70,14 +83,6 @@
'execution')
return parser
- def get_description(self):
- help_str = """Load a subunit stream into a repository.
-
- Failing tests are shown on the console and a summary of the stream
- is printed at the end.
- """
- return help_str
-
def take_action(self, parsed_args):
user_conf = user_config.get_user_config(self.app_args.user_config)
args = parsed_args
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.2.0/stestr/commands/run.py new/stestr-2.3.1/stestr/commands/run.py
--- old/stestr-2.2.0/stestr/commands/run.py 2018-11-27 21:49:05.000000000 +0100
+++ new/stestr-2.3.1/stestr/commands/run.py 2019-03-06 02:22:28.000000000 +0100
@@ -34,7 +34,28 @@
from stestr import user_config
+def _to_int(possible, default=0, out=sys.stderr):
+ try:
+ i = int(possible)
+ except ValueError:
+ i = default
+ msg = ('Unable to convert "%s" to an integer. Using %d.\n' %
+ (possible, default))
+ out.write(six.text_type(msg))
+ return i
+
+
class Run(command.Command):
+ """Run the tests for a project and store them into the repository.
+
+ Without --subunit, the process exit code will be non-zero if the test
+ run was not successful. However, with --subunit, the process exit code
+ is non-zero only if the subunit stream could not be generated
+ successfully. The test results and run status are included in the
+ subunit stream, so the stream should be used to determining the result
+ of the run instead of the exit code when using the --subunit flag.
+ """
+
def get_parser(self, prog_name):
parser = super(Run, self).get_parser(prog_name)
parser.add_argument("filters", nargs="*", default=None,
@@ -133,11 +154,6 @@
'execution')
return parser
- def get_description(self):
- help_str = (
- "Run the tests for a project and store them into the repository.")
- return help_str
-
def take_action(self, parsed_args):
user_conf = user_config.get_user_config(self.app_args.user_config)
filters = parsed_args.filters
@@ -172,6 +188,13 @@
suppress_attachments = args.suppress_attachments
verbose_level = self.app.options.verbose_level
stdout = open(os.devnull, 'w') if verbose_level == 0 else sys.stdout
+ # Make sure all (python) callers have provided an int()
+ concurrency = _to_int(concurrency)
+ if concurrency and concurrency < 0:
+ msg = ("The provided concurrency value: %s is not valid. An "
+ "integer >= 0 must be used.\n" % concurrency)
+ stdout.write(msg)
+ return 2
result = run_command(
config=self.app_args.config, repo_type=self.app_args.repo_type,
repo_url=self.app_args.repo_url,
@@ -308,6 +331,13 @@
exit(1)
repo = util.get_repo_initialise(repo_type, repo_url)
combine_id = None
+ concurrency = _to_int(concurrency)
+
+ if concurrency and concurrency < 0:
+ msg = ("The provided concurrency value: %s is not valid. An integer "
+ ">= 0 must be used.\n" % concurrency)
+ stdout.write(msg)
+ return 2
if combine:
latest_id = repo.latest_id()
combine_id = six.text_type(latest_id)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.2.0/stestr/commands/slowest.py new/stestr-2.3.1/stestr/commands/slowest.py
--- old/stestr-2.2.0/stestr/commands/slowest.py 2018-02-18 00:39:04.000000000 +0100
+++ new/stestr-2.3.1/stestr/commands/slowest.py 2019-03-01 19:22:55.000000000 +0100
@@ -23,13 +23,10 @@
class Slowest(command.Command):
- def get_description(self):
- help_str = """Show the slowest tests from the last test run.
+ """Show the slowest tests from the last test run.
- This command shows a table, with the longest running
- tests at the top.
- """
- return help_str
+ This command shows a table, with the longest running tests at the top.
+ """
def get_parser(self, prog_name):
parser = super(Slowest, self).get_parser(prog_name)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.2.0/stestr/config_file.py new/stestr-2.3.1/stestr/config_file.py
--- old/stestr-2.2.0/stestr/config_file.py 2018-11-27 21:49:05.000000000 +0100
+++ new/stestr-2.3.1/stestr/config_file.py 2019-03-01 19:22:55.000000000 +0100
@@ -10,6 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
+import os
import re
import sys
@@ -38,7 +39,7 @@
serial=False, worker_path=None,
concurrency=0, blacklist_file=None,
whitelist_file=None, black_regex=None,
- randomize=False):
+ randomize=False, parallel_class=None):
"""Get a test_processor.TestProcessorFixture for this config file
Any parameters about running tests will be used for initialize the
@@ -81,6 +82,10 @@
test list.
:param bool randomize: Randomize the test order after they are
partitioned into separate workers
+ :param bool parallel_class: Set the flag to group tests together in the
+ stestr scheduler by class. If both this and the corresponding
+ config file option which includes `group-regex` are set, this value
+ will be used.
:returns: a TestProcessorFixture object for the specified config file
and any arguments passed into this function
@@ -99,13 +104,34 @@
elif not top_dir:
top_dir = './'
- python = 'python' if sys.platform == 'win32' else '${PYTHON:-python}'
- command = "%s -m subunit.run discover -t" \
- " %s %s $LISTOPT $IDOPTION" % (python, top_dir, test_path)
+ stestr_python = sys.executable
+ # let's try to be explicit, even if it means a longer set of ifs
+ if sys.platform == 'win32':
+ # it may happen, albeit rarely
+ if not stestr_python:
+ raise RuntimeError("The Python interpreter was not found")
+ python = stestr_python
+ else:
+ if os.environ.get('PYTHON'):
+ python = '${PYTHON}'
+ elif stestr_python:
+ python = stestr_python
+ else:
+ raise RuntimeError("The Python interpreter was not found and "
+ "PYTHON is not set")
+
+ command = '%s -m subunit.run discover -t "%s" "%s" ' \
+ '$LISTOPT $IDOPTION' % (python, top_dir, test_path)
listopt = "--list"
idoption = "--load-list $IDFILE"
# If the command contains $IDOPTION read that command from config
# Use a group regex if one is defined
+ if parallel_class:
+ group_regex = '([^\.]*\.)*'
+ if not group_regex \
+ and self.parser.has_option('DEFAULT', 'parallel_class') \
+ and self.parser.getboolean('DEFAULT', 'parallel_class'):
+ group_regex = '([^\.]*\.)*'
if not group_regex and self.parser.has_option('DEFAULT',
'group_regex'):
group_regex = self.parser.get('DEFAULT', 'group_regex')
@@ -116,7 +142,6 @@
return match.group(0)
else:
group_callback = None
-
# Handle the results repository
repository = util.get_repo_open(repo_type, repo_url)
return test_processor.TestProcessorFixture(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.2.0/stestr/tests/test_bisect_return_codes.py new/stestr-2.3.1/stestr/tests/test_bisect_return_codes.py
--- old/stestr-2.2.0/stestr/tests/test_bisect_return_codes.py 2018-11-27 21:49:05.000000000 +0100
+++ new/stestr-2.3.1/stestr/tests/test_bisect_return_codes.py 2019-02-15 20:02:23.000000000 +0100
@@ -33,10 +33,12 @@
self.setup_cfg_file = os.path.join(self.directory, 'setup.cfg')
self.init_file = os.path.join(self.test_dir, '__init__.py')
self.setup_py = os.path.join(self.directory, 'setup.py')
+ self.user_config = os.path.join(self.directory, 'stestr.yaml')
shutil.copy('stestr/tests/files/testr-conf', self.testr_conf_file)
shutil.copy('setup.py', self.setup_py)
shutil.copy('stestr/tests/files/setup.cfg', self.setup_cfg_file)
shutil.copy('stestr/tests/files/__init__.py', self.init_file)
+ shutil.copy('stestr/tests/files/stestr.yaml', self.user_config)
# Move around the test code
self.serial_fail_file = os.path.join(self.test_dir,
@@ -58,8 +60,8 @@
'stestr run returned an unexpected return code'
'Stdout: %s\nStderr: %s' % (out, err))
p_analyze = subprocess.Popen(
- "stestr run --analyze-isolation", shell=True,
- stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ "stestr --user-config stestr.yaml run --analyze-isolation",
+ shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = p_analyze.communicate()
out = out.decode('utf-8')
# For debugging potential failures
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.2.0/stestr/tests/test_config_file.py new/stestr-2.3.1/stestr/tests/test_config_file.py
--- old/stestr-2.2.0/stestr/tests/test_config_file.py 2017-07-28 00:22:49.000000000 +0200
+++ new/stestr-2.3.1/stestr/tests/test_config_file.py 2019-03-01 19:22:55.000000000 +0100
@@ -29,30 +29,81 @@
@mock.patch.object(config_file, 'sys')
def _check_get_run_command(self, mock_sys, mock_TestProcessorFixture,
mock_get_repo_open, platform='win32',
- expected_python='python'):
+ group_regex='.*', parallel_class=False,
+ sys_executable='/usr/bin/python',
+ expected_python='/usr/bin/python',
+ expected_group_callback=mock.ANY,
+ environment=None):
mock_sys.platform = platform
+ mock_sys.executable = sys_executable
+ if environment is None:
+ environment = {'PYTHON': ''}
- fixture = self._testr_conf.get_run_command(test_path='fake_test_path',
- top_dir='fake_top_dir',
- group_regex='.*')
+ with mock.patch.dict('os.environ', environment):
+ fixture = \
+ self._testr_conf.get_run_command(test_path='fake_test_path',
+ top_dir='fake_top_dir',
+ group_regex=group_regex,
+ parallel_class=parallel_class)
self.assertEqual(mock_TestProcessorFixture.return_value, fixture)
mock_get_repo_open.assert_called_once_with('file',
None)
- command = "%s -m subunit.run discover -t %s %s $LISTOPT $IDOPTION" % (
- expected_python, 'fake_top_dir', 'fake_test_path')
+ command = '%s -m subunit.run discover -t "%s" "%s" ' \
+ '$LISTOPT $IDOPTION' % (expected_python, 'fake_top_dir',
+ 'fake_test_path')
# Ensure TestProcessorFixture is created with defaults except for where
# we specfied and with the correct python.
mock_TestProcessorFixture.assert_called_once_with(
None, command, "--list", "--load-list $IDFILE",
mock_get_repo_open.return_value, black_regex=None,
- blacklist_file=None, concurrency=0, group_callback=mock.ANY,
+ blacklist_file=None, concurrency=0,
+ group_callback=expected_group_callback,
test_filters=None, randomize=False, serial=False,
whitelist_file=None, worker_path=None)
+ @mock.patch.object(config_file, 'sys')
+ def _check_get_run_command_exception(self, mock_sys, platform='win32',
+ sys_executable='/usr/bin/python',
+ environment=None):
+ mock_sys.platform = platform
+ mock_sys.executable = sys_executable
+ if environment is None:
+ environment = {'PYTHON': ''}
+
+ with mock.patch.dict('os.environ', environment):
+ self.assertRaises(RuntimeError, self._testr_conf.get_run_command,
+ test_path='fake_test_path',
+ top_dir='fake_top_dir')
+
def test_get_run_command_linux(self):
- self._check_get_run_command(platform='linux2',
- expected_python='${PYTHON:-python}')
+ self._check_get_run_command(
+ platform='linux2',
+ expected_python='/usr/bin/python')
+
+ def test_get_run_command_emptysysexecutable_noenv(self):
+ self._check_get_run_command_exception(
+ platform='linux2',
+ sys_executable=None)
+
+ def test_get_run_command_emptysysexecutable_win32(self):
+ self._check_get_run_command_exception(
+ platform='win32', sys_executable=None,
+ environment={'PYTHON': 'python3'})
+
+ def test_get_run_command_emptysysexecutable_withenv(self):
+ self._check_get_run_command(
+ platform='linux2', sys_executable=None,
+ expected_python='${PYTHON}',
+ environment={'PYTHON': '/usr/bin/python3'})
def test_get_run_command_win32(self):
self._check_get_run_command()
+
+ def test_get_run_command_parallel_class(self):
+ self._check_get_run_command(parallel_class=True)
+
+ def test_get_run_command_nogroup_regex_noparallel_class(self):
+ self._testr_conf.parser.has_option.return_value = False
+ self._check_get_run_command(group_regex='',
+ expected_group_callback=None)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.2.0/stestr/tests/test_return_codes.py new/stestr-2.3.1/stestr/tests/test_return_codes.py
--- old/stestr-2.2.0/stestr/tests/test_return_codes.py 2018-11-27 21:49:05.000000000 +0100
+++ new/stestr-2.3.1/stestr/tests/test_return_codes.py 2019-03-06 02:22:28.000000000 +0100
@@ -46,12 +46,14 @@
self.failing_file = os.path.join(self.test_dir, 'test_failing.py')
self.init_file = os.path.join(self.test_dir, '__init__.py')
self.setup_py = os.path.join(self.directory, 'setup.py')
+ self.user_config = os.path.join(self.directory, 'stestr.yaml')
shutil.copy('stestr/tests/files/testr-conf', self.testr_conf_file)
shutil.copy('stestr/tests/files/passing-tests', self.passing_file)
shutil.copy('stestr/tests/files/failing-tests', self.failing_file)
shutil.copy('setup.py', self.setup_py)
shutil.copy('stestr/tests/files/setup.cfg', self.setup_cfg_file)
shutil.copy('stestr/tests/files/__init__.py', self.init_file)
+ shutil.copy('stestr/tests/files/stestr.yaml', self.user_config)
self.stdout = StringIO()
self.stderr = StringIO()
@@ -172,12 +174,20 @@
self.assertRunExit(cmd, 0)
def test_serial_subunit_passing(self):
- self.assertRunExit('stestr run --subunit passing', 0,
- subunit=True)
+ self.assertRunExit('stestr --user-config stestr.yaml run --subunit '
+ '--serial passing', 0, subunit=True)
+
+ def test_serial_subunit_failing(self):
+ self.assertRunExit('stestr --user-config stestr.yaml run --subunit '
+ '--serial failing', 0, subunit=True)
def test_parallel_subunit_passing(self):
- self.assertRunExit('stestr run --subunit passing', 0,
- subunit=True)
+ self.assertRunExit('stestr --user-config stestr.yaml run --subunit '
+ 'passing', 0, subunit=True)
+
+ def test_parallel_subunit_failing(self):
+ self.assertRunExit('stestr --user-config stestr.yaml run --subunit '
+ 'failing', 0, subunit=True)
def test_slowest_passing(self):
self.assertRunExit('stestr run --slowest passing', 0)
@@ -189,8 +199,15 @@
self.assertRunExit('stestr run --until-failure', 1)
def test_until_failure_with_subunit_fails(self):
- self.assertRunExit('stestr run --until-failure --subunit', 1,
- subunit=True)
+ self.assertRunExit('stestr --user-config stestr.yaml run '
+ '--until-failure --subunit', 1, subunit=True)
+
+ def test_with_parallel_class(self):
+ # NOTE(masayukig): Ideally, it's better to figure out the
+ # difference between with --parallel-class and without
+ # --parallel-class. However, it's difficult to make such a
+ # test from a command line based test.
+ self.assertRunExit('stestr --parallel-class run passing', 0)
def test_list(self):
self.assertRunExit('stestr list', 0)
@@ -233,13 +250,14 @@
self.assertRunExit('stestr load', 0, stdin=stream)
def test_load_from_stdin_quiet(self):
- out, err = self.assertRunExit('stestr -q run passing', 0)
+ out, err = self.assertRunExit('stestr --user-config stestr.yaml -q '
+ 'run passing', 0)
self.assertEqual(out.decode('utf-8'), '')
# FIXME(masayukig): We get some warnings when we run a coverage job.
# So, just ignore 'err' here.
- stream = self._get_cmd_stdout(
- 'stestr last --subunit')[0]
- out, err = self.assertRunExit('stestr -q load', 0, stdin=stream)
+ stream = self._get_cmd_stdout('stestr last --subunit')[0]
+ out, err = self.assertRunExit('stestr --user-config stestr.yaml -q '
+ 'load', 0, stdin=stream)
self.assertEqual(out.decode('utf-8'), '')
self.assertEqual(err.decode('utf-8'), '')
@@ -275,6 +293,19 @@
self.assertEqual(0, run.run_command(filters=['passing'], serial=True,
stdout=stdout.stream))
+ def test_str_concurrency_passing_from_func(self):
+ stdout = fixtures.StringStream('stdout')
+ self.useFixture(stdout)
+ self.assertEqual(0, run.run_command(filters=['passing'],
+ concurrency='1',
+ stdout=stdout.stream))
+
+ def test_str_concurrency_fails_from_func(self):
+ stdout = fixtures.StringStream('stdout')
+ self.useFixture(stdout)
+ self.assertEqual(1, run.run_command(concurrency='1',
+ stdout=stdout.stream))
+
def test_serial_fails_from_func(self):
stdout = fixtures.StringStream('stdout')
self.useFixture(stdout)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.2.0/stestr/tests/test_run.py new/stestr-2.3.1/stestr/tests/test_run.py
--- old/stestr-2.2.0/stestr/tests/test_run.py 1970-01-01 01:00:00.000000000 +0100
+++ new/stestr-2.3.1/stestr/tests/test_run.py 2019-03-06 02:22:28.000000000 +0100
@@ -0,0 +1,39 @@
+# 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.
+
+import io
+
+from stestr.commands import run
+from stestr.tests import base
+
+
+class TestRunCommand(base.TestCase):
+ def test_to_int_positive_int(self):
+ self.assertEqual(29, run._to_int(29))
+
+ def test_to_int_positive_int_str(self):
+ self.assertEqual(42, run._to_int('42'))
+
+ def test_to_int_negative_int(self):
+ self.assertEqual(-2, run._to_int(-2))
+
+ def test_to_int_negative_int_str(self):
+ self.assertEqual(-45, run._to_int('-45'))
+
+ def test_to_int_invalid_str(self):
+ fake_stderr = io.StringIO()
+ out = run._to_int('I am not an int', out=fake_stderr)
+ expected = (
+ 'Unable to convert "I am not an int" to an integer. '
+ 'Using 0.\n')
+ self.assertEqual(fake_stderr.getvalue(), expected)
+ self.assertEqual(0, out)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.2.0/stestr.egg-info/PKG-INFO new/stestr-2.3.1/stestr.egg-info/PKG-INFO
--- old/stestr-2.2.0/stestr.egg-info/PKG-INFO 2018-11-30 02:32:05.000000000 +0100
+++ new/stestr-2.3.1/stestr.egg-info/PKG-INFO 2019-03-06 02:23:37.000000000 +0100
@@ -1,11 +1,14 @@
Metadata-Version: 2.1
Name: stestr
-Version: 2.2.0
+Version: 2.3.1
Summary: A parallel Python test runner built around subunit
Home-page: http://stestr.readthedocs.io/en/latest/
Author: Matthew Treinish
Author-email: mtreinish(a)kortar.org
License: UNKNOWN
+Project-URL: Documentation, https://stestr.readthedocs.io
+Project-URL: Source Code, https://github.com/mtreinish/stestr
+Project-URL: Bug Tracker, https://github.com/mtreinish/stestr/issues
Description: stestr
======
@@ -25,7 +28,8 @@
:target: https://pypi.python.org/pypi/stestr
:alt: Latest Version
- You can see the full rendered docs at: http://stestr.readthedocs.io/en/latest/
+ * You can see the full rendered docs at: http://stestr.readthedocs.io/en/latest/
+ * The code of the project is on Github: https://github.com/mtreinish/stestr
Overview
--------
@@ -40,19 +44,16 @@
.. _unittest: https://docs.python.org/3/library/unittest.html
.. _subunit: https://github.com/testing-cabal/subunit
- stestr originally started as a fork of the `testrepository`_ that concentrates
- on being a dedicated test runner for python projects. The generic abstraction
- layers which enabled testrepository to work with any subunit emitting runner
- are gone. stestr hard codes python-subunit-isms into how it works. The code
- base is also designed to try and be explicit, and to provide a python api that
- is documented and has examples.
+ stestr originally started as a fork of the `testrepository`_ project. But,
+ instead of being an interface for any test runner that used subunit, like
+ testrepository, stestr concentrated on being a dedicated test runner for python
+ projects. While stestr was originally forked from testrepository it is not
+ backwards compatible with testrepository. At a high level the basic concepts of
+ operation are shared between the two projects but the actual usage is not
+ exactly the same.
.. _testrepository: https://testrepository.readthedocs.org/en/latest
- While stestr was originally forked from testrepository it is not 100% backwards
- compatible with testrepository. At a high level the basic concepts of operation
- are shared between the 2 projects but the actual usage between the 2 is not
- exactly the same.
Installing stestr
-----------------
@@ -73,7 +74,7 @@
------------
After you install stestr to use it to run tests is pretty straightforward. The
- first thing you'll need to do is create a ``.stestr.conf`` file for your
+ first thing you'll want to do is create a ``.stestr.conf`` file for your
project. This file is used to tell stestr where to find tests and basic
information about how tests are run. A basic minimal example of the
contents of this is::
@@ -83,25 +84,20 @@
which just tells stestr the relative path for the directory to use for
test discovery. This is the same as ``--start-directory`` in the standard
- `unittest discovery`_
+ `unittest discovery`_.
.. _unittest discovery: https://docs.python.org/3/library/unittest.html#test-discovery
After this file is created you should be all set to start using stestr to run
- tests. You can create a repository for test results with the stestr init
- command, just run::
-
- stestr init
-
- and it will create a .stestr directory in your cwd that will be used to store
- test run results. (if you run stestr run it will create this if it doesn't
- exist) Then to run tests just use::
+ tests. To run tests just use::
stestr run
- it will then execute all the tests found by test discovery. If you're just
- running a single test (or module) and want to avoid the overhead of doing test
- discovery you can use the ``--no-discover``/``-n`` option.
+ it will first create a results repository at ``.stestr/`` in the current
+ working directory and then execute all the tests found by test discovery. If
+ you're just running a single test (or module) and want to avoid the overhead of
+ doing test discovery you can use the ``--no-discover``/``-n`` option to specify
+ that test.
For all the details on these commands and more thorough explanation of options
see the stestr manual: https://stestr.readthedocs.io/en/latest/MANUAL.html
@@ -134,13 +130,28 @@
which will generate the troff file in doc/build/man/stestr.1 which is ready to
be packaged and or put in your system's man pages.
+ Contributing
+ ------------
+
+ To browse the latest code, see: https://github.com/mtreinish/stestr
+ To clone the latest code, use: ``git clone https://github.com/mtreinish/stestr.git``
+
+ Guidelines for contribution are documented at: http://stestr.readthedocs.io/en/latest/developer_guidelines.html
+
+ Use `github pull requests`_ to submit patches. Before you submit a pull request
+ ensure that all the automated testing will pass by running ``tox`` locally.
+ This will run the test suite and also the automated style rule checks just as
+ they will in CI. If CI fails on your change it will not be able to merge.
+
+ .. _github pull requests: https://help.github.com/articles/about-pull-requests/
+
Platform: UNKNOWN
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
-Classifier: Operating System :: POSIX :: Linux
+Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
@@ -150,5 +161,5 @@
Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: Software Development :: Quality Assurance
-Provides-Extra: test
Provides-Extra: sql
+Provides-Extra: test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.2.0/stestr.egg-info/SOURCES.txt new/stestr-2.3.1/stestr.egg-info/SOURCES.txt
--- old/stestr-2.2.0/stestr.egg-info/SOURCES.txt 2018-11-30 02:32:07.000000000 +0100
+++ new/stestr-2.3.1/stestr.egg-info/SOURCES.txt 2019-03-06 02:23:38.000000000 +0100
@@ -15,6 +15,7 @@
tox.ini
.github/issue_template.md
.travis/coveralls.sh
+doc/source/CONTRIBUTING.rst
doc/source/MANUAL.rst
doc/source/README.rst
doc/source/api.rst
@@ -84,6 +85,7 @@
stestr/tests/test_bisect_tests.py
stestr/tests/test_config_file.py
stestr/tests/test_return_codes.py
+stestr/tests/test_run.py
stestr/tests/test_scheduler.py
stestr/tests/test_selection.py
stestr/tests/test_slowest.py
@@ -97,6 +99,7 @@
stestr/tests/files/failing-tests
stestr/tests/files/passing-tests
stestr/tests/files/setup.cfg
+stestr/tests/files/stestr.yaml
stestr/tests/files/testr-conf
stestr/tests/repository/__init__.py
stestr/tests/repository/test_file.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stestr-2.2.0/stestr.egg-info/pbr.json new/stestr-2.3.1/stestr.egg-info/pbr.json
--- old/stestr-2.2.0/stestr.egg-info/pbr.json 2018-11-30 02:32:06.000000000 +0100
+++ new/stestr-2.3.1/stestr.egg-info/pbr.json 2019-03-06 02:23:37.000000000 +0100
@@ -1 +1 @@
-{"git_version": "8d35dcb", "is_release": true}
\ No newline at end of file
+{"git_version": "4ae2b23", "is_release": true}
\ No newline at end of file
1
0
Hello community,
here is the log from the commit of package python-cmd2 for openSUSE:Factory checked in at 2019-03-29 20:35:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-cmd2 (Old)
and /work/SRC/openSUSE:Factory/.python-cmd2.new.25356 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-cmd2"
Fri Mar 29 20:35:39 2019 rev:23 rq:685423 version:0.9.11
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-cmd2/python-cmd2.changes 2019-03-04 09:09:47.736713746 +0100
+++ /work/SRC/openSUSE:Factory/.python-cmd2.new.25356/python-cmd2.changes 2019-03-29 20:35:40.722530026 +0100
@@ -1,0 +2,17 @@
+Fri Mar 15 10:31:09 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Add vim to depends as it is used in tests as an editor
+
+-------------------------------------------------------------------
+Thu Mar 14 19:04:12 UTC 2019 - Matěj Cepl <mcepl(a)suse.com>
+
+- Add vim to BR
+
+-------------------------------------------------------------------
+Thu Mar 14 14:59:18 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Update to 0.9.11:
+ * too many changes to enumerate, see CHANGELOG.md
+- Really run tests
+
+-------------------------------------------------------------------
Old:
----
cmd2-0.9.10.tar.gz
New:
----
cmd2-0.9.11.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-cmd2.spec ++++++
--- /var/tmp/diff_new_pack.R6FmKF/_old 2019-03-29 20:35:41.314528952 +0100
+++ /var/tmp/diff_new_pack.R6FmKF/_new 2019-03-29 20:35:41.318528945 +0100
@@ -19,17 +19,23 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-cmd2
-Version: 0.9.10
+Version: 0.9.11
Release: 0
Summary: Extra features for standard library's cmd module
License: MIT
Group: Development/Languages/Python
-Url: https://github.com/python-cmd2/cmd2
+URL: https://github.com/python-cmd2/cmd2
Source: https://files.pythonhosted.org/packages/source/c/cmd2/cmd2-%{version}.tar.gz
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
+BuildRequires: vim
+Requires: python-attrs
+Requires: python-colorama
+Requires: python-pyperclip >= 1.5.27
+Requires: python-wcwidth
+BuildArch: noarch
# SECTION Test requirements
BuildRequires: %{python_module attrs}
BuildRequires: %{python_module colorama}
@@ -38,17 +44,13 @@
BuildRequires: %{python_module pytest-mock}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module wcwidth}
+# Required by tests.
+BuildRequires: vim
%if 0%{?sle_version} < 150000 && 0%{?is_opensuse}
BuildRequires: %{python_module contextlib2}
BuildRequires: %{python_module typing}
%endif
# /SECTION
-Requires: python-attrs
-Requires: python-colorama
-Requires: python-pyperclip >= 1.5.27
-Requires: python-wcwidth
-BuildArch: noarch
-
%python_subpackages
%description
@@ -85,7 +87,7 @@
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
-%python_exec setup.py test
+%pytest
%files %{python_files}
%license LICENSE
++++++ cmd2-0.9.10.tar.gz -> cmd2-0.9.11.tar.gz ++++++
++++ 5299 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package python-rpm-macros for openSUSE:Factory checked in at 2019-03-29 20:35:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-rpm-macros (Old)
and /work/SRC/openSUSE:Factory/.python-rpm-macros.new.25356 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-rpm-macros"
Fri Mar 29 20:35:35 2019 rev:17 rq:685389 version:20190315.d3034bf
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-rpm-macros/python-rpm-macros.changes 2019-03-12 09:44:03.831885672 +0100
+++ /work/SRC/openSUSE:Factory/.python-rpm-macros.new.25356/python-rpm-macros.changes 2019-03-29 20:35:37.182536447 +0100
@@ -1,0 +2,6 @@
+Fri Mar 15 14:18:06 UTC 2019 - mcepl(a)cepl.eu
+
+- Update to version 20190315.d3034bf bsc#1128323:
+ * Rewrite pytest and pytest_arch into Lua macros with multiple arguments.
+
+-------------------------------------------------------------------
@@ -10 +16 @@
-- bsc#1128323: Update to version 20190307.fbaed33 bsc#1128323:
+- bsc#1128323: Update to version 20190307.fbaed33
Old:
----
python-rpm-macros-20190307.81ca329.tar.bz2
New:
----
python-rpm-macros-20190315.d3034bf.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-rpm-macros.spec ++++++
--- /var/tmp/diff_new_pack.IAT0J8/_old 2019-03-29 20:35:37.726535460 +0100
+++ /var/tmp/diff_new_pack.IAT0J8/_new 2019-03-29 20:35:37.734535446 +0100
@@ -17,7 +17,7 @@
Name: python-rpm-macros
-Version: 20190307.81ca329
+Version: 20190315.d3034bf
Release: 0
Summary: RPM macros for building of Python modules
License: WTFPL
++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.IAT0J8/_old 2019-03-29 20:35:37.782535359 +0100
+++ /var/tmp/diff_new_pack.IAT0J8/_new 2019-03-29 20:35:37.798535329 +0100
@@ -1,4 +1,4 @@
<servicedata>
<service name="tar_scm">
<param name="url">git://github.com/openSUSE/python-rpm-macros.git</param>
- <param name="changesrevision">81ca329ee2ac053848f0dffa7ec54c8e22aac23f</param></service></servicedata>
\ No newline at end of file
+ <param name="changesrevision">d3034bf252e8fef64846586e05a64088a63e8adc</param></service></servicedata>
\ No newline at end of file
++++++ python-rpm-macros-20190307.81ca329.tar.bz2 -> python-rpm-macros-20190315.d3034bf.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-rpm-macros-20190307.81ca329/macros/010-common-defs new/python-rpm-macros-20190315.d3034bf/macros/010-common-defs
--- old/python-rpm-macros-20190307.81ca329/macros/010-common-defs 2019-03-07 14:40:08.000000000 +0100
+++ new/python-rpm-macros-20190315.d3034bf/macros/010-common-defs 2019-03-15 15:17:47.000000000 +0100
@@ -51,5 +51,11 @@
##### testing commands #####
-%pytest() %{python_expand PYTHONPATH=$PYTHONPATH:%{buildroot}%{$python_sitelib} $python -mpytest --ignore=_build.python2 --ignore=_build.python3 --ignore=_build.pypy3 -v "%**"}
-%pytest_arch() %{python_expand PYTHONPATH=$PYTHONPATH:%{buildroot}%{$python_sitearch} $python -mpytest --ignore=_build.python2 --ignore=_build.python3 --ignore=_build.pypy3 -v "%**"}
+%pytest_arch(+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-=) %{lua: \
+ local args = rpm.expand("%**")\
+ print(rpm.expand("%{python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} py.test-%{python_bin_suffix} --ignore=_build.python2 --ignore=_build.python3 --ignore=_build.pypy3 -v " .. args .. "}"))\
+}
+%pytest(+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-=) %{lua: \
+ local args = rpm.expand("%**")\
+ print(rpm.expand("%{python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{python_bin_suffix} --ignore=_build.python2 --ignore=_build.python3 --ignore=_build.pypy3 -v " .. args .. "}"))\
+}
1
0
Hello community,
here is the log from the commit of package python-google-auth for openSUSE:Factory checked in at 2019-03-29 20:35:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-google-auth (Old)
and /work/SRC/openSUSE:Factory/.python-google-auth.new.25356 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-google-auth"
Fri Mar 29 20:35:30 2019 rev:6 rq:685333 version:1.6.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-google-auth/python-google-auth.changes 2018-12-19 13:53:46.546923012 +0100
+++ /work/SRC/openSUSE:Factory/.python-google-auth.new.25356/python-google-auth.changes 2019-03-29 20:35:31.426546888 +0100
@@ -1,0 +2,14 @@
+Fri Mar 15 10:53:23 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Update to 1.6.3:
+ * follow rfc 7515 : strip padding from JWS segments #324 (#324)
+ * Add retry to _metadata.ping() (#323)
+ * Announce deprecation of Python 2.7 (#311)
+ * Link all the PRs in CHANGELOG (#307)
+ * Automatically refresh impersonated credentials (#304)
+ * Add google.auth.impersonated_credentials (#299)
+ * Enable static type checking with pytype (#298)
+ * Make classifiers in setup.py an array. (#280)
+- Drop oauth-no-appengine.patch should not be needed
+
+-------------------------------------------------------------------
Old:
----
google-auth-1.5.1.tar.gz
oauth-no-appengine.patch
New:
----
google-auth-1.6.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-google-auth.spec ++++++
--- /var/tmp/diff_new_pack.1c764w/_old 2019-03-29 20:35:31.994545858 +0100
+++ /var/tmp/diff_new_pack.1c764w/_new 2019-03-29 20:35:31.994545858 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-google-auth
#
-# 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
@@ -18,14 +18,13 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-google-auth
-Version: 1.5.1
+Version: 1.6.3
Release: 0
Summary: Google Authentication Library
License: Apache-2.0
Group: Development/Languages/Python
URL: https://github.com/GoogleCloudPlatform/google-auth-library-python
Source: https://files.pythonhosted.org/packages/source/g/google-auth/google-auth-%{…
-Patch0: oauth-no-appengine.patch
BuildRequires: %{python_module Flask}
BuildRequires: %{python_module cachetools}
BuildRequires: %{python_module cryptography}
@@ -62,7 +61,6 @@
%prep
%setup -q -n google-auth-%{version}
-%patch0 -p1
%build
%python_build
@@ -72,7 +70,7 @@
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
-%python_expand py.test-%{$python_bin_suffix}
+%pytest
%files %{python_files}
%license LICENSE
++++++ google-auth-1.5.1.tar.gz -> google-auth-1.6.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-auth-1.5.1/CHANGELOG.rst new/google-auth-1.6.3/CHANGELOG.rst
--- old/google-auth-1.5.1/CHANGELOG.rst 2018-08-01 01:16:19.000000000 +0200
+++ new/google-auth-1.6.3/CHANGELOG.rst 2019-02-19 22:13:34.000000000 +0100
@@ -1,95 +1,152 @@
Changelog
=========
+v1.6.3
+------
+
+02-15-2019 9:31 PST
+
+Implementation Changes
++++++++++++++
+
+- follow rfc 7515 : strip padding from JWS segments #324 (`#324 <https://github.com/googleapis/google-auth-library-python/pull/324>`_)
+- Add retry to _metadata.ping() (`#323 <https://github.com/googleapis/google-auth-library-python/pull/323>`_)
+
+v1.6.2
+------
+
+12-17-2018 10:51 PST
+
+Documentation
++++++++++++++
+
+- Announce deprecation of Python 2.7 (`#311 <https://github.com/googleapis/google-auth-library-python/pull/311>`_)
+- Link all the PRs in CHANGELOG (`#307 <https://github.com/googleapis/google-auth-library-python/pull/307>`_)
+
+v1.6.1
+------
+
+11-12-2018 10:10 PST
+
+Implementation Changes
+++++++++++++++++++++++
+
+- Automatically refresh impersonated credentials (`#304 <https://github.com/googleapis/google-auth-library-python/pull/304>`_)
+
+v1.6.0
+------
+
+11-09-2018 11:07 PST
+
+New Features
+++++++++++++
+
+- Add google.auth.impersonated_credentials (`#299 <https://github.com/googleapis/google-auth-library-python/pull/299>`_)
+
+Documentation
++++++++++++++
+
+- Update link to documentation for default credentials (`#296 <https://github.com/googleapis/google-auth-library-python/pull/296>`_)
+- Update github issue templates (`#300 <https://github.com/googleapis/google-auth-library-python/pull/300>`_)
+- Remove punctuation which becomes part of the url (`#284 <https://github.com/googleapis/google-auth-library-python/pull/284>`_)
+
+Internal / Testing Changes
+++++++++++++++++++++++++++
+
+- Update trampoline.sh (`#302 <https://github.com/googleapis/google-auth-library-python/pull/302>`_)
+- Enable static type checking with pytype (`#298 <https://github.com/googleapis/google-auth-library-python/pull/298>`_)
+- Make classifiers in setup.py an array. (`#280 <https://github.com/googleapis/google-auth-library-python/pull/280>`_)
+
+
v1.5.1
------
-- Fix check for error text on Python 3.7. (#278)
-- Use new Auth URIs. (#281)
-- Add code-of-conduct document. (#270)
-- Fix some typos in test_urllib3.py (#268)
+- Fix check for error text on Python 3.7. (`#278 <https://github.com/googleapis/google-auth-library-python/pull/#278>`_)
+- Use new Auth URIs. (`#281 <https://github.com/googleapis/google-auth-library-python/pull/#281>`_)
+- Add code-of-conduct document. (`#270 <https://github.com/googleapis/google-auth-library-python/pull/#270>`_)
+- Fix some typos in test_urllib3.py (`#268 <https://github.com/googleapis/google-auth-library-python/pull/#268>`_)
v1.5.0
------
-- Warn when using user credentials from the Cloud SDK (#266)
-- Add compute engine-based IDTokenCredentials (#236)
-- Corrected some typos (#265)
+- Warn when using user credentials from the Cloud SDK (`#266 <https://github.com/googleapis/google-auth-library-python/pull/266>`_)
+- Add compute engine-based IDTokenCredentials (`#236 <https://github.com/googleapis/google-auth-library-python/pull/236>`_)
+- Corrected some typos (`#265 <https://github.com/googleapis/google-auth-library-python/pull/265>`_)
v1.4.2
------
-- Raise a helpful exception when trying to refresh credentials without a refresh token. (#262)
-- Fix links to README and CONTRIBUTING in docs/index.rst. (#260)
-- Fix a typo in credentials.py. (#256)
-- Use pytest instead of py.test per upstream recommendation, #dropthedot. (#255)
-- Fix typo on exemple of jwt usage (#245)
+- Raise a helpful exception when trying to refresh credentials without a refresh token. (`#262 <https://github.com/googleapis/google-auth-library-python/pull/262>`_)
+- Fix links to README and CONTRIBUTING in docs/index.rst. (`#260 <https://github.com/googleapis/google-auth-library-python/pull/260>`_)
+- Fix a typo in credentials.py. (`#256 <https://github.com/googleapis/google-auth-library-python/pull/256>`_)
+- Use pytest instead of py.test per upstream recommendation, #dropthedot. (`#255 <https://github.com/googleapis/google-auth-library-python/pull/255>`_)
+- Fix typo on exemple of jwt usage (`#245 <https://github.com/googleapis/google-auth-library-python/pull/245>`_)
v1.4.1
------
-- Added a check for the cryptography version before attempting to use it. (#243)
+- Added a check for the cryptography version before attempting to use it. (`#243 <https://github.com/googleapis/google-auth-library-python/pull/243>`_)
v1.4.0
------
-- Added `cryptography`-based RSA signer and verifier. (#185)
-- Added `google.oauth2.service_account.IDTokenCredentials`. (#234)
-- Improved documentation around ID Tokens (#224)
+- Added `cryptography`-based RSA signer and verifier. (`#185 <https://github.com/googleapis/google-auth-library-python/pull/185>`_)
+- Added `google.oauth2.service_account.IDTokenCredentials`. (`#234 <https://github.com/googleapis/google-auth-library-python/pull/234>`_)
+- Improved documentation around ID Tokens (`#224 <https://github.com/googleapis/google-auth-library-python/pull/224>`_)
v1.3.0
------
-- Added ``google.oauth2.credentials.Credentials.from_authorized_user_file`` (#226)
-- Dropped direct pyasn1 dependency in favor of letting ``pyasn1-modules`` specify the right version. (#230)
-- ``default()`` now checks for the project ID environment var before warning about missing project ID. (#227)
-- Fixed the docstrings for ``has_scopes()`` and ``with_scopes()``. (#228)
-- Fixed example in docstring for ``ReadOnlyScoped``. (#219)
-- Made ``transport.requests`` use timeouts and retries to improve reliability. (#220)
+- Added ``google.oauth2.credentials.Credentials.from_authorized_user_file`` (`#226 <https://github.com/googleapis/google-auth-library-python/pull/#226>`_)
+- Dropped direct pyasn1 dependency in favor of letting ``pyasn1-modules`` specify the right version. (`#230 <https://github.com/googleapis/google-auth-library-python/pull/#230>`_)
+- ``default()`` now checks for the project ID environment var before warning about missing project ID. (`#227 <https://github.com/googleapis/google-auth-library-python/pull/#227>`_)
+- Fixed the docstrings for ``has_scopes()`` and ``with_scopes()``. (`#228 <https://github.com/googleapis/google-auth-library-python/pull/#228>`_)
+- Fixed example in docstring for ``ReadOnlyScoped``. (`#219 <https://github.com/googleapis/google-auth-library-python/pull/#219>`_)
+- Made ``transport.requests`` use timeouts and retries to improve reliability. (`#220 <https://github.com/googleapis/google-auth-library-python/pull/#220>`_)
v1.2.1
------
-- Excluded compiled Python files in source distributions. (#215)
-- Updated docs for creating RSASigner from string. (#213)
-- Use ``six.raise_from`` wherever possible. (#212)
-- Fixed a typo in a comment ``seconds`` not ``sections``. (#210)
+- Excluded compiled Python files in source distributions. (`#215 <https://github.com/googleapis/google-auth-library-python/pull/#215>`_)
+- Updated docs for creating RSASigner from string. (`#213 <https://github.com/googleapis/google-auth-library-python/pull/#213>`_)
+- Use ``six.raise_from`` wherever possible. (`#212 <https://github.com/googleapis/google-auth-library-python/pull/#212>`_)
+- Fixed a typo in a comment ``seconds`` not ``sections``. (`#210 <https://github.com/googleapis/google-auth-library-python/pull/#210>`_)
v1.2.0
------
-- Added ``google.auth.credentials.AnonymousCredentials``. (#206)
-- Updated the documentation to link to the Google Cloud Platform Python setup guide (#204)
+- Added ``google.auth.credentials.AnonymousCredentials``. (`#206 <https://github.com/googleapis/google-auth-library-python/pull/#206>`_)
+- Updated the documentation to link to the Google Cloud Platform Python setup guide (`#204 <https://github.com/googleapis/google-auth-library-python/pull/#204>`_)
v1.1.1
------
-- ``google.oauth.credentials.Credentials`` now correctly inherits from ``ReadOnlyScoped`` instead of ``Scoped``. (#200)
+- ``google.oauth.credentials.Credentials`` now correctly inherits from ``ReadOnlyScoped`` instead of ``Scoped``. (`#200 <https://github.com/googleapis/google-auth-library-python/pull/#200>`_)
v1.1.0
------
-- Added ``service_account.Credentials.project_id``. (#187)
-- Move read-only methods of ``credentials.Scoped`` into new interface ``credentials.ReadOnlyScoped``. (#195, #196)
-- Make ``compute_engine.Credentials`` derive from ``ReadOnlyScoped`` instead of ``Scoped``. (#195)
-- Fix App Engine's expiration calculation (#197)
-- Split ``crypt`` module into a package to allow alternative implementations. (#189)
-- Add error message to handle case of empty string or missing file for GOOGLE_APPLICATION_CREDENTIALS (#188)
+- Added ``service_account.Credentials.project_id``. (`#187 <https://github.com/googleapis/google-auth-library-python/pull/#187>`_)
+- Move read-only methods of ``credentials.Scoped`` into new interface ``credentials.ReadOnlyScoped``. (`#195 <https://github.com/googleapis/google-auth-library-python/pull/#195>`_, `#196 <https://github.com/googleapis/google-auth-library-python/pull/#196>`_)
+- Make ``compute_engine.Credentials`` derive from ``ReadOnlyScoped`` instead of ``Scoped``. (`#195 <https://github.com/googleapis/google-auth-library-python/pull/#195>`_)
+- Fix App Engine's expiration calculation (`#197 <https://github.com/googleapis/google-auth-library-python/pull/#197>`_)
+- Split ``crypt`` module into a package to allow alternative implementations. (`#189 <https://github.com/googleapis/google-auth-library-python/pull/#189>`_)
+- Add error message to handle case of empty string or missing file for GOOGLE_APPLICATION_CREDENTIALS (`#188 <https://github.com/googleapis/google-auth-library-python/pull/#188>`_)
v1.0.2
------
-- Fixed a bug where the Cloud SDK executable could not be found on Windows, leading to project ID detection failing. (#179)
-- Fixed a bug where the timeout argument wasn't being passed through the httplib transport correctly. (#175)
-- Added documentation for using the library on Google App Engine standard. (#172)
-- Testing style updates. (#168)
-- Added documentation around the oauth2client deprecation. (#165)
-- Fixed a few lint issues caught by newer versions of pylint. (#166)
+- Fixed a bug where the Cloud SDK executable could not be found on Windows, leading to project ID detection failing. (`#179 <https://github.com/googleapis/google-auth-library-python/pull/#179>`_)
+- Fixed a bug where the timeout argument wasn't being passed through the httplib transport correctly. (`#175 <https://github.com/googleapis/google-auth-library-python/pull/#175>`_)
+- Added documentation for using the library on Google App Engine standard. (`#172 <https://github.com/googleapis/google-auth-library-python/pull/#172>`_)
+- Testing style updates. (`#168 <https://github.com/googleapis/google-auth-library-python/pull/#168>`_)
+- Added documentation around the oauth2client deprecation. (`#165 <https://github.com/googleapis/google-auth-library-python/pull/#165>`_)
+- Fixed a few lint issues caught by newer versions of pylint. (`#166 <https://github.com/googleapis/google-auth-library-python/pull/#166>`_)
v1.0.1
------
-- Fixed a bug in the clock skew accommodation logic where expired credentials could be used for up to 5 minutes. (#158)
+- Fixed a bug in the clock skew accommodation logic where expired credentials could be used for up to 5 minutes. (`#158 <https://github.com/googleapis/google-auth-library-python/pull/158>`_)
v1.0.0
------
@@ -100,87 +157,87 @@
v0.10.0
-------
-- Added ``jwt.OnDemandCredentials``. (#142)
-- Added new public property ``id_token`` to ``oauth2.credentials.Credentials``. (#150)
-- Added the ability to set the address used to communicate with the Compute Engine metadata server via the ``GCE_METADATA_ROOT`` and ``GCE_METADATA_IP`` environment variables. (#148)
-- Changed the way cloud project IDs are ascertained from the Google Cloud SDK. (#147)
-- Modified expiration logic to add a 5 minute clock skew accommodation. (#145)
+- Added ``jwt.OnDemandCredentials``. (`#142 <https://github.com/googleapis/google-auth-library-python/pull/142>`_)
+- Added new public property ``id_token`` to ``oauth2.credentials.Credentials``. (`#150 <https://github.com/googleapis/google-auth-library-python/pull/150>`_)
+- Added the ability to set the address used to communicate with the Compute Engine metadata server via the ``GCE_METADATA_ROOT`` and ``GCE_METADATA_IP`` environment variables. (`#148 <https://github.com/googleapis/google-auth-library-python/pull/148>`_)
+- Changed the way cloud project IDs are ascertained from the Google Cloud SDK. (`#147 <https://github.com/googleapis/google-auth-library-python/pull/147>`_)
+- Modified expiration logic to add a 5 minute clock skew accommodation. (`#145 <https://github.com/googleapis/google-auth-library-python/pull/145>`_)
v0.9.0
------
-- Added ``service_account.Credentials.with_claims``. (#140)
-- Moved ``google.auth.oauthlib`` and ``google.auth.flow`` to a new separate package ``google_auth_oauthlib``. (#137, #139, #135, #126)
-- Added ``InstalledAppFlow`` to ``google_auth_oauthlib``. (#128)
-- Fixed some packaging and documentation issues. (#131)
-- Added a helpful error message when importing optional dependencies. (#125)
-- Made all properties required to reconstruct ``google.oauth2.credentials.Credentials`` public. (#124)
-- Added official Python 3.6 support. (#102)
-- Added ``jwt.Credentials.from_signing_credentials`` and removed ``service_account.Credentials.to_jwt_credentials``. (#120)
+- Added ``service_account.Credentials.with_claims``. (`#140 <https://github.com/googleapis/google-auth-library-python/pull/140>`_)
+- Moved ``google.auth.oauthlib`` and ``google.auth.flow`` to a new separate package ``google_auth_oauthlib``. (`#137 <https://github.com/googleapis/google-auth-library-python/pull/137>`_, `#139 <https://github.com/googleapis/google-auth-library-python/pull/139>`_, `#135 <https://github.com/googleapis/google-auth-library-python/pull/135>`_, `#126 <https://github.com/googleapis/google-auth-library-python/pull/126>`_)
+- Added ``InstalledAppFlow`` to ``google_auth_oauthlib``. (`#128 <https://github.com/googleapis/google-auth-library-python/pull/128>`_)
+- Fixed some packaging and documentation issues. (`#131 <https://github.com/googleapis/google-auth-library-python/pull/131>`_)
+- Added a helpful error message when importing optional dependencies. (`#125 <https://github.com/googleapis/google-auth-library-python/pull/125>`_)
+- Made all properties required to reconstruct ``google.oauth2.credentials.Credentials`` public. (`#124 <https://github.com/googleapis/google-auth-library-python/pull/124>`_)
+- Added official Python 3.6 support. (`#102 <https://github.com/googleapis/google-auth-library-python/pull/102>`_)
+- Added ``jwt.Credentials.from_signing_credentials`` and removed ``service_account.Credentials.to_jwt_credentials``. (`#120 <https://github.com/googleapis/google-auth-library-python/pull/120>`_)
v0.8.0
------
-- Removed one-time token behavior from ``jwt.Credentials``, audience claim is now required and fixed. (#117)
-- ``crypt.Signer`` and ``crypt.Verifier`` are now abstract base classes. The concrete implementations have been renamed to ``crypt.RSASigner`` and ``crypt.RSAVerifier``. ``app_engine.Signer`` and ``iam.Signer`` now inherit from ``crypt.Signer``. (#115)
-- ``transport.grpc`` now correctly calls ``Credentials.before_request``. (#116)
+- Removed one-time token behavior from ``jwt.Credentials``, audience claim is now required and fixed. (`#117 <https://github.com/googleapis/google-auth-library-python/pull/117>`_)
+- ``crypt.Signer`` and ``crypt.Verifier`` are now abstract base classes. The concrete implementations have been renamed to ``crypt.RSASigner`` and ``crypt.RSAVerifier``. ``app_engine.Signer`` and ``iam.Signer`` now inherit from ``crypt.Signer``. (`#115 <https://github.com/googleapis/google-auth-library-python/pull/115>`_)
+- ``transport.grpc`` now correctly calls ``Credentials.before_request``. (`#116 <https://github.com/googleapis/google-auth-library-python/pull/116>`_)
v0.7.0
------
-- Added ``google.auth.iam.Signer``. (#108)
-- Fixed issue where ``google.auth.app_engine.Signer`` erroneously returns a tuple from ``sign()``. (#109)
-- Added public property ``google.auth.credentials.Signing.signer``. (#110)
+- Added ``google.auth.iam.Signer``. (`#108 <https://github.com/googleapis/google-auth-library-python/pull/108>`_)
+- Fixed issue where ``google.auth.app_engine.Signer`` erroneously returns a tuple from ``sign()``. (`#109 <https://github.com/googleapis/google-auth-library-python/pull/109>`_)
+- Added public property ``google.auth.credentials.Signing.signer``. (`#110 <https://github.com/googleapis/google-auth-library-python/pull/110>`_)
v0.6.0
------
-- Added experimental integration with ``requests-oauthlib`` in ``google.oauth2.oauthlib`` and ``google.oauth2.flow``. (#100, #105, #106)
-- Fixed typo in ``google_auth_httplib2``'s README. (#105)
+- Added experimental integration with ``requests-oauthlib`` in ``google.oauth2.oauthlib`` and ``google.oauth2.flow``. (`#100 <https://github.com/googleapis/google-auth-library-python/pull/100>`_, `#105 <https://github.com/googleapis/google-auth-library-python/pull/105>`_, `#106 <https://github.com/googleapis/google-auth-library-python/pull/106>`_)
+- Fixed typo in ``google_auth_httplib2``'s README. (`#105 <https://github.com/googleapis/google-auth-library-python/pull/105>`_)
v0.5.0
------
-- Added ``app_engine.Signer``. (#97)
-- Added ``crypt.Signer.from_service_account_file``. (#95)
-- Fixed error handling in the oauth2 client. (#96)
+- Added ``app_engine.Signer``. (`#97 <https://github.com/googleapis/google-auth-library-python/pull/97>`_)
+- Added ``crypt.Signer.from_service_account_file``. (`#95 <https://github.com/googleapis/google-auth-library-python/pull/95>`_)
+- Fixed error handling in the oauth2 client. (`#96 <https://github.com/googleapis/google-auth-library-python/pull/96>`_)
- Fixed the App Engine system tests.
v0.4.0
------
-- ``transports.grpc.secure_authorized_channel`` now passes ``kwargs`` to ``grpc.secure_channel``. (#90)
-- Added new property ``credentials.Singing.signer_email`` which can be used to identify the signer of a message. (#89)
+- ``transports.grpc.secure_authorized_channel`` now passes ``kwargs`` to ``grpc.secure_channel``. (`#90 <https://github.com/googleapis/google-auth-library-python/pull/90>`_)
+- Added new property ``credentials.Singing.signer_email`` which can be used to identify the signer of a message. (`#89 <https://github.com/googleapis/google-auth-library-python/pull/89>`_)
- (google_auth_httplib2) Added a proxy to ``httplib2.Http.connections``.
v0.3.2
------
-- Fixed an issue where an ``ImportError`` would occur if ``google.oauth2`` was imported before ``google.auth``. (#88)
+- Fixed an issue where an ``ImportError`` would occur if ``google.oauth2`` was imported before ``google.auth``. (`#88 <https://github.com/googleapis/google-auth-library-python/pull/88>`_)
v0.3.1
------
-- Fixed a bug where non-padded base64 encoded strings were not accepted. (#87)
-- Fixed a bug where ID token verification did not correctly call the HTTP request function. (#87)
+- Fixed a bug where non-padded base64 encoded strings were not accepted. (`#87 <https://github.com/googleapis/google-auth-library-python/pull/87>`_)
+- Fixed a bug where ID token verification did not correctly call the HTTP request function. (`#87 <https://github.com/googleapis/google-auth-library-python/pull/87>`_)
v0.3.0
------
-- Added Google ID token verification helpers. (#82)
-- Swapped the ``target`` and ``request`` argument order for ``grpc.secure_authorized_channel``. (#81)
-- Added a user's guide. (#79)
-- Made ``service_account_email`` a public property on several credential classes. (#76)
-- Added a ``scope`` argument to ``google.auth.default``. (#75)
-- Added support for the ``GCLOUD_PROJECT`` environment variable. (#73)
+- Added Google ID token verification helpers. (`#82 <https://github.com/googleapis/google-auth-library-python/pull/82>`_)
+- Swapped the ``target`` and ``request`` argument order for ``grpc.secure_authorized_channel``. (`#81 <https://github.com/googleapis/google-auth-library-python/pull/81>`_)
+- Added a user's guide. (`#79 <https://github.com/googleapis/google-auth-library-python/pull/79>`_)
+- Made ``service_account_email`` a public property on several credential classes. (`#76 <https://github.com/googleapis/google-auth-library-python/pull/76>`_)
+- Added a ``scope`` argument to ``google.auth.default``. (`#75 <https://github.com/googleapis/google-auth-library-python/pull/75>`_)
+- Added support for the ``GCLOUD_PROJECT`` environment variable. (`#73 <https://github.com/googleapis/google-auth-library-python/pull/73>`_)
v0.2.0
------
-- Added gRPC support. (#67)
-- Added Requests support. (#66)
-- Added ``google.auth.credentials.with_scopes_if_required`` helper. (#65)
-- Added private helper for oauth2client migration. (#70)
+- Added gRPC support. (`#67 <https://github.com/googleapis/google-auth-library-python/pull/67>`_)
+- Added Requests support. (`#66 <https://github.com/googleapis/google-auth-library-python/pull/66>`_)
+- Added ``google.auth.credentials.with_scopes_if_required`` helper. (`#65 <https://github.com/googleapis/google-auth-library-python/pull/65>`_)
+- Added private helper for oauth2client migration. (`#70 <https://github.com/googleapis/google-auth-library-python/pull/70>`_)
v0.1.0
------
@@ -188,15 +245,15 @@
First release with core functionality available. This version is ready for
initial usage and testing.
-- Added ``google.auth.credentials``, public interfaces for Credential types. (#8)
-- Added ``google.oauth2.credentials``, credentials that use OAuth 2.0 access and refresh tokens (#24)
-- Added ``google.oauth2.service_account``, credentials that use Service Account private keys to obtain OAuth 2.0 access tokens. (#25)
-- Added ``google.auth.compute_engine``, credentials that use the Compute Engine metadata service to obtain OAuth 2.0 access tokens. (#22)
+- Added ``google.auth.credentials``, public interfaces for Credential types. (`#8 <https://github.com/googleapis/google-auth-library-python/pull/8>`_)
+- Added ``google.oauth2.credentials``, credentials that use OAuth 2.0 access and refresh tokens (`#24 <https://github.com/googleapis/google-auth-library-python/pull/24>`_)
+- Added ``google.oauth2.service_account``, credentials that use Service Account private keys to obtain OAuth 2.0 access tokens. (`#25 <https://github.com/googleapis/google-auth-library-python/pull/25>`_)
+- Added ``google.auth.compute_engine``, credentials that use the Compute Engine metadata service to obtain OAuth 2.0 access tokens. (`#22 <https://github.com/googleapis/google-auth-library-python/pull/22>`_)
- Added ``google.auth.jwt.Credentials``, credentials that use a JWT as a bearer token.
-- Added ``google.auth.app_engine``, credentials that use the Google App Engine App Identity service to obtain OAuth 2.0 access tokens. (#46)
-- Added ``google.auth.default()``, an implementation of Google Application Default Credentials that supports automatic Project ID detection. (#32)
-- Added system tests for all credential types. (#51, #54, #56, #58, #59, #60, #61, #62)
-- Added ``google.auth.transports.urllib3.AuthorizedHttp``, an HTTP client that includes authentication provided by credentials. (#19)
+- Added ``google.auth.app_engine``, credentials that use the Google App Engine App Identity service to obtain OAuth 2.0 access tokens. (`#46 <https://github.com/googleapis/google-auth-library-python/pull/46>`_)
+- Added ``google.auth.default()``, an implementation of Google Application Default Credentials that supports automatic Project ID detection. (`#32 <https://github.com/googleapis/google-auth-library-python/pull/32>`_)
+- Added system tests for all credential types. (`#51 <https://github.com/googleapis/google-auth-library-python/pull/51>`_, `#54 <https://github.com/googleapis/google-auth-library-python/pull/54>`_, `#56 <https://github.com/googleapis/google-auth-library-python/pull/56>`_, `#58 <https://github.com/googleapis/google-auth-library-python/pull/58>`_, `#59 <https://github.com/googleapis/google-auth-library-python/pull/59>`_, `#60 <https://github.com/googleapis/google-auth-library-python/pull/60>`_, `#61 <https://github.com/googleapis/google-auth-library-python/pull/61>`_, `#62 <https://github.com/googleapis/google-auth-library-python/pull/62>`_)
+- Added ``google.auth.transports.urllib3.AuthorizedHttp``, an HTTP client that includes authentication provided by credentials. (`#19 <https://github.com/googleapis/google-auth-library-python/pull/19>`_)
- Documentation style and formatting updates.
v0.0.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-auth-1.5.1/PKG-INFO new/google-auth-1.6.3/PKG-INFO
--- old/google-auth-1.5.1/PKG-INFO 2018-08-01 01:23:36.000000000 +0200
+++ new/google-auth-1.6.3/PKG-INFO 2019-02-19 22:14:17.000000000 +0100
@@ -1,6 +1,6 @@
-Metadata-Version: 1.1
+Metadata-Version: 1.2
Name: google-auth
-Version: 1.5.1
+Version: 1.6.3
Summary: Google Authentication Library
Home-page: https://github.com/GoogleCloudPlatform/google-auth-library-python
Author: Google Cloud Platform
@@ -34,6 +34,14 @@
.. _`Python Development Environment Setup Guide`: https://cloud.google.com/python/setup
+ Supported Python Versions
+ ^^^^^^^^^^^^^^^^^^^^^^^^^
+ Python >= 3.4
+
+ Deprecated Python Versions
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^
+ Python == 2.7. Python 2.7 support will be removed on January 1, 2020.
+
Documentation
-------------
@@ -42,7 +50,7 @@
Maintainers
-----------
- - `@jonparrott <https://github.com/jonparrott>`_ (Jon Wayne Parrott)
+ - `@theacodes <https://github.com/theacodes>`_ (Thea Flowers)
- `@dhermes <https://github.com/dhermes>`_ (Danny Hermes)
- `@lukesneeringer <https://github.com/lukesneeringer>`_ (Luke Sneeringer)
@@ -70,6 +78,7 @@
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
@@ -78,3 +87,4 @@
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: OS Independent
Classifier: Topic :: Internet :: WWW/HTTP
+Requires-Python: >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-auth-1.5.1/README.rst new/google-auth-1.6.3/README.rst
--- old/google-auth-1.5.1/README.rst 2018-05-16 20:01:59.000000000 +0200
+++ new/google-auth-1.6.3/README.rst 2019-02-15 18:21:38.000000000 +0100
@@ -26,6 +26,14 @@
.. _`Python Development Environment Setup Guide`: https://cloud.google.com/python/setup
+Supported Python Versions
+^^^^^^^^^^^^^^^^^^^^^^^^^
+Python >= 3.4
+
+Deprecated Python Versions
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+Python == 2.7. Python 2.7 support will be removed on January 1, 2020.
+
Documentation
-------------
@@ -34,7 +42,7 @@
Maintainers
-----------
-- `@jonparrott <https://github.com/jonparrott>`_ (Jon Wayne Parrott)
+- `@theacodes <https://github.com/theacodes>`_ (Thea Flowers)
- `@dhermes <https://github.com/dhermes>`_ (Danny Hermes)
- `@lukesneeringer <https://github.com/lukesneeringer>`_ (Luke Sneeringer)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-auth-1.5.1/google/auth/_default.py new/google-auth-1.6.3/google/auth/_default.py
--- old/google-auth-1.5.1/google/auth/_default.py 2018-05-31 23:53:20.000000000 +0200
+++ new/google-auth-1.6.3/google/auth/_default.py 2019-02-15 18:21:38.000000000 +0100
@@ -41,7 +41,7 @@
Could not automatically determine credentials. Please set {env} or \
explicitly create credentials and re-run the application. For more \
information, please see \
-https://developers.google.com/accounts/docs/application-default-credentials.
+https://cloud.google.com/docs/authentication/getting-started
""".format(env=environment_vars.CREDENTIALS).strip()
# Warning when using Cloud SDK user credentials
@@ -51,7 +51,7 @@
instead. If your application continues to use end user credentials from Cloud \
SDK, you might receive a "quota exceeded" or "API not enabled" error. For \
more information about service accounts, see \
-https://cloud.google.com/docs/authentication/."""
+https://cloud.google.com/docs/authentication/"""
def _warn_about_problematic_credentials(credentials):
@@ -172,7 +172,12 @@
def _get_gae_credentials():
"""Gets Google App Engine App Identity credentials and project ID."""
- from google.auth import app_engine
+ # While this library is normally bundled with app_engine, there are
+ # some cases where it's not available, so we tolerate ImportError.
+ try:
+ import google.auth.app_engine as app_engine
+ except ImportError:
+ return None, None
try:
credentials = app_engine.Credentials()
@@ -188,8 +193,14 @@
# to require no arguments. So, we'll use the _http_client transport which
# uses http.client. This is only acceptable because the metadata server
# doesn't do SSL and never requires proxies.
- from google.auth import compute_engine
- from google.auth.compute_engine import _metadata
+
+ # While this library is normally bundled with compute_engine, there are
+ # some cases where it's not available, so we tolerate ImportError.
+ try:
+ from google.auth import compute_engine
+ from google.auth.compute_engine import _metadata
+ except ImportError:
+ return None, None
if request is None:
request = google.auth.transport._http_client.Request()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-auth-1.5.1/google/auth/_helpers.py new/google-auth-1.6.3/google/auth/_helpers.py
--- old/google-auth-1.5.1/google/auth/_helpers.py 2018-05-16 20:01:59.000000000 +0200
+++ new/google-auth-1.6.3/google/auth/_helpers.py 2019-02-15 18:21:38.000000000 +0100
@@ -215,3 +215,20 @@
b64string = to_bytes(value)
padded = b64string + b'=' * (-len(b64string) % 4)
return base64.urlsafe_b64decode(padded)
+
+
+def unpadded_urlsafe_b64encode(value):
+ """Encodes base64 strings removing any padding characters.
+
+ `rfc 7515`_ defines Base64url to NOT include any padding
+ characters, but the stdlib doesn't do that by default.
+
+ _rfc7515: https://tools.ietf.org/html/rfc7515#page-6
+
+ Args:
+ value (Union[str|bytes]): The bytes-like value to encode
+
+ Returns:
+ Union[str|bytes]: The encoded value
+ """
+ return base64.urlsafe_b64encode(value).rstrip(b'=')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-auth-1.5.1/google/auth/_oauth2client.py new/google-auth-1.6.3/google/auth/_oauth2client.py
--- old/google-auth-1.5.1/google/auth/_oauth2client.py 2018-05-16 20:01:59.000000000 +0200
+++ new/google-auth-1.6.3/google/auth/_oauth2client.py 2019-02-15 18:21:38.000000000 +0100
@@ -25,6 +25,7 @@
from google.auth import _helpers
import google.auth.app_engine
+import google.auth.compute_engine
import google.oauth2.credentials
import google.oauth2.service_account
@@ -37,7 +38,7 @@
ImportError('oauth2client is not installed.'), caught_exc)
try:
- import oauth2client.contrib.appengine
+ import oauth2client.contrib.appengine # pytype: disable=import-error
_HAS_APPENGINE = True
except ImportError:
_HAS_APPENGINE = False
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-auth-1.5.1/google/auth/app_engine.py new/google-auth-1.6.3/google/auth/app_engine.py
--- old/google-auth-1.5.1/google/auth/app_engine.py 2018-05-16 20:01:59.000000000 +0200
+++ new/google-auth-1.6.3/google/auth/app_engine.py 2019-02-15 18:21:38.000000000 +0100
@@ -28,10 +28,12 @@
from google.auth import credentials
from google.auth import crypt
+# pytype: disable=import-error
try:
from google.appengine.api import app_identity
except ImportError:
app_identity = None
+# pytype: enable=import-error
class Signer(crypt.Signer):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-auth-1.5.1/google/auth/compute_engine/_metadata.py new/google-auth-1.6.3/google/auth/compute_engine/_metadata.py
--- old/google-auth-1.5.1/google/auth/compute_engine/_metadata.py 2018-05-16 20:01:59.000000000 +0200
+++ new/google-auth-1.6.3/google/auth/compute_engine/_metadata.py 2019-02-15 18:21:38.000000000 +0100
@@ -51,13 +51,15 @@
_METADATA_DEFAULT_TIMEOUT = 3
-def ping(request, timeout=_METADATA_DEFAULT_TIMEOUT):
+def ping(request, timeout=_METADATA_DEFAULT_TIMEOUT, retry_count=3):
"""Checks to see if the metadata server is available.
Args:
request (google.auth.transport.Request): A callable used to make
HTTP requests.
timeout (int): How long to wait for the metadata server to respond.
+ retry_count (int): How many times to attempt connecting to metadata
+ server using above timeout.
Returns:
bool: True if the metadata server is reachable, False otherwise.
@@ -68,18 +70,23 @@
# could lead to false negatives in the event that we are on GCE, but
# the metadata resolution was particularly slow. The latter case is
# "unlikely".
- try:
- response = request(
- url=_METADATA_IP_ROOT, method='GET', headers=_METADATA_HEADERS,
- timeout=timeout)
-
- metadata_flavor = response.headers.get(_METADATA_FLAVOR_HEADER)
- return (response.status == http_client.OK and
- metadata_flavor == _METADATA_FLAVOR_VALUE)
-
- except exceptions.TransportError:
- _LOGGER.info('Compute Engine Metadata server unavailable.')
- return False
+ retries = 0
+ while retries < retry_count:
+ try:
+ response = request(
+ url=_METADATA_IP_ROOT, method='GET', headers=_METADATA_HEADERS,
+ timeout=timeout)
+
+ metadata_flavor = response.headers.get(_METADATA_FLAVOR_HEADER)
+ return (response.status == http_client.OK and
+ metadata_flavor == _METADATA_FLAVOR_VALUE)
+
+ except exceptions.TransportError:
+ _LOGGER.info('Compute Engine Metadata server unavailable on'
+ 'attempt %s of %s', retries+1, retry_count)
+ retries += 1
+
+ return False
def get(request, path, root=_METADATA_ROOT, recursive=False):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-auth-1.5.1/google/auth/impersonated_credentials.py new/google-auth-1.6.3/google/auth/impersonated_credentials.py
--- old/google-auth-1.5.1/google/auth/impersonated_credentials.py 1970-01-01 01:00:00.000000000 +0100
+++ new/google-auth-1.6.3/google/auth/impersonated_credentials.py 2019-02-15 18:21:38.000000000 +0100
@@ -0,0 +1,231 @@
+# Copyright 2018 Google Inc.
+#
+# 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.
+
+"""Google Cloud Impersonated credentials.
+
+This module provides authentication for applications where local credentials
+impersonates a remote service account using `IAM Credentials API`_.
+
+This class can be used to impersonate a service account as long as the original
+Credential object has the "Service Account Token Creator" role on the target
+service account.
+
+ .. _IAM Credentials API:
+ https://cloud.google.com/iam/credentials/reference/rest/
+"""
+
+import copy
+from datetime import datetime
+import json
+
+import six
+from six.moves import http_client
+
+from google.auth import _helpers
+from google.auth import credentials
+from google.auth import exceptions
+
+_DEFAULT_TOKEN_LIFETIME_SECS = 3600 # 1 hour in seconds
+
+_IAM_SCOPE = ['https://www.googleapis.com/auth/iam']
+
+_IAM_ENDPOINT = ('https://iamcredentials.googleapis.com/v1/projects/-' +
+ '/serviceAccounts/{}:generateAccessToken')
+
+_REFRESH_ERROR = 'Unable to acquire impersonated credentials'
+
+
+def _make_iam_token_request(request, principal, headers, body):
+ """Makes a request to the Google Cloud IAM service for an access token.
+ Args:
+ request (Request): The Request object to use.
+ principal (str): The principal to request an access token for.
+ headers (Mapping[str, str]): Map of headers to transmit.
+ body (Mapping[str, str]): JSON Payload body for the iamcredentials
+ API call.
+
+ Raises:
+ TransportError: Raised if there is an underlying HTTP connection
+ Error
+ DefaultCredentialsError: Raised if the impersonated credentials
+ are not available. Common reasons are
+ `iamcredentials.googleapis.com` is not enabled or the
+ `Service Account Token Creator` is not assigned
+ """
+ iam_endpoint = _IAM_ENDPOINT.format(principal)
+
+ body = json.dumps(body)
+
+ response = request(
+ url=iam_endpoint,
+ method='POST',
+ headers=headers,
+ body=body)
+
+ response_body = response.data.decode('utf-8')
+
+ if response.status != http_client.OK:
+ exceptions.RefreshError(_REFRESH_ERROR, response_body)
+
+ try:
+ token_response = json.loads(response.data.decode('utf-8'))
+ token = token_response['accessToken']
+ expiry = datetime.strptime(
+ token_response['expireTime'], '%Y-%m-%dT%H:%M:%SZ')
+
+ return token, expiry
+
+ except (KeyError, ValueError) as caught_exc:
+ new_exc = exceptions.RefreshError(
+ '{}: No access token or invalid expiration in response.'.format(
+ _REFRESH_ERROR),
+ response_body)
+ six.raise_from(new_exc, caught_exc)
+
+
+class Credentials(credentials.Credentials):
+ """This module defines impersonated credentials which are essentially
+ impersonated identities.
+
+ Impersonated Credentials allows credentials issued to a user or
+ service account to impersonate another. The target service account must
+ grant the originating credential principal the
+ `Service Account Token Creator`_ IAM role:
+
+ For more information about Token Creator IAM role and
+ IAMCredentials API, see
+ `Creating Short-Lived Service Account Credentials`_.
+
+ .. _Service Account Token Creator:
+ https://cloud.google.com/iam/docs/service-accounts#the_service_account_toke…
+
+ .. _Creating Short-Lived Service Account Credentials:
+ https://cloud.google.com/iam/docs/creating-short-lived-service-account-cred…
+
+ Usage:
+
+ First grant source_credentials the `Service Account Token Creator`
+ role on the target account to impersonate. In this example, the
+ service account represented by svc_account.json has the
+ token creator role on
+ `impersonated-account(a)_project_.iam.gserviceaccount.com`.
+
+ Enable the IAMCredentials API on the source project:
+ `gcloud services enable iamcredentials.googleapis.com`.
+
+ Initialize a source credential which does not have access to
+ list bucket::
+
+ from google.oauth2 import service_acccount
+
+ target_scopes = [
+ 'https://www.googleapis.com/auth/devstorage.read_only']
+
+ source_credentials = (
+ service_account.Credentials.from_service_account_file(
+ '/path/to/svc_account.json',
+ scopes=target_scopes))
+
+ Now use the source credentials to acquire credentials to impersonate
+ another service account::
+
+ from google.auth import impersonated_credentials
+
+ target_credentials = impersonated_credentials.Credentials(
+ source_credentials=source_credentials,
+ target_principal='impersonated-account(a)_project_.iam.gserviceaccount.com',
+ target_scopes = target_scopes,
+ lifetime=500)
+
+ Resource access is granted::
+
+ client = storage.Client(credentials=target_credentials)
+ buckets = client.list_buckets(project='your_project')
+ for bucket in buckets:
+ print bucket.name
+ """
+
+ def __init__(self, source_credentials, target_principal,
+ target_scopes, delegates=None,
+ lifetime=_DEFAULT_TOKEN_LIFETIME_SECS):
+ """
+ Args:
+ source_credentials (google.auth.Credentials): The source credential
+ used as to acquire the impersonated credentials.
+ target_principal (str): The service account to impersonate.
+ target_scopes (Sequence[str]): Scopes to request during the
+ authorization grant.
+ delegates (Sequence[str]): The chained list of delegates required
+ to grant the final access_token. If set, the sequence of
+ identities must have "Service Account Token Creator" capability
+ granted to the prceeding identity. For example, if set to
+ [serviceAccountB, serviceAccountC], the source_credential
+ must have the Token Creator role on serviceAccountB.
+ serviceAccountB must have the Token Creator on serviceAccountC.
+ Finally, C must have Token Creator on target_principal.
+ If left unset, source_credential must have that role on
+ target_principal.
+ lifetime (int): Number of seconds the delegated credential should
+ be valid for (upto 3600).
+ """
+
+ super(Credentials, self).__init__()
+
+ self._source_credentials = copy.copy(source_credentials)
+ self._source_credentials._scopes = _IAM_SCOPE
+ self._target_principal = target_principal
+ self._target_scopes = target_scopes
+ self._delegates = delegates
+ self._lifetime = lifetime
+ self.token = None
+ self.expiry = _helpers.utcnow()
+
+ @_helpers.copy_docstring(credentials.Credentials)
+ def refresh(self, request):
+ self._update_token(request)
+
+ @property
+ def expired(self):
+ return _helpers.utcnow() >= self.expiry
+
+ def _update_token(self, request):
+ """Updates credentials with a new access_token representing
+ the impersonated account.
+
+ Args:
+ request (google.auth.transport.requests.Request): Request object
+ to use for refreshing credentials.
+ """
+
+ # Refresh our source credentials.
+ self._source_credentials.refresh(request)
+
+ body = {
+ "delegates": self._delegates,
+ "scope": self._target_scopes,
+ "lifetime": str(self._lifetime) + "s"
+ }
+
+ headers = {
+ 'Content-Type': 'application/json',
+ }
+
+ # Apply the source credentials authentication info.
+ self._source_credentials.apply(headers)
+
+ self.token, self.expiry = _make_iam_token_request(
+ request=request,
+ principal=self._target_principal,
+ headers=headers,
+ body=body)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-auth-1.5.1/google/auth/jwt.py new/google-auth-1.6.3/google/auth/jwt.py
--- old/google-auth-1.5.1/google/auth/jwt.py 2018-05-24 22:00:37.000000000 +0200
+++ new/google-auth-1.6.3/google/auth/jwt.py 2019-02-15 18:21:38.000000000 +0100
@@ -40,7 +40,6 @@
"""
-import base64
import collections
import copy
import datetime
@@ -86,13 +85,19 @@
header['kid'] = key_id
segments = [
- base64.urlsafe_b64encode(json.dumps(header).encode('utf-8')),
- base64.urlsafe_b64encode(json.dumps(payload).encode('utf-8')),
+ _helpers.unpadded_urlsafe_b64encode(
+ json.dumps(header).encode('utf-8')
+ ),
+ _helpers.unpadded_urlsafe_b64encode(
+ json.dumps(payload).encode('utf-8')
+ ),
]
signing_input = b'.'.join(segments)
signature = signer.sign(signing_input)
- segments.append(base64.urlsafe_b64encode(signature))
+ segments.append(
+ _helpers.unpadded_urlsafe_b64encode(signature)
+ )
return b'.'.join(segments)
@@ -738,7 +743,7 @@
parts = urllib.parse.urlsplit(url)
# Strip query string and fragment
audience = urllib.parse.urlunsplit(
- (parts.scheme, parts.netloc, parts.path, None, None))
+ (parts.scheme, parts.netloc, parts.path, "", ""))
token = self._get_jwt_for_audience(audience)
self.apply(headers, token=token)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-auth-1.5.1/google/auth/transport/requests.py new/google-auth-1.6.3/google/auth/transport/requests.py
--- old/google-auth-1.5.1/google/auth/transport/requests.py 2018-05-16 20:01:59.000000000 +0200
+++ new/google-auth-1.6.3/google/auth/transport/requests.py 2019-02-15 18:21:38.000000000 +0100
@@ -150,33 +150,40 @@
refresh the credentials and retry the request.
refresh_timeout (Optional[int]): The timeout value in seconds for
credential refresh HTTP requests.
- kwargs: Additional arguments passed to the :class:`requests.Session`
- constructor.
+ auth_request (google.auth.transport.requests.Request):
+ (Optional) An instance of
+ :class:`~google.auth.transport.requests.Request` used when
+ refreshing credentials. If not passed,
+ an instance of :class:`~google.auth.transport.requests.Request`
+ is created.
"""
def __init__(self, credentials,
refresh_status_codes=transport.DEFAULT_REFRESH_STATUS_CODES,
max_refresh_attempts=transport.DEFAULT_MAX_REFRESH_ATTEMPTS,
refresh_timeout=None,
- **kwargs):
- super(AuthorizedSession, self).__init__(**kwargs)
+ auth_request=None):
+ super(AuthorizedSession, self).__init__()
self.credentials = credentials
self._refresh_status_codes = refresh_status_codes
self._max_refresh_attempts = max_refresh_attempts
self._refresh_timeout = refresh_timeout
- auth_request_session = requests.Session()
+ if auth_request is None:
+ auth_request_session = requests.Session()
- # Using an adapter to make HTTP requests robust to network errors.
- # This adapter retrys HTTP requests when network errors occur
- # and the requests seems safely retryable.
- retry_adapter = requests.adapters.HTTPAdapter(max_retries=3)
- auth_request_session.mount("https://", retry_adapter)
+ # Using an adapter to make HTTP requests robust to network errors.
+ # This adapter retrys HTTP requests when network errors occur
+ # and the requests seems safely retryable.
+ retry_adapter = requests.adapters.HTTPAdapter(max_retries=3)
+ auth_request_session.mount("https://", retry_adapter)
+
+ # Do not pass `self` as the session here, as it can lead to
+ # infinite recursion.
+ auth_request = Request(auth_request_session)
# Request instance used by internal methods (for example,
# credentials.refresh).
- # Do not pass `self` as the session here, as it can lead to infinite
- # recursion.
- self._auth_request = Request(auth_request_session)
+ self._auth_request = auth_request
def request(self, method, url, data=None, headers=None, **kwargs):
"""Implementation of Requests' request."""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-auth-1.5.1/google_auth.egg-info/PKG-INFO new/google-auth-1.6.3/google_auth.egg-info/PKG-INFO
--- old/google-auth-1.5.1/google_auth.egg-info/PKG-INFO 2018-08-01 01:23:36.000000000 +0200
+++ new/google-auth-1.6.3/google_auth.egg-info/PKG-INFO 2019-02-19 22:14:17.000000000 +0100
@@ -1,6 +1,6 @@
-Metadata-Version: 1.1
+Metadata-Version: 1.2
Name: google-auth
-Version: 1.5.1
+Version: 1.6.3
Summary: Google Authentication Library
Home-page: https://github.com/GoogleCloudPlatform/google-auth-library-python
Author: Google Cloud Platform
@@ -34,6 +34,14 @@
.. _`Python Development Environment Setup Guide`: https://cloud.google.com/python/setup
+ Supported Python Versions
+ ^^^^^^^^^^^^^^^^^^^^^^^^^
+ Python >= 3.4
+
+ Deprecated Python Versions
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^
+ Python == 2.7. Python 2.7 support will be removed on January 1, 2020.
+
Documentation
-------------
@@ -42,7 +50,7 @@
Maintainers
-----------
- - `@jonparrott <https://github.com/jonparrott>`_ (Jon Wayne Parrott)
+ - `@theacodes <https://github.com/theacodes>`_ (Thea Flowers)
- `@dhermes <https://github.com/dhermes>`_ (Danny Hermes)
- `@lukesneeringer <https://github.com/lukesneeringer>`_ (Luke Sneeringer)
@@ -70,6 +78,7 @@
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
@@ -78,3 +87,4 @@
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: OS Independent
Classifier: Topic :: Internet :: WWW/HTTP
+Requires-Python: >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-auth-1.5.1/google_auth.egg-info/SOURCES.txt new/google-auth-1.6.3/google_auth.egg-info/SOURCES.txt
--- old/google-auth-1.5.1/google_auth.egg-info/SOURCES.txt 2018-08-01 01:23:36.000000000 +0200
+++ new/google-auth-1.6.3/google_auth.egg-info/SOURCES.txt 2019-02-19 22:14:17.000000000 +0100
@@ -16,6 +16,7 @@
google/auth/environment_vars.py
google/auth/exceptions.py
google/auth/iam.py
+google/auth/impersonated_credentials.py
google/auth/jwt.py
google/auth/compute_engine/__init__.py
google/auth/compute_engine/_metadata.py
@@ -52,6 +53,7 @@
tests/test_app_engine.py
tests/test_credentials.py
tests/test_iam.py
+tests/test_impersonated_credentials.py
tests/test_jwt.py
tests/compute_engine/__init__.py
tests/compute_engine/test__metadata.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-auth-1.5.1/setup.cfg new/google-auth-1.6.3/setup.cfg
--- old/google-auth-1.5.1/setup.cfg 2018-08-01 01:23:36.000000000 +0200
+++ new/google-auth-1.6.3/setup.cfg 2019-02-19 22:14:17.000000000 +0100
@@ -1,6 +1,14 @@
[bdist_wheel]
universal = 1
+[pytype]
+inputs = .
+exclude = tests system_tests
+output = pytype_output
+python_version = 3.6
+pythonpath = .
+disable = pyi-error
+
[egg_info]
tag_build =
tag_date = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-auth-1.5.1/setup.py new/google-auth-1.6.3/setup.py
--- old/google-auth-1.5.1/setup.py 2018-08-01 01:16:19.000000000 +0200
+++ new/google-auth-1.6.3/setup.py 2019-02-19 22:13:34.000000000 +0100
@@ -31,7 +31,7 @@
setup(
name='google-auth',
- version='1.5.1',
+ version='1.6.3',
author='Google Cloud Platform',
author_email='jonwayne+google-auth(a)google.com',
description='Google Authentication Library',
@@ -40,15 +40,17 @@
packages=find_packages(exclude=('tests*', 'system_tests*')),
namespace_packages=('google',),
install_requires=DEPENDENCIES,
+ python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*',
license='Apache 2.0',
keywords='google auth oauth client',
- classifiers=(
+ classifiers=[
'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',
+ 'Programming Language :: Python :: 3.7',
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
@@ -57,5 +59,5 @@
'Operating System :: MacOS :: MacOS X',
'Operating System :: OS Independent',
'Topic :: Internet :: WWW/HTTP',
- ),
+ ],
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-auth-1.5.1/tests/test__default.py new/google-auth-1.6.3/tests/test__default.py
--- old/google-auth-1.5.1/tests/test__default.py 2018-05-31 23:53:20.000000000 +0200
+++ new/google-auth-1.6.3/tests/test__default.py 2019-02-15 18:21:38.000000000 +0100
@@ -235,6 +235,15 @@
assert project_id == mock.sentinel.project
+def test__get_gae_credentials_no_app_engine():
+ import sys
+ with mock.patch.dict('sys.modules'):
+ sys.modules['google.auth.app_engine'] = None
+ credentials, project_id = _default._get_gae_credentials()
+ assert credentials is None
+ assert project_id is None
+
+
def test__get_gae_credentials_no_apis():
assert _default._get_gae_credentials() == (None, None)
@@ -275,6 +284,15 @@
assert project_id is None
+def test__get_gce_credentials_no_compute_engine():
+ import sys
+ with mock.patch.dict('sys.modules'):
+ sys.modules['google.auth.compute_engine'] = None
+ credentials, project_id = _default._get_gce_credentials()
+ assert credentials is None
+ assert project_id is None
+
+
@mock.patch(
'google.auth.compute_engine._metadata.ping', return_value=False,
autospec=True)
@@ -366,3 +384,21 @@
assert project_id == mock.sentinel.project_id
with_scopes.assert_called_once_with(
mock.sentinel.credentials, scopes)
+
+
+(a)mock.patch(
+ 'google.auth._default._get_explicit_environ_credentials',
+ return_value=(mock.sentinel.credentials, mock.sentinel.project_id),
+ autospec=True)
+def test_default_no_app_engine_compute_engine_module(unused_get):
+ """
+ google.auth.compute_engine and google.auth.app_engine are both optional
+ to allow not including them when using this package. This verifies
+ that default fails gracefully if these modules are absent
+ """
+ import sys
+ with mock.patch.dict('sys.modules'):
+ sys.modules['google.auth.compute_engine'] = None
+ sys.modules['google.auth.app_engine'] = None
+ assert _default.default() == (
+ mock.sentinel.credentials, mock.sentinel.project_id)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-auth-1.5.1/tests/test__helpers.py new/google-auth-1.6.3/tests/test__helpers.py
--- old/google-auth-1.5.1/tests/test__helpers.py 2018-05-16 20:01:59.000000000 +0200
+++ new/google-auth-1.6.3/tests/test__helpers.py 2019-02-15 18:21:38.000000000 +0100
@@ -167,3 +167,15 @@
for case, expected in cases:
assert _helpers.padded_urlsafe_b64decode(case) == expected
+
+
+def test_unpadded_urlsafe_b64encode():
+ cases = [
+ (b'', b''),
+ (b'a', b'YQ'),
+ (b'aa', b'YWE'),
+ (b'aaa', b'YWFh'),
+ ]
+
+ for case, expected in cases:
+ assert _helpers.unpadded_urlsafe_b64encode(case) == expected
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-auth-1.5.1/tests/test_impersonated_credentials.py new/google-auth-1.6.3/tests/test_impersonated_credentials.py
--- old/google-auth-1.5.1/tests/test_impersonated_credentials.py 1970-01-01 01:00:00.000000000 +0100
+++ new/google-auth-1.6.3/tests/test_impersonated_credentials.py 2019-02-15 18:21:38.000000000 +0100
@@ -0,0 +1,178 @@
+# Copyright 2018 Google Inc.
+#
+# 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.
+
+import datetime
+import json
+import os
+
+import mock
+import pytest
+from six.moves import http_client
+
+from google.auth import _helpers
+from google.auth import crypt
+from google.auth import exceptions
+from google.auth import impersonated_credentials
+from google.auth import transport
+from google.auth.impersonated_credentials import Credentials
+from google.oauth2 import service_account
+
+DATA_DIR = os.path.join(os.path.dirname(__file__), '', 'data')
+
+with open(os.path.join(DATA_DIR, 'privatekey.pem'), 'rb') as fh:
+ PRIVATE_KEY_BYTES = fh.read()
+
+SERVICE_ACCOUNT_JSON_FILE = os.path.join(DATA_DIR, 'service_account.json')
+
+with open(SERVICE_ACCOUNT_JSON_FILE, 'r') as fh:
+ SERVICE_ACCOUNT_INFO = json.load(fh)
+
+SIGNER = crypt.RSASigner.from_string(PRIVATE_KEY_BYTES, '1')
+TOKEN_URI = 'https://example.com/oauth2/token'
+
+
+(a)pytest.fixture
+def mock_donor_credentials():
+ with mock.patch('google.oauth2._client.jwt_grant', autospec=True) as grant:
+ grant.return_value = (
+ "source token",
+ _helpers.utcnow() + datetime.timedelta(seconds=500),
+ {})
+ yield grant
+
+
+class TestImpersonatedCredentials(object):
+
+ SERVICE_ACCOUNT_EMAIL = 'service-account(a)example.com'
+ TARGET_PRINCIPAL = 'impersonated(a)project.iam.gserviceaccount.com'
+ TARGET_SCOPES = ['https://www.googleapis.com/auth/devstorage.read_only']
+ DELEGATES = []
+ LIFETIME = 3600
+ SOURCE_CREDENTIALS = service_account.Credentials(
+ SIGNER, SERVICE_ACCOUNT_EMAIL, TOKEN_URI)
+
+ def make_credentials(self, lifetime=LIFETIME):
+ return Credentials(
+ source_credentials=self.SOURCE_CREDENTIALS,
+ target_principal=self.TARGET_PRINCIPAL,
+ target_scopes=self.TARGET_SCOPES,
+ delegates=self.DELEGATES,
+ lifetime=lifetime)
+
+ def test_default_state(self):
+ credentials = self.make_credentials()
+ assert not credentials.valid
+ assert credentials.expired
+
+ def make_request(self, data, status=http_client.OK,
+ headers=None, side_effect=None):
+ response = mock.create_autospec(transport.Response, instance=False)
+ response.status = status
+ response.data = _helpers.to_bytes(data)
+ response.headers = headers or {}
+
+ request = mock.create_autospec(transport.Request, instance=False)
+ request.side_effect = side_effect
+ request.return_value = response
+
+ return request
+
+ def test_refresh_success(self, mock_donor_credentials):
+ credentials = self.make_credentials(lifetime=None)
+ token = 'token'
+
+ expire_time = (
+ _helpers.utcnow().replace(microsecond=0) +
+ datetime.timedelta(seconds=500)).isoformat('T') + 'Z'
+ response_body = {
+ "accessToken": token,
+ "expireTime": expire_time
+ }
+
+ request = self.make_request(
+ data=json.dumps(response_body),
+ status=http_client.OK)
+
+ credentials.refresh(request)
+
+ assert credentials.valid
+ assert not credentials.expired
+
+ def test_refresh_failure_malformed_expire_time(
+ self, mock_donor_credentials):
+ credentials = self.make_credentials(lifetime=None)
+ token = 'token'
+
+ expire_time = (
+ _helpers.utcnow() + datetime.timedelta(seconds=500)).isoformat('T')
+ response_body = {
+ "accessToken": token,
+ "expireTime": expire_time
+ }
+
+ request = self.make_request(
+ data=json.dumps(response_body),
+ status=http_client.OK)
+
+ with pytest.raises(exceptions.RefreshError) as excinfo:
+ credentials.refresh(request)
+
+ assert excinfo.match(impersonated_credentials._REFRESH_ERROR)
+
+ assert not credentials.valid
+ assert credentials.expired
+
+ def test_refresh_failure_unauthorzed(self, mock_donor_credentials):
+ credentials = self.make_credentials(lifetime=None)
+
+ response_body = {
+ "error": {
+ "code": 403,
+ "message": "The caller does not have permission",
+ "status": "PERMISSION_DENIED"
+ }
+ }
+
+ request = self.make_request(
+ data=json.dumps(response_body),
+ status=http_client.UNAUTHORIZED)
+
+ with pytest.raises(exceptions.RefreshError) as excinfo:
+ credentials.refresh(request)
+
+ assert excinfo.match(impersonated_credentials._REFRESH_ERROR)
+
+ assert not credentials.valid
+ assert credentials.expired
+
+ def test_refresh_failure_http_error(self, mock_donor_credentials):
+ credentials = self.make_credentials(lifetime=None)
+
+ response_body = {}
+
+ request = self.make_request(
+ data=json.dumps(response_body),
+ status=http_client.HTTPException)
+
+ with pytest.raises(exceptions.RefreshError) as excinfo:
+ credentials.refresh(request)
+
+ assert excinfo.match(impersonated_credentials._REFRESH_ERROR)
+
+ assert not credentials.valid
+ assert credentials.expired
+
+ def test_expired(self):
+ credentials = self.make_credentials(lifetime=None)
+ assert credentials.expired
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-auth-1.5.1/tests/transport/test_requests.py new/google-auth-1.6.3/tests/transport/test_requests.py
--- old/google-auth-1.5.1/tests/transport/test_requests.py 2018-05-16 20:01:59.000000000 +0200
+++ new/google-auth-1.6.3/tests/transport/test_requests.py 2019-02-15 18:21:38.000000000 +0100
@@ -85,6 +85,15 @@
assert authed_session.credentials == mock.sentinel.credentials
+ def test_constructor_with_auth_request(self):
+ http = mock.create_autospec(requests.Session)
+ auth_request = google.auth.transport.requests.Request(http)
+
+ authed_session = google.auth.transport.requests.AuthorizedSession(
+ mock.sentinel.credentials, auth_request=auth_request)
+
+ assert authed_session._auth_request == auth_request
+
def test_request_no_refresh(self):
credentials = mock.Mock(wraps=CredentialsStub())
response = make_response()
1
0