diff --git a/Pygments-2.2.0.tar.gz b/Pygments-2.2.0.tar.gz deleted file mode 100644 index 8c50696..0000000 --- a/Pygments-2.2.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:dbae1046def0efb574852fab9e90209b23f556367b5a320c0bcb871c77c3e8cc -size 2113944 diff --git a/Pygments-2.3.1.tar.gz b/Pygments-2.3.1.tar.gz new file mode 100644 index 0000000..f2bfe5b --- /dev/null +++ b/Pygments-2.3.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5ffada19f6203563680669ee7f53b64dabbeb100eb51b61996085e99c03b284a +size 3124216 diff --git a/denose.patch b/denose.patch index e86dc95..eb5e235 100644 --- a/denose.patch +++ b/denose.patch @@ -1,14 +1,17 @@ ---- a/tests/run.py -+++ b/tests/run.py -@@ -16,18 +16,13 @@ from __future__ import print_function - +Index: Pygments-2.3.1/tests/run.py +=================================================================== +--- Pygments-2.3.1.orig/tests/run.py ++++ Pygments-2.3.1/tests/run.py +@@ -17,6 +17,7 @@ from __future__ import print_function import os import sys + import warnings +import unittest # only find tests in this directory if os.path.dirname(__file__): - os.chdir(os.path.dirname(__file__)) +@@ -30,12 +31,6 @@ warnings.filterwarnings("error", module= + category=DeprecationWarning) -try: @@ -20,14 +23,16 @@ # make sure the current source is first on sys.path sys.path.insert(0, '..') -@@ -47,4 +42,4 @@ else: +@@ -55,4 +50,4 @@ else: print('Pygments test suite running (Python %s)...' % sys.version.split()[0], file=sys.stderr) -nose.main() +unittest.main() ---- a/tests/support.py -+++ b/tests/support.py +Index: Pygments-2.3.1/tests/support.py +=================================================================== +--- Pygments-2.3.1.orig/tests/support.py ++++ Pygments-2.3.1/tests/support.py @@ -5,7 +5,7 @@ Support for Pygments tests import os @@ -37,8 +42,10 @@ def location(mod_name): ---- a/tests/test_cmdline.py -+++ b/tests/test_cmdline.py +Index: Pygments-2.3.1/tests/test_cmdline.py +=================================================================== +--- Pygments-2.3.1.orig/tests/test_cmdline.py ++++ Pygments-2.3.1/tests/test_cmdline.py @@ -143,7 +143,7 @@ class CmdLineTest(unittest.TestCase): def test_h_opt(self): @@ -202,7 +209,9 @@ # same with -v: should reraise the exception try: +Index: Pygments-2.3.1/tests/__init__.py +=================================================================== --- /dev/null -+++ b/tests/__init__.py ++++ Pygments-2.3.1/tests/__init__.py @@ -0,0 +1 @@ + diff --git a/python-Pygments.changes b/python-Pygments.changes index 73d7962..c8a15d2 100644 --- a/python-Pygments.changes +++ b/python-Pygments.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Mon Feb 11 11:10:41 UTC 2019 - Tomáš Chvátal + +- Update to 2.3.1: + * Update lexers + * Minimum Python versions changed to 2.7 and 3.5 + * Added support for Python 3.7 generator changes (PR#772) + * Fix incorrect token type in SCSS for single-quote strings (#1322) + * Use `terminal256` formatter if `TERM` contains `256` (PR#666) + * Fix incorrect handling of GitHub style fences in Markdown (PR#741, #1389) + * Fix `%a` not being highlighted in Python3 strings (PR#727) +- Drop patch python_37.diff which was merged upstream +- Refresh patch denose.patch + ------------------------------------------------------------------- Thu Jan 10 01:20:08 UTC 2019 - Matej Cepl diff --git a/python-Pygments.spec b/python-Pygments.spec index a349114..84bc573 100644 --- a/python-Pygments.spec +++ b/python-Pygments.spec @@ -18,19 +18,18 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-Pygments -Version: 2.2.0 +Version: 2.3.1 Release: 0 Summary: Pygments is a syntax highlighting package written in Python License: BSD-2-Clause Group: Development/Languages/Python URL: http://pygments.org Source: https://files.pythonhosted.org/packages/source/P/Pygments/Pygments-%{version}.tar.gz -Patch0: python_37.diff Patch1: denose.patch -BuildRequires: %{python_module setuptools} # We need pytest just because of its test runner, it seems even # python3 stdlib unittest runner doesn't work BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-setuptools @@ -59,6 +58,7 @@ source code. Highlights are: %prep %setup -q -n Pygments-%{version} %autopatch -p1 + # Remove non-oss licensed files, see bnc# 760344 rm tests/examplefiles/{Sorting,test}.mod diff --git a/python_37.diff b/python_37.diff deleted file mode 100644 index 3061344..0000000 --- a/python_37.diff +++ /dev/null @@ -1,34 +0,0 @@ -diff -r 7941677dc77d pygments/lexers/lisp.py ---- a/pygments/lexers/lisp.py Mon Mar 13 19:16:03 2017 +0000 -+++ b/pygments/lexers/lisp.py Wed Jul 04 18:03:07 2018 +0200 -@@ -2327,13 +2327,13 @@ - token = Name.Function if token == Literal else token - yield index, token, value - -- raise StopIteration -+ return - - def _process_signature(self, tokens): - for index, token, value in tokens: - if token == Literal and value == '}': - yield index, Punctuation, value -- raise StopIteration -+ return - elif token in (Literal, Name.Function): - token = Name.Variable if value.istitle() else Keyword.Type - yield index, token, value -diff -r 7941677dc77d pygments/lexers/sql.py ---- a/pygments/lexers/sql.py Mon Mar 13 19:16:03 2017 +0000 -+++ b/pygments/lexers/sql.py Wed Jul 04 18:03:07 2018 +0200 -@@ -347,7 +347,10 @@ - # Emit the output lines - out_token = Generic.Output - while 1: -- line = next(lines) -+ try: -+ line = next(lines) -+ except StopIteration: -+ return - mprompt = re_prompt.match(line) - if mprompt is not None: - # push the line back to have it processed by the prompt