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

Fix compatibility with Python 3.10, refs #358 #359

Merged
merged 3 commits into from Oct 24, 2021

Conversation

simonw
Copy link
Contributor

@simonw simonw commented Oct 8, 2021

What do these changes do?

Tests now also run against Python 3.10, and code incorporates a workaround for a bug in Python 3.10 that affects Janus.

Related issue number

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes - (not needed)
  • Add a new news fragment into the CHANGES folder (skipped, not sure how to do this)

@@ -43,7 +43,7 @@ jobs:
needs: lint
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Necessary to use strings rather than floating point numbers here, because otherwise 3.10 is interpreted as 3.1

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say only wrap "3.10" and keep others as is.

Copy link
Member

@achimnol achimnol Oct 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better to wrap them all for consistency, but have no strong opinion on this as long as it would not make future confusion.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both variants work technically.
I prefer the current version; if we process 3.10 as a string -- why others should be numbers? Again, technically the version is not a number but a string.

Copy link
Member

@webknjaz webknjaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but I'll leave this to the maintainers to merge.

@codecov
Copy link

codecov bot commented Oct 8, 2021

Codecov Report

Merging #359 (5f2a387) into master (d7970f8) will decrease coverage by 0.06%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #359      +/-   ##
==========================================
- Coverage   95.52%   95.45%   -0.07%     
==========================================
  Files           4        4              
  Lines        1274     1277       +3     
  Branches       84       86       +2     
==========================================
+ Hits         1217     1219       +2     
  Misses         50       50              
- Partials        7        8       +1     
Flag Coverage Δ
unit 95.30% <33.33%> (-0.15%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
janus/__init__.py 99.36% <66.66%> (-0.32%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d7970f8...5f2a387. Read the comment docs.

Copy link
Member

@achimnol achimnol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've confirmed the symptom reported in #358 and that this PR well handles it.

@@ -43,7 +43,7 @@ jobs:
needs: lint
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
Copy link
Member

@achimnol achimnol Oct 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better to wrap them all for consistency, but have no strong opinion on this as long as it would not make future confusion.

@achimnol
Copy link
Member

@asvetlov Could you review & merge this PR to release a new version?
I think this is a major blocker for many asyncio projects to run with Python 3.10 and it is expected that we still need to wait for about 1.5 months to get Python 3.10.1 which will fix the issue in the upstream.

@asvetlov
Copy link
Member

Thanks!

@asvetlov asvetlov merged commit a6227af into aio-libs:master Oct 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants