Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-cssutils for openSUSE:Factory
checked in at 2023-06-18 23:07:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-cssutils (Old)
and /work/SRC/openSUSE:Factory/.python-cssutils.new.15902 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-cssutils"
Sun Jun 18 23:07:48 2023 rev:33 rq:1093642 version:2.7.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-cssutils/python-cssutils.changes
2022-09-14 13:45:28.133967781 +0200
+++
/work/SRC/openSUSE:Factory/.python-cssutils.new.15902/python-cssutils.changes
2023-06-18 23:07:48.373411827 +0200
@@ -1,0 +2,9 @@
+Sun Jun 11 09:08:05 UTC 2023 - Dirk Müller <[email protected]>
+
+- update to 2.7.0:
+ * Updated deprecated usage of ``cgi`` module.
+ * Updated deprecated setup/teardown from ``nose`` in
+ tests.
+ * Other miscellaneous cleanup and packaging updates.
+
+-------------------------------------------------------------------
Old:
----
cssutils-2.6.0.tar.gz
New:
----
cssutils-2.7.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-cssutils.spec ++++++
--- /var/tmp/diff_new_pack.7ZjfKO/_old 2023-06-18 23:07:49.017415681 +0200
+++ /var/tmp/diff_new_pack.7ZjfKO/_new 2023-06-18 23:07:49.021415705 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-cssutils
#
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-cssutils
-Version: 2.6.0
+Version: 2.7.0
Release: 0
Summary: A CSS Cascading Style Sheets library for Python
License: LGPL-3.0-or-later
++++++ cssutils-2.6.0.tar.gz -> cssutils-2.7.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/.coveragerc
new/cssutils-2.7.0/.coveragerc
--- old/cssutils-2.6.0/.coveragerc 2022-08-22 04:25:33.000000000 +0200
+++ new/cssutils-2.7.0/.coveragerc 2023-06-09 03:46:33.000000000 +0200
@@ -2,7 +2,8 @@
omit =
# leading `*/` for pytest-dev/pytest-cov#456
*/.tox/*
- */pep517-build-env-*
+disable_warnings =
+ couldnt-parse
[report]
show_missing = True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/.flake8 new/cssutils-2.7.0/.flake8
--- old/cssutils-2.6.0/.flake8 2022-08-22 04:25:33.000000000 +0200
+++ new/cssutils-2.7.0/.flake8 1970-01-01 01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
-[flake8]
-max-line-length = 88
-
-# jaraco/skeleton#34
-max-complexity = 10
-
-extend-ignore =
- # Black creates whitespace before colon
- E203
- # Ignore long lines for now
- E501
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/.github/workflows/main.yml
new/cssutils-2.7.0/.github/workflows/main.yml
--- old/cssutils-2.6.0/.github/workflows/main.yml 2022-08-22
04:25:33.000000000 +0200
+++ new/cssutils-2.7.0/.github/workflows/main.yml 2023-06-09
03:46:33.000000000 +0200
@@ -2,36 +2,104 @@
on: [push, pull_request]
+permissions:
+ contents: read
+
+env:
+ # Environment variables to support color support (jaraco/skeleton#66):
+ # Request colored output from CLI tools supporting it. Different tools
+ # interpret the value differently. For some, just being set is sufficient.
+ # For others, it must be a non-zero integer. For yet others, being set
+ # to a non-empty value is sufficient. For tox, it must be one of
+ # <blank>, 0, 1, false, no, off, on, true, yes. The only enabling value
+ # in common is "1".
+ FORCE_COLOR: 1
+ # MyPy's color enforcement (must be a non-zero number)
+ MYPY_FORCE_COLOR: -42
+ # Recognized by the `py` package, dependency of `pytest` (must be "1")
+ PY_COLORS: 1
+ # Make tox-wrapped tools see color requests
+ TOX_TESTENV_PASSENV: >-
+ FORCE_COLOR
+ MYPY_FORCE_COLOR
+ NO_COLOR
+ PY_COLORS
+ PYTEST_THEME
+ PYTEST_THEME_MODE
+
+ # Suppress noisy pip warnings
+ PIP_DISABLE_PIP_VERSION_CHECK: 'true'
+ PIP_NO_PYTHON_VERSION_WARNING: 'true'
+ PIP_NO_WARN_SCRIPT_LOCATION: 'true'
+
+ # Disable the spinner, noise in GHA; TODO(webknjaz): Fix this upstream
+ # Must be "1".
+ TOX_PARALLEL_NO_SPINNER: 1
+
+
jobs:
test:
strategy:
matrix:
python:
- - 3.7
- - '3.10'
- - '3.11'
+ - "3.7"
+ - "3.11"
+ - "3.12"
+ # Workaround for actions/setup-python#508
+ dev:
+ - -dev
platform:
- ubuntu-latest
- macos-latest
- windows-latest
+ include:
+ - python: "3.8"
+ platform: ubuntu-latest
+ - python: "3.9"
+ platform: ubuntu-latest
+ - python: "3.10"
+ platform: ubuntu-latest
+ - python: pypy3.9
+ platform: ubuntu-latest
runs-on: ${{ matrix.platform }}
+ continue-on-error: ${{ matrix.python == '3.12' }}
+ steps:
+ - uses: actions/checkout@v3
+ - name: Setup Python
+ uses: actions/setup-python@v4
+ with:
+ python-version: ${{ matrix.python }}${{ matrix.dev }}
+ - name: Install tox
+ run: |
+ python -m pip install tox
+ - name: Run tests
+ run: tox
+
+ docs:
+ runs-on: ubuntu-latest
+ env:
+ TOXENV: docs
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
- python-version: ${{ matrix.python }}-dev
+ python-version: ${{ matrix.python }}${{ matrix.dev }}
- name: Install tox
run: |
python -m pip install tox
- name: Run tests
run: tox
+ # workaround for #36
+ continue-on-error: true
check: # This job does nothing and is only used for the branch protection
if: always()
needs:
- test
+ # workaround for #36
+ # - docs
runs-on: ubuntu-latest
@@ -42,6 +110,8 @@
jobs: ${{ toJSON(needs) }}
release:
+ permissions:
+ contents: write
needs:
- check
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
@@ -52,7 +122,7 @@
- name: Setup Python
uses: actions/setup-python@v4
with:
- python-version: "3.11-dev"
+ python-version: 3.11-dev
- name: Install tox
run: |
python -m pip install tox
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/.readthedocs.yaml
new/cssutils-2.7.0/.readthedocs.yaml
--- old/cssutils-2.6.0/.readthedocs.yaml 1970-01-01 01:00:00.000000000
+0100
+++ new/cssutils-2.7.0/.readthedocs.yaml 2023-06-09 03:46:33.000000000
+0200
@@ -0,0 +1,12 @@
+version: 2
+python:
+ install:
+ - path: .
+ extra_requirements:
+ - docs
+
+# required boilerplate readthedocs/readthedocs.org#10401
+build:
+ os: ubuntu-22.04
+ tools:
+ python: "3"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/.readthedocs.yml
new/cssutils-2.7.0/.readthedocs.yml
--- old/cssutils-2.6.0/.readthedocs.yml 2022-08-22 04:25:33.000000000 +0200
+++ new/cssutils-2.7.0/.readthedocs.yml 1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-version: 2
-python:
- install:
- - path: .
- extra_requirements:
- - docs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/CHANGES.rst
new/cssutils-2.7.0/CHANGES.rst
--- old/cssutils-2.6.0/CHANGES.rst 2022-08-22 04:25:33.000000000 +0200
+++ new/cssutils-2.7.0/CHANGES.rst 2023-06-09 03:46:33.000000000 +0200
@@ -1,3 +1,12 @@
+v2.7.0
+======
+
+#35: Updated deprecated usage of ``cgi`` module.
+
+#34: Updated deprecated setup/teardown from ``nose`` in tests.
+
+Other miscellaneous cleanup and packaging updates.
+
v2.6.0
======
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/PKG-INFO new/cssutils-2.7.0/PKG-INFO
--- old/cssutils-2.6.0/PKG-INFO 2022-08-22 04:26:05.044268800 +0200
+++ new/cssutils-2.7.0/PKG-INFO 2023-06-09 03:46:59.229071100 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: cssutils
-Version: 2.6.0
+Version: 2.7.0
Summary: A CSS Cascading Style Sheets library for Python
Home-page: https://github.com/jaraco/cssutils
Author: Christof Hoeke
@@ -23,17 +23,18 @@
License-File: COPYING.LESSER
.. image:: https://img.shields.io/pypi/v/cssutils.svg
- :target: `PyPI link`_
+ :target: https://pypi.org/project/cssutils
.. image:: https://img.shields.io/pypi/pyversions/cssutils.svg
- :target: `PyPI link`_
-
-.. _PyPI link: https://pypi.org/project/cssutils
.. image:: https://github.com/jaraco/cssutils/workflows/tests/badge.svg
:target:
https://github.com/jaraco/cssutils/actions?query=workflow%3A%22tests%22
:alt: tests
+.. image::
https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json
+ :target: https://github.com/astral-sh/ruff
+ :alt: Ruff
+
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
:alt: Code style: Black
@@ -41,7 +42,7 @@
.. image:: https://readthedocs.org/projects/cssutils/badge/?version=latest
:target: https://cssutils.readthedocs.io/en/latest/?badge=latest
-.. image:: https://img.shields.io/badge/skeleton-2022-informational
+.. image:: https://img.shields.io/badge/skeleton-2023-informational
:target: https://blog.jaraco.com/skeleton
.. image:: https://tidelift.com/badges/package/pypi/cssutils
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/README.rst
new/cssutils-2.7.0/README.rst
--- old/cssutils-2.6.0/README.rst 2022-08-22 04:25:33.000000000 +0200
+++ new/cssutils-2.7.0/README.rst 2023-06-09 03:46:33.000000000 +0200
@@ -1,15 +1,16 @@
.. image:: https://img.shields.io/pypi/v/cssutils.svg
- :target: `PyPI link`_
+ :target: https://pypi.org/project/cssutils
.. image:: https://img.shields.io/pypi/pyversions/cssutils.svg
- :target: `PyPI link`_
-
-.. _PyPI link: https://pypi.org/project/cssutils
.. image:: https://github.com/jaraco/cssutils/workflows/tests/badge.svg
:target:
https://github.com/jaraco/cssutils/actions?query=workflow%3A%22tests%22
:alt: tests
+.. image::
https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json
+ :target: https://github.com/astral-sh/ruff
+ :alt: Ruff
+
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
:alt: Code style: Black
@@ -17,7 +18,7 @@
.. image:: https://readthedocs.org/projects/cssutils/badge/?version=latest
:target: https://cssutils.readthedocs.io/en/latest/?badge=latest
-.. image:: https://img.shields.io/badge/skeleton-2022-informational
+.. image:: https://img.shields.io/badge/skeleton-2023-informational
:target: https://blog.jaraco.com/skeleton
.. image:: https://tidelift.com/badges/package/pypi/cssutils
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/cssutils/css/colors.py
new/cssutils-2.7.0/cssutils/css/colors.py
--- old/cssutils-2.6.0/cssutils/css/colors.py 2022-08-22 04:25:33.000000000
+0200
+++ new/cssutils-2.7.0/cssutils/css/colors.py 2023-06-09 03:46:33.000000000
+0200
@@ -33,14 +33,11 @@
'aqua': (0, 255, 255, 1.0),
'aliceblue': (240, 248, 255, 1.0),
'antiquewhite': (250, 235, 215, 1.0),
- 'aqua': (0, 255, 255, 1.0),
'aquamarine': (127, 255, 212, 1.0),
'azure': (240, 255, 255, 1.0),
'beige': (245, 245, 220, 1.0),
'bisque': (255, 228, 196, 1.0),
- 'black': (0, 0, 0, 1.0),
'blanchedalmond': (255, 235, 205, 1.0),
- 'blue': (0, 0, 255, 1.0),
'blueviolet': (138, 43, 226, 1.0),
'brown': (165, 42, 42, 1.0),
'burlywood': (222, 184, 135, 1.0),
@@ -79,13 +76,10 @@
'firebrick': (178, 34, 34, 1.0),
'floralwhite': (255, 250, 240, 1.0),
'forestgreen': (34, 139, 34, 1.0),
- 'fuchsia': (255, 0, 255, 1.0),
'gainsboro': (220, 220, 220, 1.0),
'ghostwhite': (248, 248, 255, 1.0),
'gold': (255, 215, 0, 1.0),
'goldenrod': (218, 165, 32, 1.0),
- 'gray': (128, 128, 128, 1.0),
- 'green': (0, 128, 0, 1.0),
'greenyellow': (173, 255, 47, 1.0),
'grey': (128, 128, 128, 1.0),
'honeydew': (240, 255, 240, 1.0),
@@ -113,11 +107,9 @@
'lightslategrey': (119, 136, 153, 1.0),
'lightsteelblue': (176, 196, 222, 1.0),
'lightyellow': (255, 255, 224, 1.0),
- 'lime': (0, 255, 0, 1.0),
'limegreen': (50, 205, 50, 1.0),
'linen': (250, 240, 230, 1.0),
'magenta': (255, 0, 255, 1.0),
- 'maroon': (128, 0, 0, 1.0),
'mediumaquamarine': (102, 205, 170, 1.0),
'mediumblue': (0, 0, 205, 1.0),
'mediumorchid': (186, 85, 211, 1.0),
@@ -132,9 +124,7 @@
'mistyrose': (255, 228, 225, 1.0),
'moccasin': (255, 228, 181, 1.0),
'navajowhite': (255, 222, 173, 1.0),
- 'navy': (0, 0, 128, 1.0),
'oldlace': (253, 245, 230, 1.0),
- 'olive': (128, 128, 0, 1.0),
'olivedrab': (107, 142, 35, 1.0),
'orange': (255, 165, 0, 1.0),
'orangered': (255, 69, 0, 1.0),
@@ -149,8 +139,6 @@
'pink': (255, 192, 203, 1.0),
'plum': (221, 160, 221, 1.0),
'powderblue': (176, 224, 230, 1.0),
- 'purple': (128, 0, 128, 1.0),
- 'red': (255, 0, 0, 1.0),
'rosybrown': (188, 143, 143, 1.0),
'royalblue': (65, 105, 225, 1.0),
'saddlebrown': (139, 69, 19, 1.0),
@@ -159,7 +147,6 @@
'seagreen': (46, 139, 87, 1.0),
'seashell': (255, 245, 238, 1.0),
'sienna': (160, 82, 45, 1.0),
- 'silver': (192, 192, 192, 1.0),
'skyblue': (135, 206, 235, 1.0),
'slateblue': (106, 90, 205, 1.0),
'slategray': (112, 128, 144, 1.0),
@@ -168,14 +155,11 @@
'springgreen': (0, 255, 127, 1.0),
'steelblue': (70, 130, 180, 1.0),
'tan': (210, 180, 140, 1.0),
- 'teal': (0, 128, 128, 1.0),
'thistle': (216, 191, 216, 1.0),
'tomato': (255, 99, 71, 1.0),
'turquoise': (64, 224, 208, 1.0),
'violet': (238, 130, 238, 1.0),
'wheat': (245, 222, 179, 1.0),
- 'white': (255, 255, 255, 1.0),
'whitesmoke': (245, 245, 245, 1.0),
- 'yellow': (255, 255, 0, 1.0),
'yellowgreen': (154, 205, 50, 1.0),
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/cssutils/css/csspagerule.py
new/cssutils-2.7.0/cssutils/css/csspagerule.py
--- old/cssutils-2.6.0/cssutils/css/csspagerule.py 2022-08-22
04:25:33.000000000 +0200
+++ new/cssutils-2.7.0/cssutils/css/csspagerule.py 2023-06-09
03:46:33.000000000 +0200
@@ -257,7 +257,6 @@
token[0] == 'ATKEYWORD'
and self._normalize(token[1]) in MarginRule.margins
):
-
# MarginRule
m = MarginRule(parentRule=self,
parentStyleSheet=self.parentStyleSheet)
m.cssText = chain([token], g)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/cssutils/css/cssrule.py
new/cssutils-2.7.0/cssutils/css/cssrule.py
--- old/cssutils-2.6.0/cssutils/css/cssrule.py 2022-08-22 04:25:33.000000000
+0200
+++ new/cssutils-2.7.0/cssutils/css/cssrule.py 2023-06-09 03:46:33.000000000
+0200
@@ -161,7 +161,6 @@
"""
def __init__(self, parentRule=None, parentStyleSheet=None):
-
super().__init__(parentRule=parentRule,
parentStyleSheet=parentStyleSheet)
self.cssRules = cssutils.css.CSSRuleList()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/cssutils/css/property.py
new/cssutils-2.7.0/cssutils/css/property.py
--- old/cssutils-2.6.0/cssutils/css/property.py 2022-08-22 04:25:33.000000000
+0200
+++ new/cssutils-2.7.0/cssutils/css/property.py 2023-06-09 03:46:33.000000000
+0200
@@ -466,7 +466,6 @@
# TODO: same for @page
if self.name and self.value:
-
# TODO
# cv = self.propertyValue
# if cv.cssValueType == cv.CSS_VARIABLE and not cv.value:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/cssutils/errorhandler.py
new/cssutils-2.7.0/cssutils/errorhandler.py
--- old/cssutils-2.6.0/cssutils/errorhandler.py 2022-08-22 04:25:33.000000000
+0200
+++ new/cssutils-2.7.0/cssutils/errorhandler.py 2023-06-09 03:46:33.000000000
+0200
@@ -113,7 +113,6 @@
instance = None
def __init__(self, log=None, defaultloglevel=logging.INFO,
raiseExceptions=True):
-
if ErrorHandler.instance is None:
ErrorHandler.instance = _ErrorHandler(
log=log,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/cssutils/prodparser.py
new/cssutils-2.7.0/cssutils/prodparser.py
--- old/cssutils-2.6.0/cssutils/prodparser.py 2022-08-22 04:25:33.000000000
+0200
+++ new/cssutils-2.7.0/cssutils/prodparser.py 2023-06-09 03:46:33.000000000
+0200
@@ -197,7 +197,6 @@
"""
# print u'TEST for %s in %s' % (token, self)
while self._round < self._max:
-
# for this round
i = self._i
round = self._round
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/cssutils/serialize.py
new/cssutils-2.7.0/cssutils/serialize.py
--- old/cssutils-2.6.0/cssutils/serialize.py 2022-08-22 04:25:33.000000000
+0200
+++ new/cssutils-2.7.0/cssutils/serialize.py 2023-06-09 03:46:33.000000000
+0200
@@ -1080,7 +1080,6 @@
else:
val = v[1:]
else:
-
val = self._strip_zeros('%f' % value.value) # issue #27
# keep '+' if given
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/cssutils-2.6.0/cssutils/tests/test_cssfontfacerule.py
new/cssutils-2.7.0/cssutils/tests/test_cssfontfacerule.py
--- old/cssutils-2.6.0/cssutils/tests/test_cssfontfacerule.py 2022-08-22
04:25:33.000000000 +0200
+++ new/cssutils-2.7.0/cssutils/tests/test_cssfontfacerule.py 2023-06-09
03:46:33.000000000 +0200
@@ -185,7 +185,7 @@
]
}
for n, t in list(tests.items()):
- for (v, valid) in t:
+ for v, valid in t:
r = cssutils.css.CSSFontFaceRule()
r.style[n] = v
assert r.style.getProperty(n).parent == r.style
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/cssutils/tests/test_cssimportrule.py
new/cssutils-2.7.0/cssutils/tests/test_cssimportrule.py
--- old/cssutils-2.6.0/cssutils/tests/test_cssimportrule.py 2022-08-22
04:25:33.000000000 +0200
+++ new/cssutils-2.7.0/cssutils/tests/test_cssimportrule.py 2023-06-09
03:46:33.000000000 +0200
@@ -90,7 +90,6 @@
'''@IMPORT "str";''': '''@import "str";''',
'''@import 'str';''': '''@import "str";''',
'''@import 'str' ;''': '''@import "str";''',
- '''@import "str";''': None,
'''@import "str" ;''': '''@import "str";''',
r'''@import "\"" ;''': r'''@import "\"";''',
'''@import '\\'';''': r'''@import "'";''',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/cssutils/tests/test_cssproperties.py
new/cssutils-2.7.0/cssutils/tests/test_cssproperties.py
--- old/cssutils-2.6.0/cssutils/tests/test_cssproperties.py 2022-08-22
04:25:33.000000000 +0200
+++ new/cssutils-2.7.0/cssutils/tests/test_cssproperties.py 2023-06-09
03:46:33.000000000 +0200
@@ -6,7 +6,6 @@
class TestCSSProperties:
-
# def test_cssvalues(self):
# "cssproperties cssvalues"
# # does actually return match object, so a very simplified test...
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/cssutils/tests/test_cssrule.py
new/cssutils-2.7.0/cssutils/tests/test_cssrule.py
--- old/cssutils-2.6.0/cssutils/tests/test_cssrule.py 2022-08-22
04:25:33.000000000 +0200
+++ new/cssutils-2.7.0/cssutils/tests/test_cssrule.py 2023-06-09
03:46:33.000000000 +0200
@@ -19,7 +19,7 @@
to use the base class tests too
"""
- def setup(self):
+ def setup_method(self):
"""
self.r is the rule
self.rRO the readonly rule
@@ -35,7 +35,7 @@
self.r_type = cssutils.css.CSSRule.UNKNOWN_RULE
self.r_typeString = 'UNKNOWN_RULE'
- def teardown(self):
+ def teardown_method(self):
cssutils.ser.prefs.useDefaults()
def test_init(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/cssutils-2.6.0/cssutils/tests/test_cssstyledeclaration.py
new/cssutils-2.7.0/cssutils/tests/test_cssstyledeclaration.py
--- old/cssutils-2.6.0/cssutils/tests/test_cssstyledeclaration.py
2022-08-22 04:25:33.000000000 +0200
+++ new/cssutils-2.7.0/cssutils/tests/test_cssstyledeclaration.py
2023-06-09 03:46:33.000000000 +0200
@@ -7,7 +7,7 @@
class TestCSSStyleDeclaration(basetest.BaseTestCase):
- def setup(self):
+ def setup_method(self):
self.r = cssutils.css.CSSStyleDeclaration()
def test_init(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/cssutils/tests/test_cssstylesheet.py
new/cssutils-2.7.0/cssutils/tests/test_cssstylesheet.py
--- old/cssutils-2.6.0/cssutils/tests/test_cssstylesheet.py 2022-08-22
04:25:33.000000000 +0200
+++ new/cssutils-2.7.0/cssutils/tests/test_cssstylesheet.py 2023-06-09
03:46:33.000000000 +0200
@@ -7,12 +7,12 @@
class TestCSSStyleSheet(basetest.BaseTestCase):
- def setup(self):
+ def setup_method(self):
self.r = cssutils.css.CSSStyleSheet() # used by basetest
self.s = self.r # used here
self.rule = cssutils.css.CSSStyleRule()
- def teardown(self):
+ def teardown_method(self):
cssutils.ser.prefs.useDefaults()
def test_init(self):
@@ -318,7 +318,7 @@
# __contains__
assert '' in s.namespaces
assert 'ex2' in s.namespaces
- assert not ('NOTSET' in s.namespaces)
+ assert "NOTSET" not in s.namespaces
# __delitem__
with pytest.raises(xml.dom.NoModificationAllowedErr):
s.namespaces.__delitem__('ex2')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/cssutils/tests/test_cssutils.py
new/cssutils-2.7.0/cssutils/tests/test_cssutils.py
--- old/cssutils-2.6.0/cssutils/tests/test_cssutils.py 2022-08-22
04:25:33.000000000 +0200
+++ new/cssutils-2.7.0/cssutils/tests/test_cssutils.py 2023-06-09
03:46:33.000000000 +0200
@@ -18,10 +18,10 @@
class TestCSSutils(basetest.BaseTestCase):
- def setup(self):
+ def setup_method(self):
cssutils.ser.prefs.useDefaults()
- def teardown(self):
+ def teardown_method(self):
cssutils.ser.prefs.useDefaults()
exp = '''@import "import/import2.css";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/cssutils/tests/test_cssvalue.py
new/cssutils-2.7.0/cssutils/tests/test_cssvalue.py
--- old/cssutils-2.6.0/cssutils/tests/test_cssvalue.py 2022-08-22
04:25:33.000000000 +0200
+++ new/cssutils-2.7.0/cssutils/tests/test_cssvalue.py 2023-06-09
03:46:33.000000000 +0200
@@ -181,15 +181,11 @@
'u\\rl(a)': 'url(a)',
'url("a")': 'url(a)',
'url( "a" )': 'url(a)',
- 'url(a)': 'url(a)',
'url(";")': 'url(";")',
'url(",")': 'url(",")',
'url(")")': 'url(")")',
'''url("'")''': '''url("'")''',
'''url('"')''': '''url("\\"")''',
- '''url("'")''': '''url("'")''',
- # operator
- '1': '1',
'1 2': '1 2',
'1 2': '1 2',
'1,2': '1, 2',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/cssutils-2.6.0/cssutils/tests/test_cssvariablesdeclaration.py
new/cssutils-2.7.0/cssutils/tests/test_cssvariablesdeclaration.py
--- old/cssutils-2.6.0/cssutils/tests/test_cssvariablesdeclaration.py
2022-08-22 04:25:33.000000000 +0200
+++ new/cssutils-2.7.0/cssutils/tests/test_cssvariablesdeclaration.py
2023-06-09 03:46:33.000000000 +0200
@@ -7,11 +7,11 @@
class TestCSSVariablesDeclaration(basetest.BaseTestCase):
- def setup(self):
+ def setup_method(self):
self.r = cssutils.css.CSSVariablesDeclaration()
cssutils.ser.prefs.useDefaults()
- def teardown(self):
+ def teardown_method(self):
cssutils.ser.prefs.useDefaults()
def test_init(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/cssutils/tests/test_errorhandler.py
new/cssutils-2.7.0/cssutils/tests/test_errorhandler.py
--- old/cssutils-2.6.0/cssutils/tests/test_errorhandler.py 2022-08-22
04:25:33.000000000 +0200
+++ new/cssutils-2.7.0/cssutils/tests/test_errorhandler.py 2023-06-09
03:46:33.000000000 +0200
@@ -10,7 +10,7 @@
class TestErrorHandler:
- def setup(self):
+ def setup_method(self):
"replace default log and ignore its output"
self._oldlog = cssutils.log._log
self._saved = cssutils.log.raiseExceptions
@@ -18,7 +18,7 @@
cssutils.log.raiseExceptions = False
cssutils.log.setLog(logging.getLogger('IGNORED-CSSUTILS-TEST'))
- def teardown(self):
+ def teardown_method(self):
"reset default log"
cssutils.log.setLog(self._oldlog)
# for tests only
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/cssutils/tests/test_medialist.py
new/cssutils-2.7.0/cssutils/tests/test_medialist.py
--- old/cssutils-2.6.0/cssutils/tests/test_medialist.py 2022-08-22
04:25:33.000000000 +0200
+++ new/cssutils-2.7.0/cssutils/tests/test_medialist.py 2023-06-09
03:46:33.000000000 +0200
@@ -10,7 +10,7 @@
class TestMediaList(basetest.BaseTestCase):
- def setup(self):
+ def setup_method(self):
self.r = cssutils.stylesheets.MediaList()
def test_set(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/cssutils/tests/test_mediaquery.py
new/cssutils-2.7.0/cssutils/tests/test_mediaquery.py
--- old/cssutils-2.6.0/cssutils/tests/test_mediaquery.py 2022-08-22
04:25:33.000000000 +0200
+++ new/cssutils-2.7.0/cssutils/tests/test_mediaquery.py 2023-06-09
03:46:33.000000000 +0200
@@ -7,7 +7,7 @@
class TestMediaQuery(basetest.BaseTestCase):
- def setup(self):
+ def setup_method(self):
self.r = cssutils.stylesheets.MediaQuery()
def test_mediaText(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/cssutils/tests/test_prodparser.py
new/cssutils-2.7.0/cssutils/tests/test_prodparser.py
--- old/cssutils-2.6.0/cssutils/tests/test_prodparser.py 2022-08-22
04:25:33.000000000 +0200
+++ new/cssutils-2.7.0/cssutils/tests/test_prodparser.py 2023-06-09
03:46:33.000000000 +0200
@@ -349,7 +349,7 @@
class TestProdParser:
- def setup(self):
+ def setup_method(self):
pass
def test_parse_keepS(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/cssutils/tests/test_properties.py
new/cssutils-2.7.0/cssutils/tests/test_properties.py
--- old/cssutils-2.6.0/cssutils/tests/test_properties.py 2022-08-22
04:25:33.000000000 +0200
+++ new/cssutils-2.7.0/cssutils/tests/test_properties.py 2023-06-09
03:46:33.000000000 +0200
@@ -8,7 +8,7 @@
class TestProperties:
- def setup(self):
+ def setup_method(self):
"init test values"
V = {
'0': ('0', '-0'), # , '+0'),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/cssutils/tests/test_property.py
new/cssutils-2.7.0/cssutils/tests/test_property.py
--- old/cssutils-2.6.0/cssutils/tests/test_property.py 2022-08-22
04:25:33.000000000 +0200
+++ new/cssutils-2.7.0/cssutils/tests/test_property.py 2023-06-09
03:46:33.000000000 +0200
@@ -11,7 +11,7 @@
class TestProperty(basetest.BaseTestCase):
- def setup(self):
+ def setup_method(self):
self.r = cssutils.css.property.Property('top', '1px') # , 'important')
def test_init(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/cssutils-2.6.0/cssutils/tests/test_scripts_csscombine.py
new/cssutils-2.7.0/cssutils/tests/test_scripts_csscombine.py
--- old/cssutils-2.6.0/cssutils/tests/test_scripts_csscombine.py
2022-08-22 04:25:33.000000000 +0200
+++ new/cssutils-2.7.0/cssutils/tests/test_scripts_csscombine.py
2023-06-09 03:46:33.000000000 +0200
@@ -6,7 +6,6 @@
class CSSCombine:
-
C = '@namespace
s2"uri";s2|sheet-1{top:1px}s2|sheet-2{top:2px}proxy{top:3px}'
def test_combine(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/cssutils/tests/test_selector.py
new/cssutils-2.7.0/cssutils/tests/test_selector.py
--- old/cssutils-2.6.0/cssutils/tests/test_selector.py 2022-08-22
04:25:33.000000000 +0200
+++ new/cssutils-2.7.0/cssutils/tests/test_selector.py 2023-06-09
03:46:33.000000000 +0200
@@ -16,7 +16,7 @@
class TestSelector(basetest.BaseTestCase):
- def setup(self):
+ def setup_method(self):
self.r = cssutils.css.Selector('*')
def test_init(self):
@@ -170,13 +170,9 @@
'a> b': 'a > b',
'a >b': 'a > b',
'a > b': 'a > b',
- # +
- 'a+b': 'a + b',
'a+ b': 'a + b',
'a +b': 'a + b',
'a + b': 'a + b',
- # ~
- 'a~b': 'a ~ b',
'a~ b': 'a ~ b',
'a ~b': 'a ~ b',
'a ~ b': 'a ~ b',
@@ -253,7 +249,6 @@
'''a[x |= en]''': 'a[x|=en]',
'''a[ x |= en]''': 'a[x|=en]',
'''a[x |= en ]''': 'a[x|=en]',
- '''a[ x |= en]''': 'a[x|=en]',
'''a [ x |= en]''': 'a [x|=en]',
# CSS3
'''a[x^=en]''': None,
@@ -428,8 +423,6 @@
'a.a.b': (0, 0, 2, 1),
'.a .a': (0, 0, 2, 0),
'*[x]': (0, 0, 1, 0),
- '*[x]': (0, 0, 1, 0),
- '*[x]': (0, 0, 1, 0),
'*[x=a]': (0, 0, 1, 0),
'*[x~=a]': (0, 0, 1, 0),
'*[x|=a]': (0, 0, 1, 0),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/cssutils/tests/test_selectorlist.py
new/cssutils-2.7.0/cssutils/tests/test_selectorlist.py
--- old/cssutils-2.6.0/cssutils/tests/test_selectorlist.py 2022-08-22
04:25:33.000000000 +0200
+++ new/cssutils-2.7.0/cssutils/tests/test_selectorlist.py 2023-06-09
03:46:33.000000000 +0200
@@ -8,7 +8,7 @@
class TestSelectorList(basetest.BaseTestCase):
- def setup(self):
+ def setup_method(self):
self.r = SelectorList()
def test_init(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/cssutils/tests/test_serialize.py
new/cssutils-2.7.0/cssutils/tests/test_serialize.py
--- old/cssutils-2.6.0/cssutils/tests/test_serialize.py 2022-08-22
04:25:33.000000000 +0200
+++ new/cssutils-2.7.0/cssutils/tests/test_serialize.py 2023-06-09
03:46:33.000000000 +0200
@@ -9,10 +9,10 @@
testcases for cssutils.serialize.Preferences
"""
- def setup(self):
+ def setup_method(self):
cssutils.ser.prefs.useDefaults()
- def teardown(self):
+ def teardown_method(self):
cssutils.ser.prefs.useDefaults()
# def testkeepUnkownAtRules(self):
@@ -631,10 +631,10 @@
testcases for cssutils.CSSSerializer
"""
- def setup(self):
+ def setup_method(self):
cssutils.ser.prefs.useDefaults()
- def teardown(self):
+ def teardown_method(self):
cssutils.ser.prefs.useDefaults()
def test_canonical(self):
@@ -661,7 +661,6 @@
'''00.0s''': '''0s''',
'''00.0khz''': '''0khz''',
'''00.0hz''': '''0hz''',
- '''00.0khz''': '''0khz''',
'''00.0deg''': '''0deg''',
'''00.0rad''': '''0rad''',
'''00.0grad''': '''0grad''',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/cssutils/tests/test_tokenize2.py
new/cssutils-2.7.0/cssutils/tests/test_tokenize2.py
--- old/cssutils-2.6.0/cssutils/tests/test_tokenize2.py 2022-08-22
04:25:33.000000000 +0200
+++ new/cssutils-2.7.0/cssutils/tests/test_tokenize2.py 2023-06-09
03:46:33.000000000 +0200
@@ -12,7 +12,6 @@
class TestTokenizer:
-
testsall = {
# IDENT
'äöüÃâ¬': [('IDENT', 'äöüÃâ¬', 1, 1)],
@@ -498,7 +497,7 @@
"url('a'": [('URI', "url('a')", 1, 1)],
}
- def setup(self):
+ def setup_method(self):
# log = cssutils.errorhandler.ErrorHandler()
self.tokenizer = Tokenizer()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/cssutils/tests/test_util.py
new/cssutils-2.7.0/cssutils/tests/test_util.py
--- old/cssutils-2.6.0/cssutils/tests/test_util.py 2022-08-22
04:25:33.000000000 +0200
+++ new/cssutils-2.7.0/cssutils/tests/test_util.py 2023-06-09
03:46:33.000000000 +0200
@@ -1,7 +1,7 @@
"""Testcases for cssutils.util"""
-import cgi
+from email.message import Message
import re
import urllib.request
import urllib.error
@@ -31,14 +31,14 @@
# len
assert 2 == len(ls)
# __contains__
- assert True == (1 in ls)
+ assert True is (1 in ls)
# get
assert 1 == ls[0]
assert 2 == ls[1]
# del
del ls[0]
assert 1 == len(ls)
- assert False == (1 in ls)
+ assert False is (1 in ls)
# for in
for x in ls:
assert 2 == x
@@ -384,9 +384,11 @@
def __init__(self, url, contenttype, content, exception=None,
args=None):
self.url = url
- mt, params = cgi.parse_header(contenttype)
- self.mimetype = mt
- self.charset = params.get('charset', None)
+ m = Message()
+ m['content-type'] = contenttype
+
+ self.mimetype = m.get_content_type()
+ self.charset = m.get_param('charset', None)
self.text = content
@@ -400,7 +402,6 @@
mimetype, charset = self.mimetype, self.charset
class Info:
-
# py2x
def gettype(self):
return mimetype
@@ -502,7 +503,7 @@
class TestLazyRegex:
"""Tests for cssutils.util.LazyRegex."""
- def setup(self):
+ def setup_method(self):
self.lazyre = LazyRegex('f.o')
def test_public_interface(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/cssutils/tests/test_value.py
new/cssutils-2.7.0/cssutils/tests/test_value.py
--- old/cssutils-2.6.0/cssutils/tests/test_value.py 2022-08-22
04:25:33.000000000 +0200
+++ new/cssutils-2.7.0/cssutils/tests/test_value.py 2023-06-09
03:46:33.000000000 +0200
@@ -99,7 +99,7 @@
'matrix(0.000092, 0.250001, -0.25, 0.000092, 0, 0)',
),
}
- for (cssText, (c, len, v)) in list(tests.items()):
+ for cssText, (c, len, v) in list(tests.items()):
if c is None:
c = cssText
if v is None:
@@ -131,7 +131,7 @@
'url(x.gif)0 0': ('url(x.gif) 0 0', 3),
'url(x.gif)no-repeat': ('url(x.gif) no-repeat', 2),
}
- for (cssText, (c, len)) in list(tests.items()):
+ for cssText, (c, len) in list(tests.items()):
if c is None:
c = cssText
pv = cssutils.css.PropertyValue(cssText)
@@ -178,13 +178,11 @@
'u\\rl(a)': 'url(a)',
'url("a")': 'url(a)',
'url( "a" )': 'url(a)',
- 'url(a)': 'url(a)',
'url(";")': 'url(";")',
'url(",")': 'url(",")',
'url(")")': 'url(")")',
'''url("'")''': '''url("'")''',
'''url('"')''': '''url("\\"")''',
- '''url("'")''': '''url("'")''',
# operator
'1': '1',
'1 2': '1 2',
@@ -409,7 +407,7 @@
'STRING',
),
}
- for (p, (r, n, t)) in list(tests.items()):
+ for p, (r, n, t) in list(tests.items()):
v = cssutils.css.Value(p)
assert r == v.cssText
assert t == v.type
@@ -443,7 +441,7 @@
'hsl(1,2%,3%)': ('hsl(1, 2%, 3%)',),
'hsla(1,2%,3%, 1.0)': ('hsla(1, 2%, 3%, 1)',),
}
- for (p, (r,)) in list(tests.items()):
+ for p, (r,) in list(tests.items()):
v = cssutils.css.ColorValue(p)
assert v.COLOR_VALUE == v.type
assert r == v.cssText
@@ -565,7 +563,7 @@
' url(some.gif) ': ('url(some.gif)', 'some.gif', 'URI'),
'url( some.gif )': ('url(some.gif)', 'some.gif', 'URI'),
}
- for (p, (r, n, t)) in list(tests.items()):
+ for p, (r, n, t) in list(tests.items()):
v = cssutils.css.URIValue(p)
assert r == v.cssText
assert t == v.type
@@ -639,7 +637,7 @@
'-1.1%': ('-1.1%', -1.1, '%', 'PERCENTAGE'),
'+1%': ('+1%', 1, '%', 'PERCENTAGE'),
}
- for (p, (r, n, d, t)) in list(tests.items()):
+ for p, (r, n, d, t) in list(tests.items()):
v = cssutils.css.DimensionValue(p)
assert r == v.cssText
assert t == v.type
@@ -665,9 +663,8 @@
'x(/**/1)': ('x(/**/ 1)', 'x(1)'),
'x(/**/1/**/)': ('x(/**/ 1 /**/)', 'x(1)'),
'x(/**/1,x/**/)': ('x(/**/ 1, x /**/)', 'x(1, x)'),
- 'x(1,2)': ('x(1, 2)', None),
}
- for (f, (cssText, value)) in list(tests.items()):
+ for f, (cssText, value) in list(tests.items()):
if value is None:
value = cssText
v = cssutils.css.CSSFunction(f)
@@ -705,7 +702,7 @@
),
'var(C, #f00 )': ('var(C, #f00)', 'C', '#fff'),
}
- for (var, (cssText, name, fallback)) in list(tests.items()):
+ for var, (cssText, name, fallback) in list(tests.items()):
v = cssutils.css.CSSVariable(var)
assert cssText == v.cssText
assert 'VARIABLE' == v.type
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/cssutils/tokenize2.py
new/cssutils-2.7.0/cssutils/tokenize2.py
--- old/cssutils-2.6.0/cssutils/tokenize2.py 2022-08-22 04:25:33.000000000
+0200
+++ new/cssutils-2.7.0/cssutils/tokenize2.py 2023-06-09 03:46:33.000000000
+0200
@@ -157,7 +157,6 @@
else:
# check all other productions, at least CHAR must match
for name, matcher in productions:
-
# TODO: USE bad comment?
if fullsheet and name == 'CHAR' and has_at(text, pos,
'/*'):
# before CHAR production test for incomplete comment
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/cssutils.egg-info/PKG-INFO
new/cssutils-2.7.0/cssutils.egg-info/PKG-INFO
--- old/cssutils-2.6.0/cssutils.egg-info/PKG-INFO 2022-08-22
04:26:04.000000000 +0200
+++ new/cssutils-2.7.0/cssutils.egg-info/PKG-INFO 2023-06-09
03:46:59.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: cssutils
-Version: 2.6.0
+Version: 2.7.0
Summary: A CSS Cascading Style Sheets library for Python
Home-page: https://github.com/jaraco/cssutils
Author: Christof Hoeke
@@ -23,17 +23,18 @@
License-File: COPYING.LESSER
.. image:: https://img.shields.io/pypi/v/cssutils.svg
- :target: `PyPI link`_
+ :target: https://pypi.org/project/cssutils
.. image:: https://img.shields.io/pypi/pyversions/cssutils.svg
- :target: `PyPI link`_
-
-.. _PyPI link: https://pypi.org/project/cssutils
.. image:: https://github.com/jaraco/cssutils/workflows/tests/badge.svg
:target:
https://github.com/jaraco/cssutils/actions?query=workflow%3A%22tests%22
:alt: tests
+.. image::
https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json
+ :target: https://github.com/astral-sh/ruff
+ :alt: Ruff
+
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
:alt: Code style: Black
@@ -41,7 +42,7 @@
.. image:: https://readthedocs.org/projects/cssutils/badge/?version=latest
:target: https://cssutils.readthedocs.io/en/latest/?badge=latest
-.. image:: https://img.shields.io/badge/skeleton-2022-informational
+.. image:: https://img.shields.io/badge/skeleton-2023-informational
:target: https://blog.jaraco.com/skeleton
.. image:: https://tidelift.com/badges/package/pypi/cssutils
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/cssutils.egg-info/SOURCES.txt
new/cssutils-2.7.0/cssutils.egg-info/SOURCES.txt
--- old/cssutils-2.6.0/cssutils.egg-info/SOURCES.txt 2022-08-22
04:26:04.000000000 +0200
+++ new/cssutils-2.7.0/cssutils.egg-info/SOURCES.txt 2023-06-09
03:46:59.000000000 +0200
@@ -1,8 +1,7 @@
.coveragerc
.editorconfig
-.flake8
.pre-commit-config.yaml
-.readthedocs.yml
+.readthedocs.yaml
CHANGES.rst
COPYING
COPYING.LESSER
@@ -11,6 +10,7 @@
mypy.ini
pyproject.toml
pytest.ini
+ruff.toml
setup.cfg
tox.ini
.github/FUNDING.yml
@@ -247,6 +247,7 @@
docs/html/docs/utilities.html
docs/html/docs/variables.html
encutils/__init__.py
+examples/__init__.py
examples/build.py
examples/codec.py
examples/cssencodings.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/cssutils.egg-info/requires.txt
new/cssutils-2.7.0/cssutils.egg-info/requires.txt
--- old/cssutils-2.6.0/cssutils.egg-info/requires.txt 2022-08-22
04:26:04.000000000 +0200
+++ new/cssutils-2.7.0/cssutils.egg-info/requires.txt 2023-06-09
03:46:59.000000000 +0200
@@ -3,18 +3,19 @@
importlib_metadata
[docs]
-sphinx
+sphinx>=3.5
jaraco.packaging>=9
rst.linker>=1.9
+furo
+sphinx-lint
jaraco.tidelift>=1.4
[testing]
pytest>=6
pytest-checkdocs>=2.4
-pytest-flake8
-flake8<5
pytest-cov
pytest-enabler>=1.3
+pytest-ruff
cssselect
jaraco.test>=5.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/docs/conf.py
new/cssutils-2.7.0/docs/conf.py
--- old/cssutils-2.6.0/docs/conf.py 2022-08-22 04:25:33.000000000 +0200
+++ new/cssutils-2.7.0/docs/conf.py 2023-06-09 03:46:33.000000000 +0200
@@ -1,8 +1,13 @@
-#!/usr/bin/env python3
-extensions = ['sphinx.ext.autodoc', 'jaraco.packaging.sphinx', 'rst.linker']
+extensions = [
+ 'sphinx.ext.autodoc',
+ 'jaraco.packaging.sphinx',
+]
master_doc = "index"
+html_theme = "furo"
+# Link dates and other references in the changelog
+extensions += ['rst.linker']
link_files = {
'../CHANGES.rst': dict(
using=dict(GH='https://github.com'),
@@ -28,7 +33,7 @@
)
}
-# Be strict about any broken references:
+# Be strict about any broken references
nitpicky = True
# Include Python intersphinx mapping to prevent failures
@@ -38,4 +43,7 @@
'python': ('https://docs.python.org/3', None),
}
+# Preserve authored syntax for defaults
+autodoc_preserve_defaults = True
+
extensions += ['jaraco.tidelift']
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/encutils/__init__.py
new/cssutils-2.7.0/encutils/__init__.py
--- old/cssutils-2.6.0/encutils/__init__.py 2022-08-22 04:25:33.000000000
+0200
+++ new/cssutils-2.7.0/encutils/__init__.py 2023-06-09 03:46:33.000000000
+0200
@@ -50,9 +50,9 @@
'EncodingInfo',
]
+from email.message import Message
import html.parser
import io
-import cgi
import re
import sys
import urllib.request
@@ -315,8 +315,11 @@
pass
if p.content_type:
- media_type, params = cgi.parse_header(p.content_type)
- encoding = params.get('charset') # defaults to None
+ m = Message()
+ m['content-type'] = p.content_type
+
+ media_type = m.get_content_type()
+ encoding = m.get_param('charset') # defaults to None
if encoding:
encoding = encoding.lower()
if log:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/examples/parse.py
new/cssutils-2.7.0/examples/parse.py
--- old/cssutils-2.6.0/examples/parse.py 2022-08-22 04:25:33.000000000
+0200
+++ new/cssutils-2.7.0/examples/parse.py 2023-06-09 03:46:33.000000000
+0200
@@ -6,7 +6,6 @@
def main():
-
css = '''/* This is a comment */
body {
background: white;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/examples/website.py
new/cssutils-2.7.0/examples/website.py
--- old/cssutils-2.6.0/examples/website.py 2022-08-22 04:25:33.000000000
+0200
+++ new/cssutils-2.7.0/examples/website.py 2023-06-09 03:46:33.000000000
+0200
@@ -114,7 +114,7 @@
True
>>> # returns the new Selector:
>>> sheet.cssRules[1].selectorList.appendSelector('a')
- cssutils.css.Selector(selectorText=u'a')
+ cssutils.css.Selector(selectorText='a')
>>> print(sheet.cssText.decode())
@import url(example.css) tv, print;
body, a {
@@ -139,7 +139,7 @@
>>> # work with properties:
>>> proplist = style.getProperties('background', all=True)
>>> proplist
- [cssutils.css.Property(name='background', value=u'white url(paper.png)
scroll', priority=u''), cssutils.css.Property(name='background', value=u'white
url(ledger.png) fixed', priority=u'')]
+ [cssutils.css.Property(name='background', value='white url(paper.png)
scroll', priority=''), cssutils.css.Property(name='background', value='white
url(ledger.png) fixed', priority='')]
>>> for prop in proplist: print(prop.value)
white url(paper.png) scroll
white url(ledger.png) fixed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/mypy.ini new/cssutils-2.7.0/mypy.ini
--- old/cssutils-2.6.0/mypy.ini 2022-08-22 04:25:33.000000000 +0200
+++ new/cssutils-2.7.0/mypy.ini 2023-06-09 03:46:33.000000000 +0200
@@ -1,2 +1,5 @@
[mypy]
ignore_missing_imports = True
+# required to support namespace packages
+# https://github.com/python/mypy/issues/14057
+explicit_package_bases = True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/pyproject.toml
new/cssutils-2.7.0/pyproject.toml
--- old/cssutils-2.6.0/pyproject.toml 2022-08-22 04:25:33.000000000 +0200
+++ new/cssutils-2.7.0/pyproject.toml 2023-06-09 03:46:33.000000000 +0200
@@ -13,8 +13,8 @@
[tool.pytest-enabler.mypy]
# addopts = "--mypy"
-[tool.pytest-enabler.flake8]
-addopts = "--flake8"
-
[tool.pytest-enabler.cov]
addopts = "--cov"
+
+[tool.pytest-enabler.ruff]
+addopts = "--ruff"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/pytest.ini
new/cssutils-2.7.0/pytest.ini
--- old/cssutils-2.6.0/pytest.ini 2022-08-22 04:25:33.000000000 +0200
+++ new/cssutils-2.7.0/pytest.ini 2023-06-09 03:46:33.000000000 +0200
@@ -1,17 +1,27 @@
[pytest]
norecursedirs=dist build .tox .eggs
addopts=--doctest-modules
-doctest_optionflags=ALLOW_UNICODE ELLIPSIS
filterwarnings=
- # Suppress deprecation warning in flake8
- ignore:SelectableGroups dict interface is deprecated::flake8
+ ## upstream
+
+ # Ensure ResourceWarnings are emitted
+ default::ResourceWarning
# shopkeep/pytest-black#55
ignore:<class 'pytest_black.BlackItem'> is not using a cooperative
constructor:pytest.PytestDeprecationWarning
ignore:The \(fspath. py.path.local\) argument to BlackItem is
deprecated.:pytest.PytestDeprecationWarning
ignore:BlackItem is an Item subclass and should not be a
collector:pytest.PytestWarning
- # tholo/pytest-flake8#83
- ignore:<class 'pytest_flake8.Flake8Item'> is not using a cooperative
constructor:pytest.PytestDeprecationWarning
- ignore:The \(fspath. py.path.local\) argument to Flake8Item is
deprecated.:pytest.PytestDeprecationWarning
- ignore:Flake8Item is an Item subclass and should not be a
collector:pytest.PytestWarning
+ # shopkeep/pytest-black#67
+ ignore:'encoding' argument not specified::pytest_black
+
+ # realpython/pytest-mypy#152
+ ignore:'encoding' argument not specified::pytest_mypy
+
+ # python/cpython#100750
+ ignore:'encoding' argument not specified::platform
+
+ # pypa/build#615
+ ignore:'encoding' argument not specified::build.env
+
+ ## end upstream
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/ruff.toml new/cssutils-2.7.0/ruff.toml
--- old/cssutils-2.6.0/ruff.toml 1970-01-01 01:00:00.000000000 +0100
+++ new/cssutils-2.7.0/ruff.toml 2023-06-09 03:46:33.000000000 +0200
@@ -0,0 +1,2 @@
+# ignore "line too long" as many lines are too long
+ignore = ["E501"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/setup.cfg new/cssutils-2.7.0/setup.cfg
--- old/cssutils-2.6.0/setup.cfg 2022-08-22 04:26:05.044268800 +0200
+++ new/cssutils-2.7.0/setup.cfg 2023-06-09 03:46:59.229071100 +0200
@@ -39,14 +39,13 @@
testing =
pytest >= 6
pytest-checkdocs >= 2.4
- pytest-flake8
- flake8 < 5
pytest-black >= 0.3.7; \
python_implementation != "PyPy"
pytest-cov
pytest-mypy >= 0.9.1; \
python_implementation != "PyPy"
pytest-enabler >= 1.3
+ pytest-ruff
lxml; \
python_version < "3.11"
@@ -54,9 +53,12 @@
importlib_resources; python_version < "3.9"
jaraco.test >= 5.1
docs =
- sphinx
+ sphinx >= 3.5
jaraco.packaging >= 9
rst.linker >= 1.9
+ furo
+ sphinx-lint
+
jaraco.tidelift >= 1.4
[options.entry_points]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cssutils-2.6.0/tox.ini new/cssutils-2.7.0/tox.ini
--- old/cssutils-2.6.0/tox.ini 2022-08-22 04:25:33.000000000 +0200
+++ new/cssutils-2.7.0/tox.ini 2023-06-09 03:46:33.000000000 +0200
@@ -8,10 +8,13 @@
[testenv]
deps =
+setenv =
+ PYTHONWARNDEFAULTENCODING = 1
commands =
pytest {posargs}
usedevelop = True
-extras = testing
+extras =
+ testing
[testenv:docs]
extras =
@@ -20,6 +23,7 @@
changedir = docs
commands =
python -m sphinx -W --keep-going . {toxinidir}/build/html
+ python -m sphinxlint
[testenv:release]
skip_install = True