Bug 2075405 - python-flit fails to build with Python 3.11: AssertionError: assert None == 'readme.md'
Summary: python-flit fails to build with Python 3.11: AssertionError: assert None == '...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: python-flit
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomáš Hrnčiar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.11
TreeView+ depends on / blocked
 
Reported: 2022-04-14 06:50 UTC by Tomáš Hrnčiar
Modified: 2022-05-25 11:13 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-25 11:13:43 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2022-04-14 06:50:50 UTC
python-flit fails to build with Python 3.11.0a7.


=================================== FAILURES ===================================
_________________________ test_find_readme[readme.md] __________________________

readme_file = 'readme.md'

    @pytest.mark.parametrize(
        "readme_file",
        ["readme.md", "README.MD", "README.md",
         "Readme.md", "readme.MD", "readme.rst",
         "readme.txt"])
    def test_find_readme(readme_file):
        with make_dir([readme_file]) as td:
            ib = init.IniterBase(td)
>           assert ib.find_readme() == readme_file
E           AssertionError: assert None == 'readme.md'
E            +  where None = <bound method IniterBase.find_readme of <flit.init.IniterBase object at 0x7fdef22533d0>>()
E            +    where <bound method IniterBase.find_readme of <flit.init.IniterBase object at 0x7fdef22533d0>> = <flit.init.IniterBase object at 0x7fdef22533d0>.find_readme

tests/test_init.py:196: AssertionError
_________________________ test_find_readme[README.MD] __________________________

readme_file = 'README.MD'

    @pytest.mark.parametrize(
        "readme_file",
        ["readme.md", "README.MD", "README.md",
         "Readme.md", "readme.MD", "readme.rst",
         "readme.txt"])
    def test_find_readme(readme_file):
        with make_dir([readme_file]) as td:
            ib = init.IniterBase(td)
>           assert ib.find_readme() == readme_file
E           AssertionError: assert None == 'README.MD'
E            +  where None = <bound method IniterBase.find_readme of <flit.init.IniterBase object at 0x7fdef200acd0>>()
E            +    where <bound method IniterBase.find_readme of <flit.init.IniterBase object at 0x7fdef200acd0>> = <flit.init.IniterBase object at 0x7fdef200acd0>.find_readme

tests/test_init.py:196: AssertionError
_________________________ test_find_readme[README.md] __________________________

readme_file = 'README.md'

    @pytest.mark.parametrize(
        "readme_file",
        ["readme.md", "README.MD", "README.md",
         "Readme.md", "readme.MD", "readme.rst",
         "readme.txt"])
    def test_find_readme(readme_file):
        with make_dir([readme_file]) as td:
            ib = init.IniterBase(td)
>           assert ib.find_readme() == readme_file
E           AssertionError: assert None == 'README.md'
E            +  where None = <bound method IniterBase.find_readme of <flit.init.IniterBase object at 0x7fdef2026b50>>()
E            +    where <bound method IniterBase.find_readme of <flit.init.IniterBase object at 0x7fdef2026b50>> = <flit.init.IniterBase object at 0x7fdef2026b50>.find_readme

tests/test_init.py:196: AssertionError
_________________________ test_find_readme[Readme.md] __________________________

readme_file = 'Readme.md'

    @pytest.mark.parametrize(
        "readme_file",
        ["readme.md", "README.MD", "README.md",
         "Readme.md", "readme.MD", "readme.rst",
         "readme.txt"])
    def test_find_readme(readme_file):
        with make_dir([readme_file]) as td:
            ib = init.IniterBase(td)
>           assert ib.find_readme() == readme_file
E           AssertionError: assert None == 'Readme.md'
E            +  where None = <bound method IniterBase.find_readme of <flit.init.IniterBase object at 0x7fdef1fe3010>>()
E            +    where <bound method IniterBase.find_readme of <flit.init.IniterBase object at 0x7fdef1fe3010>> = <flit.init.IniterBase object at 0x7fdef1fe3010>.find_readme

tests/test_init.py:196: AssertionError
_________________________ test_find_readme[readme.MD] __________________________

readme_file = 'readme.MD'

    @pytest.mark.parametrize(
        "readme_file",
        ["readme.md", "README.MD", "README.md",
         "Readme.md", "readme.MD", "readme.rst",
         "readme.txt"])
    def test_find_readme(readme_file):
        with make_dir([readme_file]) as td:
            ib = init.IniterBase(td)
>           assert ib.find_readme() == readme_file
E           AssertionError: assert None == 'readme.MD'
E            +  where None = <bound method IniterBase.find_readme of <flit.init.IniterBase object at 0x7fdef32c6b50>>()
E            +    where <bound method IniterBase.find_readme of <flit.init.IniterBase object at 0x7fdef32c6b50>> = <flit.init.IniterBase object at 0x7fdef32c6b50>.find_readme

tests/test_init.py:196: AssertionError
_________________________ test_find_readme[readme.rst] _________________________

readme_file = 'readme.rst'

    @pytest.mark.parametrize(
        "readme_file",
        ["readme.md", "README.MD", "README.md",
         "Readme.md", "readme.MD", "readme.rst",
         "readme.txt"])
    def test_find_readme(readme_file):
        with make_dir([readme_file]) as td:
            ib = init.IniterBase(td)
>           assert ib.find_readme() == readme_file
E           AssertionError: assert None == 'readme.rst'
E            +  where None = <bound method IniterBase.find_readme of <flit.init.IniterBase object at 0x7fdef32e4d10>>()
E            +    where <bound method IniterBase.find_readme of <flit.init.IniterBase object at 0x7fdef32e4d10>> = <flit.init.IniterBase object at 0x7fdef32e4d10>.find_readme

tests/test_init.py:196: AssertionError
_________________________ test_find_readme[readme.txt] _________________________

readme_file = 'readme.txt'

    @pytest.mark.parametrize(
        "readme_file",
        ["readme.md", "README.MD", "README.md",
         "Readme.md", "readme.MD", "readme.rst",
         "readme.txt"])
    def test_find_readme(readme_file):
        with make_dir([readme_file]) as td:
            ib = init.IniterBase(td)
>           assert ib.find_readme() == readme_file
E           AssertionError: assert None == 'readme.txt'
E            +  where None = <bound method IniterBase.find_readme of <flit.init.IniterBase object at 0x7fdef3263a50>>()
E            +    where <bound method IniterBase.find_readme of <flit.init.IniterBase object at 0x7fdef3263a50>> = <flit.init.IniterBase object at 0x7fdef3263a50>.find_readme

tests/test_init.py:196: AssertionError
______________________ test_init_readme_found_yes_choosen ______________________

    def test_init_readme_found_yes_choosen():
        responses = ['test_module_name',
                     'Test Author',
                     'test_email',
                     '',   # Home page omitted
                     '4',  # Skip - choose a license later
                    ]
        with make_dir(["readme.md"]) as td, \
              patch_data_dir(), \
              faking_input(responses):
            ti = init.TerminalIniter(td)
            ti.initialise()
            with Path(td, 'pyproject.toml').open('rb') as f:
                data = tomli.load(f)
    
>       assert data['project'] == {
            'authors': [{'name': 'Test Author', 'email': 'test_email'}],
            'name': 'test_module_name',
            'readme': 'readme.md',
            'dynamic': ['version', 'description'],
        }
E       AssertionError: assert {'authors': [..._module_name'} == {'authors': [...: 'readme.md'}
E         Omitting 3 identical items, use -vv to show
E         Right contains 1 more item:
E         {'readme': 'readme.md'}
E         Use -v to get the full diff

tests/test_init.py:220: AssertionError
----------------------------- Captured stdout call -----------------------------
Choose a license (see http://choosealicense.com/ for more info)
1. MIT - simple and permissive
2. Apache - explicitly grants patent rights
3. GPL - ensures that code based on this is shared with the same terms
4. Skip - choose a license later

Written pyproject.toml; edit that file to add optional extra info.
=========================== short test summary info ============================
FAILED tests/test_init.py::test_find_readme[readme.md] - AssertionError: asse...
FAILED tests/test_init.py::test_find_readme[README.MD] - AssertionError: asse...
FAILED tests/test_init.py::test_find_readme[README.md] - AssertionError: asse...
FAILED tests/test_init.py::test_find_readme[Readme.md] - AssertionError: asse...
FAILED tests/test_init.py::test_find_readme[readme.MD] - AssertionError: asse...
FAILED tests/test_init.py::test_find_readme[readme.rst] - AssertionError: ass...
FAILED tests/test_init.py::test_find_readme[readme.txt] - AssertionError: ass...
FAILED tests/test_init.py::test_init_readme_found_yes_choosen - AssertionErro...
=================== 8 failed, 192 passed, 2 skipped in 4.96s ===================

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/04208101-python-flit/

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

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 Tomáš Hrnčiar 2022-05-25 11:13:43 UTC
Seems like this was some transient failure. Flit builds in Python 3.11 COPR.


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