Bug 1990763 - python-hypothesis fails to build with Python 3.10: hypothesis.errors.InvalidArgument: thing=tests.typing_extensions.test_backported_types.T must be a type
Summary: python-hypothesis fails to build with Python 3.10: hypothesis.errors.InvalidA...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-hypothesis
Version: 35
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lumír Balhar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.10 F35FTBFS F36FTBFS
TreeView+ depends on / blocked
 
Reported: 2021-08-06 07:34 UTC by Tomáš Hrnčiar
Modified: 2021-11-19 09:10 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-19 09:10:36 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2021-08-06 07:34:40 UTC
python-hypothesis fails to build with Python 3.10.0rc1.

=================================== FAILURES ===================================
__________________________ test_can_register_NewType ___________________________
[gw6] linux -- Python 3.10.0 /usr/bin/python3
Traceback (most recent call last):
  File "/builddir/build/BUILD/hypothesis-hypothesis-python-6.14.3/hypothesis-python/tests/cover/test_lookup.py", line 557, in test_can_register_NewType
    st.register_type_strategy(Name, st.just("Eric Idle"))
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/core.py", line 1714, in register_type_strategy
    raise InvalidArgument("custom_type=%r must be a type")
hypothesis.errors.InvalidArgument: custom_type=%r must be a type
____________________________ test_resolves_NewType _____________________________
[gw1] linux -- Python 3.10.0 /usr/bin/python3
Traceback (most recent call last):
  File "/builddir/build/BUILD/hypothesis-hypothesis-python-6.14.3/hypothesis-python/tests/cover/test_lookup.py", line 456, in test_resolves_NewType
    assert isinstance(from_type(typ).example(), int)
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/strategies.py", line 331, in example
    example_generating_inner_function()
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/strategies.py", line 319, in example_generating_inner_function
    @settings(
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/core.py", line 1037, in wrapped_test
    processed_args = process_arguments_to_given(
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/core.py", line 450, in process_arguments_to_given
    search_strategy.validate()
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/strategies.py", line 400, in validate
    self.do_validate()
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/collections.py", line 46, in do_validate
    s.validate()
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/strategies.py", line 400, in validate
    self.do_validate()
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/strategies.py", line 800, in do_validate
    self.mapped_strategy.validate()
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/strategies.py", line 400, in validate
    self.do_validate()
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/lazy.py", line 135, in do_validate
    w.validate()
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/strategies.py", line 400, in validate
    self.do_validate()
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/strategies.py", line 800, in do_validate
    self.mapped_strategy.validate()
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/strategies.py", line 400, in validate
    self.do_validate()
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/collections.py", line 46, in do_validate
    s.validate()
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/strategies.py", line 400, in validate
    self.do_validate()
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/lazy.py", line 135, in do_validate
    w.validate()
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/strategies.py", line 401, in validate
    self.is_empty
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/strategies.py", line 135, in accept
    recur(self)
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/strategies.py", line 131, in recur
    mapping[strat] = getattr(strat, calculation)(recur)
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/deferred.py", line 70, in calc_is_empty
    return recur(self.wrapped_strategy)
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/deferred.py", line 40, in wrapped_strategy
    result = self.__definition()
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/core.py", line 944, in <lambda>
    lambda thing: deferred(lambda: _from_type(thing)),
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/core.py", line 1010, in _from_type
    raise InvalidArgument(f"thing={thing} must be a type")
hypothesis.errors.InvalidArgument: thing=tests.cover.test_lookup.T must be a type
________________________ test_ghostwriter_on_hypothesis ________________________
[gw1] linux -- Python 3.10.0 /usr/bin/python3
Traceback (most recent call last):
  File "/builddir/build/BUILD/hypothesis-hypothesis-python-6.14.3/hypothesis-python/tests/ghostwriter/test_expected_output.py", line 169, in test_ghostwriter_on_hypothesis
    assert actual == expected
AssertionError: assert '# This test ...abel=label)\n' == '# This test ...abel=label)\n'
    # This test code was written by the `hypothesis.extra.ghostwriter` module
    # and is provided under the Creative Commons Zero public domain dedication.
    
    import hypothesis
    import typing
    from hypothesis import given, settings, strategies as st
    from hypothesis.strategies._internal.strategies import Ex...
  
  ...Full output truncated (96 lines hidden), use '-vv' to show
____________________________ test_resolves_NewType _____________________________
[gw2] linux -- Python 3.10.0 /usr/bin/python3
Traceback (most recent call last):
  File "/builddir/build/BUILD/hypothesis-hypothesis-python-6.14.3/hypothesis-python/tests/typing_extensions/test_backported_types.py", line 73, in test_resolves_NewType
    assert isinstance(from_type(typ).example(), int)
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/strategies.py", line 331, in example
    example_generating_inner_function()
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/strategies.py", line 319, in example_generating_inner_function
    @settings(
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/core.py", line 1037, in wrapped_test
    processed_args = process_arguments_to_given(
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/core.py", line 450, in process_arguments_to_given
    search_strategy.validate()
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/strategies.py", line 400, in validate
    self.do_validate()
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/collections.py", line 46, in do_validate
    s.validate()
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/strategies.py", line 400, in validate
    self.do_validate()
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/strategies.py", line 800, in do_validate
    self.mapped_strategy.validate()
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/strategies.py", line 400, in validate
    self.do_validate()
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/lazy.py", line 135, in do_validate
    w.validate()
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/strategies.py", line 400, in validate
    self.do_validate()
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/strategies.py", line 800, in do_validate
    self.mapped_strategy.validate()
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/strategies.py", line 400, in validate
    self.do_validate()
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/collections.py", line 46, in do_validate
    s.validate()
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/strategies.py", line 400, in validate
    self.do_validate()
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/lazy.py", line 135, in do_validate
    w.validate()
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/strategies.py", line 401, in validate
    self.is_empty
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/strategies.py", line 135, in accept
    recur(self)
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/strategies.py", line 131, in recur
    mapping[strat] = getattr(strat, calculation)(recur)
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/deferred.py", line 70, in calc_is_empty
    return recur(self.wrapped_strategy)
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/deferred.py", line 40, in wrapped_strategy
    result = self.__definition()
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/core.py", line 944, in <lambda>
    lambda thing: deferred(lambda: _from_type(thing)),
  File "/builddir/build/BUILDROOT/python-hypothesis-6.14.3-1.fc35.noarch/usr/lib/python3.10/site-packages/hypothesis/strategies/_internal/core.py", line 1010, in _from_type
    raise InvalidArgument(f"thing={thing} must be a type")
hypothesis.errors.InvalidArgument: thing=tests.typing_extensions.test_backported_types.T must be a type

=========================== short test summary info ============================
FAILED tests/cover/test_lookup.py::test_can_register_NewType - hypothesis.err...
FAILED tests/cover/test_lookup.py::test_resolves_NewType - hypothesis.errors....
FAILED tests/ghostwriter/test_expected_output.py::test_ghostwriter_on_hypothesis
FAILED tests/typing_extensions/test_backported_types.py::test_resolves_NewType
XPASS tests/cover/test_lookup_py38.py::test_simple_optional_key_is_optional 
XPASS tests/cover/test_lookup_py38.py::test_layered_optional_key_is_optional 
XPASS tests/cover/test_lookup.py::test_resolves_weird_types[Sequence] 
= 4 failed, 4529 passed, 4 skipped, 4 xfailed, 3 xpassed, 8 warnings in 312.29s (0:05:12) =

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

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

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 is already included in Fedora 35. To make that update smoother, we're building Fedora packages with all 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 Ben Cotton 2021-08-10 13:35:44 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 35 development cycle.
Changing version to 35.

Comment 2 Fedora Release Engineering 2021-08-22 04:27:56 UTC
Dear Maintainer,

your package has an open Fails To Build From Source bug for Fedora 35.
Action is required from you.

If you can fix your package to build, perform a build in koji, and either create
an update in bodhi, or close this bug without creating an update, if updating is
not appropriate [1]. If you are working on a fix, set the status to ASSIGNED to
acknowledge this. If you have already fixed this issue, please close this Bugzilla report.

Following the policy for such packages [2], your package will be orphaned if
this bug remains in NEW state more than 8 weeks (not sooner than 2021-10-01).

A week before the mass branching of Fedora 36 according to the schedule [3],
any packages not successfully rebuilt at least on Fedora 34 will be
retired regardless of the status of this bug.

[1] https://docs.fedoraproject.org/en-US/fesco/Updates_Policy/
[2] https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/
[3] https://fedorapeople.org/groups/schedule/f-36/f-36-key-tasks.html

Comment 3 Fedora Release Engineering 2021-09-12 04:26:42 UTC
Dear Maintainer,

your package has an open Fails To Build From Source bug for Fedora 35.
Action is required from you.

If you can fix your package to build, perform a build in koji, and either create
an update in bodhi, or close this bug without creating an update, if updating is
not appropriate [1]. If you are working on a fix, set the status to ASSIGNED to
acknowledge this. If you have already fixed this issue, please close this Bugzilla report.

Following the policy for such packages [2], your package will be orphaned if
this bug remains in NEW state more than 8 weeks (not sooner than 2021-10-01).

A week before the mass branching of Fedora 36 according to the schedule [3],
any packages not successfully rebuilt at least on Fedora 34 will be
retired regardless of the status of this bug.

[1] https://docs.fedoraproject.org/en-US/fesco/Updates_Policy/
[2] https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/
[3] https://fedorapeople.org/groups/schedule/f-36/f-36-key-tasks.html

Comment 4 Lumír Balhar 2021-11-19 09:10:36 UTC
Builds fine in rawhide now.


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