-
Notifications
You must be signed in to change notification settings - Fork 242
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 for Python 3.11 #668
Comments
Hi, I'm using Mutmut project for my mutation tests. This project uses Pony and since I upgraded from python 3.10.1 to python 3.11.0 I have the same issue
to reproduce it with Best regards |
Is there are full traceback available? |
In my case ( $ mutmut html
Traceback (most recent call last):
File "/Users/.../bin/mutmut", line 8, in <module>
sys.exit(climain())
^^^^^^^^^
File "/Users/.../lib/python3.11/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/.../lib/python3.11/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/Users/.../lib/python3.11/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/.../lib/python3.11/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/.../lib/python3.11/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/.../lib/python3.11/site-packages/mutmut/__init__.py", line 882, in wrapper
f(*args, **kwargs)
File "/Users/.../lib/python3.11/site-packages/mutmut/__main__.py", line 234, in html
create_html_report(dict_synonyms)
File "/Users/.../lib/python3.11/site-packages/mutmut/cache.py", line 88, in wrapper
return f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "<string>", line 2, in create_html_report
File "/Users/.../lib/python3.11/site-packages/pony/orm/core.py", line 519, in new_func
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/Users/.../lib/python3.11/site-packages/mutmut/cache.py", line 264, in create_html_report
mutants = list(select(x for x in Mutant))
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/.../lib/python3.11/site-packages/pony/orm/core.py", line 5560, in select
return make_query(args, frame_depth=cut_traceback_depth+1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/.../lib/python3.11/site-packages/pony/orm/core.py", line 5546, in make_query
tree, external_names, cells = decompile(gen)
^^^^^^^^^^^^^^
File "/Users/.../lib/python3.11/site-packages/pony/orm/decompiling.py", line 38, in decompile
decompiler = Decompiler(codeobject)
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/.../lib/python3.11/site-packages/pony/orm/decompiling.py", line 156, in __init__
decompiler.decompile()
File "/Users/.../lib/python3.11/site-packages/pony/orm/decompiling.py", line 256, in decompile
throw(DecompileError('Unsupported operation: %s' % opname))
File "/Users/.../lib/python3.11/site-packages/pony/utils/utils.py", line 99, in throw
raise exc
pony.orm.decompiling.DecompileError: Unsupported operation: RETURN_GENERATOR
|
https://docs.python.org/3/library/dis.html#opcode-RETURN_GENERATOR seems to be the new addition to the python bytecode. python/cpython#90567 for the issue with more information. |
Here's a complete tracelog of the testsuite failure running 3.11, it can help.
|
Hello this is being in work. You can check it here: #671 |
I installed it with |
I can confirm lambdas don't work under Python 3.11 on the latest Pony version |
Ran into the same while trying to use mutmut. |
+1 |
+1 |
+1 |
same problem. python 3.11.3 `DecompileError pony.orm.decompiling.DecompileError: Unsupported operation: RETURN_GENERATOR
The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error. To switch between the interactive traceback and the plaintext one, you can click on the "Traceback" headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side. You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:
` |
+1 |
Apparently, PonyORM does not support Python version 3.11 properly yet. In case of some generator-involving expressions, such as: orm.count(row.id for row in cache.Cache); there appears the following: pony.orm.decompiling.DecompileError: Unsupported operation: RETURN_GENERATOR however using construction cache.Cache.select().count() works fine. Ref: ponyorm/pony#668
Apparently, PonyORM does not support Python version 3.11 properly yet. In case of some generator-involving expressions, such as: orm.count(row.id for row in cache.Cache); there appears the following: pony.orm.decompiling.DecompileError: Unsupported operation: RETURN_GENERATOR however using construction cache.Cache.select().count() works fine. Ref: ponyorm/pony#668
+1 |
+1 same problem while trying to use mutmut |
➕1️⃣ mutmut issue |
+1 trying to use mutmut here |
+1 |
Came from trying to use mutmut on 3.11 on arch, installing |
I'm still having trouble with Pony on 3.11 where lambdas are being used; it seems to be the same issue reported in #681, which shouldn't have been closed IMO since "regressing to Python 3.10" is not an adequate long-term fix. Is there any attention on that particular issue? More and more of my Python environments are defaulting to 3.11 and it's getting a little painful to manage. |
looks to have a PR open #671 for anyone looking for this. I've just installed from that branch in the meantime, though you must accept some level of risk as tests were failing. Seems good to me. |
It looks like #671 has been successfully merged. Is there any plan to do a pypi release? The current pypi is pretty outdated anyway (January 2022 at present). |
The official PonyORM 0.7.17 release with Python 3.11 support is out! |
Awesome! Thank you so much for all your hard work. |
Apparently, PonyORM does not support Python version 3.11 properly yet. In case of some generator-involving expressions, such as: orm.count(row.id for row in cache.Cache); there appears the following: pony.orm.decompiling.DecompileError: Unsupported operation: RETURN_GENERATOR however using construction cache.Cache.select().count() works fine. Ref: ponyorm/pony#668
Are there any plans to support Python 3.11?
I ran my app's test suite after bumping Python from 3.9.7 to 3.11.0 and got a bunch of the following:
The text was updated successfully, but these errors were encountered: