{{ message }}
Repository navigation
Commit 14e7a5f
committed
Defer
Four more stdlib imports that every `import IPython` paid for and almost no
session used:
- `platform` in `IPython.utils.sysinfo`, needed only by `pkg_info()`;
- `pprint` in the same module, needed only by `sys_info()`;
- `textwrap` in `IPython.core.interactiveshell`, needed only to dedent the
banner used when `SOURCE_DATE_EPOCH` is set;
- `html` (and with it `html.entities`) in `IPython.core.oinspect`, needed
only to build the html mime representation of an inspected object;
- `platform` in `IPython.lib.pretty`, needed only to special-case PyPy when
pretty-printing a `super` object.platform, pprint, textwrap and html to their use sites1 parent 6245869 commit 14e7a5f
4 files changed
Lines changed: 10 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
| |||
574 | 573 | | |
575 | 574 | | |
576 | 575 | | |
| 576 | + | |
| 577 | + | |
577 | 578 | | |
578 | 579 | | |
579 | 580 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
100 | 99 | | |
101 | 100 | | |
102 | 101 | | |
| |||
705 | 704 | | |
706 | 705 | | |
707 | 706 | | |
| 707 | + | |
| 708 | + | |
708 | 709 | | |
709 | 710 | | |
710 | 711 | | |
| |||

0 commit comments