Skip to content

[CI infra] Linting fixes and modern Python runtimes support/testing needed #1544

Open

Description

@webknjaz

I noticed that the CI is failing, specifically pre-commit. Plus the recent CPython versions aren't in the CI at all. It's time to add them.


cc @rodrigobnogueira @Polandia94 — would you be able to help out with this? proxy.py is a test dependency of aiohttp, and we periodically need to help them with the infra and maintenance.

For context, I've originally integrated some linting here based on what's in cheroot/cherrypy, ansible/pylibssh, sphinx-contrib/towncrier and perhaps bits of what's under @aio-libs. Some of the things are a little behind compared to my other config templates. For example, I've moved the MyPy and pytest settings to the shared config files (except for where they differ due to multiple invocations via matrices).

The current linting failure is probably related to the transitive deps being too new while pre-commit being run under Python 3.10 in GHA: https://github.com/abhinavsingh/proxy.py/actions/runs/37005868712/job/110834183302?pr=1543.

I recommend starting with granular improvements and minimal diff.

Some of my newer examples that are also tox-based can be found @ https://github.com/tox-dev/tox-pre-commit/blob/32376c46fdea0d11264d3efdbe11b7faba52f92f/.pre-commit-config.yaml and https://github.com/ansible/awx_plugins.interfaces/blob/a60405976f7b24ccca1a5d/.pre-commit-config.yaml.

Activity

  1. webknjaz commented on Oct 2, 2026

    @webknjaz
    ContributorAuthor

    The current linting failure is probably related to the transitive deps being too new while pre-commit being run under Python 3.10 in GHA: abhinavsingh/proxy.py/actions/runs/37005868712/job/110834183302?pr=1543.

    A hack for this one would be pinning setuptools, it seems: https://github.com/sphinx-contrib/sphinxcontrib-towncrier/pull/136/changes#diff-63a9c44a44acf85fea213a857769990937107cf072831e1a26808cfde9d096b9R188-R193

  2. Polandia94 commented on Oct 2, 2026

    @Polandia94

    I added to my to do list, I will assign myself when I start, but that could be in a couple of weeks, so if anyone want to start before it's welcome

  3. rodrigobnogueira commented on Oct 4, 2026

    @rodrigobnogueira

    I can help with the CI part. A possible plan is a few small PRs, in this order:

    1. Fix the lint job (Pin setuptools and docutils in the Flake8 pre-commit hook #1545). The Flake8 hook fails because flake8-commas (installed through wemake-python-styleguide) imports pkg_resources, which setuptools 82 removed, so the hook pins setuptools < 82. With that pinned, docutils 0.22.1 and later report the module docstring header that nearly every file shares as RST399 (229 hits) instead of the RST499 that .flake8 already ignores, so the hook also pins docutils < 0.22.1.
    2. Fix the MyPy hook on pre-commit.ci (Run the MyPy pre-commit hook on Python 3.10 #1546). pre-commit.ci builds hook environments with Python 3.14, where MyPy 0.910 fails with a misleading "The typed_ast package is not installed" error because 3.14 removed ast.Str and similar names. Running the hook on Python 3.10, as the Flake8 hook already does, fixes it.
    3. Add CPython 3.13 to the test matrix. The test suite already passes on it locally.
    4. Add CPython 3.14 separately, since it needs more than CI changes. The pinned pytest-asyncio (0.21.1) uses asyncio APIs that 3.14 deprecates, so it needs a bump, and pytest with it. There is also a bug in proxy.py itself: proxy/core/work/remote.py and proxy/core/work/fd/remote.py call asyncio.get_event_loop_policy().get_event_loop(), which raises on 3.14 in the worker processes, so with --local-executor 0 every request times out.
  4. webknjaz commented on Oct 4, 2026

    @webknjaz
    ContributorAuthor

    Thanks folks! This is a slow project so it may take a minute for @abhinavsingh to get to those PRs. Just wanted to get thing moving early.

  5. webknjaz commented on Oct 8, 2026

    @webknjaz
    ContributorAuthor

    Looks like #1547 could be another related follow-up.

  6. abhinavsingh commented on Oct 20, 2026

    @abhinavsingh
    Owner

    Hi @webknjaz , thanks for pulling me back into the project. I missed these notifications and open issues. I am travelling, but wanted to leave a quick note to acknowledge. I will jump back into it over the weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions