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 2022-01-26 21:26:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-css-parser (Old)
and /work/SRC/openSUSE:Factory/.python-css-parser.new.1938 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-css-parser"
Wed Jan 26 21:26:58 2022 rev:4 rq:949148 version:1.0.7
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-css-parser/python-css-parser.changes
2020-11-17 21:26:25.809445939 +0100
+++
/work/SRC/openSUSE:Factory/.python-css-parser.new.1938/python-css-parser.changes
2022-01-26 21:27:40.153709131 +0100
@@ -1,0 +2,14 @@
+Tue Jan 25 22:45:54 UTC 2022 - Matej Cepl <[email protected]>
+
+- Update to version 1.0.7:
+ - Fix incorrect license information in one file from a
+ copy/paste
+ - Use the badge from GA
+ - test: relax assertRaisesMsg to match longer strings
+ - Add a two level import from above test
+ - Add python 3.10 to the CI matrix
+ - version 1.0.7
+- Add relax_error_msg_check.patch replacing non-standard assert
+ methods with the standard ones (gh#ebook-utils/css-parser#12).
+
+-------------------------------------------------------------------
Old:
----
python-css-parser-1.0.6.tar.gz
New:
----
python-css-parser-1.0.7.tar.gz
relax_error_msg_check.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-css-parser.spec ++++++
--- /var/tmp/diff_new_pack.6RYUCw/_old 2022-01-26 21:27:40.701705353 +0100
+++ /var/tmp/diff_new_pack.6RYUCw/_new 2022-01-26 21:27:40.705705325 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-css-parser
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,13 +18,16 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-css-parser
-Version: 1.0.6
+Version: 1.0.7
Release: 0
Summary: CSS related utilities (parsing, serialization, etc) for python
License: LGPL-3.0-or-later
Group: Development/Languages/Python
URL: https://github.com/ebook-utils/css-parser
Source:
https://github.com/ebook-utils/css-parser/archive/v%{version}/%{name}-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM relax_error_msg_check.patch gh#ebook-utils/css-parser#12
[email protected]
+# instead of home-made assert methods with the ones from the standard library
+Patch0: relax_error_msg_check.patch
BuildRequires: %{python_module chardet}
BuildRequires: %{python_module setuptools}
Requires: python-chardet
@@ -46,7 +49,8 @@
local to each file
%prep
-%setup -q -n css-parser-%{version}
+%autosetup -p1 -n css-parser-%{version}
+
sed -i "1d"
src/css_parser/{parse,codec,sac,serialize,scripts/csscapture,_codec2,errorhandler,scripts/cssparse,_codec3,scripts/csscombine,tokenize2,version,encutils/__init__,__init__}.py
# Fix non-executable scripts
%build
++++++ python-css-parser-1.0.6.tar.gz -> python-css-parser-1.0.7.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/css-parser-1.0.6/.appveyor.yml
new/css-parser-1.0.7/.appveyor.yml
--- old/css-parser-1.0.6/.appveyor.yml 2020-10-28 04:30:43.000000000 +0100
+++ new/css-parser-1.0.7/.appveyor.yml 1970-01-01 01:00:00.000000000 +0100
@@ -1,10 +0,0 @@
-os: Visual Studio 2015
-
-build_script:
- - python.exe --version
- - pip.exe install chardet
- - C:/Python37-x64/python.exe -m pip install chardet
-
-test_script:
- - python.exe setup.py test
- - C:/Python37-x64/python.exe setup.py test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/css-parser-1.0.6/.github/workflows/ci.yml
new/css-parser-1.0.7/.github/workflows/ci.yml
--- old/css-parser-1.0.6/.github/workflows/ci.yml 1970-01-01
01:00:00.000000000 +0100
+++ new/css-parser-1.0.7/.github/workflows/ci.yml 2021-12-11
03:54:31.000000000 +0100
@@ -0,0 +1,42 @@
+name: CI
+on: [push, pull_request]
+env:
+ CI: 'true'
+ LC_ALL: en_US.UTF-8
+ LANG: en_US.UTF-8
+
+jobs:
+ test:
+ name: Test on ${{ matrix.os }} Python ${{ matrix.pyver }})
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ include:
+ - { pyver: 2.7, os: ubuntu-latest }
+ - { pyver: 3.6, os: ubuntu-latest }
+ - { pyver: 3.8, os: ubuntu-latest }
+ - { pyver: 3.9, os: ubuntu-latest }
+ - { pyver: "3.10", os: ubuntu-latest }
+
+ - { pyver: 3.8, os: macos-latest }
+ - { pyver: 3.8, os: windows-latest }
+
+ steps:
+ - name: Checkout source code
+ uses: actions/checkout@master
+ with:
+ fetch-depth: 10
+
+ - name: Set up Python ${{ matrix.pyver }}
+ uses: actions/setup-python@master
+ with:
+ python-version: ${{ matrix.pyver }}
+
+ - name: Install dependencies
+ run: python -m pip install chardet flake8
+
+ - name: Check code quality
+ run: flake8 src
+
+ - name: Run tests
+ run: python run_tests.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/css-parser-1.0.6/.travis.yml
new/css-parser-1.0.7/.travis.yml
--- old/css-parser-1.0.6/.travis.yml 2020-10-28 04:30:43.000000000 +0100
+++ new/css-parser-1.0.7/.travis.yml 1970-01-01 01:00:00.000000000 +0100
@@ -1,25 +0,0 @@
-env:
- global:
- - PYTHONHASHSEED=random
-language: python
-dist: xenial
-matrix:
- include:
- - os: linux
- python: 2.7
- - os: linux
- python: 3.6
- - os: osx
- language: generic
- # - os: windows
- # language: sh
- # python: "3.7"
- # before_install:
- # - choco install python3
- # - export PATH="/c/Python37:/c/Python37/Scripts:$PATH"
- # - python -m pip install --upgrade pip wheel
-install:
- pip install chardet flake8
-script:
- - python setup.py test
- - flake8 src
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/css-parser-1.0.6/README.md
new/css-parser-1.0.7/README.md
--- old/css-parser-1.0.6/README.md 2020-10-28 04:30:43.000000000 +0100
+++ new/css-parser-1.0.7/README.md 2021-12-11 03:54:31.000000000 +0100
@@ -1,8 +1,7 @@
css-parser
================
-[](https://travis-ci.org/ebook-utils/css-parser)
-[](https://ci.appveyor.com/project/kovidgoyal/css-parser)
+[](https://github.com/ebook-utils/css-parser/actions?query=workflow%3ACI)
A fork of the cssutils project based on version 1.0.2.
This fork includes general bug fixes and extensions
@@ -14,5 +13,5 @@
modules required. All required modifications
are handled local to each file
-For more information on usage, please see the cssutils
-documentation
+For more information on usage, please see the
+[cssutils documentation](https://cssutils.readthedocs.io).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/css-parser-1.0.6/css_parser_tests/basetest.py
new/css-parser-1.0.7/css_parser_tests/basetest.py
--- old/css-parser-1.0.6/css_parser_tests/basetest.py 2020-10-28
04:30:43.000000000 +0100
+++ new/css-parser-1.0.7/css_parser_tests/basetest.py 2021-12-11
03:54:31.000000000 +0100
@@ -149,21 +149,7 @@
else:
self.fail("%s did not raise %s" % (callsig, exception))
- def assertRaisesMsg(self, excClass, msg, callableObj, *args, **kwargs):
- """
- Just like unittest.TestCase.assertRaises,
- but checks that the message is right too.
-
- Usage::
-
- self.assertRaisesMsg(
- MyException, "Exception message",
- my_function, (arg1, arg2)
- )
-
- from
- http://www.nedbatchelder.com/blog/200609.html#e20060905T064418
- """
+ def _assertRaisesMsgSubstring(self, excClass, msg, substring_match,
callableObj, *args, **kwargs):
try:
callableObj(*args, **kwargs)
except excClass as exc:
@@ -171,7 +157,7 @@
if not msg:
# No message provided: any message is fine.
return
- elif excMsg == msg:
+ elif (msg in excMsg if substring_match else msg == excMsg):
# Message provided, and we got the right message: passes.
return
else:
@@ -189,6 +175,29 @@
excName
)
+ def assertRaisesMsg(self, excClass, msg, callableObj, *args, **kwargs):
+ """
+ Just like unittest.TestCase.assertRaises,
+ but checks that the message is right too.
+
+ Usage::
+
+ self.assertRaisesMsg(
+ MyException, "Exception message",
+ my_function, arg1, arg2,
+ kwarg1=val, kwarg2=val)
+
+ from
+ http://www.nedbatchelder.com/blog/200609.html#e20060905T064418
+ """
+ return self._assertRaisesMsgSubstring(excClass, msg, False,
callableObj, *args, **kwargs)
+
+ def assertRaisesMsgSubstring(self, excClass, msg, callableObj, *args,
**kwargs):
+ """
+ Just like assertRaisesMsg, but looks for substring in the message.
+ """
+ return self._assertRaisesMsgSubstring(excClass, msg, True,
callableObj, *args, **kwargs)
+
def do_equal_p(self, tests, att='cssText', debug=False, raising=True):
"""
if raising self.p is used for parsing, else self.pf
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/css-parser-1.0.6/css_parser_tests/test_cssutils.py
new/css-parser-1.0.7/css_parser_tests/test_cssutils.py
--- old/css-parser-1.0.6/css_parser_tests/test_cssutils.py 2020-10-28
04:30:43.000000000 +0100
+++ new/css-parser-1.0.7/css_parser_tests/test_cssutils.py 2021-12-11
03:54:31.000000000 +0100
@@ -47,6 +47,18 @@
'a/test.jpg'
)
+ results = [('a/test.css', '@import url(../test.css);'), ('test.css',
'p { background-image: url(a/test.jpg) }')]
+
+ def fetch3(url):
+ e, text = results.pop(0)
+ self.assertEqual(e, url)
+ return None, text
+
+ p = css_parser.CSSParser(fetcher=fetch3)
+ s = p.parseString("@import url('../test.css'); a { background-image:
url(../test.jpg); }", href='a/b/test.css')
+ style =
s.cssRules[0].styleSheet.cssRules[0].styleSheet.cssRules[0].style
+
self.assertEqual(style.getPropertyCSSValue('background-image')[0].absoluteUri,
'a/test.jpg')
+
def test_parseString(self):
"css_parser.parseString()"
s = css_parser.parseString(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/css-parser-1.0.6/css_parser_tests/test_property.py
new/css-parser-1.0.7/css_parser_tests/test_property.py
--- old/css-parser-1.0.6/css_parser_tests/test_property.py 2020-10-28
04:30:43.000000000 +0100
+++ new/css-parser-1.0.7/css_parser_tests/test_property.py 2021-12-11
03:54:31.000000000 +0100
@@ -162,8 +162,8 @@
"Property.literalname"
p = css_parser.css.property.Property(r'c\olor', 'red')
self.assertEqual(r'c\olor', p.literalname)
- self.assertRaisesMsg(AttributeError, "can't set attribute",
p.__setattr__,
- 'literalname', 'color')
+ self.assertRaisesMsgSubstring(AttributeError, "can't set attribute",
p.__setattr__,
+ 'literalname', 'color')
def test_validate(self):
"Property.valid"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/css-parser-1.0.6/css_parser_tests/test_selector.py
new/css-parser-1.0.7/css_parser_tests/test_selector.py
--- old/css-parser-1.0.6/css_parser_tests/test_selector.py 2020-10-28
04:30:43.000000000 +0100
+++ new/css-parser-1.0.7/css_parser_tests/test_selector.py 2021-12-11
03:54:31.000000000 +0100
@@ -412,7 +412,7 @@
# readonly
def _set(): selector.specificity = 1
- self.assertRaisesMsg(AttributeError, "can't set attribute", _set)
+ self.assertRaisesMsgSubstring(AttributeError, "can't set attribute",
_set)
tests = {
'*': (0, 0, 0, 0),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/css-parser-1.0.6/css_parser_tests/test_selectorlist.py
new/css-parser-1.0.7/css_parser_tests/test_selectorlist.py
--- old/css-parser-1.0.6/css_parser_tests/test_selectorlist.py 2020-10-28
04:30:43.000000000 +0100
+++ new/css-parser-1.0.7/css_parser_tests/test_selectorlist.py 2021-12-11
03:54:31.000000000 +0100
@@ -11,6 +11,7 @@
class SelectorListTestCase(basetest.BaseTestCase):
def setUp(self):
+ basetest.BaseTestCase.setUp(self)
self.r = SelectorList()
def test_init(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/css-parser-1.0.6/run_tests.py
new/css-parser-1.0.7/run_tests.py
--- old/css-parser-1.0.6/run_tests.py 2020-10-28 04:30:43.000000000 +0100
+++ new/css-parser-1.0.7/run_tests.py 2021-12-11 03:54:31.000000000 +0100
@@ -1,10 +1,12 @@
#!/usr/bin/env python
# vim:fileencoding=utf-8
-# License: Apache 2.0 Copyright: 2017, Kovid Goyal <kovid at kovidgoyal.net>
+# License: LGPLv3 Copyright: 2017, Kovid Goyal <kovid at kovidgoyal.net>
-from __future__ import absolute_import, division, print_function,
unicode_literals
+from __future__ import (absolute_import, division, print_function,
+ unicode_literals)
import importlib
+import logging
import os
import sys
import unittest
@@ -72,6 +74,7 @@
def run_tests(test_names=()):
sys.path = [base, os.path.join(base, 'src')] + sys.path
+ import css_parser
tests = find_tests()
suites = []
for name in test_names:
@@ -85,6 +88,7 @@
tests = unittest.TestSuite(suites) if suites else tests
r = unittest.TextTestRunner
+ css_parser.log.setLevel(logging.CRITICAL)
result = r().run(tests)
if not result.wasSuccessful():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/css-parser-1.0.6/src/css_parser/version.py
new/css-parser-1.0.7/src/css_parser/version.py
--- old/css-parser-1.0.6/src/css_parser/version.py 2020-10-28
04:30:43.000000000 +0100
+++ new/css-parser-1.0.7/src/css_parser/version.py 2021-12-11
03:54:31.000000000 +0100
@@ -2,7 +2,7 @@
# vim:fileencoding=utf-8
# License: LGPLv3 Copyright: 2018, Kovid Goyal <kovid at kovidgoyal.net>
-version = (1, 0, 6)
+version = (1, 0, 7)
VERSION = '.'.join(map(str, version))
__version__ = '%s $Id$' % VERSION
++++++ relax_error_msg_check.patch ++++++
++++ 1286 lines (skipped)