@@ -329,6 +329,7 @@ class InteractiveShell(SingletonConfigurable):
329329
330330 _instance = None
331331 _user_ns : dict
332+ _sys_modules_keys : set [str , AnyType ]
332333
333334 inspector : oinspect .Inspector
334335
@@ -764,7 +765,9 @@ def _check_colors(self, proposal):
764765 if not new == new .lower ():
765766 warn (
766767 f"`TerminalInteractiveShell.colors` is now lowercase: `{ new .lower ()} `,"
767- " non lowercase, may invalid in the future."
768+ " non lowercase, may be invalid in the future." ,
769+ DeprecationWarning ,
770+ stacklevel = 2 ,
768771 )
769772 return new .lower ()
770773
@@ -781,7 +784,8 @@ def init_syntax_highlighting(self, changes=None):
781784 )
782785
783786 try :
784- self .inspector .set_theme_name (self .colors )
787+ # Deprecation in 9.0, colors should always be lower
788+ self .inspector .set_theme_name (self .colors .lower ())
785789 except Exception :
786790 warn (
787791 "Error changing object inspector color schemes.\n %s"
@@ -804,20 +808,19 @@ def init_pushd_popd_magic(self):
804808
805809 self .dir_stack = []
806810
807- def init_logger (self ):
811+ def init_logger (self ) -> None :
808812 self .logger = Logger (self .home_dir , logfname = 'ipython_log.py' ,
809813 logmode = 'rotate' )
810814
811- def init_logstart (self ):
815+ def init_logstart (self ) -> None :
812816 """Initialize logging in case it was requested at the command line.
813817 """
814818 if self .logappend :
815- self .magic ( ' logstart %s append' % self .logappend )
819+ self .run_line_magic ( " logstart" , f" { self .logappend } append" )
816820 elif self .logfile :
817- self .magic ( ' logstart %s' % self .logfile )
821+ self .run_line_magic ( " logstart" , self .logfile )
818822 elif self .logstart :
819- self .magic ('logstart' )
820-
823+ self .run_line_magic ("logstart" , "" )
821824
822825 def init_builtins (self ):
823826 # A single, static flag that we set to True. Its presence indicates
0 commit comments