Skip to content
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

Improve Python 3.12 compatibility #389

Merged
merged 9 commits into from Dec 10, 2023
Merged

Conversation

achimnol
Copy link
Member

@achimnol achimnol commented Dec 7, 2023

What do these changes do?

It improves Python 3.12 compatibility.

This PR relaxes our direct dependency to aiohttp to allow 3.9 and higher, by changing the requirement expression from ~=3.8.5 to >=3.8.5, while pinning its version to 3.9.1 in requirements-dev.txt used for local development and CI/CD tests. It also pins the uvloop version to 0.19.0 in the same way.

setup.cfg (relaxed, minimum only) requirements-dev.txt (pinned for dev & CI)
aiohttp>=3.8.5 aiohttp==3.9.1
uvloop>=0.17.0 uvloop==0.19.0
aioconsole>=0.7.0 aioconsole==0.7.0

aiomonitor is a library that can be used various combinations of Python and aiohttp versions. The new aiohttp 3.9 release is required to run on Python 3.12, and there is no critical need to hold the aiohttp version back to the 3.8.x series to serve our webui.

In general, it is better to set the minimum compatible versions on our dependencies to maximize the dependency compatibility unless there are known critical regressions on specific versions.

This PR also sets the minimum required version of aioconsole to 0.7.0, to avoid the incompatibility issue with Python 3.11.7+ and 3.12.1+ (vxgmichel/aioconsole#114).

Are there changes in behavior for the user?

No.

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • Add a new news fragment into the CHANGES folder
    • name it <issue_id>.<type> (e.g. 588.bugfix)
    • if you don't have an issue_id change it to the pr id after creating the PR
    • ensure type is one of the following:
      • .feature: Signifying a new feature.
      • .bugfix: Signifying a bug fix.
      • .doc: Signifying a documentation improvement.
      • .removal: Signifying a deprecation or removal of public API.
      • .misc: A ticket has been closed, but it is not of interest to users.
    • Make sure to use full sentences with correct case and punctuation, for example: Fix issue with non-ascii contents in doctest text files.

@achimnol achimnol added deps-update dependencies Pull requests that update a dependency file maintenance labels Dec 7, 2023
@achimnol achimnol self-assigned this Dec 7, 2023
@achimnol achimnol added this pull request to the merge queue Dec 7, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Dec 7, 2023
@webknjaz
Copy link
Member

webknjaz commented Dec 7, 2023

@achimnol I think it's the RTD requirement that is not yet compatible with merge queues: https://github.com/orgs/aio-libs/discussions/27#discussioncomment-7395467. We may have to drop it from the required checks.

Could you +1 this request? readthedocs/readthedocs.org#10021

changes/389.fix.md Outdated Show resolved Hide resolved
@achimnol
Copy link
Member Author

achimnol commented Dec 7, 2023

@achimnol I think it's the RTD requirement that is not yet compatible with merge queues: github.com/orgs/aio-libs/discussions/27#discussioncomment-7395467. We may have to drop it from the required checks.

Could you +1 this request? readthedocs/readthedocs.org#10021

Just added a +1 there!

@achimnol achimnol added this pull request to the merge queue Dec 7, 2023
@achimnol
Copy link
Member Author

achimnol commented Dec 7, 2023

After this, I'm going to update requirements-dev.txt to work with Python 3.12 as well via a separate PR.

@achimnol
Copy link
Member Author

achimnol commented Dec 7, 2023

Ah... RTD is blocking the merge queue.... 😞
@webknjaz Until the RTD-side issue is resolved, could you temporarily remove RTD build from the required checks?

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Dec 7, 2023
@achimnol achimnol added this pull request to the merge queue Dec 9, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 9, 2023
@achimnol
Copy link
Member Author

achimnol commented Dec 9, 2023

Ummm... the test failure turned out to be a new regression introduced in Python 3.11.7 as GitHub Action began to use it. In my local setup, the test passes with Python 3.11.6 and breaks with Python 3.11.7...... T_T

@achimnol
Copy link
Member Author

achimnol commented Dec 9, 2023

Currently blocked by vxgmichel/aioconsole#114

@achimnol achimnol added this pull request to the merge queue Dec 10, 2023
@achimnol achimnol removed this pull request from the merge queue due to a manual request Dec 10, 2023
@achimnol achimnol added this pull request to the merge queue Dec 10, 2023
@achimnol achimnol changed the title Relax the aiohttp version range as being a library Improve Python 3.12 compatibility Dec 10, 2023
Merged via the queue into main with commit b5932ad Dec 10, 2023
14 checks passed
@achimnol achimnol deleted the fix/relax-aiohttp-dep-version branch December 10, 2023 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file deps-update maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants