-
-
Notifications
You must be signed in to change notification settings - Fork 114
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
Support python 3.11, fix bug in CodeType arg order #110
base: master
Are you sure you want to change the base?
Conversation
I ran into this too and made my own fix before finding yours. I just tested your changes with version 3.11 and can confirm that it fixed my problem |
Add patch from open PR pjkundert/cpppo#110
Can we get this merged? |
Hi @pjkundert, just wanted to follow up on this, any chance we could please merge this PR? |
Hi, @crmaxj;
|
No worries at all, that is super understandable! Just sent a small donation your way, keep up the good work. |
Wow thanks! That's really appreciated. I'll try to get to it soon. |
5d7841f
to
00e38df
Compare
I had an import failing when trying to run my
cpppo
code in python 3.11:I looked into this and it looked like there was some python-version-specific code in
misc.py
.In addition to adding support for python version 3.11, I also noticed what I think is a bug in the existing code. If you run
help(types.CodeType)
in a python 3.8, 3.9, or 3.10 shell, you'll see that the second argument tocode
isposonlyargcount
, but in the current code it is assumed to bekwonlyargcount
. I fixed that in this PR as well.I tested this by running the import in python versions 3.7, 3.9, 3.10, and 3.11. I did not test in python 2.
It would be cool if someone with more knowledge of this code than me could kill this function entirely! Also I didn't see any CONTRIBUTING docs, so apologies if I'm doing this wrong. Thank you!