Skip to content

Conversation

jb3
Copy link
Member

@jb3 jb3 commented Oct 9, 2025

Updates the eval command to default to executing user code with snekbox's Python 3.14 binary.

See python-discord/snekbox#245 for the related snekbox change to switch from 3.14.0rc1 to 3.14.0.

The notice about 3.14 jobs being pre-release is also removed by this PR.

@jb3 jb3 added a: utility Related to utility commands: (bot, eval, extensions, jams, reminders, snekbox, utils) t: enhancement Changes or improvements to existing features s: needs review Author is waiting for someone to review and approve labels Oct 9, 2025
jb3 added 2 commits October 9, 2025 14:48
This will allow all other utility files within the snekbox cog to access
types such as `SupportedPythonVersions` without causing circular import
issues.
@jb3 jb3 force-pushed the jb3/eval-command-3.14 branch from a3b2b00 to 4ff670c Compare October 9, 2025 13:49
@jb3 jb3 requested a review from Copilot October 9, 2025 14:00
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Updates the eval command to use Python 3.14 as the default version instead of 3.13, and removes the pre-release notice for Python 3.14 jobs. This change aligns with snekbox switching from Python 3.14.0rc1 to 3.14.0.

  • Moved SupportedPythonVersions and related constants to a new dedicated constants module
  • Changed default Python version from "3.13" to the first available version (3.14) using get_args()
  • Removed the pre-release notice for Python 3.14 in status messages

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
bot/exts/utils/snekbox/_eval.py Updates default version to use first available Python version and removes 3.14 pre-release notice
bot/exts/utils/snekbox/_constants.py New module containing SupportedPythonVersions type and other constants
bot/exts/utils/snekbox/_cog.py Refactored to import constants from new module instead of defining them locally
bot/exts/utils/snekbox/__init__.py Updates imports to reflect the moved SupportedPythonVersions type

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Member

@ChrisLovering ChrisLovering left a comment

Choose a reason for hiding this comment

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

Should we drop 3.13t for 3.14t now too?

Instead of using typing.get_args(...) and fetching the first value
returned (which is mostly safe, but not guaranteed to be so), use a new
constant DEFAULT_PYTHON_VERSION to control the current default Python
executor when no explicit interpreter version is passed.
@jb3 jb3 force-pushed the jb3/eval-command-3.14 branch from 85dec81 to 92a0fb8 Compare October 9, 2025 16:53
Removes the need to hardcode each specific "3.Xt" version we may support in future.

Co-authored-by: ChrisJL <ChrisLovering@users.noreply.github.com>
@jb3 jb3 requested a review from Copilot October 9, 2025 22:13
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

See python-discord/snekbox#246 for relevant snekbox changes
@jb3 jb3 merged commit b2714a4 into main Oct 11, 2025
4 of 5 checks passed
@jb3 jb3 deleted the jb3/eval-command-3.14 branch October 11, 2025 00:06
@jb3 jb3 deployed to production October 11, 2025 00:07 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: utility Related to utility commands: (bot, eval, extensions, jams, reminders, snekbox, utils) s: needs review Author is waiting for someone to review and approve t: enhancement Changes or improvements to existing features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants