Skip to content

banner cannot be customized when SOURCE_DATE_EPOCH is set #15207

Description

@tornaria

Normally one can customize the banner via banner1 parameter, as in:

$ cat ipython_banner.py 
from IPython.core.interactiveshell import InteractiveShell

shell=InteractiveShell(banner1="MY CUSTOM BANNER", enable_tip=False)

print(shell.banner)
$ python ipython_banner.py 
MY CUSTOM BANNER

However, this is ignored when running with SOURCE_DATE_EPOCH set:

$ SOURCE_DATE_EPOCH=1234567890 python ipython_banner.py 
Python 3.y.z | Packaged with love | (main, Friday, 13 February 2009) [Compiler]
Type 'copyright', 'credits' or 'license' for more information
IPython 9.y.z -- An enhanced Interactive Python. Type '?' for help.
Tip: unset SOURCE_DATE_EPOCH to restore dynamic banner.

This affects e.g. doctesting in sagemath.

Perhaps the static banner can be used only when self.banner1 is default_banner, so if banner1 is set it will override the static banner?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions