| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d5183ff commit f3cf6a6
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -64,7 +64,7 @@ | |||
| 64 | 64 | # These are used for syntax highlighting | |
| 65 | 65 | from pygments import format | |
| 66 | 66 | from pygments.formatters import TerminalFormatter | |
| 67 | - from ._py3compat import PythonLexer | ||
| 67 | + from ._py3compat import PythonLexer, py3 | ||
| 68 | 68 | from pygments.token import Token | |
| 69 | 69 | from .formatter import BPythonFormatter | |
| 70 | 70 | ||
@@ -83,7 +83,6 @@ | |||
| 83 | 83 | ||
| 84 | 84 | from . import repl | |
| 85 | 85 | from . import args as bpargs | |
| 86 | - from ._py3compat import py3 | ||
| 87 | 86 | from .pager import page | |
| 88 | 87 | from .args import parse as argsparse | |
| 89 | 88 | ||
@@ -1998,7 +1997,7 @@ def main_curses(scr, args, config, interactive=True, locals_=None, banner=None): | |||
| 1998 | 1997 | ) | |
| 1999 | 1998 | clirepl.write("\n") | |
| 2000 | 1999 | ||
| 2001 | - if sys.version_info[0] == 2: | ||
| 2000 | + if not py3: | ||
| 2002 | 2001 | # XXX these deprecation warnings need to go at some point | |
| 2003 | 2002 | clirepl.write( | |
| 2004 | 2003 | _( | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -23,6 +23,7 @@ | |||
| 23 | 23 | from .curtsiesfrontend import events as bpythonevents | |
| 24 | 24 | from . import inspection | |
| 25 | 25 | from .repl import extract_exit_value | |
| 26 | + from ._py3compat import py3 | ||
| 26 | 27 | ||
| 27 | 28 | logger = logging.getLogger(__name__) | |
| 28 | 29 | ||
@@ -202,7 +203,7 @@ def main(args=None, locals_=None, banner=None, welcome_message=None): | |||
| 202 | 203 | if banner is not None: | |
| 203 | 204 | print(banner) | |
| 204 | 205 | ||
| 205 | - if sys.version_info[0] == 2: | ||
| 206 | + if not py3: | ||
| 206 | 207 | # XXX these deprecation warnings need to go at some point | |
| 207 | 208 | print( | |
| 208 | 209 | _( | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1394,7 +1394,7 @@ def start(main_loop, user_data): | |||
| 1394 | 1394 | ) | |
| 1395 | 1395 | myrepl.write("\n") | |
| 1396 | 1396 | ||
| 1397 | - if sys.version_info[0] == 2: | ||
| 1397 | + if not py3: | ||
| 1398 | 1398 | # XXX these deprecation warnings need to go at some point | |
| 1399 | 1399 | myrepl.write( | |
| 1400 | 1400 | _( | |
| Back | FazBrowse Home | New Git URL |
0 commit comments