Skip to content

feat: support Python 3.10#88

Merged
dwilding merged 3 commits intomainfrom
py-310
Feb 25, 2026
Merged

feat: support Python 3.10#88
dwilding merged 3 commits intomainfrom
py-310

Conversation

@dwilding
Copy link
Copy Markdown
Owner

This PR adds support for Python 3.10, which gimmegit was very close to supporting already. Fixes #86.

Copilot AI review requested due to automatic review settings February 25, 2026 08:54
Copy link
Copy Markdown

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

This PR updates gimmegit to support Python 3.10 by adjusting an argparse flag implementation that crashes on 3.10 and by lowering the project’s declared minimum Python version, then validating that support in CI.

Changes:

  • Lower the minimum supported Python version from 3.11 to 3.10 (project metadata + lockfile).
  • Fix CLI flag parsing to avoid Python 3.10’s argparse store_const behavior (switch to store_true for --compare, --help, --version).
  • Expand CI coverage to run unit/functional tests on Python 3.10.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pyproject.toml Lowers requires-python to >= 3.10.
uv.lock Updates lock metadata and resolved deps for Python 3.10 compatibility (incl. backports/markers).
src/gimmegit/_args.py Replaces store_const flags with store_true to fix Python 3.10 crash.
src/gimmegit/_cli.py Replaces typing.Never with typing.NoReturn for Python 3.10 compatibility.
.github/workflows/unit.yaml Adds Python 3.10 to the unit-test matrix.
.github/workflows/functional-full.yaml Adds Python 3.10 to the functional test matrix.
.github/workflows/functional-limited.yaml Runs the limited functional job on Python 3.10.

Comment thread src/gimmegit/_args.py
Comment on lines +37 to +39
parser.add_argument("-c", "--compare", action="store_true") # The value isn't significant.
parser.add_argument("-h", "--help", action="store_true") # The value isn't significant.
parser.add_argument("--version", action="store_true") # The value isn't significant.
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

By "the value isn't significant", I mean that the code never checks the value of these arguments. We only check whether they exist. By default, they don't exist, because we've set argument_default=argparse.SUPPRESS (which we need for being able to distinguish between missing/default values of other arguments).

@dwilding dwilding merged commit 22f62f0 into main Feb 25, 2026
13 checks passed
@dwilding dwilding deleted the py-310 branch February 25, 2026 09:01
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.

gimmegit crashes on Python 3.10 due to a small difference with Python 3.11+ argparse

2 participants