- Update to 1.2.15
* Resolve Python 2.7 support issue introduced in v1.2.14 in ``sphinx.py``. * Fix #69: Add ``extra_stacklevel`` argument for interoperating with other wrapper functions (refer to #68 for a concrete use case). * Fix #73: Update class method deprecation warnings for Python 3.13. * Fix #75: Update GitHub workflows and fix development dependencies for Python 3.12. * Fix #66: discontinue TravisCI and AppVeyor due to end of free support. - Adjust upstream source name in spec file - Drop fix-python3.13-ftbfs.patch, merged upstream OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Deprecated?expand=0&rev=24
This commit is contained in:
commit
ecdbf7dd2f
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
BIN
Deprecated-1.2.14.tar.gz
(Stored with Git LFS)
Normal file
BIN
Deprecated-1.2.14.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
3
deprecated-1.2.15.tar.gz
Normal file
3
deprecated-1.2.15.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:683e561a90de76239796e6b6feac66b99030d2dd3fcf61ef996330f14bbb9b0d
|
||||
size 2977612
|
42
fix-python3.13-ftbfs.patch
Normal file
42
fix-python3.13-ftbfs.patch
Normal file
@ -0,0 +1,42 @@
|
||||
From 3b1aec9b8ff43f81cf7df9be92d0d383d759792e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
|
||||
Date: Fri, 28 Jun 2024 07:52:59 +0200
|
||||
Subject: [PATCH] Update class method deprecation warnings for Python 3.13
|
||||
|
||||
Update the version range for modified deprecation warnings that was
|
||||
introduced in efb3e60623e1dda88c2725a93223d290924e8666, since Python
|
||||
3.13 reverted the change originally introduced in 3.9 and is back to
|
||||
the old messages. This fixes tests with Python 3.13.
|
||||
|
||||
See also https://github.com/GrahamDumpleton/wrapt/pull/260.
|
||||
---
|
||||
tests/test_deprecated.py | 2 +-
|
||||
tests/test_sphinx.py | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tests/test_deprecated.py b/tests/test_deprecated.py
|
||||
index 0e467ae..c39229b 100644
|
||||
--- a/tests/test_deprecated.py
|
||||
+++ b/tests/test_deprecated.py
|
||||
@@ -191,7 +191,7 @@ def test_classic_deprecated_class_method__warns(classic_deprecated_class_method)
|
||||
assert len(warns) == 1
|
||||
warn = warns[0]
|
||||
assert issubclass(warn.category, DeprecationWarning)
|
||||
- if sys.version_info >= (3, 9):
|
||||
+ if (3, 9) <= sys.version_info < (3, 13):
|
||||
assert "deprecated class method" in str(warn.message)
|
||||
else:
|
||||
assert "deprecated function (or staticmethod)" in str(warn.message)
|
||||
diff --git a/tests/test_sphinx.py b/tests/test_sphinx.py
|
||||
index a1d7753..8cf8e95 100644
|
||||
--- a/tests/test_sphinx.py
|
||||
+++ b/tests/test_sphinx.py
|
||||
@@ -301,7 +301,7 @@ def test_sphinx_deprecated_class_method__warns(sphinx_deprecated_class_method):
|
||||
assert len(warns) == 1
|
||||
warn = warns[0]
|
||||
assert issubclass(warn.category, DeprecationWarning)
|
||||
- if sys.version_info >= (3, 9):
|
||||
+ if (3, 9) <= sys.version_info < (3, 13):
|
||||
assert "deprecated class method" in str(warn.message)
|
||||
else:
|
||||
assert "deprecated function (or staticmethod)" in str(warn.message)
|
121
python-Deprecated.changes
Normal file
121
python-Deprecated.changes
Normal file
@ -0,0 +1,121 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 25 12:43:42 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||
|
||||
- Update to 1.2.15
|
||||
* Resolve Python 2.7 support issue introduced in v1.2.14 in ``sphinx.py``.
|
||||
* Fix #69: Add ``extra_stacklevel`` argument for interoperating with
|
||||
other wrapper functions (refer to #68 for a concrete use case).
|
||||
* Fix #73: Update class method deprecation warnings for Python 3.13.
|
||||
* Fix #75: Update GitHub workflows and fix development dependencies for Python 3.12.
|
||||
* Fix #66: discontinue TravisCI and AppVeyor due to end of free support.
|
||||
- Adjust upstream source name in spec file
|
||||
- Drop fix-python3.13-ftbfs.patch, merged upstream
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 24 12:03:30 UTC 2024 - ecsos <ecsos@opensuse.org>
|
||||
|
||||
- Fix build error under Leap.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 22 09:42:29 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||
|
||||
- Cherry-pick upstream patch to fix build with Python 3.13
|
||||
* fix-python3.13-ftbfs.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 29 16:00:37 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 1.2.14:
|
||||
* Bug fix release
|
||||
* Fix return a correctly dedented docstring when long
|
||||
docstring are using the D212 or D213 format.
|
||||
* Add support for Python 3.11.
|
||||
* Drop support for Python older than 3.7 in build systems like
|
||||
pytest and tox, while ensuring the library remains
|
||||
production-compatible.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 21 12:20:29 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- add sle15_python_module_pythons (jsc#PED-68)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 13 22:40:54 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Make calling of %{sle15modernpython} optional.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 31 13:16:26 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- Provid canonicalized lowercase name
|
||||
- Don't catchall files section
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 6 20:04:59 UTC 2021 - Dirk Müller <dmueller@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).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Apr 18 13:29:45 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- Update to 1.2.12
|
||||
* Avoid "Explicit markup ends without a blank line" when the
|
||||
decorated function has no docstring.
|
||||
* Fix #40: 'version' argument is required in Sphinx directives.
|
||||
* Fix #41: deprecated.sphinx: strip Sphinx cross-referencing
|
||||
syntax from warning message.
|
||||
- Release 1.2.11
|
||||
* Fix packit configuration: use upstream_tag_template: v{version}.
|
||||
* Fix #33: Change the class ~deprecated.sphinx.SphinxAdapter: add
|
||||
the line_length keyword argument to the constructor to specify
|
||||
the max line length of the directive text. Sphinx decorators
|
||||
also accept the line_length argument.
|
||||
* Fix #34: versionadded and versionchanged decorators don't emit
|
||||
DeprecationWarning anymore on decorated classes.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 8 21:53:35 UTC 2020 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||
|
||||
- Update to 1.2.10
|
||||
* Fix #25: @deprecated respects global warning filters with actions other
|
||||
than “ignore” and “always” on Python 3.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 4 08:17:33 UTC 2020 - Johannes Grassler <johannes.grassler@suse.com>
|
||||
|
||||
- update to 1.2.9
|
||||
* Fix #20: Set the :func:warnings.warn stacklevel to 2 if
|
||||
the Python implementation is PyPy
|
||||
* Fix packit configuration: use dist-git-branch: fedora-all
|
||||
* Change the Tox configuration to run tests on PyPy v2.7 and 3.6.
|
||||
* Fix #15: The @deprecated decorator doesn't set a warning
|
||||
filter if the action keyword argument is not provided or None.
|
||||
* Fix #13: Warning displays the correct filename and line
|
||||
number when decorating a class if wrapt does not have the compiled c
|
||||
extension.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 13 15:06:49 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
|
||||
|
||||
- update to 1.2.7
|
||||
* Fix: Warning displays the correct filename and line number when
|
||||
decorating a function if wrapt does not have the compiled c extension.
|
||||
* Add Black configuration file.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 22 09:11:53 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Update to 1.2.6:
|
||||
* Fix #9: Change the project's configuration: reinforce the constraint to the Wrapt requirement.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 6 09:00:04 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Initial commit, needed by PyGithub
|
67
python-Deprecated.spec
Normal file
67
python-Deprecated.spec
Normal file
@ -0,0 +1,67 @@
|
||||
#
|
||||
# spec file for package python-Deprecated
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-Deprecated
|
||||
Version: 1.2.15
|
||||
Release: 0
|
||||
Summary: Python @deprecated decorator
|
||||
License: MIT
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/tantale/deprecated
|
||||
Source: https://files.pythonhosted.org/packages/source/d/deprecated/deprecated-%{version}.tar.gz
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wrapt >= 1.10}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-wrapt >= 1.10
|
||||
BuildArch: noarch
|
||||
Provides: python-deprecated = %{version}-%{release}
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
If you need to mark a function or a method as deprecated,
|
||||
you can use the ``@deprecated`` decorator.
|
||||
|
||||
%prep
|
||||
%setup -q -n deprecated-%{version}
|
||||
|
||||
%build
|
||||
%python_build
|
||||
|
||||
%install
|
||||
%python_install
|
||||
# Fix python-bytecode-inconsistent-mtime
|
||||
pushd %{buildroot}%{python_sitelib}
|
||||
find . -name '*.pyc' -exec rm -f '{}' ';'
|
||||
python%python_bin_suffix -m compileall *.py ';'
|
||||
popd
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
%pytest
|
||||
|
||||
%files %{python_files}
|
||||
%doc CHANGELOG.rst README.md
|
||||
%license LICENSE.rst
|
||||
%{python_sitelib}/deprecated
|
||||
%{python_sitelib}/Deprecated-%{version}*-info
|
||||
|
||||
%changelog
|
Loading…
x
Reference in New Issue
Block a user