-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Add support for specifying specific Lua runtime version #287
Comments
Oh, so redis supports only LUA 5.1 while fakeredis supports LUA 5.4. |
@cunla yeah, this is also doable and valid. I just thought it might break other users' scripts, so it might be better to leave a default as 5.4 for this minor version with an ability to select a custom one, and then make 5.1 a default in the next major version. |
The issue is with lupa2.0. |
Sure, but can it be the feature of the fakeredis to have the ability to set a specific Lua version or at least have 5.1 as a default one? I don't think lupa maintainers will ever update 1.14.x version. |
A bug should be opened on lupa package. They claim 5.1 is supported in v2. |
Sorry, but I don't get it. How does opening an issue ticket in lupa package fix this problem? And what even is the exact problem with lupa? As stated in lupa documentation:
At the time of writing, the latest version of Lua is 5.4. So when you do from lupa import LuaRuntime it's the 5.4 that gets used. But in this specific Redis scenario, the Lua version is fixed to 5.1, so importing the LuaRuntime should be as follows: from lupa.lua51 import LuaRuntime |
So with lupa2 - |
ok, my bad for not checking it, I see what you mean. For some strange reason lupa ships only with 5.[234] and not 5.1. |
I created an issue on lupa, closing this issue. |
I also opened the issue some time ago right here. |
Good point... |
thank you! |
Is your feature request related to a problem? Please describe.
As stated in Redis documentation, the only supported Lua runtime is Lua 5.1. Logically, I would also expect it to work with Lua 5.x, because the new minor versions should be backward-compatible with previous minor versions. However, that is not the case. In Lua 5.2
unpack
was completely removed and replaced withtable.unpack
.So when using Lua with fakeredis, the only available version is
5.4
and in the real-world environment it's5.1
. Being unable to fix the Lua version and use one of somebody's choice forces to do such a fix to make it working:Describe the solution you'd like
Probably, a good solution will be to pass Lua version with an environment variable like
FAKEREDIS_LUA_VERSION
and default it to the latest one in case it's not present or lupa doesn't support runtime for this version.Upvote & Fund
The text was updated successfully, but these errors were encountered: