Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-css-parser for openSUSE:Factory checked in at 2023-11-13 22:18:00 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-css-parser (Old) and /work/SRC/openSUSE:Factory/.python-css-parser.new.17445 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-css-parser" Mon Nov 13 22:18:00 2023 rev:7 rq:1124874 version:1.0.10 Changes: -------- --- /work/SRC/openSUSE:Factory/python-css-parser/python-css-parser.changes 2023-05-08 17:24:06.912635372 +0200 +++ /work/SRC/openSUSE:Factory/.python-css-parser.new.17445/python-css-parser.changes 2023-11-13 22:20:38.406992989 +0100 @@ -1,0 +2,6 @@ +Fri Nov 10 12:20:45 UTC 2023 - Dirk Müller <dmuel...@suse.com> + +- update to 1.0.10: + * Fix selector specificity calculation for pseudo-classes + +------------------------------------------------------------------- Old: ---- python-css-parser-1.0.9.tar.gz New: ---- python-css-parser-1.0.10.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-css-parser.spec ++++++ --- /var/tmp/diff_new_pack.hrfmCF/_old 2023-11-13 22:20:38.879010368 +0100 +++ /var/tmp/diff_new_pack.hrfmCF/_new 2023-11-13 22:20:38.883010515 +0100 @@ -18,7 +18,7 @@ %{?sle15_python_module_pythons} Name: python-css-parser -Version: 1.0.9 +Version: 1.0.10 Release: 0 Summary: CSS related utilities (parsing, serialization, etc) for python License: LGPL-3.0-or-later ++++++ python-css-parser-1.0.9.tar.gz -> python-css-parser-1.0.10.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/css-parser-1.0.9/.github/workflows/ci.yml new/css-parser-1.0.10/.github/workflows/ci.yml --- old/css-parser-1.0.9/.github/workflows/ci.yml 2023-05-04 05:53:52.000000000 +0200 +++ new/css-parser-1.0.10/.github/workflows/ci.yml 2023-10-21 11:06:44.000000000 +0200 @@ -12,7 +12,6 @@ strategy: matrix: include: - - { pyver: 2.7, os: ubuntu-latest } - { pyver: 3.8, os: ubuntu-latest } - { pyver: 3.9, os: ubuntu-latest } - { pyver: "3.10", os: ubuntu-latest } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/css-parser-1.0.9/css_parser_tests/test_selector.py new/css-parser-1.0.10/css_parser_tests/test_selector.py --- old/css-parser-1.0.9/css_parser_tests/test_selector.py 2023-05-04 05:53:52.000000000 +0200 +++ new/css-parser-1.0.10/css_parser_tests/test_selector.py 2023-10-21 11:06:44.000000000 +0200 @@ -442,7 +442,7 @@ 'a *': (0, 0, 0, 1), 'a * b': (0, 0, 0, 2), - 'a:hover': (0, 0, 0, 1), + 'a:hover': (0, 0, 1, 1), 'a:first-line': (0, 0, 0, 2), 'a:first-letter': (0, 0, 0, 2), @@ -478,10 +478,15 @@ '#a#a': (0, 2, 0, 0), # e.g. html:id + xml:id '#a#b': (0, 2, 0, 0), '#a #b': (0, 2, 0, 0), + + # pseudo classes + 'p:only-of-type': (0, 0, 1, 1), + ':where(p)': (0, 0, 0, 0), + ':where(p) span': (0, 0, 0, 1), } for text in tests: selector.selectorText = text - self.assertEqual(tests[text], selector.specificity) + self.assertEqual(tests[text], selector.specificity, text) def test_reprANDstr(self): "Selector.__repr__(), .__str__()" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/css-parser-1.0.9/src/css_parser/css/cssfontfacerule.py new/css-parser-1.0.10/src/css_parser/css/cssfontfacerule.py --- old/css-parser-1.0.9/src/css_parser/css/cssfontfacerule.py 2023-05-04 05:53:52.000000000 +0200 +++ new/css-parser-1.0.10/src/css_parser/css/cssfontfacerule.py 2023-10-21 11:06:44.000000000 +0200 @@ -124,8 +124,7 @@ blockendonly=True, separateEnd=True) - val, type_ = self._tokenvalue(braceorEOFtoken),\ - self._type(braceorEOFtoken) + val, type_ = self._tokenvalue(braceorEOFtoken), self._type(braceorEOFtoken) if val != '}' and type_ != 'EOF': ok = False self._log.error('CSSFontFaceRule: No "}" after style ' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/css-parser-1.0.9/src/css_parser/css/csspagerule.py new/css-parser-1.0.10/src/css_parser/css/csspagerule.py --- old/css-parser-1.0.9/src/css_parser/css/csspagerule.py 2023-05-04 05:53:52.000000000 +0200 +++ new/css-parser-1.0.10/src/css_parser/css/csspagerule.py 2023-10-21 11:06:44.000000000 +0200 @@ -173,8 +173,7 @@ self._log.error( 'CSSPageRule selectorText: No IDENT found.', token) else: - ival, ityp = self._tokenvalue(identtoken),\ - self._type(identtoken) + ival, ityp = self._tokenvalue(identtoken), self._type(identtoken) if self._prods.IDENT != ityp: self._log.error('CSSPageRule selectorText: Expected ' 'IDENT but found: %r' % ival, token) @@ -327,8 +326,7 @@ selok, newselseq, specificity = self.__parseSelectorText(selectortokens) ok = ok and selok - val, type_ = self._tokenvalue(braceorEOFtoken),\ - self._type(braceorEOFtoken) + val, type_ = self._tokenvalue(braceorEOFtoken), self._type(braceorEOFtoken) if val != '}' and type_ != 'EOF': ok = False diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/css-parser-1.0.9/src/css_parser/css/cssstylerule.py new/css-parser-1.0.10/src/css_parser/css/cssstylerule.py --- old/css-parser-1.0.9/src/css_parser/css/cssstylerule.py 2023-05-04 05:53:52.000000000 +0200 +++ new/css-parser-1.0.10/src/css_parser/css/cssstylerule.py 2023-10-21 11:06:44.000000000 +0200 @@ -144,8 +144,7 @@ self._valuestr(cssText)) else: braceorEOFtoken = styletokens.pop() - val, typ = self._tokenvalue(braceorEOFtoken),\ - self._type(braceorEOFtoken) + val, typ = self._tokenvalue(braceorEOFtoken), self._type(braceorEOFtoken) if val != '}' and typ != 'EOF': ok = False self._log.error('CSSStyleRule: No "}" after style ' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/css-parser-1.0.9/src/css_parser/css/selector.py new/css-parser-1.0.10/src/css_parser/css/selector.py --- old/css-parser-1.0.9/src/css_parser/css/selector.py 2023-05-04 05:53:52.000000000 +0200 +++ new/css-parser-1.0.10/src/css_parser/css/selector.py 2023-10-21 11:06:44.000000000 +0200 @@ -368,10 +368,10 @@ if not context or context == 'negation': if 'id' == typ: new['specificity'][1] += 1 - elif 'class' == typ or '[' == val: - new['specificity'][2] += 1 - elif typ in ('type-selector', 'negation-type-selector', - 'pseudo-element'): + elif '[' == val or typ in ('class', 'pseudo-class'): + if typ != 'pseudo-class' or val != ':where(': + new['specificity'][2] += 1 + elif typ in ('type-selector', 'negation-type-selector', 'pseudo-element'): new['specificity'][3] += 1 if not context and typ in ('type-selector', 'universal'): # define element @@ -470,8 +470,7 @@ /* occur only in the last simple_selector_sequence. */ """ context = new['context'][-1] - val, typ = self._tokenvalue(token, normalize=True),\ - self._type(token) + val, typ = self._tokenvalue(token, normalize=True), self._type(token) if 'pseudo' in expected: if val in (':first-line', ':first-letter', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/css-parser-1.0.9/src/css_parser/version.py new/css-parser-1.0.10/src/css_parser/version.py --- old/css-parser-1.0.9/src/css_parser/version.py 2023-05-04 05:53:52.000000000 +0200 +++ new/css-parser-1.0.10/src/css_parser/version.py 2023-10-21 11:06:44.000000000 +0200 @@ -2,7 +2,7 @@ # vim:fileencoding=utf-8 # License: LGPLv3 Copyright: 2018, Kovid Goyal <kovid at kovidgoyal.net> -version = (1, 0, 9) +version = (1, 0, 10) VERSION = '.'.join(map(str, version)) __version__ = '%s $Id$' % VERSION