-
Notifications
You must be signed in to change notification settings - Fork 160
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
Update byte-code for Python 3.13 #1095
Update byte-code for Python 3.13 #1095
Conversation
New scipy lockfiles are broken Traceback (most recent call last):
File "/Users/guyer/mambaforge-arm/lib/python3.10/site-packages/conda/exception_handler.py", line 18, in __call__
return func(*args, **kwargs)
File "/Users/guyer/mambaforge-arm/lib/python3.10/site-packages/conda/cli/main.py", line 61, in main_subshell
exit_code = do_call(args, parser)
File "/Users/guyer/mambaforge-arm/lib/python3.10/site-packages/conda/cli/conda_argparse.py", line 205, in do_call
result = getattr(module, func_name)(args, parser)
File "/Users/guyer/mambaforge-arm/lib/python3.10/site-packages/conda/notices/core.py", line 132, in wrapper
return func(*args, **kwargs)
File "/Users/guyer/mambaforge-arm/lib/python3.10/site-packages/conda/cli/main_create.py", line 154, in execute
return install(args, parser, "create")
File "/Users/guyer/mambaforge-arm/lib/python3.10/site-packages/conda/cli/install.py", line 308, in install
explicit(specs, prefix, verbose=not context.quiet)
File "/Users/guyer/mambaforge-arm/lib/python3.10/site-packages/conda/deprecations.py", line 174, in inner
return func(*args, **kwargs)
File "/Users/guyer/mambaforge-arm/lib/python3.10/site-packages/conda/misc.py", line 128, in explicit
raise AssertionError(
AssertionError: Missing package cache records for: conda-forge/linux-64::x264==1!164.3095=h166bdaf_2[md5=6c99772d483f566d59e25037fea2c4b1] |
@@ -287,6 +291,11 @@ def _py3kInstructions(self, op, style, argDict, id, freshen): | |||
stack.append(self._unop[ins.opcode] + '(' + stack.pop() + ')') | |||
elif ins.opcode in self._binop: | |||
stack.append(stack.pop(-2) + " " + self._binop[ins.opcode] + " " + stack.pop()) | |||
elif ins.opname == 'UNARY_NEGATIVE': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of this code is of the form:
if dis.opname[bytecode] == 'UNARY_CONVERT':
stack.append("`" + stack.pop() + "`")
It could be cleaned up by having a dictionary that relates UNARY_CONVERTER
to what's inside the stack.append
. You would then just have one line of
stack.append(relation_dict.get(disopname[bytecode], otherfunc()))
and use get
to call another function for the edge cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's grown organically over a bazillion years, but I'll give that a think
probably want to squash most of these commits |
Fixes #1094