-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Infra: replace feedgen/lxml dependency to test Python 3.12-dev #2973
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
CAM-Gerlach
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM otherwise (I'd been meaning to update the CI Python versions, but hadn't quite gotten around to it yet).
One thing, though, that's bothered me for a while. It would likely be confusing and frustrating for PEP authors and contributors if one of our CI check jobs run on all PRs and our main branch suddenly started failing due to a change in an alpha Python version outside of their control. Furthermore, it also means that we're executing (or at least a slightly hacky skips on) several unnecessary steps (clean up, deploy, purge CDN cache) twice, and we're also running both jobs on every single PR (as opposed to e.g. just those that actually touch infra/rendering code). Conversely, it means we're not actually checking that the PEPs can actually be build on the full range of Python versions and platforms we nominally support, only Linux with the very latest stable and development Python versions.
To avoid all of this, what about we remove the 3.12-dev job from the render workflow matrix, as well as the matrix.python-version check from the Deploy step, and instead add a Render PEPs step to the test workflow, running python -b -X dev -W error build.py (for cross platform support and warning checks)? This means:
- We ensure PEP rendering works on all supported Python versions and platforms
- The CI checks on PEP author/contributor facing PRs don't suddenly start failing due to an alpha Python version issue unrelated to their change
- We're not running extra testing jobs on changes that actually touch any infra (we should also expand the
pathsto cover more relevant files, too, likerequirements.txt,build.py,conf.py,generate_rss.py, andpytest.ini) - The CIs on infra PRs will detect and report Python-level warnings (Deprecation, etc), as is considered a best practice for CI runs.
Or, in hindsight, perhaps best that I make this a separate followup PR?
|
I feel we use dev Python in order to be good citizens and help catch regressions in main faster. It's true that this could confuse some contributors, but this repo's contributors tend to be rather sophisticated Python users, so I think the tradeoff is probably worth it. |
|
Well, perhaps, but we're still touching some aspects of infra semi-regularly so any issue would still get found relatively promptly, considering that the If we want more certainty than that, a much better solution than adding it to the PEP content checks on every commit is to just run a GitHub Action against Also, even if were to not remove it from the |
|
Ah, I think your main point is that That sounds fine to me. About the paths, I'd probably remove them from And I don't think we need a cron.
Yeah, I think this would be good as a followup, and I'll merge this. Thank you! |
I wanted to bump
3.11-devto3.12-devon the CI, but https://github.com/lkiesow/python-feedgen depends on https://lxml.de/, which is difficult to build from source, even for Ubuntu.We're writing out fairly simple RSS, so we can remove the feedgen/lxml dependencies, and it takes less code to do so.
In addition to testing
3.12-devon all operating systems, this means we can also now test 3.11/Windows.I also updated the
generate_rss.pyscript to take an optional output directory (likebuild.pydoes), so we can also generate RSS on the Read the Docs previews.And let's bump RTD to use 3.11 instead of 3.10 for build previews.