Bug 2019391

Summary: python-css-parser fails to build with Python 3.11: AttributeError: 'TestLazyRegex' object has no attribute 'assertEquals'
Product: [Fedora] Fedora Reporter: Tomáš Hrnčiar <thrnciar>
Component: python-css-parserAssignee: Zbigniew Jędrzejewski-Szmek <zbyszek>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: hugovk+redhatbugzilla, mhroncok, python-sig, thrnciar, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-css-parser-1.0.7-1.fc36 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-01-01 12:10:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1992484, 2016048    

Description Tomáš Hrnčiar 2021-11-02 13:27:48 UTC
python-css-parser fails to build with Python 3.11.0a1.

======================================================================
ERROR: test_calling (css_parser_tests.test_util.TestLazyRegex)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/css-parser-1.0.6/css_parser_tests/test_util.py", line 445, in test_calling
    self.assertEquals(match.group(), 'foo')
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestLazyRegex' object has no attribute 'assertEquals'

======================================================================
ERROR: test_findall (css_parser_tests.test_util.TestLazyRegex)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/css-parser-1.0.6/css_parser_tests/test_util.py", line 474, in test_findall
    self.assertEquals(self.lazyre.findall('rafoobarfuobaz'),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestLazyRegex' object has no attribute 'assertEquals'

======================================================================
ERROR: test_finditer (css_parser_tests.test_util.TestLazyRegex)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/css-parser-1.0.6/css_parser_tests/test_util.py", line 479, in test_finditer
    self.assertEquals([m.group() for m in result], ['foo', 'fuo'])
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestLazyRegex' object has no attribute 'assertEquals'

======================================================================
ERROR: test_flags (css_parser_tests.test_util.TestLazyRegex)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/css-parser-1.0.6/css_parser_tests/test_util.py", line 505, in test_flags
    self.assertEquals(self.lazyre.flags, re.compile('.').flags)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestLazyRegex' object has no attribute 'assertEquals'

======================================================================
ERROR: test_groupindex (css_parser_tests.test_util.TestLazyRegex)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/css-parser-1.0.6/css_parser_tests/test_util.py", line 501, in test_groupindex
    self.assertEquals(lazyre.groupindex, {'foo': 1})
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestLazyRegex' object has no attribute 'assertEquals'

======================================================================
ERROR: test_groups (css_parser_tests.test_util.TestLazyRegex)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/css-parser-1.0.6/css_parser_tests/test_util.py", line 495, in test_groups
    self.assertEquals(lazyre.groups, 2)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestLazyRegex' object has no attribute 'assertEquals'

======================================================================
ERROR: test_matching (css_parser_tests.test_util.TestLazyRegex)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/css-parser-1.0.6/css_parser_tests/test_util.py", line 450, in test_matching
    self.assertEquals(match.group(), 'foo')
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestLazyRegex' object has no attribute 'assertEquals'

======================================================================
ERROR: test_pattern (css_parser_tests.test_util.TestLazyRegex)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/css-parser-1.0.6/css_parser_tests/test_util.py", line 508, in test_pattern
    self.assertEquals(self.lazyre.pattern, 'f.o')
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestLazyRegex' object has no attribute 'assertEquals'

======================================================================
ERROR: test_searching (css_parser_tests.test_util.TestLazyRegex)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/css-parser-1.0.6/css_parser_tests/test_util.py", line 459, in test_searching
    self.assertEquals(match.group(), 'foo')
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestLazyRegex' object has no attribute 'assertEquals'

======================================================================
ERROR: test_searching_with_position_parameters (css_parser_tests.test_util.TestLazyRegex)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/css-parser-1.0.6/css_parser_tests/test_util.py", line 465, in test_searching_with_position_parameters
    self.assertEquals(match.group(), 'fuo')
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestLazyRegex' object has no attribute 'assertEquals'

======================================================================
ERROR: test_split (css_parser_tests.test_util.TestLazyRegex)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/css-parser-1.0.6/css_parser_tests/test_util.py", line 468, in test_split
    self.assertEquals(self.lazyre.split('rafoobarfoobaz'),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestLazyRegex' object has no attribute 'assertEquals'

======================================================================
ERROR: test_sub (css_parser_tests.test_util.TestLazyRegex)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/css-parser-1.0.6/css_parser_tests/test_util.py", line 482, in test_sub
    self.assertEquals(self.lazyre.sub('bar', 'foofoo'), 'barbar')
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestLazyRegex' object has no attribute 'assertEquals'

======================================================================
ERROR: test_subn (css_parser_tests.test_util.TestLazyRegex)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/css-parser-1.0.6/css_parser_tests/test_util.py", line 487, in test_subn
    self.assertEquals(subbed, ('barbar', 2))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestLazyRegex' object has no attribute 'assertEquals'

----------------------------------------------------------------------
Ran 384 tests in 1.776s

FAILED (errors=13)

Removed many old deprecated unittest features:
    TestCase method aliases failUnlessEqual, failIfEqual, failUnless, failIf,
    failUnlessRaises, failUnlessAlmostEqual, failIfAlmostEqual (deprecated in
    Python 3.1), assertEquals, assertNotEquals, assert_, assertAlmostEquals,
    assertNotAlmostEquals, assertRegexpMatches, assertRaisesRegexp (deprecated in
    Python 3.2), and assertNotRegexpMatches (deprecated in Python 3.5).

https://bugs.python.org/issue45162
https://docs.python.org/3.11/whatsnew/3.11.html


For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.11/fedora-rawhide-x86_64/02909899-python-css-parser/

For all our attempts to build python-css-parser with Python 3.11, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/package/python-css-parser/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.11:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/

Let us know here if you have any questions.

Python 3.11 is planned to be included in Fedora 37. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.11.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Hugo van Kemenade 2021-12-30 22:45:51 UTC
Upstream PR: https://github.com/ebook-utils/css-parser/pull/11

Comment 2 Hugo van Kemenade 2021-12-31 07:45:18 UTC
Merged: https://github.com/ebook-utils/css-parser/pull/11

Comment 3 Zbigniew Jędrzejewski-Szmek 2022-01-01 12:10:18 UTC
Thanks, built in rawhide.