Skip to content

Show deprecation warnings for urwid/curses/python2. #787

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

Merged
merged 3 commits into from
Jan 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ Changelog
0.19
----

General information:
* The bpython-cli and bpython-urwid rendering backends have been deprecated and
will show a warning that they'll be removed in a future release when started.
* Usage in combination with Python 2 has been deprecated. This does not mean that
support is dropped instantly but rather that at some point in the future we will
stop running our testcases against Python 2.

New features:

Fixes:
Expand Down
18 changes: 18 additions & 0 deletions bpython/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1988,6 +1988,24 @@ def main_curses(scr, args, config, interactive=True, locals_=None, banner=None):
if banner is not None:
clirepl.write(banner)
clirepl.write("\n")

# XXX these deprecation warnings need to go at some point
clirepl.write(
_(
"WARNING: You are using `bpython-cli`, the curses backend for `bpython`. This backend has been deprecated in version 0.19 and might disappear in a future version."
)
)
clirepl.write("\n")

if sys.version_info[0] == 2:
# XXX these deprecation warnings need to go at some point
clirepl.write(
_(
"WARNING: You are using `bpython` on Python 2. Support for Python 2 has been deprecated in version 0.19 and might disappear in a future version."
)
)
clirepl.write("\n")

exit_value = clirepl.repl()
if hasattr(sys, "exitfunc"):
sys.exitfunc()
Expand Down
9 changes: 9 additions & 0 deletions bpython/curtsies.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,15 @@ def main(args=None, locals_=None, banner=None, welcome_message=None):
print(bpargs.version_banner())
if banner is not None:
print(banner)

if sys.version_info[0] == 2:
# XXX these deprecation warnings need to go at some point
print(
_(
"WARNING: You are using `bpython` on Python 2. Support for Python 2 has been deprecated in version 0.19 and might disappear in a future version."
)
)

global repl
repl = FullCurtsiesRepl(config, locals_, welcome_message, interp)
try:
Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy