Open crmaxj opened 1 year ago
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
Can we get this merged?
Hi @pjkundert, just wanted to follow up on this, any chance we could please merge this PR?
Hi, @crmaxj;
Sorry, I've been super busy with other work! I have a huge branch that includes all this and many other fixes (feature-pro).
Unfortunately, nobody seems all that interested in this project, so I've had to prioritise paying work! I'll see if I can get to it soon.
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.
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!