Skip to content
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

Py 3.13 rc #217

Merged
merged 7 commits into from
Oct 3, 2024
Merged

Py 3.13 rc #217

merged 7 commits into from
Oct 3, 2024

Conversation

ChrisLovering
Copy link
Member

This adds support for Python 3.13 to snekbox.

Actually calling this isn't possible until #196 is merged, which I will be looking into now.

This means when building multiple python versions this repo is only cloned once
This ensures only packages that have wheels for 3.13 are installed into the 3.13 eval container
When using nargs='?' the nsjail_args argument was sometimes consuming 1 of the arguments passed to the module.
By setting these two arguments to store_const actions instead, this is no longer the case, as they will always use the constant specified now.
This is more appropriate for their actual use case of being purely for documentation.

Co-authored-by: GDWR <[email protected]>
@ChrisLovering ChrisLovering force-pushed the py-3.13-rc branch 2 times, most recently from 7d5ebf2 to a7c52bf Compare October 3, 2024 20:19
This was a breaking change github introduced recently

Co-authored-by: GDWR <[email protected]>
@coveralls
Copy link

coveralls commented Oct 3, 2024

Coverage Status

coverage: 90.826%. remained the same
when pulling b276a04 on py-3.13-rc
into 5aaaa8a on main.

.github/workflows/test.yaml Outdated Show resolved Hide resolved
@@ -29,12 +29,16 @@ RUN apt-get -y update \
tk-dev \
&& rm -rf /var/lib/apt/lists/*

RUN git clone -b v2.4.14 --depth 1 https://github.com/pyenv/pyenv.git $PYENV_ROOT
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent change!

@@ -13,10 +13,16 @@ def parse_args() -> argparse.Namespace:
)
parser.add_argument("code", help="the Python code to evaluate")
parser.add_argument(
"nsjail_args", nargs="?", default=[], help="override configured NsJail options"
"nsjail_args",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have a sample of what the help output is after this change?

Copy link
Member Author

@ChrisLovering ChrisLovering Oct 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, the reason I added the default to the help kwarg directly is because it didn't get added automatically.

❯ python3 -m snekbox --help
usage: snekbox [-h] code [nsjail_args ...] [--- py_args ...]

positional arguments:
  code         the Python code to evaluate
  nsjail_args  override configured NsJail options (default: [])
  py_args      arguments to pass to the Python process (default: ['-c'])

options:
  -h, --help   show this help message and exit

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks - that still looks helpful

@ChrisLovering ChrisLovering merged commit b276a04 into main Oct 3, 2024
8 checks passed
@ChrisLovering ChrisLovering deleted the py-3.13-rc branch October 3, 2024 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants