python-discord / snekbox

Easy, safe evaluation of arbitrary Python code
https://pythondiscord.com
MIT License
214 stars 39 forks source link

Multiple binary support api #196

Closed ChrisLovering closed 2 months ago

ChrisLovering commented 1 year ago

This allows setting a binary_path key in the request body to /eval to specify which binary to run under.

If not supplied, it defaults to "/snekbin/python/default/bin/python".

https://github.com/python-discord/snekbox/pull/196/commits/0c9b234011f21ce7bdc993957867610dfec1258f is needed as previously we were dropping the text after the last period when creating the path to install Python to. However, for versions such as3.13-dev this would result in it being installed into /snekbin/3. Instead, we now split on the last . or the last -

coveralls commented 1 year ago

Coverage Status

coverage: 89.158% (-1.7%) from 90.826% when pulling b58f98bd5127cac43cba4dcff66f9d7a01527576 on multi-version-api into b276a04f2cb9b2e974b84b66719b2b0984f3a800 on main.

ChrisLovering commented 10 months ago

I plan to pick this PR up soon just had time to rebase this evening

HassanAbouelela commented 4 months ago

Hey how's this PR going? It would be very useful for a project I'm working on.

ChrisLovering commented 2 months ago

Now ready for (re)review