Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1907400 - python-genshi fails to build with Python 3.10: TypeError: 'Something' object is not subscriptable [tests were skipped]
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-06-14 10:03 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
Embargoed:


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.

Comment 3 Tomáš Hrnčiar 2021-05-13 08:15:20 UTC
We need genshi to build during bootstrap sequence of Python 3.10. I'd like to temporarily disable failing tests until they are fixed in the upstream.

https://src.fedoraproject.org/rpms/python-genshi/pull-request/2

Comment 4 Miro Hrončok 2021-06-04 20:15:53 UTC
This is a mass-posted update. Sorry if it is not 100% accurate to this bugzilla.


The Python 3.10 rebuild is in progress in a Koji side tag. If you manage to fix the problem, please commit the fix in the rawhide branch, but don't build the package in regular rawhide.

You can either build the package in the side tag, with:

    $ fedpkg build --target=f35-python

Or you can the build and we will eventually build it for you.

Note that the rebuild is still in progress, so not all (build) dependencies of this package might be available right away.

Thanks.

See also https://fedoraproject.org/wiki/Changes/Python3.10

If you have general questions about the rebuild, please use this mailing list thread: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/G47SGOYIQLRDTWGOSLSWERZSSHXDEDH5/

Comment 5 Miro Hrončok 2021-06-07 23:00:15 UTC
The f35-python side tag has been merged to Rawhide. From now on, build as you would normally build.


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