pytest-dev / pytest-html

Plugin for generating HTML reports for pytest results
Other
707 stars 236 forks source link

Drop python 3.8, add support for 3.12, 3.13 #842

Closed Pierre-Sassoulas closed 2 days ago

BeyondEvil commented 3 days ago

Most errors are related to pkg_resources which I guess is entirely removed in 3.12.

However, the code:

    except AttributeError:
        # Needed for python < 3.9
        return pkg_resources.resource_string(
            "pytest_html", os.path.join("assets", "style.css")
        ).decode("utf-8")

We shouldn't hit.

So something is causing an attribute error here: https://github.com/pytest-dev/pytest-html/blob/master/testing/test_unit.py#L22

EDIT: Just realized we can just remove that code since we've dropped support for < 3.9. 🤷‍♂️

Pierre-Sassoulas commented 3 days ago

Thanks for the review @BeyondEvil ! I did not manage to install locally yet (absolute path error I don't understand). Planning to work on this in the next few days and hopefully be able to reproduce the CI fail locally if adding setuptools doesn't work.

BeyondEvil commented 3 days ago

Thanks for the review @BeyondEvil ! I did not manage to install locally yet (absolute path error I don't understand). Planning to work on this in the next few days and hopefully be able to reproduce the CI fail locally if adding setuptools doesn't work.

Ugh... windows builds are always sooo slow.

Anyway, I think it's fixed.

Re-add the devel stuff and I think we're good to merge. 👍

Thanks for the PR! ❤️ 🙏

Pierre-Sassoulas commented 3 days ago

Nice ! Will do. I plan to merge all the dependabot one next, there's a bunch of pending cve warning that stressed me out :D

Pierre-Sassoulas commented 2 days ago

Thank you for fixing the pipeline, I had a hard time setting up the dev env locally to troubleshoot !