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 1898084
Summary: | python-django fails to build with Python 3.10: TypeError: ChoicesMeta.__new__() got an unexpected keyword argument 'boundary' [several tests were skipped] | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Miro Hrončok <mhroncok> |
Component: | python-django | Assignee: | Matthias Runge <mrunge> |
Status: | NEW --- | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | jal233, mhroncok, michel, mrunge, rdopiera, sgallagh, slavek.kabrda, thrnciar, tir.karthi |
Target Milestone: | --- | Flags: | thrnciar:
needinfo+
|
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 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: | 1890881 |
Description
Miro Hrončok
2020-11-16 10:43:26 UTC
I tried to build python-django with 4th alpha and it seems like the above problem is not present anymore. But I ran to another test failure: ====================================================================== ERROR: model_enums.tests (unittest.loader._FailedTest) ---------------------------------------------------------------------- ImportError: Failed to import test module: model_enums.tests Traceback (most recent call last): File "/usr/lib64/python3.10/unittest/loader.py", line 436, in _find_test_path module = self._get_module_from_name(name) File "/usr/lib64/python3.10/unittest/loader.py", line 377, in _get_module_from_name __import__(name) File "/builddir/build/BUILD/Django-3.1.5/tests/model_enums/tests.py", line 225, in <module> class IPv4Network(ipaddress.IPv4Network, models.Choices): File "/builddir/build/BUILD/Django-3.1.5/django/db/models/enums.py", line 28, in __new__ cls = super().__new__(metacls, classname, bases, classdict) File "/usr/lib64/python3.10/enum.py", line 239, in __new__ enum_class.__bases__ = enum_class.__bases__[1:] #or (object, ) File "/usr/lib64/python3.10/enum.py", line 483, in __setattr__ super().__setattr__(name, value) TypeError: __bases__ assignment: 'IPv4Network' object layout differs from '_NoInitSubclass' https://download.copr.fedorainfracloud.org/results/@python/python3.10/fedora-rawhide-x86_64/01863009-python-django/builder-live.log.gz Here are new failures with 5th alpha of Python 3.10 (last one should be fixed in upstream). ====================================================================== ERROR: test_integerchoices_functional_api (model_enums.tests.ChoicesTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Django-3.1.6/tests/model_enums/tests.py", line 74, in test_integerchoices_functional_api Place = models.IntegerChoices('Place', 'FIRST SECOND THIRD') File "/usr/lib64/python3.10/enum.py", line 598, in __call__ return cls._create_( File "/usr/lib64/python3.10/enum.py", line 738, in _create_ return metacls.__new__(metacls, class_name, bases, classdict, boundary=boundary) TypeError: ChoicesMeta.__new__() got an unexpected keyword argument 'boundary' ====================================================================== ERROR: test_textchoices_functional_api (model_enums.tests.ChoicesTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Django-3.1.6/tests/model_enums/tests.py", line 115, in test_textchoices_functional_api Medal = models.TextChoices('Medal', 'GOLD SILVER BRONZE') File "/usr/lib64/python3.10/enum.py", line 598, in __call__ return cls._create_( File "/usr/lib64/python3.10/enum.py", line 738, in _create_ return metacls.__new__(metacls, class_name, bases, classdict, boundary=boundary) TypeError: ChoicesMeta.__new__() got an unexpected keyword argument 'boundary' ====================================================================== FAIL: test_memoryview_content (httpwrappers.tests.HttpResponseTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Django-3.1.6/tests/httpwrappers/tests.py", line 372, in test_memoryview_content self.assertEqual(r.content, b'memoryview') AssertionError: b'109101109111114121118105101119' != b'memoryview' ---------------------------------------------------------------------- This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle. Changing version to 34. I still only see: ====================================================================== FAIL: test_memoryview_content (httpwrappers.tests.HttpResponseTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Django-3.1.6/tests/httpwrappers/tests.py", line 372, in test_memoryview_content self.assertEqual(r.content, b'memoryview') AssertionError: b'109101109111114121118105101119' != b'memoryview' ---------------------------------------------------------------------- Ran 13829 tests in 527.276s In the latest Copr build. The upstream fix is included in 3.2a1, bz1917820. There are some new failures present in first beta. ====================================================================== FAIL: test_dumpdata_proxy_with_concrete (fixtures.tests.FixtureLoadingTests) A warning isn't displayed if a proxy model is dumped with its concrete ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Django-3.2.1/tests/fixtures/tests.py", line 622, in test_dumpdata_proxy_with_concrete self.assertEqual(len(warning_list), 0) AssertionError: 2 != 0 ====================================================================== FAIL: test_repr_with_deferrable (constraints.tests.UniqueConstraintTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Django-3.2.1/tests/constraints/tests.py", line 246, in test_repr_with_deferrable self.assertEqual( AssertionError: "<Uni[28 chars], 'bar') name='unique_fields' deferrable=IMMEDIATE>" != "<Uni[28 chars], 'bar') name='unique_fields' deferrable=Deferrable.IMMEDIATE>" - <UniqueConstraint: fields=('foo', 'bar') name='unique_fields' deferrable=IMMEDIATE> + <UniqueConstraint: fields=('foo', 'bar') name='unique_fields' deferrable=Deferrable.IMMEDIATE> ? +++++++++++ ====================================================================== FAIL: test_validators (validators.tests.TestValidators) [URLValidator] (value='http://www.djangoproject.com/\n') ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Django-3.2.1/tests/validators/tests.py", line 327, in test_validators with self.assertRaises(expected): AssertionError: ValidationError not raised ====================================================================== FAIL: test_validators (validators.tests.TestValidators) [URLValidator] (value='http://[::ffff:192.9.5.5]\n') ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Django-3.2.1/tests/validators/tests.py", line 327, in test_validators with self.assertRaises(expected): AssertionError: ValidationError not raised ====================================================================== FAIL: test_integerchoices (model_enums.tests.ChoicesTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Django-3.2.1/tests/model_enums/tests.py", line 51, in test_integerchoices self.assertEqual(repr(Suit.DIAMOND), '<Suit.DIAMOND: 1>') AssertionError: 'Suit.DIAMOND' != '<Suit.DIAMOND: 1>' - Suit.DIAMOND + <Suit.DIAMOND: 1> ? + ++++ ====================================================================== FAIL: test_textchoices (model_enums.tests.ChoicesTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Django-3.2.1/tests/model_enums/tests.py", line 92, in test_textchoices self.assertEqual(repr(YearInSchool.FRESHMAN), "<YearInSchool.FRESHMAN: 'FR'>") AssertionError: 'YearInSchool.FRESHMAN' != "<YearInSchool.FRESHMAN: 'FR'>" - YearInSchool.FRESHMAN + <YearInSchool.FRESHMAN: 'FR'> ? + +++++++ ---------------------------------------------------------------------- Ran 14608 tests in 553.444s FAILED (failures=6, skipped=1166, expected failures=4) 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/ The f35-python side tag has been merged to Rawhide. From now on, build as you would normally build. Enum related changes were reverted in Python 3.10 : https://mail.python.org/archives/list/python-dev@python.org/thread/ZMC67QA2JVQJSWSFWRS6IM6ZX4EK277G/#LSTMFAPSPD3BGZ4D6HQFODXZVB3PLYKF Django will use the 3.10 repr format irrespective of the revert in stdlib enum : https://github.com/django/django/pull/14624 |