Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-Deprecated for openSUSE:Factory checked in at 2021-12-09 19:45:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-Deprecated (Old) and /work/SRC/openSUSE:Factory/.python-Deprecated.new.2520 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-Deprecated" Thu Dec 9 19:45:17 2021 rev:7 rq:936117 version:1.2.13 Changes: -------- --- /work/SRC/openSUSE:Factory/python-Deprecated/python-Deprecated.changes 2021-04-19 21:06:39.336088402 +0200 +++ /work/SRC/openSUSE:Factory/.python-Deprecated.new.2520/python-Deprecated.changes 2021-12-09 19:45:32.445131275 +0100 @@ -1,0 +2,12 @@ +Mon Dec 6 20:04:59 UTC 2021 - Dirk M??ller <dmuel...@suse.com> + +- update to 1.2.13: + * Change the signature of the :func:`~deprecated.sphinx.deprecated` decorator to reflect + the valid use cases. + * Fix ``versionadded`` and ``versionchanged`` decorators: do not return a decorator factory, + but a Wrapt adapter. + * change the requirements for ``pip`` to "pip >= 9.0.3, < 21" (Python 2.7, 3.4 and 3.5). + * install ``typing`` when building on Python 3.4 (required by Pytest->Attrs). + * run unit tests on Wrapt 1.13 (release candidate). + +------------------------------------------------------------------- Old: ---- Deprecated-1.2.12.tar.gz New: ---- Deprecated-1.2.13.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-Deprecated.spec ++++++ --- /var/tmp/diff_new_pack.B5lf8S/_old 2021-12-09 19:45:33.057131570 +0100 +++ /var/tmp/diff_new_pack.B5lf8S/_new 2021-12-09 19:45:33.061131572 +0100 @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-Deprecated -Version: 1.2.12 +Version: 1.2.13 Release: 0 Summary: Python @deprecated decorator License: MIT ++++++ Deprecated-1.2.12.tar.gz -> Deprecated-1.2.13.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Deprecated-1.2.12/.bumpversion.cfg new/Deprecated-1.2.13/.bumpversion.cfg --- old/Deprecated-1.2.12/.bumpversion.cfg 2021-01-17 10:57:45.000000000 +0100 +++ new/Deprecated-1.2.13/.bumpversion.cfg 2021-06-03 18:38:27.000000000 +0200 @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.2.12 +current_version = 1.2.13 commit = True tag = False message = Prepare next version {new_version} (unreleased) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Deprecated-1.2.12/.github/workflows/codeql-analysis.yml new/Deprecated-1.2.13/.github/workflows/codeql-analysis.yml --- old/Deprecated-1.2.12/.github/workflows/codeql-analysis.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/Deprecated-1.2.13/.github/workflows/codeql-analysis.yml 2021-06-03 18:38:27.000000000 +0200 @@ -0,0 +1,71 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ master ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ master ] + schedule: + - cron: '22 8 * * 1' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'python' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] + # Learn more: + # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + + # ?????? Command-line programs to run using the OS shell. + # ???? https://git.io/JvXDl + + # ?????? If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Deprecated-1.2.12/CHANGELOG.rst new/Deprecated-1.2.13/CHANGELOG.rst --- old/Deprecated-1.2.12/CHANGELOG.rst 2021-03-13 14:59:20.000000000 +0100 +++ new/Deprecated-1.2.13/CHANGELOG.rst 2021-09-05 13:09:53.000000000 +0200 @@ -18,7 +18,35 @@ (only in comment or documentation). -v1.2.12 (2020-03-13) +v1.2.13 (2021-09-05) +==================== + +Bug fix release + +Fix +--- + +- Fix #45: Change the signature of the :func:`~deprecated.sphinx.deprecated` decorator to reflect + the valid use cases. + +- Fix #48: Fix ``versionadded`` and ``versionchanged`` decorators: do not return a decorator factory, + but a Wrapt adapter. + +Other +----- + +- Fix configuration for AppVeyor: simplify the test scripts and set the version format to match the current version. + +- Change configuration for Tox: + + + change the requirements for ``pip`` to "pip >= 9.0.3, < 21" (Python 2.7, 3.4 and 3.5). + + install ``typing`` when building on Python 3.4 (required by Pytest->Attrs). + + run unit tests on Wrapt 1.13 (release candidate). + +- Migrating project to `travis-ci.com <https://travis-ci.com/github/tantale/deprecated>`_. + + +v1.2.12 (2021-03-13) ==================== Bug fix release @@ -400,7 +428,7 @@ Other ----- -- Improve `Travis <https://travis-ci.org/>`_ configuration file (compatibility from Python 2.6 to 3.7-dev, and PyPy). +- Improve `Travis <https://travis-ci.com/>`_ configuration file (compatibility from Python 2.6 to 3.7-dev, and PyPy). - Add `AppVeyor <https://www.appveyor.com/docs/>`_ configuration file. - Add `Tox <https://tox.readthedocs.io/en/latest/>`_ configuration file. - Add `BumpVersion <https://github.com/peritus/bumpversion>`_ configuration file. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Deprecated-1.2.12/Deprecated.egg-info/PKG-INFO new/Deprecated-1.2.13/Deprecated.egg-info/PKG-INFO --- old/Deprecated-1.2.12/Deprecated.egg-info/PKG-INFO 2021-03-13 15:07:08.000000000 +0100 +++ new/Deprecated-1.2.13/Deprecated.egg-info/PKG-INFO 2021-09-05 13:12:55.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: Deprecated -Version: 1.2.12 +Version: 1.2.13 Summary: Python @deprecated decorator to deprecate old python classes, functions or methods. Home-page: https://github.com/tantale/deprecated Author: Laurent LAPORTE @@ -9,145 +9,6 @@ Project-URL: Documentation, https://deprecated.readthedocs.io/en/latest/ Project-URL: Source, https://github.com/tantale/deprecated Project-URL: Bug Tracker, https://github.com/tantale/deprecated/issues -Description: - Deprecated Library - ------------------ - - Deprecated is Easy to Use - ````````````````````````` - - If you need to mark a function or a method as deprecated, - you can use the ``@deprecated`` decorator: - - Save in a hello.py: - - .. code:: python - - from deprecated import deprecated - - - @deprecated(version='1.2.1', reason="You should use another function") - def some_old_function(x, y): - return x + y - - - class SomeClass(object): - @deprecated(version='1.3.0', reason="This method is deprecated") - def some_old_method(self, x, y): - return x + y - - - some_old_function(12, 34) - obj = SomeClass() - obj.some_old_method(5, 8) - - - And Easy to Setup - ````````````````` - - And run it: - - .. code:: bash - - $ pip install Deprecated - $ python hello.py - hello.py:15: DeprecationWarning: Call to deprecated function (or staticmethod) some_old_function. - (You should use another function) -- Deprecated since version 1.2.0. - some_old_function(12, 34) - hello.py:17: DeprecationWarning: Call to deprecated method some_old_method. - (This method is deprecated) -- Deprecated since version 1.3.0. - obj.some_old_method(5, 8) - - - You can document your code - `````````````````````````` - - Have you ever wonder how to document that some functions, classes, methods, etc. are deprecated? - This is now possible with the integrated Sphinx directives: - - For instance, in hello_sphinx.py: - - .. code:: python - - from deprecated.sphinx import deprecated - from deprecated.sphinx import versionadded - from deprecated.sphinx import versionchanged - - - @versionadded(version='1.0', reason="This function is new") - def function_one(): - '''This is the function one''' - - - @versionchanged(version='1.0', reason="This function is modified") - def function_two(): - '''This is the function two''' - - - @deprecated(version='1.0', reason="This function will be removed soon") - def function_three(): - '''This is the function three''' - - - function_one() - function_two() - function_three() # warns - - help(function_one) - help(function_two) - help(function_three) - - - The result it immediate - ``````````````````````` - - Run it: - - .. code:: bash - - $ python hello_sphinx.py - - hello_sphinx.py:23: DeprecationWarning: Call to deprecated function (or staticmethod) function_three. - (This function will be removed soon) -- Deprecated since version 1.0. - function_three() # warns - - Help on function function_one in module __main__: - - function_one() - This is the function one - - .. versionadded:: 1.0 - This function is new - - Help on function function_two in module __main__: - - function_two() - This is the function two - - .. versionchanged:: 1.0 - This function is modified - - Help on function function_three in module __main__: - - function_three() - This is the function three - - .. deprecated:: 1.0 - This function will be removed soon - - - Links - ````` - - * `Python package index (PyPi) <https://pypi.python.org/pypi/deprecated>`_ - * `GitHub website <https://github.com/tantale/deprecated>`_ - * `Read The Docs <https://readthedocs.org/projects/deprecated>`_ - * `EBook on Lulu.com <http://www.lulu.com/commerce/index.php?fBuyContent=21305117>`_ - * `StackOverFlow Q&A <https://stackoverflow.com/a/40301488/1513933>`_ - * `Development version - <https://github.com/tantale/deprecated/zipball/master#egg=Deprecated-dev>`_ - - Keywords: deprecate,deprecated,deprecation,warning,warn,decorator Platform: any Classifier: Development Status :: 5 - Production/Stable @@ -169,3 +30,145 @@ Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.* Description-Content-Type: text/x-rst Provides-Extra: dev +License-File: LICENSE.rst + + +Deprecated Library +------------------ + +Deprecated is Easy to Use +````````````````````````` + +If you need to mark a function or a method as deprecated, +you can use the ``@deprecated`` decorator: + +Save in a hello.py: + +.. code:: python + + from deprecated import deprecated + + + @deprecated(version='1.2.1', reason="You should use another function") + def some_old_function(x, y): + return x + y + + + class SomeClass(object): + @deprecated(version='1.3.0', reason="This method is deprecated") + def some_old_method(self, x, y): + return x + y + + + some_old_function(12, 34) + obj = SomeClass() + obj.some_old_method(5, 8) + + +And Easy to Setup +````````````````` + +And run it: + +.. code:: bash + + $ pip install Deprecated + $ python hello.py + hello.py:15: DeprecationWarning: Call to deprecated function (or staticmethod) some_old_function. + (You should use another function) -- Deprecated since version 1.2.0. + some_old_function(12, 34) + hello.py:17: DeprecationWarning: Call to deprecated method some_old_method. + (This method is deprecated) -- Deprecated since version 1.3.0. + obj.some_old_method(5, 8) + + +You can document your code +`````````````````````````` + +Have you ever wonder how to document that some functions, classes, methods, etc. are deprecated? +This is now possible with the integrated Sphinx directives: + +For instance, in hello_sphinx.py: + +.. code:: python + + from deprecated.sphinx import deprecated + from deprecated.sphinx import versionadded + from deprecated.sphinx import versionchanged + + + @versionadded(version='1.0', reason="This function is new") + def function_one(): + '''This is the function one''' + + + @versionchanged(version='1.0', reason="This function is modified") + def function_two(): + '''This is the function two''' + + + @deprecated(version='1.0', reason="This function will be removed soon") + def function_three(): + '''This is the function three''' + + + function_one() + function_two() + function_three() # warns + + help(function_one) + help(function_two) + help(function_three) + + +The result it immediate +``````````````````````` + +Run it: + +.. code:: bash + + $ python hello_sphinx.py + + hello_sphinx.py:23: DeprecationWarning: Call to deprecated function (or staticmethod) function_three. + (This function will be removed soon) -- Deprecated since version 1.0. + function_three() # warns + + Help on function function_one in module __main__: + + function_one() + This is the function one + + .. versionadded:: 1.0 + This function is new + + Help on function function_two in module __main__: + + function_two() + This is the function two + + .. versionchanged:: 1.0 + This function is modified + + Help on function function_three in module __main__: + + function_three() + This is the function three + + .. deprecated:: 1.0 + This function will be removed soon + + +Links +````` + +* `Python package index (PyPi) <https://pypi.python.org/pypi/deprecated>`_ +* `GitHub website <https://github.com/tantale/deprecated>`_ +* `Read The Docs <https://readthedocs.org/projects/deprecated>`_ +* `EBook on Lulu.com <http://www.lulu.com/commerce/index.php?fBuyContent=21305117>`_ +* `StackOverFlow Q&A <https://stackoverflow.com/a/40301488/1513933>`_ +* `Development version + <https://github.com/tantale/deprecated/zipball/master#egg=Deprecated-dev>`_ + + + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Deprecated-1.2.12/Deprecated.egg-info/SOURCES.txt new/Deprecated-1.2.13/Deprecated.egg-info/SOURCES.txt --- old/Deprecated-1.2.12/Deprecated.egg-info/SOURCES.txt 2021-03-13 15:07:08.000000000 +0100 +++ new/Deprecated-1.2.13/Deprecated.egg-info/SOURCES.txt 2021-09-05 13:12:56.000000000 +0200 @@ -17,6 +17,7 @@ .github/CODE_OF_CONDUCT.md .github/ISSUE_TEMPLATE.md .github/PULL_REQUEST_TEMPLATE.md +.github/workflows/codeql-analysis.yml .github/workflows/python-package.yml Deprecated.egg-info/PKG-INFO Deprecated.egg-info/SOURCES.txt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Deprecated-1.2.12/PKG-INFO new/Deprecated-1.2.13/PKG-INFO --- old/Deprecated-1.2.12/PKG-INFO 2021-03-13 15:07:08.000000000 +0100 +++ new/Deprecated-1.2.13/PKG-INFO 2021-09-05 13:12:56.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: Deprecated -Version: 1.2.12 +Version: 1.2.13 Summary: Python @deprecated decorator to deprecate old python classes, functions or methods. Home-page: https://github.com/tantale/deprecated Author: Laurent LAPORTE @@ -9,145 +9,6 @@ Project-URL: Documentation, https://deprecated.readthedocs.io/en/latest/ Project-URL: Source, https://github.com/tantale/deprecated Project-URL: Bug Tracker, https://github.com/tantale/deprecated/issues -Description: - Deprecated Library - ------------------ - - Deprecated is Easy to Use - ````````````````````````` - - If you need to mark a function or a method as deprecated, - you can use the ``@deprecated`` decorator: - - Save in a hello.py: - - .. code:: python - - from deprecated import deprecated - - - @deprecated(version='1.2.1', reason="You should use another function") - def some_old_function(x, y): - return x + y - - - class SomeClass(object): - @deprecated(version='1.3.0', reason="This method is deprecated") - def some_old_method(self, x, y): - return x + y - - - some_old_function(12, 34) - obj = SomeClass() - obj.some_old_method(5, 8) - - - And Easy to Setup - ````````````````` - - And run it: - - .. code:: bash - - $ pip install Deprecated - $ python hello.py - hello.py:15: DeprecationWarning: Call to deprecated function (or staticmethod) some_old_function. - (You should use another function) -- Deprecated since version 1.2.0. - some_old_function(12, 34) - hello.py:17: DeprecationWarning: Call to deprecated method some_old_method. - (This method is deprecated) -- Deprecated since version 1.3.0. - obj.some_old_method(5, 8) - - - You can document your code - `````````````````````````` - - Have you ever wonder how to document that some functions, classes, methods, etc. are deprecated? - This is now possible with the integrated Sphinx directives: - - For instance, in hello_sphinx.py: - - .. code:: python - - from deprecated.sphinx import deprecated - from deprecated.sphinx import versionadded - from deprecated.sphinx import versionchanged - - - @versionadded(version='1.0', reason="This function is new") - def function_one(): - '''This is the function one''' - - - @versionchanged(version='1.0', reason="This function is modified") - def function_two(): - '''This is the function two''' - - - @deprecated(version='1.0', reason="This function will be removed soon") - def function_three(): - '''This is the function three''' - - - function_one() - function_two() - function_three() # warns - - help(function_one) - help(function_two) - help(function_three) - - - The result it immediate - ``````````````````````` - - Run it: - - .. code:: bash - - $ python hello_sphinx.py - - hello_sphinx.py:23: DeprecationWarning: Call to deprecated function (or staticmethod) function_three. - (This function will be removed soon) -- Deprecated since version 1.0. - function_three() # warns - - Help on function function_one in module __main__: - - function_one() - This is the function one - - .. versionadded:: 1.0 - This function is new - - Help on function function_two in module __main__: - - function_two() - This is the function two - - .. versionchanged:: 1.0 - This function is modified - - Help on function function_three in module __main__: - - function_three() - This is the function three - - .. deprecated:: 1.0 - This function will be removed soon - - - Links - ````` - - * `Python package index (PyPi) <https://pypi.python.org/pypi/deprecated>`_ - * `GitHub website <https://github.com/tantale/deprecated>`_ - * `Read The Docs <https://readthedocs.org/projects/deprecated>`_ - * `EBook on Lulu.com <http://www.lulu.com/commerce/index.php?fBuyContent=21305117>`_ - * `StackOverFlow Q&A <https://stackoverflow.com/a/40301488/1513933>`_ - * `Development version - <https://github.com/tantale/deprecated/zipball/master#egg=Deprecated-dev>`_ - - Keywords: deprecate,deprecated,deprecation,warning,warn,decorator Platform: any Classifier: Development Status :: 5 - Production/Stable @@ -169,3 +30,145 @@ Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.* Description-Content-Type: text/x-rst Provides-Extra: dev +License-File: LICENSE.rst + + +Deprecated Library +------------------ + +Deprecated is Easy to Use +````````````````````````` + +If you need to mark a function or a method as deprecated, +you can use the ``@deprecated`` decorator: + +Save in a hello.py: + +.. code:: python + + from deprecated import deprecated + + + @deprecated(version='1.2.1', reason="You should use another function") + def some_old_function(x, y): + return x + y + + + class SomeClass(object): + @deprecated(version='1.3.0', reason="This method is deprecated") + def some_old_method(self, x, y): + return x + y + + + some_old_function(12, 34) + obj = SomeClass() + obj.some_old_method(5, 8) + + +And Easy to Setup +````````````````` + +And run it: + +.. code:: bash + + $ pip install Deprecated + $ python hello.py + hello.py:15: DeprecationWarning: Call to deprecated function (or staticmethod) some_old_function. + (You should use another function) -- Deprecated since version 1.2.0. + some_old_function(12, 34) + hello.py:17: DeprecationWarning: Call to deprecated method some_old_method. + (This method is deprecated) -- Deprecated since version 1.3.0. + obj.some_old_method(5, 8) + + +You can document your code +`````````````````````````` + +Have you ever wonder how to document that some functions, classes, methods, etc. are deprecated? +This is now possible with the integrated Sphinx directives: + +For instance, in hello_sphinx.py: + +.. code:: python + + from deprecated.sphinx import deprecated + from deprecated.sphinx import versionadded + from deprecated.sphinx import versionchanged + + + @versionadded(version='1.0', reason="This function is new") + def function_one(): + '''This is the function one''' + + + @versionchanged(version='1.0', reason="This function is modified") + def function_two(): + '''This is the function two''' + + + @deprecated(version='1.0', reason="This function will be removed soon") + def function_three(): + '''This is the function three''' + + + function_one() + function_two() + function_three() # warns + + help(function_one) + help(function_two) + help(function_three) + + +The result it immediate +``````````````````````` + +Run it: + +.. code:: bash + + $ python hello_sphinx.py + + hello_sphinx.py:23: DeprecationWarning: Call to deprecated function (or staticmethod) function_three. + (This function will be removed soon) -- Deprecated since version 1.0. + function_three() # warns + + Help on function function_one in module __main__: + + function_one() + This is the function one + + .. versionadded:: 1.0 + This function is new + + Help on function function_two in module __main__: + + function_two() + This is the function two + + .. versionchanged:: 1.0 + This function is modified + + Help on function function_three in module __main__: + + function_three() + This is the function three + + .. deprecated:: 1.0 + This function will be removed soon + + +Links +````` + +* `Python package index (PyPi) <https://pypi.python.org/pypi/deprecated>`_ +* `GitHub website <https://github.com/tantale/deprecated>`_ +* `Read The Docs <https://readthedocs.org/projects/deprecated>`_ +* `EBook on Lulu.com <http://www.lulu.com/commerce/index.php?fBuyContent=21305117>`_ +* `StackOverFlow Q&A <https://stackoverflow.com/a/40301488/1513933>`_ +* `Development version + <https://github.com/tantale/deprecated/zipball/master#egg=Deprecated-dev>`_ + + + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Deprecated-1.2.12/README.md new/Deprecated-1.2.13/README.md --- old/Deprecated-1.2.12/README.md 2020-12-17 18:47:12.000000000 +0100 +++ new/Deprecated-1.2.13/README.md 2021-06-03 18:38:27.000000000 +0200 @@ -2,7 +2,7 @@ Python ``@deprecated`` decorator to deprecate old python classes, functions or methods. -[](https://travis-ci.org/tantale/deprecated) +[](https://travis-ci.com/tantale/deprecated) [](https://ci.appveyor.com/project/tantale/deprecated) [](https://coveralls.io/github/tantale/deprecated?branch=master) [](https://badge.fury.io/gh/tantale%2Fdeprecated) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Deprecated-1.2.12/appveyor.yml new/Deprecated-1.2.13/appveyor.yml --- old/Deprecated-1.2.12/appveyor.yml 2020-12-17 18:47:12.000000000 +0100 +++ new/Deprecated-1.2.13/appveyor.yml 2021-09-05 13:09:43.000000000 +0200 @@ -1,6 +1,8 @@ # What Python version is installed where: # http://www.appveyor.com/docs/installed-software#python +version: 1.2.13.{build} + environment: matrix: # Python **2.6** and **3.3** are no more supported @@ -37,22 +39,20 @@ init: - set PATH=%PYTHON%;%PYTHON%\Scripts;C:\MinGW\msys\1.0\bin;%PATH% - "git config --system http.sslcainfo \"C:\\Program Files\\Git\\mingw64\\ssl\\certs\\ca-bundle.crt\"" - - "%PYTHON%/python -V" - - "%PYTHON%/python -c \"import struct;print(8 * struct.calcsize(\'P\'))\"" + - "%PYTHON%\\python.exe -V" + - "%PYTHON%\\python.exe -c \"import struct;print(8 * struct.calcsize(\'P\'))\"" install: - - "%PYTHON%/Scripts/easy_install -U pip" - - "%PYTHON%/Scripts/pip install -U setuptools" - - "%PYTHON%/Scripts/pip install tox" - - "%PYTHON%/Scripts/pip install wheel" + - "%PYTHON%\\python.exe -m pip install wheel" + - "%PYTHON%\\python.exe -m pip install tox" -build: off # Not a C# project, build stuff at the test step instead. +build: false # Not a C# project, build stuff at the test step instead. test_script: - - "%PYTHON%/Scripts/tox -e %TOX_ENV%" + - "%PYTHON%\\Scripts\\tox.exe -e %TOX_ENV%" after_test: - - "%PYTHON%/python setup.py --command-packages wheel bdist_wheel" + - "%PYTHON%\\python.exe setup.py --command-packages wheel bdist_wheel" - ps: "ls dist" artifacts: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Deprecated-1.2.12/deprecated/__init__.py new/Deprecated-1.2.13/deprecated/__init__.py --- old/Deprecated-1.2.12/deprecated/__init__.py 2021-03-13 14:59:20.000000000 +0100 +++ new/Deprecated-1.2.13/deprecated/__init__.py 2021-09-05 13:09:53.000000000 +0200 @@ -7,9 +7,9 @@ """ -__version__ = "1.2.12" +__version__ = "1.2.13" __author__ = u"Laurent LAPORTE <tantale.soluti...@gmail.com>" -__date__ = "2020-03-13" +__date__ = "2021-09-05" __credits__ = "(c) Laurent LAPORTE" from deprecated.classic import deprecated diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Deprecated-1.2.12/deprecated/sphinx.py new/Deprecated-1.2.13/deprecated/sphinx.py --- old/Deprecated-1.2.12/deprecated/sphinx.py 2021-03-13 11:56:07.000000000 +0100 +++ new/Deprecated-1.2.13/deprecated/sphinx.py 2021-09-05 10:06:52.000000000 +0200 @@ -183,13 +183,7 @@ version=version, line_length=line_length, ) - - # noinspection PyUnusedLocal - @wrapt.decorator(adapter=adapter) - def wrapper(wrapped, instance, args, kwargs): - return wrapped(*args, **kwargs) - - return wrapper + return adapter def versionchanged(reason="", version="", line_length=70): @@ -218,31 +212,29 @@ version=version, line_length=line_length, ) - - # noinspection PyUnusedLocal - @wrapt.decorator(adapter=adapter) - def wrapper(wrapped, instance, args, kwargs): - return wrapped(*args, **kwargs) - - return wrapper + return adapter -def deprecated(*args, **kwargs): +def deprecated(reason="", version="", line_length=70, **kwargs): """ This decorator can be used to insert a "deprecated" directive in your function/class docstring in order to documents the version of the project which deprecates this functionality in your library. - Keyword arguments can be: - - - "reason": + :param str reason: Reason message which documents the deprecation in your library (can be omitted). - - "version": + :param str version: Version of your project which deprecates this feature. If you follow the `Semantic Versioning <https://semver.org/>`_, the version number has the format "MAJOR.MINOR.PATCH". + :type line_length: int + :param line_length: + Max line length of the directive text. If non nul, a long text is wrapped in several lines. + + Keyword arguments can be: + - "action": A warning filter used to activate or not the deprecation warning. Can be one of "error", "ignore", "always", "default", "module", or "once". @@ -253,11 +245,14 @@ By default, the category class is :class:`~DeprecationWarning`, you can inherit this class to define your own deprecation warning category. - - "line_length": - Max line length of the directive text. If non nul, a long text is wrapped in several lines. + :return: a decorator used to deprecate a function. - :return: the decorated function. + .. versionchanged:: 1.2.13 + Change the signature of the decorator to reflect the valid use cases. """ directive = kwargs.pop('directive', 'deprecated') adapter_cls = kwargs.pop('adapter_cls', SphinxAdapter) - return _classic_deprecated(*args, directive=directive, adapter_cls=adapter_cls, **kwargs) + kwargs["reason"] = reason + kwargs["version"] = version + kwargs["line_length"] = line_length + return _classic_deprecated(directive=directive, adapter_cls=adapter_cls, **kwargs) Binary files old/Deprecated-1.2.12/docs/source/_static/banner.png and new/Deprecated-1.2.13/docs/source/_static/banner.png differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Deprecated-1.2.12/docs/source/conf.py new/Deprecated-1.2.13/docs/source/conf.py --- old/Deprecated-1.2.12/docs/source/conf.py 2021-01-17 10:57:45.000000000 +0100 +++ new/Deprecated-1.2.13/docs/source/conf.py 2021-06-03 18:38:27.000000000 +0200 @@ -61,7 +61,7 @@ # built documents. # # The full version, including alpha/beta/rc tags. -release = "1.2.12" +release = "1.2.13" # The short X.Y version. version = release.rpartition('.')[0] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Deprecated-1.2.12/python-deprecated.spec new/Deprecated-1.2.13/python-deprecated.spec --- old/Deprecated-1.2.12/python-deprecated.spec 2021-01-17 10:57:45.000000000 +0100 +++ new/Deprecated-1.2.13/python-deprecated.spec 2021-06-03 18:38:27.000000000 +0200 @@ -2,8 +2,8 @@ %global pkgname deprecated Name: python-%{pkgname} -Version: 1.2.12 -Release: 2%{?dist} +Version: 1.2.13 +Release: 1%{?dist} Summary: Python decorator to deprecate old python classes, functions or methods License: MIT URL: https://github.com/tantale/%{pkgname} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Deprecated-1.2.12/setup.cfg new/Deprecated-1.2.13/setup.cfg --- old/Deprecated-1.2.12/setup.cfg 2021-03-13 15:07:08.000000000 +0100 +++ new/Deprecated-1.2.13/setup.cfg 2021-09-05 13:12:56.000000000 +0200 @@ -8,11 +8,8 @@ release = egg_info -D -b '' sdist bdist_wheel [build_sphinx] -source-dir = docs/source -build-dir = dist/docs - -[upload_docs] -upload-dir = dist/docs/html +source_dir = docs/source +build_dir = dist/docs [egg_info] tag_build = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Deprecated-1.2.12/setup.py new/Deprecated-1.2.13/setup.py --- old/Deprecated-1.2.12/setup.py 2021-01-18 14:03:16.000000000 +0100 +++ new/Deprecated-1.2.13/setup.py 2021-06-03 18:38:27.000000000 +0200 @@ -143,7 +143,7 @@ setup( name='Deprecated', - version='1.2.12', + version='1.2.13', url='https://github.com/tantale/deprecated', project_urls={ "Documentation": "https://deprecated.readthedocs.io/en/latest/", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Deprecated-1.2.12/tests/test_sphinx.py new/Deprecated-1.2.13/tests/test_sphinx.py --- old/Deprecated-1.2.12/tests/test_sphinx.py 2021-03-13 11:54:58.000000000 +0100 +++ new/Deprecated-1.2.13/tests/test_sphinx.py 2021-06-03 18:38:27.000000000 +0200 @@ -303,7 +303,10 @@ def test_should_raise_type_error(): try: - deprecated.sphinx.deprecated(5) + @deprecated.sphinx.deprecated(version="4.5.6", reason=5) + def foo(): + pass + assert False, "TypeError not raised" except TypeError: pass diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Deprecated-1.2.12/tests/test_sphinx_class.py new/Deprecated-1.2.13/tests/test_sphinx_class.py --- old/Deprecated-1.2.12/tests/test_sphinx_class.py 2021-02-04 15:13:27.000000000 +0100 +++ new/Deprecated-1.2.13/tests/test_sphinx_class.py 2021-09-05 08:59:59.000000000 +0200 @@ -82,3 +82,68 @@ assert isinstance(obj, MyBaseClass) assert inspect.isclass(MyBaseClass) assert issubclass(MySubClass, MyBaseClass) + + +@pytest.mark.skipif( + sys.version_info < (3, 3), reason="Classes should have mutable docstrings -- resolved in python 3.3" +) +def test_isinstance_versionadded(): + # https://github.com/tantale/deprecated/issues/48 + @deprecated.sphinx.versionadded(version="X.Y", reason="some reason") + class VersionAddedCls: + pass + + @deprecated.sphinx.versionadded(version="X.Y", reason="some reason") + class VersionAddedChildCls(VersionAddedCls): + pass + + instance = VersionAddedChildCls() + assert isinstance(instance, VersionAddedChildCls) + assert isinstance(instance, VersionAddedCls) + + +@pytest.mark.skipif( + sys.version_info < (3, 3), reason="Classes should have mutable docstrings -- resolved in python 3.3" +) +def test_isinstance_versionchanged(): + @deprecated.sphinx.versionchanged(version="X.Y", reason="some reason") + class VersionChangedCls: + pass + + @deprecated.sphinx.versionchanged(version="X.Y", reason="some reason") + class VersionChangedChildCls(VersionChangedCls): + pass + + instance = VersionChangedChildCls() + assert isinstance(instance, VersionChangedChildCls) + assert isinstance(instance, VersionChangedCls) + + +@pytest.mark.skipif( + sys.version_info < (3, 3), reason="Classes should have mutable docstrings -- resolved in python 3.3" +) +def test_isinstance_deprecated(): + @deprecated.sphinx.deprecated(version="X.Y", reason="some reason") + class DeprecatedCls: + pass + + @deprecated.sphinx.deprecated(version="Y.Z", reason="some reason") + class DeprecatedChildCls(DeprecatedCls): + pass + + instance = DeprecatedChildCls() + assert isinstance(instance, DeprecatedChildCls) + assert isinstance(instance, DeprecatedCls) + + +@pytest.mark.skipif( + sys.version_info < (3, 3), reason="Classes should have mutable docstrings -- resolved in python 3.3" +) +def test_isinstance_versionadded_versionchanged(): + @deprecated.sphinx.versionadded(version="X.Y") + @deprecated.sphinx.versionchanged(version="X.Y.Z") + class AddedChangedCls: + pass + + instance = AddedChangedCls() + assert isinstance(instance, AddedChangedCls) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Deprecated-1.2.12/tox.ini new/Deprecated-1.2.13/tox.ini --- old/Deprecated-1.2.12/tox.ini 2021-01-18 13:36:18.000000000 +0100 +++ new/Deprecated-1.2.13/tox.ini 2021-09-05 10:38:18.000000000 +0200 @@ -11,21 +11,23 @@ # - /usr/local/bin/pypy -> /opt/pypy2.7-v7.3.0-osx64/bin/pypy # - /usr/local/bin/pypy3 -> /opt/pypy3.6-v7.3.0-osx64/bin/pypy3 envlist = - py{27,34,35,36,37,38,39,310}-wrapt{1.10,1.11,1.12} + py{27,34,35,36,37,38,39,310}-wrapt{1.10,1.11,1.12,1.13} pypy, pypy3 docs [testenv] commands = pytest --cov-report term-missing --cov=deprecated tests/ deps = - py27,py34,py35: pip >= 9.0.3, < 19.2 + py27,py34,py35: pip >= 9.0.3, < 21 py27,py34: PyTest < 5 py35,py36,py37,py38,py39,pypy,pypy3: PyTest py27,py34: PyTest-Cov < 2.6 + py34: typing # required by pytest->attrs py35,py36,py37,py38,py39,py310,pypy,pypy3: PyTest-Cov wrapt1.10: wrapt ~= 1.10.0 wrapt1.11: wrapt ~= 1.11.0 wrapt1.12: wrapt ~= 1.12.0 + wrapt1.13: wrapt == 1.13.0rc3 coverage < 5 [testenv:docs]