|
1 | 1 | # The MIT License |
2 | 2 | # |
3 | 3 | # Copyright (c) 2008 Bob Farrell |
4 | | -# Copyright (c) 2012-2020 Sebastian Ramacher |
| 4 | +# Copyright (c) 2012-2021 Sebastian Ramacher |
5 | 5 | # |
6 | 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy |
7 | 7 | # of this software and associated documentation files (the "Software"), to deal |
|
26 | 26 | """ |
27 | 27 |
|
28 | 28 | import argparse |
| 29 | +import curtsies |
| 30 | +import cwcwidth |
| 31 | +import greenlet |
29 | 32 | import importlib.util |
30 | 33 | import logging |
31 | 34 | import os |
| 35 | +import pygments |
| 36 | +import requests |
32 | 37 | import sys |
33 | 38 | from pathlib import Path |
34 | 39 |
|
35 | 40 | from . import __version__, __copyright__ |
36 | 41 | from .config import default_config_path, loadini, Struct |
37 | 42 | from .translations import _ |
38 | 43 |
|
| 44 | +logger = logging.getLogger(__name__) |
| 45 | + |
39 | 46 |
|
40 | 47 | class ArgumentParserFailed(ValueError): |
41 | 48 | """Raised by the RaisingOptionParser for a bogus commandline.""" |
@@ -184,6 +191,25 @@ def callback(group): |
184 | 191 | bpython_logger.addHandler(logging.NullHandler()) |
185 | 192 | curtsies_logger.addHandler(logging.NullHandler()) |
186 | 193 |
|
| 194 | + logger.info(f"Starting bpython {__version__}") |
| 195 | + logger.info(f"Python {sys.executable}: {sys.version_info}") |
| 196 | + logger.info(f"curtsies: {curtsies.__version__}") |
| 197 | + logger.info(f"cwcwidth: {cwcwidth.__version__}") |
| 198 | + logger.info(f"greenlet: {greenlet.__version__}") |
| 199 | + logger.info(f"pygments: {pygments.__version__}") |
| 200 | + logger.info(f"requests: {requests.__version__}") |
| 201 | + logger.info( |
| 202 | + "environment:\n{}".format( |
| 203 | + "\n".join( |
| 204 | + f"{key}: {value}" |
| 205 | + for key, value in sorted(os.environ.items()) |
| 206 | + if key.startswith("LC") |
| 207 | + or key.startswith("LANG") |
| 208 | + or key == "TERM" |
| 209 | + ) |
| 210 | + ) |
| 211 | + ) |
| 212 | + |
187 | 213 | config = Struct() |
188 | 214 | loadini(config, options.config) |
189 | 215 |
|
|
0 commit comments