File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -132,6 +132,7 @@ importlib.metadata.DeprecatedNonAbstract.__new__
132132importlib.resources._common.files
133133
134134sys._monitoring # Doesn't really exist. See comments in the stub.
135+ sys.__jit # Similar to sys._monitoring
135136sys.last_exc # not always defined
136137
137138# These only exist to give a better error message if you try to subclass an instance
Original file line number Diff line number Diff line change 1+ import sys
2+ from typing_extensions import assert_type
3+
4+ if sys .version_info >= (3 , 14 ):
5+ assert_type (sys ._jit .is_available (), bool )
6+ assert_type (sys ._jit .is_enabled (), bool )
7+ assert_type (sys ._jit .is_active (), bool )
8+
9+ def sys_is_not_a_package () -> None :
10+ # This has to be put into a function, because otherwise the presence
11+ # of this import statement causes errors on the above usages of `sys._jit`.
12+ import sys ._jit # type: ignore
Original file line number Diff line number Diff line change @@ -295,6 +295,7 @@ sunau: 3.0-3.12
295295symbol: 3.0-3.9
296296symtable: 3.0-
297297sys: 3.0-
298+ sys.__jit: 3.14- # Similar to sys._monitoring
298299sys._monitoring: 3.12- # Doesn't actually exist. See comments in the stub.
299300sysconfig: 3.0-
300301syslog: 3.0-
Original file line number Diff line number Diff line change @@ -518,3 +518,7 @@ if sys.version_info >= (3, 14):
518518 def is_remote_debug_enabled () -> bool : ...
519519 def remote_exec (pid : int , script : StrOrBytesPath ) -> None : ...
520520 def _is_immortal (op : object , / ) -> bool : ...
521+
522+ from . import __jit
523+
524+ _jit = __jit
Original file line number Diff line number Diff line change 1+ # This py314+ module provides annotations for `sys._jit`.
2+ # It's named `sys.__jit` in typeshed,
3+ # because trying to import `sys._jit` will fail at runtime!
4+ # At runtime, `sys._jit` has the unusual status
5+ # of being a `types.ModuleType` instance that cannot be directly imported,
6+ # (same as sys.monitoring)
7+ # and exists in the `sys`-module namespace despite `sys` not being a package.
8+
9+ def is_available () -> bool : ...
10+ def is_enabled () -> bool : ...
11+ def is_active () -> bool : ...
Original file line number Diff line number Diff line change 11# This py312+ module provides annotations for `sys.monitoring`.
22# It's named `sys._monitoring` in typeshed,
33# because trying to import `sys.monitoring` will fail at runtime!
4- # At runtime, `sys.monitoring` has the unique status
4+ # At runtime, `sys.monitoring` has the unusual status
55# of being a `types.ModuleType` instance that cannot be directly imported,
6+ # (same as sys._jit)
67# and exists in the `sys`-module namespace despite `sys` not being a package.
78
89import sys
You can’t perform that action at this time.
0 commit comments