-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
assert instr.opname.startswith("CALL_") throws on Python 3.11 #49
Comments
Thanks for the report! It was inevitable that something would break with how we are reaching into internals like this. The whole "magic" thing was a mistake of a feature I think, oh well. I'll take a look and try to come up with some workaround. |
So, apparently CALL_FUNCTION, CALL_FUNCTION_KW, CALL_METHOD, CALL_METHOD_KW were removed from Python 3.11. See python/cpython#88691 for the details. |
Thanks! Looking forward to it! |
OK, so brownie is using a vendored version of docopt, so if I fix the bug here then you won't see that change unless they pull that in. I still will look for the bug and probably fix it, but FYI you are going to have to go through more steps. |
1. lockfiles, so CI can be consistent. It wasn't locked and was failing because of this. 2. less boiler plate for building and uploading wheels, for setting up dev env 3. allows venvs for different python verisons, useful for eg #49 4. less config files 5. add metadata to pyproject.toml, for better ecosystem interoperability 6. Just more modern and better updates.
1. lockfiles, so CI can be consistent. It wasn't locked and was failing because of this. 2. less boiler plate for building and uploading wheels, for setting up dev env 3. allows venvs for different python verisons, useful for eg #49 4. less config files 5. add metadata to pyproject.toml, for better ecosystem interoperability 6. Just more modern and better updates.
OK this is fixed in #51 (by just deleting the problematic feature ;) ). You will now need to get brownie to re-pull this updated version (or perhaps depend on it from PyPI, I'm not sure why they have it vendored, but they are going to keep getting this problem otherwise) I'll leave this open for now if you have any problems, but will close soon. |
Upgrade docopt to ver. 0.9.0 to restore compatibility with Python 3.11. See jazzband/docopt-ng#49 for further details. Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Hello!
Similar to this StackOverflow message I've got the same error while trying to (indirectly) use docopt-ng with Python 3.11.
I've added
print(instr.opname)
right after the line 941 and the resulting list of instructions indeed doesn't have anything stareted with CALL_ (see file atached). On the contrary here is a move shorter list of instructions when I run the same with Python 3.10:If I remove the following block completely along with
output_value_assigned
variable then everything seems to work just fine with Python 3.11:docopt-ng/docopt/__init__.py
Lines 937 to 950 in 130a542
The text was updated successfully, but these errors were encountered: