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

Use new REPL for the "code" module #119512

Open
treyhunner opened this issue May 24, 2024 · 1 comment
Open

Use new REPL for the "code" module #119512

treyhunner opened this issue May 24, 2024 · 1 comment
Labels
topic-repl Related to the interactive shell type-feature A feature request or enhancement

Comments

@treyhunner
Copy link
Member

treyhunner commented May 24, 2024

Feature or enhancement

Proposal:

When installing Django in a Python 3.13 virtual environment and using Django's shell command, the old REPL is used.

It would be great if the code module supported the new REPL. From @ambv's reply in #119433 (comment) it looks like this will be considered in Python 3.14.


I would also like to know what projects should do in the meantime. For example, I found a way to modify Django's shell command in one's own project to use the new REPL, by using this within a try-except block:

from _pyrepl.simple_interact import run_multiline_interactive_console
run_multiline_interactive_console()

Is this an acceptable workaround before Python 3.14 is released? Or should this function not be relied on, seeing as it's in an undocumented module?

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

#119433 (review)

@treyhunner treyhunner added the type-feature A feature request or enhancement label May 24, 2024
@ambv
Copy link
Contributor

ambv commented May 24, 2024

Is this an acceptable workaround before Python 3.14 is released?

It's unsupported as the underscore in the module name suggests. External projects will do as they please.

@AlexWaygood AlexWaygood added the topic-repl Related to the interactive shell label May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-repl Related to the interactive shell type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

3 participants