Skip to content

Conversation

@sna-scourtney
Copy link

  • ADDED: Compatible with Python 3.13. This required updating Typer, Click, click-shell, and other dependencies to versions that support Python 3.13. This is a BREAKING CHANGE for projects that are tied to older versions of those dependencies, because some of the libraries' API signatures changed.
  • ADDED: More complete project definition in pyproject.toml to take better advantage of Poetry and other build tools. requirements.txt is now only comments, with all dependencies declared in pyproject.toml.
  • DROPPED: Dropped support for Python 3.8.x which is officially EOL.
  • FIXED: make_typer_shell() was returning None but was expected by callers to return the Typer instance.
  • FIXED: Incorrect typing of some variables and function parameters.
  • EDITED: Corrected some typos in comments and string literals. Formatted some one-line function calls to multi-line to match the style of the rest of the code and to make demo.py more approachable for newcomers.
  • KNOWN ISSUE: The "magic rainbow" panel is not working.

I am submitting this PR as a draft for comment and early review and in hope that other eyes will spot the problem with the "magic rainbow" panel.

Scott Courtney added 2 commits July 23, 2025 10:07
ADDED: Compatible with Python 3.13. This required updating Typer, Click,
    click-shell, and other dependencies to versions that support also
    Python 3.13. This is a BREAKING CHANGE for projects that are tied
    to older versions of those dependencies, because some of their
    API signatures changed.

ADDED: More complete project definition in pyproject.toml to take
    better advantage of Poetry and other build tools. requirements.txt
    is now only comments, with all dependencies declared in
    pyproject.toml.

DROP: Dropped support for Python 3.8.x which is officially EOL very soon.

FIX: make_typer_shell() was returning None but was expected
     by callers to return the Typer instance.

FIX: Incorrect typing of some variables and function parameters.

EDIT: Corrected some typos in comments and string literals. Formatted
    some one-line function calls to multi-line to match the style of
    the rest of the code and to make demo.py more approachable for
    newcomers.

KNOWN ISSUE: The "magic rainbow" panel is not working.
@sna-scourtney
Copy link
Author

I had missed one occurrence of that get_command() method being called. I am not 100% certain I've captured the original behavior of typer_shell with respect to this, so please review and correct if needed.

@sna-scourtney
Copy link
Author

I reviewed the source of click and (previous) typer-shell in more detail, and I believe this now closely matches the original intent.

This is probably still not ready for merge, but I think it's ready for upstream review.

@sna-scourtney
Copy link
Author

Build result:

$ poetry build
Building typer-shell (0.2.0)
Building sdist
  - Building sdist
  - Built typer_shell-0.2.0.tar.gz
Building wheel
  - Building wheel
  - Built typer_shell-0.2.0-py3-none-any.whl

@FergusFettes
Copy link
Owner

Thanks for this! Will review in the next few days.

@sna-scourtney
Copy link
Author

Thanks for this! Will review in the next few days.

Much appreciated! In my project I was getting an empty red error box that I assumed was the fault of my code. That was the main reason for marking the PR as Draft. I've just learned this is a known issue with Typer when used with Click 8.2.0 or later. It's discussed in PR 1240 for Typer.

Since I now know it's not my code causing that problem, I'm a little more confident of my own PR here.

@FergusFettes FergusFettes merged commit 0ff0f27 into FergusFettes:main Aug 15, 2025
1 check passed
@FergusFettes
Copy link
Owner

merged this and added some more stuff :).

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.

2 participants