Bug 1907400 - python-genshi fails to build with Python 3.10: TypeError: 'Something' object is not subscriptable
Summary: python-genshi fails to build with Python 3.10: TypeError: 'Something' object ...
Keywords:
Status: ASSIGNED
Alias: None
Product: Fedora
Classification: Fedora
Component: python-genshi
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Felix Schwarz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.10
TreeView+ depends on / blocked
 
Reported: 2020-12-14 12:57 UTC by Tomáš Hrnčiar
Modified: 2021-02-09 16:25 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github edgewall genshi issues 37 0 None open Test suite fails with Python 3.10a3 2021-01-22 11:51:31 UTC

Description Tomáš Hrnčiar 2020-12-14 12:57:08 UTC
python-genshi fails to build with Python 3.10.0a3.


======================================================================
FAIL: test_not_iterable (genshi.template.tests.directives.ForDirectiveTestCase)
Verify that assignment to nested tuples works correctly.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python3-python-genshi-0.7.5-1.fc34/genshi/template/tests/directives.py", line 489, in test_not_iterable
    list(tmpl.generate(foo=12))
TypeError: 'int' object is not iterable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/builddir/build/BUILD/python3-python-genshi-0.7.5-1.fc34/genshi/template/tests/directives.py", line 505, in test_not_iterable
    self.assertEqual(2, frames[-1].tb_lineno)
AssertionError: 2 != 109

======================================================================
FAIL: test_error_access_undefined (genshi.template.tests.eval.ExpressionTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python3-python-genshi-0.7.5-1.fc34/genshi/template/tests/eval.py", line 444, in test_error_access_undefined
    expr.evaluate({})
genshi.template.eval.UndefinedError: "nothing" not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/builddir/build/BUILD/python3-python-genshi-0.7.5-1.fc34/genshi/template/tests/eval.py", line 458, in test_error_access_undefined
    self.assertEqual(50, frames[-3].tb_lineno)
AssertionError: 50 != 157

======================================================================
FAIL: test_error_getattr_undefined (genshi.template.tests.eval.ExpressionTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python3-python-genshi-0.7.5-1.fc34/genshi/template/eval.py", line 301, in lookup_attr
    val = getattr(obj, key)
AttributeError: 'Something' object has no attribute 'nil'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/builddir/build/BUILD/python3-python-genshi-0.7.5-1.fc34/genshi/template/eval.py", line 307, in lookup_attr
    val = obj[key]
TypeError: 'Something' object is not subscriptable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/builddir/build/BUILD/python3-python-genshi-0.7.5-1.fc34/genshi/template/tests/eval.py", line 467, in test_error_getattr_undefined
    expr.evaluate({'something': Something()})
genshi.template.eval.UndefinedError: <Something> has no member named "nil"

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/builddir/build/BUILD/python3-python-genshi-0.7.5-1.fc34/genshi/template/tests/eval.py", line 482, in test_error_getattr_undefined
    self.assertEqual(50, frame.tb_lineno)
AssertionError: 50 != 157

======================================================================
FAIL: test_error_getitem_undefined_string (genshi.template.tests.eval.ExpressionTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python3-python-genshi-0.7.5-1.fc34/genshi/template/eval.py", line 318, in lookup_item
    return obj[key]
TypeError: 'Something' object is not subscriptable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/builddir/build/BUILD/python3-python-genshi-0.7.5-1.fc34/genshi/template/tests/eval.py", line 491, in test_error_getitem_undefined_string
    expr.evaluate({'something': Something()})
genshi.template.eval.UndefinedError: <Something> has no member named "nil"

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/builddir/build/BUILD/python3-python-genshi-0.7.5-1.fc34/genshi/template/tests/eval.py", line 506, in test_error_getitem_undefined_string
    self.assertEqual(50, frame.tb_lineno)
AssertionError: 50 != 157

----------------------------------------------------------------------
Ran 886 tests in 1.082s

FAILED (failures=4)
Test failed: <unittest.runner.TextTestResult run=886 errors=0 failures=4>
error: Test failed: <unittest.runner.TextTestResult run=886 errors=0 failures=4>

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/01826789-python-genshi/

For all our attempts to build python-genshi with Python 3.10, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/python-genshi/

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.10:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/

Let us know here if you have any questions.

Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10.
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 Felix Schwarz 2020-12-14 20:38:44 UTC
Test suite worked with Python 3.10a2 but fails with the latest 3.10a3.

Comment 2 Ben Cotton 2021-02-09 15:34:07 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.


Note You need to log in before you can comment on or make changes to this bug.