commit 6bed2955da343245e91127872f9c155f6b1428ad5c01ebdc65cbfd40d0d52d16 Author: Steve Kowalik Date: Tue Jan 21 03:48:54 2025 +0000 - Add pygments.patch to fix test failure with Pygments 2.19 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-readme_renderer?expand=0&rev=35 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/pygments.patch b/pygments.patch new file mode 100644 index 0000000..1b4578a --- /dev/null +++ b/pygments.patch @@ -0,0 +1,95 @@ +From 04d5cfe76850192364eff344be7fe27730af8484 Mon Sep 17 00:00:00 2001 +From: shenxianpeng +Date: Sat, 18 Jan 2025 06:30:04 -0500 +Subject: [PATCH] update test outputs to fix test fail (#325) + +--- + tests/fixtures/test_CommonMark_008.html | 6 +++--- + tests/fixtures/test_GFM_doublequotes.html | 2 +- + tests/fixtures/test_GFM_highlight.html | 2 +- + tests/fixtures/test_GFM_highlight_default_py.html | 2 +- + tests/fixtures/test_GFM_malicious_pre.html | 2 +- + tests/fixtures/test_rst_008.html | 6 +++--- + 6 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/tests/fixtures/test_CommonMark_008.html b/tests/fixtures/test_CommonMark_008.html +index eef144d..5072058 100644 +--- a/tests/fixtures/test_CommonMark_008.html ++++ b/tests/fixtures/test_CommonMark_008.html +@@ -1,9 +1,9 @@ +

Here is some Python code for a Dog:

+-
class Dog(Animal):
+-    def __init__(self, name):
++
class Dog(Animal):
++    def __init__(self, name):
+         self.name = name
+ 
+-    def make_sound(self):
++    def make_sound(self):
+         print('Ruff!')
+ 
+ dog = Dog('Fido')
+diff --git a/tests/fixtures/test_GFM_doublequotes.html b/tests/fixtures/test_GFM_doublequotes.html
+index f75a4cf..b26adba 100644
+--- a/tests/fixtures/test_GFM_doublequotes.html
++++ b/tests/fixtures/test_GFM_doublequotes.html
+@@ -1,7 +1,7 @@
+ 

This is normal text.

+
This is code text.
+ 
+-
def this_is_python():
++
def this_is_python():
+     """This is a docstring."""
+     pass
+ 
+diff --git a/tests/fixtures/test_GFM_highlight.html b/tests/fixtures/test_GFM_highlight.html +index c2cf7bb..1eae5fd 100644 +--- a/tests/fixtures/test_GFM_highlight.html ++++ b/tests/fixtures/test_GFM_highlight.html +@@ -1,7 +1,7 @@ +

This is normal text.

+
This is code text.
+ 
+-
def this_is_python():
++
def this_is_python():
+     pass
+ 
+
func ThisIsGo(){
+diff --git a/tests/fixtures/test_GFM_highlight_default_py.html b/tests/fixtures/test_GFM_highlight_default_py.html
+index d85d6ce..d1a136f 100644
+--- a/tests/fixtures/test_GFM_highlight_default_py.html
++++ b/tests/fixtures/test_GFM_highlight_default_py.html
+@@ -1,4 +1,4 @@
+-
async def this_is_python():
++
async def this_is_python():
+     pass
+ 
+ print(await this_is_python())
+diff --git a/tests/fixtures/test_GFM_malicious_pre.html b/tests/fixtures/test_GFM_malicious_pre.html
+index dc7b6e6..2e586ec 100644
+--- a/tests/fixtures/test_GFM_malicious_pre.html
++++ b/tests/fixtures/test_GFM_malicious_pre.html
+@@ -1,5 +1,5 @@
+ 

This is normal text.

+-
def this_is_python():
++
def this_is_python():
+     """This is a docstring."""
+     pass
+ <script type="text/javascript">alert('I am evil.');</script>
+diff --git a/tests/fixtures/test_rst_008.html b/tests/fixtures/test_rst_008.html
+index 6762f3a..bbb44a8 100644
+--- a/tests/fixtures/test_rst_008.html
++++ b/tests/fixtures/test_rst_008.html
+@@ -1,9 +1,9 @@
+ 

Here is some Python code for a Dog:

+-
class Dog(Animal):
+-    def __init__(self, name):
++
class Dog(Animal):
++    def __init__(self, name):
+         self.name = name
+ 
+-    def make_sound(self):
++    def make_sound(self):
+         print('Ruff!')
+ 
+ dog = Dog('Fido')
diff --git a/python-readme_renderer.changes b/python-readme_renderer.changes new file mode 100644 index 0000000..6640864 --- /dev/null +++ b/python-readme_renderer.changes @@ -0,0 +1,203 @@ +------------------------------------------------------------------- +Mon Jan 20 15:29:01 UTC 2025 - Markéta Machová + +- Add pygments.patch to fix test failure with Pygments 2.19 + +------------------------------------------------------------------- +Thu Nov 7 13:28:54 UTC 2024 - Daniel Garcia + +- Update to 44.0: + * Drop support for Python 3.8 (#315) + * Require docutils 0.21.2 and higher (#315) + * Remove HTML5 tag from the list of allowed HTML tags (#315) + * Test all supported CPython and PyPy versions in CI (#315) + * Resolve Node 16 deprecation warnings in CI (#309) + * Lint specific directories (#312) + * Build a wheel once for all tox test environments (#308) + * Lazy open output files, and always close them (#314) + * Gitpod: Migrate to the Even Better TOML extension (#306) + * check-manifest: Remove a now-default .gitpod.yml exclusion (#307) + +------------------------------------------------------------------- +Sat Mar 16 12:54:36 UTC 2024 - Dirk Müller + +- update to 43.0: + * Allow HTML5 picture tag through cleaner + * Test against Python 3.12 + +------------------------------------------------------------------- +Wed Dec 27 16:45:17 UTC 2023 - Dirk Müller + +- update to 42.0: + * Migrate from ``bleach`` to ``nh3`` (#295) + * Migrate from ``setup.py`` to ``pyproject.toml`` + +------------------------------------------------------------------- +Thu Sep 7 11:38:42 UTC 2023 - Dirk Müller + +- update to 41.0: + * Allow HTML5 `figcaption` tag through cleaner (#291) + * Test `README.rst` from this project (#288) + * Add CLI option to render package README. (#271) + * Adapt tests to pygments 2.14.0 (#272) + * Update release process to use Trusted Publishing (#276) + * Replace usage of deprecated `pkg_resources` with + `importlib.metadata` (#281) + * Drop support for Python 3.7 (#282), Test against Python 3.11 + (#280) +- drop fix-tests-pygments-2.14.0.patch (upstream) + +------------------------------------------------------------------- +Fri Apr 21 12:32:44 UTC 2023 - Dirk Müller + +- add sle15_python_module_pythons (jsc#PED-68) + +------------------------------------------------------------------- +Thu Apr 13 22:44:24 UTC 2023 - Matej Cepl + +- Make calling of %{sle15modernpython} optional. + +------------------------------------------------------------------- +Wed Jan 4 16:24:09 UTC 2023 - Daniel Garcia + +- Add fix-tests-pygments-2.14.0.patch to adapt tests to the new version of + pygments gh#pypa/readme_renderer#272 + +------------------------------------------------------------------- +Wed Nov 9 18:51:01 UTC 2022 - Yogalakshmi Arunachalam + +- Update to 37.3 (2022-10-31) + * Allow HTML5 figure tag through cleaner (#265) + +- Update to 37.2 (2022-09-24) + * Allow HTML5 s tag through cleaner (#261) + +- Update to 37.1 (2022-09-03) + * Allow HTML5 nav tag through cleaner (#259) + +- Update to 37.0 (2022-08-21) + * Remove command line example from docs (#197) + * Multiple pyproject.toml fixes (#251) + * Confirm handling multiple inline strong (#252) + * Convert RST output to HTML5 (#253) + * Add Typing to classifiers (#254) + * Development tweaks - coverage reporting, actions updates (#255) + * Add test confirming behavior with unknown lexers (#256) + +-Update to 36.0 (2022-08-06) + * Enable gitpod development (#238) + * Allow rst admonitions to render (#242) + * Add badges to README (#243) + * Update codebase for modern Python (#244) + * Fix table cell spans (#245) + * Allow math directive in rst (#246) + * Preserve lang attribute in pre (#247) + +------------------------------------------------------------------- +Fri Jul 15 10:07:35 UTC 2022 - Jacob Michalskie + +- Update to 35.0: + * works with newer versions of cmarkgfm + +------------------------------------------------------------------- +Wed Feb 9 10:39:46 UTC 2022 - Matej Cepl + +- We require cmarkgfm == 0.7.0 (gh#pypa/readme_renderer#221) and + still we have to stkip test_md_fixtures. + +------------------------------------------------------------------- +Sun Jan 16 12:48:21 UTC 2022 - Dirk Müller + +- update to 32.0: + * Allow start attribute in ordered lists (#216) + * No limit rendering RST one column field names (#219) + * Render disabled checkboxes from Markdown (#217) + * support cmarkgfm>=0.6.0 (#209) +- drop remove-mock.patch, remove-six.patch: upstream + +------------------------------------------------------------------- +Mon Mar 22 10:45:29 UTC 2021 - Ben Greiner + +- Update to 29.0 + * Support cmarkgfm>=0.5.0 (#180) + * Drop support for Python 2 and 3.5 (#188) +- Release 28.0 + * Support Python 3.9 (#176) +- Release 27.0 + * Add support for align attribute rendering Markdown headers + (#173) +- Add remove-mock.patch and remove-six.patch to reduce outdated + dependecies -- gh#pypa/readme_renderer#192 + +-------------------------------------------------------------------- +Mon Aug 3 11:54:02 UTC 2020 - Marketa Calabkova + +- Update to 26.0 + * Fix regression with image width/height attributes + +------------------------------------------------------------------- +Tue Mar 24 16:03:10 UTC 2020 - Antonio Larrosa + +- Do not build the python2 package since Pygments, which is required + only builds a python3 package. + +------------------------------------------------------------------- +Sun Mar 15 07:07:09 UTC 2020 - Tomáš Chvátal + +- Update to 25.0: + * Fix testsuite to work with new pygments +- Remove merged patch pygments25.patch + +------------------------------------------------------------------- +Sat Mar 14 09:44:32 UTC 2020 - Tomáš Chvátal + +- Add patch to fix test fixtures with new pygments: + * pygments25.patch + +------------------------------------------------------------------- +Sun Mar 3 09:43:05 UTC 2019 - John Vandenberg + +- Remove bcond_with test preventing the tests from running +- Remove unnecessary dependency on flake8 +- Increase dependency on bleach to fix test failure +- Add cmarkgfm >= 0.2.0 from upstream + +------------------------------------------------------------------- +Sun Dec 30 11:27:34 UTC 2018 - Thomas Bechtold + +- update to 24.0: + * Remove dependency on ``future``. (#134) + * Breaking change: Move the cmarkgfm dependency into an extra (#130). Users + that want to render Markdown will need to install readme_render[md] instead. + * Unify handling of SVG and other images in RST. (#113) + * Support width and alignment of images in RST (#114) + * Allow . (#105) + * Add specific tests for the raw directive. (#103) + * Include docinfo when rendering rst. (#99) + * Make Python 3 the default lexer for highlighting Python code in Markdown (#97) + * Allow align attribute on

tags (#98) + * Reformat docutils messages into more human-friendly output. (#92) + * Fix incorrect escaping of html entities in pre tags when using markdown. (#89) + * Allow width, height, alt, and align attributes on img tags. (#91) + * Fix check to not report success when there is invalid RST. (#90) + * Allow details and summary tags. (#77) + * Add .pytest_cache to .gitignore. (#85) + * Warn about Markdown content type when checking RST. (#83) + * Update pep8 tox env to use py3.6. (#84) + * Add Pygments-based syntax highlighting for Markdown. (#82) + * Update docs about check to talk about Markdown. (#80) + * Change Github-flavored Markdown identifier from ``gfm`` to ``GFM``. + * Add support for GitHub-flavored Markdown. (#67) + * Switch to cmarkgfm completely for rendering Markdown. (#68) + * Warn about missing long description. (#69) + * Make Github-Flavored Markdown the default variant (#73) + * All renderers now accept arbitrary ``kwargs`` for future-proofing. + * Gracefully handle new exceptions from bleach. + * Fix an issue cleaning plaintext values. + * Fix an issue attempting to clean data that had ```` tags without a href. +- Use %license macro + +------------------------------------------------------------------- +Mon Aug 14 01:35:57 UTC 2017 - toddrme2178@gmail.com + +- Initial version diff --git a/python-readme_renderer.spec b/python-readme_renderer.spec new file mode 100644 index 0000000..1e2ee6c --- /dev/null +++ b/python-readme_renderer.spec @@ -0,0 +1,70 @@ +# +# spec file for package python-readme_renderer +# +# Copyright (c) 2025 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/ +# + + +%{?sle15_python_module_pythons} +Name: python-readme_renderer +Version: 44.0 +Release: 0 +Summary: A library for rendering "readme" descriptions +License: Apache-2.0 +URL: https://github.com/pypa/readme_renderer +Source: https://files.pythonhosted.org/packages/source/r/readme_renderer/readme_renderer-%{version}.tar.gz +# PATCH-FIX-UPSTREAM https://github.com/pypa/readme_renderer/pull/325 fix: update test outputs to fix tests fail +Patch: pygments.patch +BuildRequires: %{python_module Pygments >= 2.5.1} +BuildRequires: %{python_module cmarkgfm >= 0.7.0} +BuildRequires: %{python_module docutils >= 0.13.1} +BuildRequires: %{python_module nh3 >= 0.2.14} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-Pygments >= 2.5.1 +Requires: python-docutils >= 0.13.1 +Requires: python-nh3 >= 0.2.14 +Recommends: python-cmarkgfm >= 0.7.0 +BuildArch: noarch +%python_subpackages + +%description +Readme Renderer is a library that will safely render arbitrary ``README`` files +into HTML. It is designed to be used in Warehouse to render the +long_description for packages. + +%prep +%autosetup -p1 -n readme_renderer-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +export LANG=en_US.UTF-8 +%pytest + +%files %{python_files} +%license LICENSE +%doc CHANGES.rst README.rst +%{python_sitelib}/readme_renderer +%{python_sitelib}/readme_renderer-%{version}.dist-info + +%changelog diff --git a/readme_renderer-43.0.tar.gz b/readme_renderer-43.0.tar.gz new file mode 100644 index 0000000..8c3c30c --- /dev/null +++ b/readme_renderer-43.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1818dd28140813509eeed8d62687f7cd4f7bad90d4db586001c5dc09d4fde311 +size 31768 diff --git a/readme_renderer-44.0.tar.gz b/readme_renderer-44.0.tar.gz new file mode 100644 index 0000000..0d08787 --- /dev/null +++ b/readme_renderer-44.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8712034eabbfa6805cacf1402b4eeb2a73028f72d1166d6f5cb7f9c047c5d1e1 +size 32056