diff --git a/traitlets/config/application.py b/traitlets/config/application.py index 1d475c58..42fe8cb7 100644 --- a/traitlets/config/application.py +++ b/traitlets/config/application.py @@ -67,7 +67,7 @@ """.strip() # trim newlines of front and back # sys.argv can be missing, for example when python is embedded. See the docs -# for details: http://docs.python.org/2/c-api/intro.html#embedding-python +# for details: https://docs.python.org/3/c-api/intro.html#embedding-python if not hasattr(sys, "argv"): sys.argv = [""] diff --git a/traitlets/config/loader.py b/traitlets/config/loader.py index f9eb5fe1..351918b0 100644 --- a/traitlets/config/loader.py +++ b/traitlets/config/loader.py @@ -77,11 +77,6 @@ def print_help(self, file: t.Any = None) -> None: # ----------------------------------------------------------------------------- -def execfile(fname: str, glob: dict[str, Any]) -> None: - with open(fname, "rb") as f: - exec(compile(f.read(), fname, "exec"), glob, glob) # noqa: S102 - - class LazyConfigValue(HasTraits): """Proxy object for exposing methods on configurable containers @@ -250,10 +245,6 @@ def _ensure_subconfig(self) -> None: if _is_section_key(key) and isinstance(obj, dict) and not isinstance(obj, Config): setattr(self, key, Config(obj)) - def _merge(self, other: t.Any) -> None: - """deprecated alias, use Config.merge()""" - self.merge(other) - def merge(self, other: t.Any) -> None: """merge another config object into this one""" to_update = {} diff --git a/traitlets/traitlets.py b/traitlets/traitlets.py index 9c33d2f3..3233f12f 100644 --- a/traitlets/traitlets.py +++ b/traitlets/traitlets.py @@ -62,9 +62,6 @@ SequenceTypes = (list, tuple, set, frozenset) -# backward compatibility, use to differ between Python 2 and 3. -ClassTypes = (type,) - if t.TYPE_CHECKING: from typing_extensions import TypeVar else: