chunk_id stringlengths 36 36 | source stringclasses 35
values | source_url stringlengths 0 290 | upstream_license stringclasses 1
value | document_id stringlengths 36 36 | chunk_index int64 0 324k | retrieved_at stringclasses 2
values | chunker_version stringclasses 4
values | content_hash stringlengths 15 64 | content stringlengths 50 44.7k | namespace stringclasses 9
values | source_name stringclasses 35
values | raw_text stringlengths 50 44.7k | cleaned_text stringlengths 50 44.7k | tags stringclasses 49
values | collection_name stringclasses 11
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6221811a-a014-4ccb-9c9c-58ddc65c2c79 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,690 | supabase-export-v2 | 72d64e764c97d16d | the loader recognizes. The loaders are expected to be callables which accept two arguments of the module's name and the path to the file found.
The finder will cache the directory contents as necessary, making stat calls
for each module search to verify the cache is not outdated. Because cache
staleness relies upon t... | trusted_official_docs | CPython Docs | the loader recognizes. The loaders are expected to be callables which accept two arguments of the module's name and the path to the file found.
The finder will cache the directory contents as necessary, making stat calls
for each module search to verify the cache is not outdated. Because cache
staleness relies upon t... | the loader recognizes. The loaders are expected to be callables which accept two arguments of the module's name and the path to the file found.
The finder will cache the directory contents as necessary, making stat calls
for each module search to verify the cache is not outdated. Because cache
staleness relies upon t... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
626b8496-277f-4cc9-9c04-1813492b5616 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,509 | supabase-export-v2 | 94885f4f1811ed1f | thread-safe. Calling it from multiple threads can result in unexpected behavior. It's recommended to use the :class:`threading.Lock` or other synchronization primitives for thread-safe module reloading.
:mod:`!importlib.abc` -- Abstract base classes related to import
----------------------------------------------------... | trusted_official_docs | CPython Docs | thread-safe. Calling it from multiple threads can result in unexpected behavior. It's recommended to use the :class:`threading.Lock` or other synchronization primitives for thread-safe module reloading.
:mod:`!importlib.abc` -- Abstract base classes related to import
----------------------------------------------------... | thread-safe. Calling it from multiple threads can result in unexpected behavior. It's recommended to use the :class:`threading.Lock` or other synchronization primitives for thread-safe module reloading.
:mod:`!importlib.abc` -- Abstract base classes related to import
----------------------------------------------------... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
65add839-38eb-4e2e-8b06-bde7507f0210 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,462 | supabase-export-v2 | cff2b116a7257583 | Three, the package contains modules exposing additional functionality for managing aspects of Python packages:
* :mod:`importlib.metadata` presents access to metadata from third-party
distributions. * :mod:`importlib.resources` provides routines for accessing non-code
"resources" from Python packages. | trusted_official_docs | CPython Docs | Three, the package contains modules exposing additional functionality for managing aspects of Python packages:
* :mod:`importlib.metadata` presents access to metadata from third-party
distributions. * :mod:`importlib.resources` provides routines for accessing non-code
"resources" from Python packages. | Three, the package contains modules exposing additional functionality for managing aspects of Python packages:
* :mod:`importlib.metadata` presents access to metadata from third-party
distributions. * :mod:`importlib.resources` provides routines for accessing non-code
"resources" from Python packages. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
671e39a3-0ccc-445a-9050-7ee8870213f8 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,851 | supabase-export-v2 | 572ef10c5a1413e1 | the same effect as this function by implementing the basic interface of multi-phase init (:pep:`489`) and lying about support for multiple interpreters (or per-interpreter GIL).
.. warning::
Using this function to disable the check can lead to
unexpected behavior and even crashes. It should only be used during
exten... | trusted_official_docs | CPython Docs | the same effect as this function by implementing the basic interface of multi-phase init (:pep:`489`) and lying about support for multiple interpreters (or per-interpreter GIL).
.. warning::
Using this function to disable the check can lead to
unexpected behavior and even crashes. It should only be used during
exten... | the same effect as this function by implementing the basic interface of multi-phase init (:pep:`489`) and lying about support for multiple interpreters (or per-interpreter GIL).
.. warning::
Using this function to disable the check can lead to
unexpected behavior and even crashes. It should only be used during
exten... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
685d5ef6-1c31-46f7-b96c-4e8bfd69f65f | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,792 | supabase-export-v2 | 495d470c279bbacf | the original location with a ``sources/foo/bar/_whiz.abi3.fwork`` marker file, containing the path ``Frameworks/foo.bar._whiz/foo.bar._whiz``. The framework would also contain ``Frameworks/foo.bar._whiz.framework/foo.bar._whiz.origin``, containing the path to the ``.fwork`` file.
When a module is loaded with this loade... | trusted_official_docs | CPython Docs | the original location with a ``sources/foo/bar/_whiz.abi3.fwork`` marker file, containing the path ``Frameworks/foo.bar._whiz/foo.bar._whiz``. The framework would also contain ``Frameworks/foo.bar._whiz.framework/foo.bar._whiz.origin``, containing the path to the ``.fwork`` file.
When a module is loaded with this loade... | the original location with a ``sources/foo/bar/_whiz.abi3.fwork`` marker file, containing the path ``Frameworks/foo.bar._whiz/foo.bar._whiz``. The framework would also contain ``Frameworks/foo.bar._whiz.framework/foo.bar._whiz.origin``, containing the path to the ``.fwork`` file.
When a module is loaded with this loade... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
6966cfe5-1ec1-42da-ab97-3130ce09cd52 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,617 | supabase-export-v2 | 87a78f4407ddf3d8 | (mandatory): an integer or floating-point number representing the modification time of the source code; - ``'size'`` (optional): the size in bytes of the source code.
Any other keys in the dictionary are ignored, to allow for future
extensions. If the path cannot be handled, :exc:`OSError` is raised. | trusted_official_docs | CPython Docs | (mandatory): an integer or floating-point number representing the modification time of the source code; - ``'size'`` (optional): the size in bytes of the source code.
Any other keys in the dictionary are ignored, to allow for future
extensions. If the path cannot be handled, :exc:`OSError` is raised. | (mandatory): an integer or floating-point number representing the modification time of the source code; - ``'size'`` (optional): the size in bytes of the source code.
Any other keys in the dictionary are ignored, to allow for future
extensions. If the path cannot be handled, :exc:`OSError` is raised. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
6d00e4b2-a213-4138-a85d-2f174b3478ac | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,848 | supabase-export-v2 | 76b1374f8620666a | .. function:: _incompatible_extension_module_restrictions(*, disable_check)
A context manager that can temporarily skip the compatibility check
for extension modules. By default the check is enabled and will fail
when a single-phase init module is imported in a subinterpreter. It will also fail for a multi-phase init... | trusted_official_docs | CPython Docs | .. function:: _incompatible_extension_module_restrictions(*, disable_check)
A context manager that can temporarily skip the compatibility check
for extension modules. By default the check is enabled and will fail
when a single-phase init module is imported in a subinterpreter. It will also fail for a multi-phase init... | .. function:: _incompatible_extension_module_restrictions(*, disable_check)
A context manager that can temporarily skip the compatibility check
for extension modules. By default the check is enabled and will fail
when a single-phase init module is imported in a subinterpreter. It will also fail for a multi-phase init... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
6ef90ced-bd94-4e4e-a275-95eef9de4bbe | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,506 | supabase-export-v2 | 5414102599cde37d | objects imported from it --- one way around this is to re-execute the :keyword:`!from` statement, another is to use :keyword:`!import` and qualified names (*module.name*) instead.
If a module instantiates instances of a class, reloading the module that
defines the class does not affect the method definitions of the in... | trusted_official_docs | CPython Docs | objects imported from it --- one way around this is to re-execute the :keyword:`!from` statement, another is to use :keyword:`!import` and qualified names (*module.name*) instead.
If a module instantiates instances of a class, reloading the module that
defines the class does not affect the method definitions of the in... | objects imported from it --- one way around this is to re-execute the :keyword:`!from` statement, another is to use :keyword:`!import` and qualified names (*module.name*) instead.
If a module instantiates instances of a class, reloading the module that
defines the class does not affect the method definitions of the in... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
722dde1a-5351-4ee0-9524-33eeabf2dbc7 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,594 | supabase-export-v2 | f2254c340e3790ea | An abstract method that is to return the value of :attr:`~module.__file__` for the specified module. If no path is available, :exc:`ImportError` is raised.
If source code is available, then the method should return the path to
the source file, regardless of whether a bytecode was used to load the
module. | trusted_official_docs | CPython Docs | An abstract method that is to return the value of :attr:`~module.__file__` for the specified module. If no path is available, :exc:`ImportError` is raised.
If source code is available, then the method should return the path to
the source file, regardless of whether a bytecode was used to load the
module. | An abstract method that is to return the value of :attr:`~module.__file__` for the specified module. If no path is available, :exc:`ImportError` is raised.
If source code is available, then the method should return the path to
the source file, regardless of whether a bytecode was used to load the
module. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
75f76475-1e52-4df4-8fda-8235bd2cb508 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,497 | supabase-export-v2 | 73c6dedf61236b7a | When :func:`reload` is executed:
* Python module's code is recompiled and the module-level code re-executed,
defining a new set of objects which are bound to names in the module's
dictionary by reusing the :term:`loader` which originally loaded the
module. The ``init`` function of extension modules is not called a s... | trusted_official_docs | CPython Docs | When :func:`reload` is executed:
* Python module's code is recompiled and the module-level code re-executed,
defining a new set of objects which are bound to names in the module's
dictionary by reusing the :term:`loader` which originally loaded the
module. The ``init`` function of extension modules is not called a s... | When :func:`reload` is executed:
* Python module's code is recompiled and the module-level code re-executed,
defining a new set of objects which are bound to names in the module's
dictionary by reusing the :term:`loader` which originally loaded the
module. The ``init`` function of extension modules is not called a s... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
791cf434-0bde-4bca-81c4-d99b758e0931 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,503 | supabase-export-v2 | 377ffc4f9030543e | a global table or cache of objects --- with a :keyword:`try` statement it can test for the table's presence and skip its initialization if desired::
try:
cache
except NameError:
cache = {} | trusted_official_docs | CPython Docs | a global table or cache of objects --- with a :keyword:`try` statement it can test for the table's presence and skip its initialization if desired::
try:
cache
except NameError:
cache = {} | a global table or cache of objects --- with a :keyword:`try` statement it can test for the table's presence and skip its initialization if desired::
try:
cache
except NameError:
cache = {} | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7e678a56-daef-449d-9602-aadc1e04f4c6 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,777 | supabase-export-v2 | 1caa02ec7fd9b902 | .. attribute:: submodule_search_locations
A (possibly empty) :term:`sequence` of strings enumerating the locations
in which a package's submodules will be found
(see :attr:`module.__path__`). Most of the time there will only be a
single directory in this list. | trusted_official_docs | CPython Docs | .. attribute:: submodule_search_locations
A (possibly empty) :term:`sequence` of strings enumerating the locations
in which a package's submodules will be found
(see :attr:`module.__path__`). Most of the time there will only be a
single directory in this list. | .. attribute:: submodule_search_locations
A (possibly empty) :term:`sequence` of strings enumerating the locations
in which a package's submodules will be found
(see :attr:`module.__path__`). Most of the time there will only be a
single directory in this list. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7fb245e5-e038-41af-baa3-83c12e9eb9f7 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,498 | supabase-export-v2 | 877f375f9bf47127 | in the module's dictionary by reusing the :term:`loader` which originally loaded the module. The ``init`` function of extension modules is not called a second time.
* As with all other objects in Python the old objects are only reclaimed
after their reference counts drop to zero. | trusted_official_docs | CPython Docs | in the module's dictionary by reusing the :term:`loader` which originally loaded the module. The ``init`` function of extension modules is not called a second time.
* As with all other objects in Python the old objects are only reclaimed
after their reference counts drop to zero. | in the module's dictionary by reusing the :term:`loader` which originally loaded the module. The ``init`` function of extension modules is not called a second time.
* As with all other objects in Python the old objects are only reclaimed
after their reference counts drop to zero. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7fec7915-9c58-48c5-a860-6241068af6e4 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,827 | supabase-export-v2 | 75aabc02e3e9ca5e | .. function:: find_spec(name, package=None)
Find the :term:`spec <module spec>` for a module, optionally relative to
the specified **package** name. If the module is in :data:`sys.modules`,
then ``sys.modules[name].__spec__`` is returned (unless the spec would be
``None`` or is not set, in which case :exc:`ValueErro... | trusted_official_docs | CPython Docs | .. function:: find_spec(name, package=None)
Find the :term:`spec <module spec>` for a module, optionally relative to
the specified **package** name. If the module is in :data:`sys.modules`,
then ``sys.modules[name].__spec__`` is returned (unless the spec would be
``None`` or is not set, in which case :exc:`ValueErro... | .. function:: find_spec(name, package=None)
Find the :term:`spec <module spec>` for a module, optionally relative to
the specified **package** name. If the module is in :data:`sys.modules`,
then ``sys.modules[name].__spec__`` is returned (unless the spec would be
``None`` or is not set, in which case :exc:`ValueErro... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
86f63d4f-725d-4d42-aa34-45773bca02e3 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,765 | supabase-export-v2 | 1149408c95a9bd94 | .. class:: NamespaceLoader(name, path, path_finder)
A concrete implementation of :class:`importlib.abc.InspectLoader` for
namespace packages. This is an alias for a private class and is only made
public for introspecting the ``__loader__`` attribute on namespace
packages:: | trusted_official_docs | CPython Docs | .. class:: NamespaceLoader(name, path, path_finder)
A concrete implementation of :class:`importlib.abc.InspectLoader` for
namespace packages. This is an alias for a private class and is only made
public for introspecting the ``__loader__`` attribute on namespace
packages:: | .. class:: NamespaceLoader(name, path, path_finder)
A concrete implementation of :class:`importlib.abc.InspectLoader` for
namespace packages. This is an alias for a private class and is only made
public for introspecting the ``__loader__`` attribute on namespace
packages:: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8d17eae3-3876-418f-9716-41423f4f9b65 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,790 | supabase-export-v2 | eb65bcae510501e7 | of the packaged app. There can be only a single binary per framework, and there can be no executable binary material outside the Frameworks folder.
To accommodate this requirement, when running on iOS, extension module
binaries are *not* packaged as ``.so`` files on ``sys.path``, but as
individual standalone framewor... | trusted_official_docs | CPython Docs | of the packaged app. There can be only a single binary per framework, and there can be no executable binary material outside the Frameworks folder.
To accommodate this requirement, when running on iOS, extension module
binaries are *not* packaged as ``.so`` files on ``sys.path``, but as
individual standalone framewor... | of the packaged app. There can be only a single binary per framework, and there can be no executable binary material outside the Frameworks folder.
To accommodate this requirement, when running on iOS, extension module
binaries are *not* packaged as ``.so`` files on ``sys.path``, but as
individual standalone framewor... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8db75af9-b608-4d70-bf7c-632ee183c322 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,878 | supabase-export-v2 | 2e40f17e7d606b71 | def import_from_path(module_name, file_path): spec = importlib.util.spec_from_file_location(module_name, file_path) module = importlib.util.module_from_spec(spec) sys.modules[module_name] = module spec.loader.exec_module(module) return module
# For illustrative purposes only (use of `json` is arbitrary). import json
f... | trusted_official_docs | CPython Docs | def import_from_path(module_name, file_path): spec = importlib.util.spec_from_file_location(module_name, file_path) module = importlib.util.module_from_spec(spec) sys.modules[module_name] = module spec.loader.exec_module(module) return module
# For illustrative purposes only (use of `json` is arbitrary). import json
f... | def import_from_path(module_name, file_path): spec = importlib.util.spec_from_file_location(module_name, file_path) module = importlib.util.module_from_spec(spec) sys.modules[module_name] = module spec.loader.exec_module(module) return module
# For illustrative purposes only (use of `json` is arbitrary). import json
f... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8deb3215-0e2a-4fbc-a0ad-d8aa55d90ee2 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,553 | supabase-export-v2 | 3bf2f75915d721b2 | .. method:: create_module(spec)
A method that returns the module object to use when
importing a module. This method may return ``None``,
indicating that default module creation semantics should take place. | trusted_official_docs | CPython Docs | .. method:: create_module(spec)
A method that returns the module object to use when
importing a module. This method may return ``None``,
indicating that default module creation semantics should take place. | .. method:: create_module(spec)
A method that returns the module object to use when
importing a module. This method may return ``None``,
indicating that default module creation semantics should take place. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8ebbefc9-6be7-4b66-b36b-97d54f2bffbc | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,566 | supabase-export-v2 | 110b7169a549602e | if the *path* cannot be found. The *path* is expected to be constructed using a module's :attr:`~module.__file__` attribute or an item from a package's :attr:`~module.__path__`.
.. versionchanged:: 3.4
Raises :exc:`OSError` instead of :exc:`NotImplementedError`. | trusted_official_docs | CPython Docs | if the *path* cannot be found. The *path* is expected to be constructed using a module's :attr:`~module.__file__` attribute or an item from a package's :attr:`~module.__path__`.
.. versionchanged:: 3.4
Raises :exc:`OSError` instead of :exc:`NotImplementedError`. | if the *path* cannot be found. The *path* is expected to be constructed using a module's :attr:`~module.__file__` attribute or an item from a package's :attr:`~module.__path__`.
.. versionchanged:: 3.4
Raises :exc:`OSError` instead of :exc:`NotImplementedError`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9011b4cd-d34f-4cd4-9f57-b37ad462dca8 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,549 | supabase-export-v2 | 1b4638aa77d12f0c | An abstract base class for a :term:`loader`. See :pep:`302` for the exact definition for a loader.
Loaders that wish to support resource reading should implement a
:meth:`get_resource_reader` method as specified by
:class:`importlib.resources.abc.ResourceReader`. | trusted_official_docs | CPython Docs | An abstract base class for a :term:`loader`. See :pep:`302` for the exact definition for a loader.
Loaders that wish to support resource reading should implement a
:meth:`get_resource_reader` method as specified by
:class:`importlib.resources.abc.ResourceReader`. | An abstract base class for a :term:`loader`. See :pep:`302` for the exact definition for a loader.
Loaders that wish to support resource reading should implement a
:meth:`get_resource_reader` method as specified by
:class:`importlib.resources.abc.ResourceReader`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
932766ec-8e64-4577-9200-d2a71c05c075 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,582 | supabase-export-v2 | 0f70fb0c4f632e6c | Create a code object from Python source.
The *data* argument can be whatever the :func:`compile` function
supports (i.e. string or bytes). The *path* argument should be
the "path" to where the source code originated from, which can be an
abstract concept (e.g. location in a zip file). | trusted_official_docs | CPython Docs | Create a code object from Python source.
The *data* argument can be whatever the :func:`compile` function
supports (i.e. string or bytes). The *path* argument should be
the "path" to where the source code originated from, which can be an
abstract concept (e.g. location in a zip file). | Create a code object from Python source.
The *data* argument can be whatever the :func:`compile` function
supports (i.e. string or bytes). The *path* argument should be
the "path" to where the source code originated from, which can be an
abstract concept (e.g. location in a zip file). | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
946d02c6-5a65-430a-b993-4d23af74084c | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,681 | supabase-export-v2 | 1c26e3726fcbd999 | .. versionadded:: 3.4
.. versionchanged:: 3.5
If the current working directory -- represented by an empty string --
is no longer valid then ``None`` is returned but no value is cached
in :data:`sys.path_importer_cache`. | trusted_official_docs | CPython Docs | .. versionadded:: 3.4
.. versionchanged:: 3.5
If the current working directory -- represented by an empty string --
is no longer valid then ``None`` is returned but no value is cached
in :data:`sys.path_importer_cache`. | .. versionadded:: 3.4
.. versionchanged:: 3.5
If the current working directory -- represented by an empty string --
is no longer valid then ``None`` is returned but no value is cached
in :data:`sys.path_importer_cache`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
962917c4-624c-462f-a69e-8864b970ad0c | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,835 | supabase-export-v2 | 86df92c7f062ab1e | any pre-existing attributes will not be reset. Also, no :exc:`AttributeError` will be raised if triggered while accessing **spec** or setting an attribute on the module.
This function is preferred over using :class:`types.ModuleType` to create a
new module as **spec** is used to set as many import-controlled attribute... | trusted_official_docs | CPython Docs | any pre-existing attributes will not be reset. Also, no :exc:`AttributeError` will be raised if triggered while accessing **spec** or setting an attribute on the module.
This function is preferred over using :class:`types.ModuleType` to create a
new module as **spec** is used to set as many import-controlled attribute... | any pre-existing attributes will not be reset. Also, no :exc:`AttributeError` will be raised if triggered while accessing **spec** or setting an attribute on the module.
This function is preferred over using :class:`types.ModuleType` to create a
new module as **spec** is used to set as many import-controlled attribute... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
96878566-138d-4327-b8b6-5990afd8917d | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,459 | supabase-export-v2 | aac8383306e3a829 | The purpose of the :mod:`!importlib` package is three-fold.
One is to provide the
implementation of the :keyword:`import` statement (and thus, by extension, the
:func:`__import__` function) in Python source code. This provides an
implementation of :keyword:`!import` which is portable to any Python
interpreter. This als... | trusted_official_docs | CPython Docs | The purpose of the :mod:`!importlib` package is three-fold.
One is to provide the
implementation of the :keyword:`import` statement (and thus, by extension, the
:func:`__import__` function) in Python source code. This provides an
implementation of :keyword:`!import` which is portable to any Python
interpreter. This als... | The purpose of the :mod:`!importlib` package is three-fold.
One is to provide the
implementation of the :keyword:`import` statement (and thus, by extension, the
:func:`__import__` function) in Python source code. This provides an
implementation of :keyword:`!import` which is portable to any Python
interpreter. This als... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
99ff6b1d-4380-4cb6-b5f3-c1043cc150dd | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,823 | supabase-export-v2 | 2b186832fe723526 | then **name** is simply returned. This allows for usage such as ``importlib.util.resolve_name('sys', __spec__.parent)`` without doing a check to see if the **package** argument is needed.
:exc:`ImportError` is raised if **name** is a relative module name but
**package** is a false value (e.g. ``None`` or the empty str... | trusted_official_docs | CPython Docs | then **name** is simply returned. This allows for usage such as ``importlib.util.resolve_name('sys', __spec__.parent)`` without doing a check to see if the **package** argument is needed.
:exc:`ImportError` is raised if **name** is a relative module name but
**package** is a false value (e.g. ``None`` or the empty str... | then **name** is simply returned. This allows for usage such as ``importlib.util.resolve_name('sys', __spec__.parent)`` without doing a check to see if the **package** argument is needed.
:exc:`ImportError` is raised if **name** is a relative module name but
**package** is a false value (e.g. ``None`` or the empty str... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9b2af408-53dc-4b3f-9489-996a03816d1d | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,571 | supabase-export-v2 | 3b2b49241ab4dd08 | have a code object (as would be the case, for example, for a built-in module). Raise an :exc:`ImportError` if loader cannot find the requested module.
.. note::
While the method has a default implementation, it is suggested that
it be overridden if possible for performance. | trusted_official_docs | CPython Docs | have a code object (as would be the case, for example, for a built-in module). Raise an :exc:`ImportError` if loader cannot find the requested module.
.. note::
While the method has a default implementation, it is suggested that
it be overridden if possible for performance. | have a code object (as would be the case, for example, for a built-in module). Raise an :exc:`ImportError` if loader cannot find the requested module.
.. note::
While the method has a default implementation, it is suggested that
it be overridden if possible for performance. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a0113906-747d-4195-973e-1c1ce3446a20 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,622 | supabase-export-v2 | 8460f4df56edbc5c | Optional abstract method which returns the modification time for the specified path.
.. deprecated:: 3.3
This method is deprecated in favour of :meth:`path_stats`. You don't
have to implement it, but it is still available for compatibility
purposes. Raise :exc:`OSError` if the path cannot be handled. | trusted_official_docs | CPython Docs | Optional abstract method which returns the modification time for the specified path.
.. deprecated:: 3.3
This method is deprecated in favour of :meth:`path_stats`. You don't
have to implement it, but it is still available for compatibility
purposes. Raise :exc:`OSError` if the path cannot be handled. | Optional abstract method which returns the modification time for the specified path.
.. deprecated:: 3.3
This method is deprecated in favour of :meth:`path_stats`. You don't
have to implement it, but it is still available for compatibility
purposes. Raise :exc:`OSError` if the path cannot be handled. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a0a6d035-add0-41c2-9ef0-938d072be2c1 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,623 | supabase-export-v2 | 788ce50334cc53af | favour of :meth:`path_stats`. You don't have to implement it, but it is still available for compatibility purposes. Raise :exc:`OSError` if the path cannot be handled.
.. versionchanged:: 3.4
Raise :exc:`OSError` instead of :exc:`NotImplementedError`. | trusted_official_docs | CPython Docs | favour of :meth:`path_stats`. You don't have to implement it, but it is still available for compatibility purposes. Raise :exc:`OSError` if the path cannot be handled.
.. versionchanged:: 3.4
Raise :exc:`OSError` instead of :exc:`NotImplementedError`. | favour of :meth:`path_stats`. You don't have to implement it, but it is still available for compatibility purposes. Raise :exc:`OSError` if the path cannot be handled.
.. versionchanged:: 3.4
Raise :exc:`OSError` instead of :exc:`NotImplementedError`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a1f57a12-d98c-4c7e-853e-5f945ef0eeab | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,849 | supabase-export-v2 | fb75f0457baed3d3 | It will also fail for a multi-phase init module that doesn't explicitly support a per-interpreter GIL, when imported in an interpreter with its own GIL.
Note that this function is meant to accommodate an unusual case;
one which is likely to eventually go away. There's is a pretty good
chance this is not what you were... | trusted_official_docs | CPython Docs | It will also fail for a multi-phase init module that doesn't explicitly support a per-interpreter GIL, when imported in an interpreter with its own GIL.
Note that this function is meant to accommodate an unusual case;
one which is likely to eventually go away. There's is a pretty good
chance this is not what you were... | It will also fail for a multi-phase init module that doesn't explicitly support a per-interpreter GIL, when imported in an interpreter with its own GIL.
Note that this function is meant to accommodate an unusual case;
one which is likely to eventually go away. There's is a pretty good
chance this is not what you were... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a326ea13-f2e2-4e51-b3c7-98943836266d | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,868 | supabase-export-v2 | 1881ec19a1ab495c | Checking if a module can be imported ''''''''''''''''''''''''''''''''''''
If you need to find out if a module can be imported without actually doing the
import, then you should use :func:`importlib.util.find_spec`. | trusted_official_docs | CPython Docs | Checking if a module can be imported ''''''''''''''''''''''''''''''''''''
If you need to find out if a module can be imported without actually doing the
import, then you should use :func:`importlib.util.find_spec`. | Checking if a module can be imported ''''''''''''''''''''''''''''''''''''
If you need to find out if a module can be imported without actually doing the
import, then you should use :func:`importlib.util.find_spec`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a4a36629-8246-4f57-8346-913086d4f31c | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,598 | supabase-export-v2 | 85e631d8e82da056 | An abstract base class which inherits from :class:`ResourceLoader` and :class:`ExecutionLoader`, providing concrete implementations of :meth:`ResourceLoader.get_data` and :meth:`ExecutionLoader.get_filename`.
The *fullname* argument is a fully resolved name of the module the loader is
to handle. The *path* argument is... | trusted_official_docs | CPython Docs | An abstract base class which inherits from :class:`ResourceLoader` and :class:`ExecutionLoader`, providing concrete implementations of :meth:`ResourceLoader.get_data` and :meth:`ExecutionLoader.get_filename`.
The *fullname* argument is a fully resolved name of the module the loader is
to handle. The *path* argument is... | An abstract base class which inherits from :class:`ResourceLoader` and :class:`ExecutionLoader`, providing concrete implementations of :meth:`ResourceLoader.get_data` and :meth:`ExecutionLoader.get_filename`.
The *fullname* argument is a fully resolved name of the module the loader is
to handle. The *path* argument is... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a9583906-f76c-4d9f-a7d4-f103d243299d | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,583 | supabase-export-v2 | 531def075fdda207 | *path* argument should be the "path" to where the source code originated from, which can be an abstract concept (e.g. location in a zip file).
With the subsequent code object one can execute it in a module by
running ``exec(code, module.__dict__)``. | trusted_official_docs | CPython Docs | *path* argument should be the "path" to where the source code originated from, which can be an abstract concept (e.g. location in a zip file).
With the subsequent code object one can execute it in a module by
running ``exec(code, module.__dict__)``. | *path* argument should be the "path" to where the source code originated from, which can be an abstract concept (e.g. location in a zip file).
With the subsequent code object one can execute it in a module by
running ``exec(code, module.__dict__)``. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ae57c6e0-9a2c-4ba7-bc74-364da9e3e5ba | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,636 | supabase-export-v2 | df435d73e0da8ba6 | .. method:: is_package(fullname)
Concrete implementation of :meth:`InspectLoader.is_package`. A module
is determined to be a package if its file path (as provided by
:meth:`ExecutionLoader.get_filename`) is a file named
``__init__`` when the file extension is removed **and** the module name
itself does not end in `... | trusted_official_docs | CPython Docs | .. method:: is_package(fullname)
Concrete implementation of :meth:`InspectLoader.is_package`. A module
is determined to be a package if its file path (as provided by
:meth:`ExecutionLoader.get_filename`) is a file named
``__init__`` when the file extension is removed **and** the module name
itself does not end in `... | .. method:: is_package(fullname)
Concrete implementation of :meth:`InspectLoader.is_package`. A module
is determined to be a package if its file path (as provided by
:meth:`ExecutionLoader.get_filename`) is a file named
``__init__`` when the file extension is removed **and** the module name
itself does not end in `... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b13fe9ac-c8bf-454f-94b5-d7558363e544 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,814 | supabase-export-v2 | 0b54c2be9b5b1096 | .. function:: source_from_cache(path)
Given the *path* to a :pep:`3147` file name, return the associated source code
file path. For example, if *path* is
``/foo/bar/__pycache__/baz.cpython-32.pyc`` the returned path would be
``/foo/bar/baz.py``. *path* need not exist, however if it does not conform
to :pep:`3147` o... | trusted_official_docs | CPython Docs | .. function:: source_from_cache(path)
Given the *path* to a :pep:`3147` file name, return the associated source code
file path. For example, if *path* is
``/foo/bar/__pycache__/baz.cpython-32.pyc`` the returned path would be
``/foo/bar/baz.py``. *path* need not exist, however if it does not conform
to :pep:`3147` o... | .. function:: source_from_cache(path)
Given the *path* to a :pep:`3147` file name, return the associated source code
file path. For example, if *path* is
``/foo/bar/__pycache__/baz.cpython-32.pyc`` the returned path would be
``/foo/bar/baz.py``. *path* need not exist, however if it does not conform
to :pep:`3147` o... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b27ecbe3-df84-404a-b00b-aafa7e6b66cf | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,689 | supabase-export-v2 | 8961785ab9ab1363 | The *path* argument is the directory for which the finder is in charge of searching.
The *loader_details* argument is a variable number of 2-item tuples each
containing a loader and a sequence of file suffixes the loader recognizes. The loaders are expected to be callables which accept two arguments of
the module's n... | trusted_official_docs | CPython Docs | The *path* argument is the directory for which the finder is in charge of searching.
The *loader_details* argument is a variable number of 2-item tuples each
containing a loader and a sequence of file suffixes the loader recognizes. The loaders are expected to be callables which accept two arguments of
the module's n... | The *path* argument is the directory for which the finder is in charge of searching.
The *loader_details* argument is a variable number of 2-item tuples each
containing a loader and a sequence of file suffixes the loader recognizes. The loaders are expected to be callables which accept two arguments of
the module's n... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b2e94790-816c-418d-b1b9-705e26047a32 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,584 | supabase-export-v2 | b57e6be8cfaa1ded | With the subsequent code object one can execute it in a module by running ``exec(code, module.__dict__)``.
The optional argument *fullname* specifies the module name. It is needed to unambiguous :ref:`filter <warning-filter>` syntax
warnings by module name. | trusted_official_docs | CPython Docs | With the subsequent code object one can execute it in a module by running ``exec(code, module.__dict__)``.
The optional argument *fullname* specifies the module name. It is needed to unambiguous :ref:`filter <warning-filter>` syntax
warnings by module name. | With the subsequent code object one can execute it in a module by running ``exec(code, module.__dict__)``.
The optional argument *fullname* specifies the module name. It is needed to unambiguous :ref:`filter <warning-filter>` syntax
warnings by module name. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b394bf46-3b08-4880-8205-a0e692e34bf0 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,565 | supabase-export-v2 | c8d4f7c5e30a646b | .. method:: get_data(path) :abstractmethod:
An abstract method to return the bytes for the data located at *path*. Loaders that have a file-like storage back-end
that allows storing arbitrary data
can implement this abstract method to give direct access
to the data stored. :exc:`OSError` is to be raised if the *path... | trusted_official_docs | CPython Docs | .. method:: get_data(path) :abstractmethod:
An abstract method to return the bytes for the data located at *path*. Loaders that have a file-like storage back-end
that allows storing arbitrary data
can implement this abstract method to give direct access
to the data stored. :exc:`OSError` is to be raised if the *path... | .. method:: get_data(path) :abstractmethod:
An abstract method to return the bytes for the data located at *path*. Loaders that have a file-like storage back-end
that allows storing arbitrary data
can implement this abstract method to give direct access
to the data stored. :exc:`OSError` is to be raised if the *path... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b4b140a4-a33c-4b19-a296-fa430bdace94 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,591 | supabase-export-v2 | 1747f38bbbd84af6 | .. class:: ExecutionLoader
An abstract base class which inherits from :class:`InspectLoader` that,
when implemented, helps a module to be executed as a script. The ABC
represents an optional :pep:`302` protocol. | trusted_official_docs | CPython Docs | .. class:: ExecutionLoader
An abstract base class which inherits from :class:`InspectLoader` that,
when implemented, helps a module to be executed as a script. The ABC
represents an optional :pep:`302` protocol. | .. class:: ExecutionLoader
An abstract base class which inherits from :class:`InspectLoader` that,
when implemented, helps a module to be executed as a script. The ABC
represents an optional :pep:`302` protocol. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b5533119-7df1-4ecc-908f-63ca4239ea38 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,465 | supabase-export-v2 | 995df2521627fdaa | :ref:`import` The language reference for the :keyword:`import` statement.
`Packages specification <https://www.python.org/doc/essays/packages/>`__
Original specification of packages. Some semantics have changed since
the writing of this document (e.g. redirecting based on ``None``
in :data:`sys.modules`). | trusted_official_docs | CPython Docs | :ref:`import` The language reference for the :keyword:`import` statement.
`Packages specification <https://www.python.org/doc/essays/packages/>`__
Original specification of packages. Some semantics have changed since
the writing of this document (e.g. redirecting based on ``None``
in :data:`sys.modules`). | :ref:`import` The language reference for the :keyword:`import` statement.
`Packages specification <https://www.python.org/doc/essays/packages/>`__
Original specification of packages. Some semantics have changed since
the writing of this document (e.g. redirecting based on ``None``
in :data:`sys.modules`). | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b5e91d7c-e985-4931-949c-f72c3ad883b1 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,531 | supabase-export-v2 | 670320c77fd48d1e | .. warning:: This method can potentially yield a very large number of objects, and it may carry out IO operations when computing these values.
Because of this, it will generally be desirable to compute the result
values on-the-fly, as they are needed. As such, the returned object is
only guaranteed to be an :class:`i... | trusted_official_docs | CPython Docs | .. warning:: This method can potentially yield a very large number of objects, and it may carry out IO operations when computing these values.
Because of this, it will generally be desirable to compute the result
values on-the-fly, as they are needed. As such, the returned object is
only guaranteed to be an :class:`i... | .. warning:: This method can potentially yield a very large number of objects, and it may carry out IO operations when computing these values.
Because of this, it will generally be desirable to compute the result
values on-the-fly, as they are needed. As such, the returned object is
only guaranteed to be an :class:`i... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b6d67b4f-2311-4bf2-ae14-9ff719af4995 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,563 | supabase-export-v2 | 609cf2f528e17de4 | An abstract base class for a :term:`loader` which implements the optional :pep:`302` protocol for loading arbitrary resources from the storage back-end.
.. deprecated:: 3.7
This ABC is deprecated in favour of supporting resource loading
through :class:`importlib.resources.abc.TraversableResources`. This class exists ... | trusted_official_docs | CPython Docs | An abstract base class for a :term:`loader` which implements the optional :pep:`302` protocol for loading arbitrary resources from the storage back-end.
.. deprecated:: 3.7
This ABC is deprecated in favour of supporting resource loading
through :class:`importlib.resources.abc.TraversableResources`. This class exists ... | An abstract base class for a :term:`loader` which implements the optional :pep:`302` protocol for loading arbitrary resources from the storage back-end.
.. deprecated:: 3.7
This ABC is deprecated in favour of supporting resource loading
through :class:`importlib.resources.abc.TraversableResources`. This class exists ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b80fbcf4-aa39-4aea-9318-feb2ea9677de | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,466 | supabase-export-v2 | c990d4b8bcf7cce6 | `Packages specification <https://www.python.org/doc/essays/packages/>`__ Original specification of packages. Some semantics have changed since the writing of this document (e.g. redirecting based on ``None`` in :data:`sys.modules`).
The :func:`.__import__` function
The :keyword:`import` statement is syntactic sugar fo... | trusted_official_docs | CPython Docs | `Packages specification <https://www.python.org/doc/essays/packages/>`__ Original specification of packages. Some semantics have changed since the writing of this document (e.g. redirecting based on ``None`` in :data:`sys.modules`).
The :func:`.__import__` function
The :keyword:`import` statement is syntactic sugar fo... | `Packages specification <https://www.python.org/doc/essays/packages/>`__ Original specification of packages. Some semantics have changed since the writing of this document (e.g. redirecting based on ``None`` in :data:`sys.modules`).
The :func:`.__import__` function
The :keyword:`import` statement is syntactic sugar fo... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b8a8c3dd-db21-4233-933b-49502b26bad9 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,704 | supabase-export-v2 | 4e89e6ca8533e92f | When its ``__path__`` value is accessed it will be recomputed if necessary. This keeps it in-sync with the global state (:attr:`sys.modules`).
The *name* argument is the name of the namespace module. | trusted_official_docs | CPython Docs | When its ``__path__`` value is accessed it will be recomputed if necessary. This keeps it in-sync with the global state (:attr:`sys.modules`).
The *name* argument is the name of the namespace module. | When its ``__path__`` value is accessed it will be recomputed if necessary. This keeps it in-sync with the global state (:attr:`sys.modules`).
The *name* argument is the name of the namespace module. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
bd46fe18-b2d4-48df-b5f2-955197d07622 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,500 | supabase-export-v2 | 16f18a2cd4d8b1ca | * The names in the module namespace are updated to point to any new or changed objects.
* Other references to the old objects (such as names external to the module) are
not rebound to refer to the new objects and must be updated in each namespace
where they occur if that is desired. | trusted_official_docs | CPython Docs | * The names in the module namespace are updated to point to any new or changed objects.
* Other references to the old objects (such as names external to the module) are
not rebound to refer to the new objects and must be updated in each namespace
where they occur if that is desired. | * The names in the module namespace are updated to point to any new or changed objects.
* Other references to the old objects (such as names external to the module) are
not rebound to refer to the new objects and must be updated in each namespace
where they occur if that is desired. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c098a696-9d79-4bbe-9ab4-cd225340a056 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,778 | supabase-export-v2 | 8edc360d5759bf37 | locations in which a package's submodules will be found (see :attr:`module.__path__`). Most of the time there will only be a single directory in this list.
The :term:`finder` should set this attribute to a sequence, even an empty
one, to indicate
to the import system that the module is a package. It should be set to ... | trusted_official_docs | CPython Docs | locations in which a package's submodules will be found (see :attr:`module.__path__`). Most of the time there will only be a single directory in this list.
The :term:`finder` should set this attribute to a sequence, even an empty
one, to indicate
to the import system that the module is a package. It should be set to ... | locations in which a package's submodules will be found (see :attr:`module.__path__`). Most of the time there will only be a single directory in this list.
The :term:`finder` should set this attribute to a sequence, even an empty
one, to indicate
to the import system that the module is a package. It should be set to ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c3674e33-6b89-4e02-b2ee-37960acff9db | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,860 | supabase-export-v2 | c2126856c53a3887 | .. classmethod:: factory(loader)
A class method which returns a callable that creates a lazy loader. This
is meant to be used in situations where the loader is passed by class
instead of by instance. :: | trusted_official_docs | CPython Docs | .. classmethod:: factory(loader)
A class method which returns a callable that creates a lazy loader. This
is meant to be used in situations where the loader is passed by class
instead of by instance. :: | .. classmethod:: factory(loader)
A class method which returns a callable that creates a lazy loader. This
is meant to be used in situations where the loader is passed by class
instead of by instance. :: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c653baf3-7220-4df4-8ae5-bdaef38f16de | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,834 | supabase-export-v2 | 2ba76d0a4142e3bf | Create a new module based on **spec** and :meth:`spec.loader.create_module <importlib.abc.Loader.create_module>`.
If :meth:`spec.loader.create_module <importlib.abc.Loader.create_module>`
does not return ``None``, then any pre-existing attributes will not be reset. Also, no :exc:`AttributeError` will be raised if trig... | trusted_official_docs | CPython Docs | Create a new module based on **spec** and :meth:`spec.loader.create_module <importlib.abc.Loader.create_module>`.
If :meth:`spec.loader.create_module <importlib.abc.Loader.create_module>`
does not return ``None``, then any pre-existing attributes will not be reset. Also, no :exc:`AttributeError` will be raised if trig... | Create a new module based on **spec** and :meth:`spec.loader.create_module <importlib.abc.Loader.create_module>`.
If :meth:`spec.loader.create_module <importlib.abc.Loader.create_module>`
does not return ``None``, then any pre-existing attributes will not be reset. Also, no :exc:`AttributeError` will be raised if trig... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c72c7449-4da5-400c-97b5-4f3a426f04ef | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,744 | supabase-export-v2 | 05a5a1b83f76207c | The *fullname* argument specifies the name of the module the loader is to support. The *path* argument is the path to the extension module's file.
Note that, by default, importing an extension module will fail
in subinterpreters if it doesn't implement multi-phase init
(see :pep:`489`), even if it would otherwise imp... | trusted_official_docs | CPython Docs | The *fullname* argument specifies the name of the module the loader is to support. The *path* argument is the path to the extension module's file.
Note that, by default, importing an extension module will fail
in subinterpreters if it doesn't implement multi-phase init
(see :pep:`489`), even if it would otherwise imp... | The *fullname* argument specifies the name of the module the loader is to support. The *path* argument is the path to the extension module's file.
Note that, by default, importing an extension module will fail
in subinterpreters if it doesn't implement multi-phase init
(see :pep:`489`), even if it would otherwise imp... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c8202efe-6482-4810-afa8-00ce8fe9cbe4 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,508 | supabase-export-v2 | ee38453d983c9df6 | .. versionadded:: 3.4 .. versionchanged:: 3.7 :exc:`ModuleNotFoundError` is raised when the module being reloaded lacks a :class:`~importlib.machinery.ModuleSpec`.
.. warning::
This function is not thread-safe. Calling it from multiple threads can result
in unexpected behavior. It's recommended to use the :class:`thr... | trusted_official_docs | CPython Docs | .. versionadded:: 3.4 .. versionchanged:: 3.7 :exc:`ModuleNotFoundError` is raised when the module being reloaded lacks a :class:`~importlib.machinery.ModuleSpec`.
.. warning::
This function is not thread-safe. Calling it from multiple threads can result
in unexpected behavior. It's recommended to use the :class:`thr... | .. versionadded:: 3.4 .. versionchanged:: 3.7 :exc:`ModuleNotFoundError` is raised when the module being reloaded lacks a :class:`~importlib.machinery.ModuleSpec`.
.. warning::
This function is not thread-safe. Calling it from multiple threads can result
in unexpected behavior. It's recommended to use the :class:`thr... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c8b06762-0a79-4b19-910c-1e4270ec8dae | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,505 | supabase-export-v2 | 3ac8173a8894a272 | is not recommended. In many cases extension modules are not designed to be initialized more than once, and may fail in arbitrary ways when reloaded.
If a module imports objects from another module using :keyword:`from` ... :keyword:`import` ..., calling :func:`reload` for the other module does not
redefine the objects... | trusted_official_docs | CPython Docs | is not recommended. In many cases extension modules are not designed to be initialized more than once, and may fail in arbitrary ways when reloaded.
If a module imports objects from another module using :keyword:`from` ... :keyword:`import` ..., calling :func:`reload` for the other module does not
redefine the objects... | is not recommended. In many cases extension modules are not designed to be initialized more than once, and may fail in arbitrary ways when reloaded.
If a module imports objects from another module using :keyword:`from` ... :keyword:`import` ..., calling :func:`reload` for the other module does not
redefine the objects... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c9095215-020c-4bdf-905e-524674979f05 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,616 | supabase-export-v2 | 85d1078964ccc8b0 | Optional abstract method which returns a :class:`dict` containing metadata about the specified path. Supported dictionary keys are:
- ``'mtime'`` (mandatory): an integer or floating-point number
representing the modification time of the source code;
- ``'size'`` (optional): the size in bytes of the source code. | trusted_official_docs | CPython Docs | Optional abstract method which returns a :class:`dict` containing metadata about the specified path. Supported dictionary keys are:
- ``'mtime'`` (mandatory): an integer or floating-point number
representing the modification time of the source code;
- ``'size'`` (optional): the size in bytes of the source code. | Optional abstract method which returns a :class:`dict` containing metadata about the specified path. Supported dictionary keys are:
- ``'mtime'`` (mandatory): an integer or floating-point number
representing the modification time of the source code;
- ``'size'`` (optional): the size in bytes of the source code. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
cae0d69a-35c4-4b4e-8caa-3dc2f5c20e16 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,766 | supabase-export-v2 | 7f96114fe254239c | :class:`importlib.abc.InspectLoader` for namespace packages. This is an alias for a private class and is only made public for introspecting the ``__loader__`` attribute on namespace packages::
>>> from importlib.machinery import NamespaceLoader
>>> import my_namespace
>>> isinstance(my_namespace.__loader__, Namespace... | trusted_official_docs | CPython Docs | :class:`importlib.abc.InspectLoader` for namespace packages. This is an alias for a private class and is only made public for introspecting the ``__loader__`` attribute on namespace packages::
>>> from importlib.machinery import NamespaceLoader
>>> import my_namespace
>>> isinstance(my_namespace.__loader__, Namespace... | :class:`importlib.abc.InspectLoader` for namespace packages. This is an alias for a private class and is only made public for introspecting the ``__loader__`` attribute on namespace packages::
>>> from importlib.machinery import NamespaceLoader
>>> import my_namespace
>>> isinstance(my_namespace.__loader__, Namespace... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
cbebc6ab-a30f-4ceb-92e7-ecbd5991f795 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,502 | supabase-export-v2 | 9575674c4d3853fe | There are a number of other caveats:
When a module is reloaded, its dictionary (containing the module's global
variables) is retained. Redefinitions of names will override the old
definitions, so this is generally not a problem. If the new version of a
module does not define a name that was defined by the old versio... | trusted_official_docs | CPython Docs | There are a number of other caveats:
When a module is reloaded, its dictionary (containing the module's global
variables) is retained. Redefinitions of names will override the old
definitions, so this is generally not a problem. If the new version of a
module does not define a name that was defined by the old versio... | There are a number of other caveats:
When a module is reloaded, its dictionary (containing the module's global
variables) is retained. Redefinitions of names will override the old
definitions, so this is generally not a problem. If the new version of a
module does not define a name that was defined by the old versio... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d0157494-945e-47b3-ab3d-9436ebaf16b1 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,684 | supabase-export-v2 | 37ecf1dcc51752d0 | Calls :meth:`importlib.abc.PathEntryFinder.invalidate_caches` on all finders stored in :data:`sys.path_importer_cache` that define the method. Otherwise entries in :data:`sys.path_importer_cache` set to ``None`` are deleted.
.. versionchanged:: 3.7
Entries of ``None`` in :data:`sys.path_importer_cache` are deleted. | trusted_official_docs | CPython Docs | Calls :meth:`importlib.abc.PathEntryFinder.invalidate_caches` on all finders stored in :data:`sys.path_importer_cache` that define the method. Otherwise entries in :data:`sys.path_importer_cache` set to ``None`` are deleted.
.. versionchanged:: 3.7
Entries of ``None`` in :data:`sys.path_importer_cache` are deleted. | Calls :meth:`importlib.abc.PathEntryFinder.invalidate_caches` on all finders stored in :data:`sys.path_importer_cache` that define the method. Otherwise entries in :data:`sys.path_importer_cache` set to ``None`` are deleted.
.. versionchanged:: 3.7
Entries of ``None`` in :data:`sys.path_importer_cache` are deleted. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
dcd751d6-b678-413b-bb22-b678066b77e5 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,533 | supabase-export-v2 | 1fad469537a932a7 | .. class:: PathEntryFinder
An abstract base class representing a :term:`path entry finder`. Though
it bears some similarities to :class:`MetaPathFinder`, ``PathEntryFinder``
is meant for use only within the path-based import subsystem provided
by :class:`importlib.machinery.PathFinder`. | trusted_official_docs | CPython Docs | .. class:: PathEntryFinder
An abstract base class representing a :term:`path entry finder`. Though
it bears some similarities to :class:`MetaPathFinder`, ``PathEntryFinder``
is meant for use only within the path-based import subsystem provided
by :class:`importlib.machinery.PathFinder`. | .. class:: PathEntryFinder
An abstract base class representing a :term:`path entry finder`. Though
it bears some similarities to :class:`MetaPathFinder`, ``PathEntryFinder``
is meant for use only within the path-based import subsystem provided
by :class:`importlib.machinery.PathFinder`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
dda4167b-9502-457b-b821-e173d95cc8be | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,570 | supabase-export-v2 | 4601333a01223616 | .. method:: get_code(fullname)
Return the code object for a module, or ``None`` if the module does not
have a code object (as would be the case, for example, for a built-in
module). Raise an :exc:`ImportError` if loader cannot find the
requested module. | trusted_official_docs | CPython Docs | .. method:: get_code(fullname)
Return the code object for a module, or ``None`` if the module does not
have a code object (as would be the case, for example, for a built-in
module). Raise an :exc:`ImportError` if loader cannot find the
requested module. | .. method:: get_code(fullname)
Return the code object for a module, or ``None`` if the module does not
have a code object (as would be the case, for example, for a built-in
module). Raise an :exc:`ImportError` if loader cannot find the
requested module. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e098d2b2-63e9-405d-8f9d-b14c5aa57320 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,791 | supabase-export-v2 | 26314608040e08b3 | the original location, the framework is expected to contain a ``.origin`` file that contains the location of the ``.fwork`` file, relative to the app bundle.
For example, consider the case of an import ``from foo.bar import _whiz``,
where ``_whiz`` is implemented with the binary module
``sources/foo/bar/_whiz.abi3.so... | trusted_official_docs | CPython Docs | the original location, the framework is expected to contain a ``.origin`` file that contains the location of the ``.fwork`` file, relative to the app bundle.
For example, consider the case of an import ``from foo.bar import _whiz``,
where ``_whiz`` is implemented with the binary module
``sources/foo/bar/_whiz.abi3.so... | the original location, the framework is expected to contain a ``.origin`` file that contains the location of the ``.fwork`` file, relative to the app bundle.
For example, consider the case of an import ``from foo.bar import _whiz``,
where ``_whiz`` is implemented with the binary module
``sources/foo/bar/_whiz.abi3.so... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e1634457-6149-4c6a-80e8-cc57d38ccd05 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,873 | supabase-export-v2 | b4cb27c1b4b2cf34 | you chose to perform the actual import ... module = importlib.util.module_from_spec(spec) sys.modules[name] = module spec.loader.exec_module(module) print(f"{name!r} has been imported") else: print(f"can't find the {name!r} module")
Importing a source file directly
'''''''''''''''''''''''''''''''' | trusted_official_docs | CPython Docs | you chose to perform the actual import ... module = importlib.util.module_from_spec(spec) sys.modules[name] = module spec.loader.exec_module(module) print(f"{name!r} has been imported") else: print(f"can't find the {name!r} module")
Importing a source file directly
'''''''''''''''''''''''''''''''' | you chose to perform the actual import ... module = importlib.util.module_from_spec(spec) sys.modules[name] = module spec.loader.exec_module(module) print(f"{name!r} has been imported") else: print(f"can't find the {name!r} module")
Importing a source file directly
'''''''''''''''''''''''''''''''' | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e63c48dc-2975-4037-8200-777d9e60fccc | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,485 | supabase-export-v2 | dc32af2dfc716d54 | .. function:: import_module(name, package=None)
Import a module. The *name* argument specifies what module to
import in absolute or relative terms
(e.g. either ``pkg.mod`` or ``..mod``). If the name is
specified in relative terms, then the *package* argument must be set to
the name of the package which is to act as... | trusted_official_docs | CPython Docs | .. function:: import_module(name, package=None)
Import a module. The *name* argument specifies what module to
import in absolute or relative terms
(e.g. either ``pkg.mod`` or ``..mod``). If the name is
specified in relative terms, then the *package* argument must be set to
the name of the package which is to act as... | .. function:: import_module(name, package=None)
Import a module. The *name* argument specifies what module to
import in absolute or relative terms
(e.g. either ``pkg.mod`` or ``..mod``). If the name is
specified in relative terms, then the *package* argument must be set to
the name of the package which is to act as... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e73e2c74-62fd-4a46-a80b-1b66c1bbcfd5 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,856 | supabase-export-v2 | 31abbee4514ea71e | work as there is no way to properly replace the module references throughout the interpreter safely; :exc:`ValueError` is raised if such a substitution is detected.
.. note::
For projects where startup time is critical, this class allows for
potentially minimizing the cost of loading a module if it is never used. For... | trusted_official_docs | CPython Docs | work as there is no way to properly replace the module references throughout the interpreter safely; :exc:`ValueError` is raised if such a substitution is detected.
.. note::
For projects where startup time is critical, this class allows for
potentially minimizing the cost of loading a module if it is never used. For... | work as there is no way to properly replace the module references throughout the interpreter safely; :exc:`ValueError` is raised if such a substitution is detected.
.. note::
For projects where startup time is critical, this class allows for
potentially minimizing the cost of loading a module if it is never used. For... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e7407b80-afa6-47ae-bea6-3b69be497096 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,789 | supabase-export-v2 | 9050550a0497b7f2 | A specialization of :class:`importlib.machinery.ExtensionFileLoader` that is able to load extension modules in Framework format.
For compatibility with the iOS App Store, *all* binary modules in an iOS app
must be dynamic libraries, contained in a framework with appropriate
metadata, stored in the ``Frameworks`` fold... | trusted_official_docs | CPython Docs | A specialization of :class:`importlib.machinery.ExtensionFileLoader` that is able to load extension modules in Framework format.
For compatibility with the iOS App Store, *all* binary modules in an iOS app
must be dynamic libraries, contained in a framework with appropriate
metadata, stored in the ``Frameworks`` fold... | A specialization of :class:`importlib.machinery.ExtensionFileLoader` that is able to load extension modules in Framework format.
For compatibility with the iOS App Store, *all* binary modules in an iOS app
must be dynamic libraries, contained in a framework with appropriate
metadata, stored in the ``Frameworks`` fold... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e879d330-4e39-4f79-ba9c-f3c54ee826df | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,707 | supabase-export-v2 | 07447bca4df9c2ce | The *path_finder* argument is the callable used to recompute the path value. The callable has the same signature as :meth:`importlib.abc.MetaPathFinder.find_spec`.
When the parent's :attr:`module.__path__` attribute is updated, the path
value is recomputed. | trusted_official_docs | CPython Docs | The *path_finder* argument is the callable used to recompute the path value. The callable has the same signature as :meth:`importlib.abc.MetaPathFinder.find_spec`.
When the parent's :attr:`module.__path__` attribute is updated, the path
value is recomputed. | The *path_finder* argument is the callable used to recompute the path value. The callable has the same signature as :meth:`importlib.abc.MetaPathFinder.find_spec`.
When the parent's :attr:`module.__path__` attribute is updated, the path
value is recomputed. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e8d5fe30-dea8-48d0-be85-54290c3483e3 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,850 | supabase-export-v2 | f6ee1e1b9d7aee2f | an unusual case; one which is likely to eventually go away. There's is a pretty good chance this is not what you were looking for.
You can get the same effect as this function by implementing the
basic interface of multi-phase init (:pep:`489`) and lying about
support for multiple interpreters (or per-interpreter GIL... | trusted_official_docs | CPython Docs | an unusual case; one which is likely to eventually go away. There's is a pretty good chance this is not what you were looking for.
You can get the same effect as this function by implementing the
basic interface of multi-phase init (:pep:`489`) and lying about
support for multiple interpreters (or per-interpreter GIL... | an unusual case; one which is likely to eventually go away. There's is a pretty good chance this is not what you were looking for.
You can get the same effect as this function by implementing the
basic interface of multi-phase init (:pep:`489`) and lying about
support for multiple interpreters (or per-interpreter GIL... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e943d31a-6a1c-4342-8472-269a78a4de3c | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,884 | supabase-export-v2 | 6764c0dc48d90c2d | Setting up an importer ''''''''''''''''''''''
For deep customizations of import, you typically want to implement an
:term:`importer`. This means managing both the :term:`finder` and :term:`loader`
side of things. For finders there are two flavours to choose from depending on
your needs: a :term:`meta path finder` or a ... | trusted_official_docs | CPython Docs | Setting up an importer ''''''''''''''''''''''
For deep customizations of import, you typically want to implement an
:term:`importer`. This means managing both the :term:`finder` and :term:`loader`
side of things. For finders there are two flavours to choose from depending on
your needs: a :term:`meta path finder` or a ... | Setting up an importer ''''''''''''''''''''''
For deep customizations of import, you typically want to implement an
:term:`importer`. This means managing both the :term:`finder` and :term:`loader`
side of things. For finders there are two flavours to choose from depending on
your needs: a :term:`meta path finder` or a ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ebd4305b-01bf-43bb-aa4d-c777d500ecfd | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,890 | supabase-export-v2 | 8f98e4d278c91b39 | Approximating :func:`importlib.import_module` '''''''''''''''''''''''''''''''''''''''''''''
Import itself is implemented in Python code, making it possible to
expose most of the import machinery through importlib. The following
helps illustrate the various APIs that importlib exposes by providing an
approximate impleme... | trusted_official_docs | CPython Docs | Approximating :func:`importlib.import_module` '''''''''''''''''''''''''''''''''''''''''''''
Import itself is implemented in Python code, making it possible to
expose most of the import machinery through importlib. The following
helps illustrate the various APIs that importlib exposes by providing an
approximate impleme... | Approximating :func:`importlib.import_module` '''''''''''''''''''''''''''''''''''''''''''''
Import itself is implemented in Python code, making it possible to
expose most of the import machinery through importlib. The following
helps illustrate the various APIs that importlib exposes by providing an
approximate impleme... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f1567a1a-9aab-473a-a736-74cbe26570f8 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,491 | supabase-export-v2 | 782c87d7b94e41e6 | .. function:: invalidate_caches()
Invalidate the internal caches of finders stored at
:data:`sys.meta_path`. If a finder implements ``invalidate_caches()`` then it
will be called to perform the invalidation. This function should be called
if any modules are created/installed while your program is running to
guarant... | trusted_official_docs | CPython Docs | .. function:: invalidate_caches()
Invalidate the internal caches of finders stored at
:data:`sys.meta_path`. If a finder implements ``invalidate_caches()`` then it
will be called to perform the invalidation. This function should be called
if any modules are created/installed while your program is running to
guarant... | .. function:: invalidate_caches()
Invalidate the internal caches of finders stored at
:data:`sys.meta_path`. If a finder implements ``invalidate_caches()`` then it
will be called to perform the invalidation. This function should be called
if any modules are created/installed while your program is running to
guarant... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f2120fd1-c7c2-4e48-b27d-914076e77e1b | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,883 | supabase-export-v2 | ed7f2f042198f0fa | module ... >>> lazy_typing = lazy_import("typing") >>> #lazy_typing is a real module object, >>> #but it is not loaded in memory yet. >>> lazy_typing.TYPE_CHECKING False
Setting up an importer
'''''''''''''''''''''' | trusted_official_docs | CPython Docs | module ... >>> lazy_typing = lazy_import("typing") >>> #lazy_typing is a real module object, >>> #but it is not loaded in memory yet. >>> lazy_typing.TYPE_CHECKING False
Setting up an importer
'''''''''''''''''''''' | module ... >>> lazy_typing = lazy_import("typing") >>> #lazy_typing is a real module object, >>> #but it is not loaded in memory yet. >>> lazy_typing.TYPE_CHECKING False
Setting up an importer
'''''''''''''''''''''' | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f32d5347-c41d-4953-9d41-de44e005382c | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,828 | supabase-export-v2 | 0681f89555785fa2 | or is not set, in which case :exc:`ValueError` is raised). Otherwise a search using :data:`sys.meta_path` is done. ``None`` is returned if no spec is found.
If **name** is for a submodule (contains a dot), the parent module is
automatically imported. | trusted_official_docs | CPython Docs | or is not set, in which case :exc:`ValueError` is raised). Otherwise a search using :data:`sys.meta_path` is done. ``None`` is returned if no spec is found.
If **name** is for a submodule (contains a dot), the parent module is
automatically imported. | or is not set, in which case :exc:`ValueError` is raised). Otherwise a search using :data:`sys.meta_path` is done. ``None`` is returned if no spec is found.
If **name** is for a submodule (contains a dot), the parent module is
automatically imported. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f331adf2-6a3c-4945-93b6-bd89ad652604 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,578 | supabase-export-v2 | 7c9f6090cdd5ec9a | .. method:: is_package(fullname)
An optional method to return a true value if the module is a package, a
false value otherwise. :exc:`ImportError` is raised if the
:term:`loader` cannot find the module. | trusted_official_docs | CPython Docs | .. method:: is_package(fullname)
An optional method to return a true value if the module is a package, a
false value otherwise. :exc:`ImportError` is raised if the
:term:`loader` cannot find the module. | .. method:: is_package(fullname)
An optional method to return a true value if the module is a package, a
false value otherwise. :exc:`ImportError` is raised if the
:term:`loader` cannot find the module. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f47bc875-8d37-456c-ab57-6fd9d8b462b6 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,460 | supabase-export-v2 | c2165340b349aa29 | portable to any Python interpreter. This also provides an implementation which is easier to comprehend than one implemented in a programming language other than Python.
Two, the components to implement :keyword:`import` are exposed in this
package, making it easier for users to create their own custom objects (known
ge... | trusted_official_docs | CPython Docs | portable to any Python interpreter. This also provides an implementation which is easier to comprehend than one implemented in a programming language other than Python.
Two, the components to implement :keyword:`import` are exposed in this
package, making it easier for users to create their own custom objects (known
ge... | portable to any Python interpreter. This also provides an implementation which is easier to comprehend than one implemented in a programming language other than Python.
Two, the components to implement :keyword:`import` are exposed in this
package, making it easier for users to create their own custom objects (known
ge... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f66a9269-1862-41f3-8fa5-a4a3c0acd238 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,807 | supabase-export-v2 | e665223243803591 | .. function:: cache_from_source(path, *, optimization=None)
Return the :pep:`3147`/:pep:`488` path to the byte-compiled file associated
with the source *path*. For example, if *path* is ``/foo/bar/baz.py`` the return
value would be ``/foo/bar/__pycache__/baz.cpython-32.pyc`` for Python 3.2. The ``cpython-32`` string ... | trusted_official_docs | CPython Docs | .. function:: cache_from_source(path, *, optimization=None)
Return the :pep:`3147`/:pep:`488` path to the byte-compiled file associated
with the source *path*. For example, if *path* is ``/foo/bar/baz.py`` the return
value would be ``/foo/bar/__pycache__/baz.cpython-32.pyc`` for Python 3.2. The ``cpython-32`` string ... | .. function:: cache_from_source(path, *, optimization=None)
Return the :pep:`3147`/:pep:`488` path to the byte-compiled file associated
with the source *path*. For example, if *path* is ``/foo/bar/baz.py`` the return
value would be ``/foo/bar/__pycache__/baz.cpython-32.pyc`` for Python 3.2. The ``cpython-32`` string ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f8eaa50f-165d-49ec-af67-9285ceb11630 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,501 | supabase-export-v2 | 4c772aae77af1a3b | the module) are not rebound to refer to the new objects and must be updated in each namespace where they occur if that is desired.
There are a number of other caveats: | trusted_official_docs | CPython Docs | the module) are not rebound to refer to the new objects and must be updated in each namespace where they occur if that is desired.
There are a number of other caveats: | the module) are not rebound to refer to the new objects and must be updated in each namespace where they occur if that is desired.
There are a number of other caveats: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f962623a-4340-4a90-8f32-a3de8290e59c | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,530 | supabase-export-v2 | 26b1685b4c20d22f | Raises :exc:`ValueError` if *parent* is not a package module.
.. warning::
This method can potentially yield a very large number of objects, and
it may carry out IO operations when computing these values. | trusted_official_docs | CPython Docs | Raises :exc:`ValueError` if *parent* is not a package module.
.. warning::
This method can potentially yield a very large number of objects, and
it may carry out IO operations when computing these values. | Raises :exc:`ValueError` if *parent* is not a package module.
.. warning::
This method can potentially yield a very large number of objects, and
it may carry out IO operations when computing these values. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
faf68538-e855-4fb4-a99c-bc9f3ace9441 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,637 | supabase-export-v2 | d977d2dca36d25fb | (as provided by :meth:`ExecutionLoader.get_filename`) is a file named ``__init__`` when the file extension is removed **and** the module name itself does not end in ``__init__``.
:mod:`!importlib.machinery` -- Importers and path hooks
------------------------------------------------------- | trusted_official_docs | CPython Docs | (as provided by :meth:`ExecutionLoader.get_filename`) is a file named ``__init__`` when the file extension is removed **and** the module name itself does not end in ``__init__``.
:mod:`!importlib.machinery` -- Importers and path hooks
------------------------------------------------------- | (as provided by :meth:`ExecutionLoader.get_filename`) is a file named ``__init__`` when the file extension is removed **and** the module name itself does not end in ``__init__``.
:mod:`!importlib.machinery` -- Importers and path hooks
------------------------------------------------------- | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fbb362c1-93e3-473e-a207-dbd1a879ebb7 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,728 | supabase-export-v2 | e537af96256bd57b | A concrete implementation of :class:`importlib.abc.FileLoader` which can import bytecode files (i.e. no source code files exist).
Please note that direct use of bytecode files (and thus not source code
files) inhibits your modules from being usable by all Python
implementations or new versions of Python which change ... | trusted_official_docs | CPython Docs | A concrete implementation of :class:`importlib.abc.FileLoader` which can import bytecode files (i.e. no source code files exist).
Please note that direct use of bytecode files (and thus not source code
files) inhibits your modules from being usable by all Python
implementations or new versions of Python which change ... | A concrete implementation of :class:`importlib.abc.FileLoader` which can import bytecode files (i.e. no source code files exist).
Please note that direct use of bytecode files (and thus not source code
files) inhibits your modules from being usable by all Python
implementations or new versions of Python which change ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fff89a76-7f8b-4037-a33e-8518dda18a07 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,679 | supabase-export-v2 | 03e19fa541d7d3df | .. classmethod:: find_spec(fullname, path=None, target=None)
Class method that attempts to find a :term:`spec <module spec>`
for the module specified by *fullname* on :data:`sys.path` or, if
defined, on *path*. For each path entry that is searched,
:data:`sys.path_importer_cache` is checked. If a non-false object
i... | trusted_official_docs | CPython Docs | .. classmethod:: find_spec(fullname, path=None, target=None)
Class method that attempts to find a :term:`spec <module spec>`
for the module specified by *fullname* on :data:`sys.path` or, if
defined, on *path*. For each path entry that is searched,
:data:`sys.path_importer_cache` is checked. If a non-false object
i... | .. classmethod:: find_spec(fullname, path=None, target=None)
Class method that attempts to find a :term:`spec <module spec>`
for the module specified by *fullname* on :data:`sys.path` or, if
defined, on *path*. For each path entry that is searched,
:data:`sys.path_importer_cache` is checked. If a non-false object
i... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1ee3202a-33fd-44c3-9e76-63aea4080cc7 | CPython Docs | file://datasets/cpython/Doc/library/index.rst | unknown | 9b1212a5-e319-4b8d-83c8-1e75693c085c | 44,900 | supabase-export-v2 | 5bd7c2ade942f473 | below as it enforces numbered sections for the entire stdlib docs. If desired, :numbered: can be enabled on a per-module basis. .. toctree:: :maxdepth: 2
intro.rst
functions.rst
constants.rst
stdtypes.rst
exceptions.rst
threadsafety.rst | trusted_official_docs | CPython Docs | below as it enforces numbered sections for the entire stdlib docs. If desired, :numbered: can be enabled on a per-module basis. .. toctree:: :maxdepth: 2
intro.rst
functions.rst
constants.rst
stdtypes.rst
exceptions.rst
threadsafety.rst | below as it enforces numbered sections for the entire stdlib docs. If desired, :numbered: can be enabled on a per-module basis. .. toctree:: :maxdepth: 2
intro.rst
functions.rst
constants.rst
stdtypes.rst
exceptions.rst
threadsafety.rst | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7a718bc8-9149-404f-997c-16a06f87de2d | CPython Docs | file://datasets/cpython/Doc/library/index.rst | unknown | 9b1212a5-e319-4b8d-83c8-1e75693c085c | 44,899 | supabase-export-v2 | d95bce1aad8e9ff7 | of hundreds of thousands of components (from individual programs and modules to packages and entire application development frameworks), available from the `Python Package Index <https://pypi.org>`_.
.. We don't use :numbered: option for the TOC below as it enforces
numbered sections for the entire stdlib docs. If des... | trusted_official_docs | CPython Docs | of hundreds of thousands of components (from individual programs and modules to packages and entire application development frameworks), available from the `Python Package Index <https://pypi.org>`_.
.. We don't use :numbered: option for the TOC below as it enforces
numbered sections for the entire stdlib docs. If des... | of hundreds of thousands of components (from individual programs and modules to packages and entire application development frameworks), available from the `Python Package Index <https://pypi.org>`_.
.. We don't use :numbered: option for the TOC below as it enforces
numbered sections for the entire stdlib docs. If des... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7e7f2bbd-80b4-48ac-b233-c019cd13441a | CPython Docs | file://datasets/cpython/Doc/library/index.rst | unknown | 9b1212a5-e319-4b8d-83c8-1e75693c085c | 44,896 | supabase-export-v2 | 4bbbad0f74d9b809 | manual describes the standard library that is distributed with Python. It also describes some of the optional components that are commonly included in Python distributions.
Python's standard library is very extensive, offering a wide range of
facilities as indicated by the long table of contents listed below. The
libra... | trusted_official_docs | CPython Docs | manual describes the standard library that is distributed with Python. It also describes some of the optional components that are commonly included in Python distributions.
Python's standard library is very extensive, offering a wide range of
facilities as indicated by the long table of contents listed below. The
libra... | manual describes the standard library that is distributed with Python. It also describes some of the optional components that are commonly included in Python distributions.
Python's standard library is very extensive, offering a wide range of
facilities as indicated by the long table of contents listed below. The
libra... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a8cffd79-94eb-4d61-ab4c-bff66300b8e9 | CPython Docs | file://datasets/cpython/Doc/library/index.rst | unknown | 9b1212a5-e319-4b8d-83c8-1e75693c085c | 44,897 | supabase-export-v2 | 8d079415825d7f84 | everyday programming. Some of these modules are explicitly designed to encourage and enhance the portability of Python programs by abstracting away platform-specifics into platform-neutral APIs.
The Python installers for the Windows platform usually include
the entire standard library and often also include many additi... | trusted_official_docs | CPython Docs | everyday programming. Some of these modules are explicitly designed to encourage and enhance the portability of Python programs by abstracting away platform-specifics into platform-neutral APIs.
The Python installers for the Windows platform usually include
the entire standard library and often also include many additi... | everyday programming. Some of these modules are explicitly designed to encourage and enhance the portability of Python programs by abstracting away platform-specifics into platform-neutral APIs.
The Python installers for the Windows platform usually include
the entire standard library and often also include many additi... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
dadc8105-7452-4b14-a91b-8590f9aba31d | CPython Docs | file://datasets/cpython/Doc/library/index.rst | unknown | 9b1212a5-e319-4b8d-83c8-1e75693c085c | 44,901 | supabase-export-v2 | 605edd42c973fbd3 | intro.rst functions.rst constants.rst stdtypes.rst exceptions.rst threadsafety.rst
text.rst
binary.rst
datatypes.rst
numeric.rst
functional.rst
filesys.rst
persistence.rst
archiving.rst
fileformats.rst
crypto.rst
allos.rst
cmdlinelibs.rst
concurrency.rst
ipc.rst
netdata.rst
markup.rst
internet.rst
mm.r... | trusted_official_docs | CPython Docs | intro.rst functions.rst constants.rst stdtypes.rst exceptions.rst threadsafety.rst
text.rst
binary.rst
datatypes.rst
numeric.rst
functional.rst
filesys.rst
persistence.rst
archiving.rst
fileformats.rst
crypto.rst
allos.rst
cmdlinelibs.rst
concurrency.rst
ipc.rst
netdata.rst
markup.rst
internet.rst
mm.r... | intro.rst functions.rst constants.rst stdtypes.rst exceptions.rst threadsafety.rst
text.rst
binary.rst
datatypes.rst
numeric.rst
functional.rst
filesys.rst
persistence.rst
archiving.rst
fileformats.rst
crypto.rst
allos.rst
cmdlinelibs.rst
concurrency.rst
ipc.rst
netdata.rst
markup.rst
internet.rst
mm.r... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
de8e5d65-9102-41d3-b55b-a8bfc1c1c0ae | CPython Docs | file://datasets/cpython/Doc/library/index.rst | unknown | 9b1212a5-e319-4b8d-83c8-1e75693c085c | 44,898 | supabase-export-v2 | 2c125ec379ce3fe1 | packages, so it may be necessary to use the packaging tools provided with the operating system to obtain some or all of the optional components.
In addition to the standard library, there is an active collection of
hundreds of thousands of components (from individual programs and modules to
packages and entire applicat... | trusted_official_docs | CPython Docs | packages, so it may be necessary to use the packaging tools provided with the operating system to obtain some or all of the optional components.
In addition to the standard library, there is an active collection of
hundreds of thousands of components (from individual programs and modules to
packages and entire applicat... | packages, so it may be necessary to use the packaging tools provided with the operating system to obtain some or all of the optional components.
In addition to the standard library, there is an active collection of
hundreds of thousands of components (from individual programs and modules to
packages and entire applicat... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fd822ff7-4453-4442-bea2-d798c1921218 | CPython Docs | file://datasets/cpython/Doc/library/index.rst | unknown | 9b1212a5-e319-4b8d-83c8-1e75693c085c | 44,895 | supabase-export-v2 | 29276c64c58ea3ec | ############################### The Python Standard Library ###############################
While :ref:`reference-index` describes the exact syntax and
semantics of the Python language, this library reference manual
describes the standard library that is distributed with Python. It also
describes some of the optional c... | trusted_official_docs | CPython Docs | ############################### The Python Standard Library ###############################
While :ref:`reference-index` describes the exact syntax and
semantics of the Python language, this library reference manual
describes the standard library that is distributed with Python. It also
describes some of the optional c... | ############################### The Python Standard Library ###############################
While :ref:`reference-index` describes the exact syntax and
semantics of the Python language, this library reference manual
describes the standard library that is distributed with Python. It also
describes some of the optional c... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
00dcfe94-b57d-49eb-8510-b2fd41fe17c1 | CPython Docs | file://datasets/cpython/Doc/library/pyexpat.rst | unknown | 26f8cd3a-9210-4f86-a486-04153a46d615 | 45,046 | supabase-export-v2 | 0867a405807da912 | if it is short and so you may receive more than one call to :meth:`CharacterDataHandler`. Set the :attr:`buffer_text` instance attribute to ``True`` to avoid that.
.. method:: xmlparser.UnparsedEntityDeclHandler(entityName, base, systemId, publicId, notationName) | trusted_official_docs | CPython Docs | if it is short and so you may receive more than one call to :meth:`CharacterDataHandler`. Set the :attr:`buffer_text` instance attribute to ``True`` to avoid that.
.. method:: xmlparser.UnparsedEntityDeclHandler(entityName, base, systemId, publicId, notationName) | if it is short and so you may receive more than one call to :meth:`CharacterDataHandler`. Set the :attr:`buffer_text` instance attribute to ``True`` to avoid that.
.. method:: xmlparser.UnparsedEntityDeclHandler(entityName, base, systemId, publicId, notationName) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
05f5abc7-afed-43e4-b2c4-0416c4671b1f | CPython Docs | file://datasets/cpython/Doc/library/pyexpat.rst | unknown | 26f8cd3a-9210-4f86-a486-04153a46d615 | 44,968 | supabase-export-v2 | 682f8fff0a6b0e35 | The number of output bytes includes amplification from entity expansion and reading DTD files.
Parser objects usually have a protection activation threshold of 8 MiB,
but the actual default value depends on the underlying Expat library. | trusted_official_docs | CPython Docs | The number of output bytes includes amplification from entity expansion and reading DTD files.
Parser objects usually have a protection activation threshold of 8 MiB,
but the actual default value depends on the underlying Expat library. | The number of output bytes includes amplification from entity expansion and reading DTD files.
Parser objects usually have a protection activation threshold of 8 MiB,
but the actual default value depends on the underlying Expat library. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
08b00e7d-84db-4897-98c8-9cea0dbf928b | CPython Docs | file://datasets/cpython/Doc/library/pyexpat.rst | unknown | 26f8cd3a-9210-4f86-a486-04153a46d615 | 45,081 | supabase-export-v2 | be2659420d372f14 | p = ParserCreate() try: p.Parse(some_xml_document) except ExpatError as err: print("Error:", errors.messages[err.code])
The :mod:`~xml.parsers.expat.errors` module also provides error message
constants and a dictionary :data:`~xml.parsers.expat.errors.codes` mapping
these messages back to the error codes, see below. | trusted_official_docs | CPython Docs | p = ParserCreate() try: p.Parse(some_xml_document) except ExpatError as err: print("Error:", errors.messages[err.code])
The :mod:`~xml.parsers.expat.errors` module also provides error message
constants and a dictionary :data:`~xml.parsers.expat.errors.codes` mapping
these messages back to the error codes, see below. | p = ParserCreate() try: p.Parse(some_xml_document) except ExpatError as err: print("Error:", errors.messages[err.code])
The :mod:`~xml.parsers.expat.errors` module also provides error message
constants and a dictionary :data:`~xml.parsers.expat.errors.codes` mapping
these messages back to the error codes, see below. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0dfb5a26-bcbe-4586-ae36-9437c5a357f4 | CPython Docs | file://datasets/cpython/Doc/library/pyexpat.rst | unknown | 26f8cd3a-9210-4f86-a486-04153a46d615 | 44,994 | supabase-export-v2 | 6252ad5a9929925f | observed near the start of parsing even with benign files in practice. In particular, the activation threshold should be carefully chosen to avoid false positives.
Parser objects usually have a maximum amplification factor of 100,
but the actual default value depends on the underlying Expat library. | trusted_official_docs | CPython Docs | observed near the start of parsing even with benign files in practice. In particular, the activation threshold should be carefully chosen to avoid false positives.
Parser objects usually have a maximum amplification factor of 100,
but the actual default value depends on the underlying Expat library. | observed near the start of parsing even with benign files in practice. In particular, the activation threshold should be carefully chosen to avoid false positives.
Parser objects usually have a maximum amplification factor of 100,
but the actual default value depends on the underlying Expat library. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0f7d2b42-1c00-4b73-bcdc-2fbfda69fe71 | CPython Docs | file://datasets/cpython/Doc/library/pyexpat.rst | unknown | 26f8cd3a-9210-4f86-a486-04153a46d615 | 44,987 | supabase-export-v2 | 2e32c86eb026cb4c | Parser objects usually have an allocation activation threshold of 64 MiB, but the actual default value depends on the underlying Expat library.
An :exc:`ExpatError` is raised if this method is called on a
|xml-non-root-parser| parser. The corresponding :attr:`~ExpatError.lineno` and :attr:`~ExpatError.offset`
should ... | trusted_official_docs | CPython Docs | Parser objects usually have an allocation activation threshold of 64 MiB, but the actual default value depends on the underlying Expat library.
An :exc:`ExpatError` is raised if this method is called on a
|xml-non-root-parser| parser. The corresponding :attr:`~ExpatError.lineno` and :attr:`~ExpatError.offset`
should ... | Parser objects usually have an allocation activation threshold of 64 MiB, but the actual default value depends on the underlying Expat library.
An :exc:`ExpatError` is raised if this method is called on a
|xml-non-root-parser| parser. The corresponding :attr:`~ExpatError.lineno` and :attr:`~ExpatError.offset`
should ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
140e2e44-4572-46b5-9e02-6137e2feebc5 | CPython Docs | file://datasets/cpython/Doc/library/pyexpat.rst | unknown | 26f8cd3a-9210-4f86-a486-04153a46d615 | 45,098 | supabase-export-v2 | a03edf6dc3a6b5f0 | .. module:: xml.parsers.expat.model
Content models are described using nested tuples. Each tuple contains four
values: the type, the quantifier, the name, and a tuple of children. Children
are simply additional content model descriptions. | trusted_official_docs | CPython Docs | .. module:: xml.parsers.expat.model
Content models are described using nested tuples. Each tuple contains four
values: the type, the quantifier, the name, and a tuple of children. Children
are simply additional content model descriptions. | .. module:: xml.parsers.expat.model
Content models are described using nested tuples. Each tuple contains four
values: the type, the quantifier, the name, and a tuple of children. Children
are simply additional content model descriptions. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
235951ce-0a28-4bf5-897c-7dacde0c1e7d | CPython Docs | file://datasets/cpython/Doc/library/pyexpat.rst | unknown | 26f8cd3a-9210-4f86-a486-04153a46d615 | 44,922 | supabase-export-v2 | b6b8b78ed2fa6f12 | .. function:: ParserCreate(encoding=None, namespace_separator=None)
Creates and returns a new :class:`xmlparser` object. *encoding*, if specified,
must be a string naming the encoding used by the XML data. Expat doesn't
support as many encodings as Python does, and its repertoire of encodings can't
be extended; it s... | trusted_official_docs | CPython Docs | .. function:: ParserCreate(encoding=None, namespace_separator=None)
Creates and returns a new :class:`xmlparser` object. *encoding*, if specified,
must be a string naming the encoding used by the XML data. Expat doesn't
support as many encodings as Python does, and its repertoire of encodings can't
be extended; it s... | .. function:: ParserCreate(encoding=None, namespace_separator=None)
Creates and returns a new :class:`xmlparser` object. *encoding*, if specified,
must be a string naming the encoding used by the XML data. Expat doesn't
support as many encodings as Python does, and its repertoire of encodings can't
be extended; it s... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
248ccd47-9655-4fb4-bee0-3634bc3a962f | CPython Docs | file://datasets/cpython/Doc/library/pyexpat.rst | unknown | 26f8cd3a-9210-4f86-a486-04153a46d615 | 44,992 | supabase-export-v2 | 96e9a6685a4b5274 | Sets the maximum amplification factor between direct input and bytes of dynamic memory allocated.
The amplification factor is calculated as ``allocated / direct``
while parsing, where ``direct`` is the number of bytes read from
the primary document in parsing and ``allocated`` is the number
of bytes of dynamic memor... | trusted_official_docs | CPython Docs | Sets the maximum amplification factor between direct input and bytes of dynamic memory allocated.
The amplification factor is calculated as ``allocated / direct``
while parsing, where ``direct`` is the number of bytes read from
the primary document in parsing and ``allocated`` is the number
of bytes of dynamic memor... | Sets the maximum amplification factor between direct input and bytes of dynamic memory allocated.
The amplification factor is calculated as ``allocated / direct``
while parsing, where ``direct`` is the number of bytes read from
the primary document in parsing and ``allocated`` is the number
of bytes of dynamic memor... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
24ad7205-e8c7-4c56-af0d-b173e32ac5e4 | CPython Docs | file://datasets/cpython/Doc/library/pyexpat.rst | unknown | 26f8cd3a-9210-4f86-a486-04153a46d615 | 44,910 | supabase-export-v2 | a2c4006e25a04c49 | When an XML document is then fed to the parser, the handler functions are called for the character data and markup in the XML document.
.. index:: pair: module; pyexpat | trusted_official_docs | CPython Docs | When an XML document is then fed to the parser, the handler functions are called for the character data and markup in the XML document.
.. index:: pair: module; pyexpat | When an XML document is then fed to the parser, the handler functions are called for the character data and markup in the XML document.
.. index:: pair: module; pyexpat | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
25567ae9-7de4-4916-8353-15d3ed202a8e | CPython Docs | file://datasets/cpython/Doc/library/pyexpat.rst | unknown | 26f8cd3a-9210-4f86-a486-04153a46d615 | 44,948 | supabase-export-v2 | 08d8013a20f862fb | .. method:: xmlparser.ExternalEntityParserCreate(context[, encoding])
Create a "child" parser which can be used to parse an external parsed entity
referred to by content parsed by the parent parser. The *context* parameter
should be the string passed to the :meth:`ExternalEntityRefHandler` handler
function, describe... | trusted_official_docs | CPython Docs | .. method:: xmlparser.ExternalEntityParserCreate(context[, encoding])
Create a "child" parser which can be used to parse an external parsed entity
referred to by content parsed by the parent parser. The *context* parameter
should be the string passed to the :meth:`ExternalEntityRefHandler` handler
function, describe... | .. method:: xmlparser.ExternalEntityParserCreate(context[, encoding])
Create a "child" parser which can be used to parse an external parsed entity
referred to by content parsed by the parent parser. The *context* parameter
should be the string passed to the :meth:`ExternalEntityRefHandler` handler
function, describe... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
289bcb54-1ca4-4672-af70-38974879d6b3 | CPython Docs | file://datasets/cpython/Doc/library/pyexpat.rst | unknown | 26f8cd3a-9210-4f86-a486-04153a46d615 | 45,045 | supabase-export-v2 | 7fdfb8e9dec7a057 | .. method:: xmlparser.CharacterDataHandler(data)
Called for character data. This will be called for normal character data, CDATA
marked content, and ignorable whitespace. Applications which must distinguish
these cases can use the :attr:`StartCdataSectionHandler`,
:attr:`EndCdataSectionHandler`, and :attr:`ElementDe... | trusted_official_docs | CPython Docs | .. method:: xmlparser.CharacterDataHandler(data)
Called for character data. This will be called for normal character data, CDATA
marked content, and ignorable whitespace. Applications which must distinguish
these cases can use the :attr:`StartCdataSectionHandler`,
:attr:`EndCdataSectionHandler`, and :attr:`ElementDe... | .. method:: xmlparser.CharacterDataHandler(data)
Called for character data. This will be called for normal character data, CDATA
marked content, and ignorable whitespace. Applications which must distinguish
these cases can use the :attr:`StartCdataSectionHandler`,
:attr:`EndCdataSectionHandler`, and :attr:`ElementDe... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
293965f3-3738-4684-8d4d-d4125702e679 | CPython Docs | file://datasets/cpython/Doc/library/pyexpat.rst | unknown | 26f8cd3a-9210-4f86-a486-04153a46d615 | 45,051 | supabase-export-v2 | da26538bfaf4e200 | .. method:: xmlparser.NotationDeclHandler(notationName, base, systemId, publicId)
Called for notation declarations. *notationName*, *base*, and *systemId*, and
*publicId* are strings if given. If the public identifier is omitted,
*publicId* will be ``None``. | trusted_official_docs | CPython Docs | .. method:: xmlparser.NotationDeclHandler(notationName, base, systemId, publicId)
Called for notation declarations. *notationName*, *base*, and *systemId*, and
*publicId* are strings if given. If the public identifier is omitted,
*publicId* will be ``None``. | .. method:: xmlparser.NotationDeclHandler(notationName, base, systemId, publicId)
Called for notation declarations. *notationName*, *base*, and *systemId*, and
*publicId* are strings if given. If the public identifier is omitted,
*publicId* will be ``None``. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3436116d-8b4a-4c11-b262-841301e27dd4 | CPython Docs | file://datasets/cpython/Doc/library/pyexpat.rst | unknown | 26f8cd3a-9210-4f86-a486-04153a46d615 | 45,027 | supabase-export-v2 | ced7d5eb1c08be47 | Current line number in the parser input.
Here is the list of handlers that can be set. To set a handler on an
:class:`xmlparser` object *o*, use ``o.handlername = func``. *handlername* must
be taken from the following list, and *func* must be a callable object accepting
the correct number of arguments. The arguments ar... | trusted_official_docs | CPython Docs | Current line number in the parser input.
Here is the list of handlers that can be set. To set a handler on an
:class:`xmlparser` object *o*, use ``o.handlername = func``. *handlername* must
be taken from the following list, and *func* must be a callable object accepting
the correct number of arguments. The arguments ar... | Current line number in the parser input.
Here is the list of handlers that can be set. To set a handler on an
:class:`xmlparser` object *o*, use ``o.handlername = func``. *handlername* must
be taken from the following list, and *func* must be a callable object accepting
the correct number of arguments. The arguments ar... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
34cbf37b-4875-41a7-b94c-284c02e25c86 | CPython Docs | file://datasets/cpython/Doc/library/pyexpat.rst | unknown | 26f8cd3a-9210-4f86-a486-04153a46d615 | 45,124 | supabase-export-v2 | f05e1978380126ae | compatibility reasons, the constants' value is the error *message* and not the numeric error *code*, you do this by comparing its :attr:`code` attribute with :samp:`errors.codes[errors.XML_ERROR_{CONSTANT_NAME}]`.
The ``errors`` module has the following attributes: | trusted_official_docs | CPython Docs | compatibility reasons, the constants' value is the error *message* and not the numeric error *code*, you do this by comparing its :attr:`code` attribute with :samp:`errors.codes[errors.XML_ERROR_{CONSTANT_NAME}]`.
The ``errors`` module has the following attributes: | compatibility reasons, the constants' value is the error *message* and not the numeric error *code*, you do this by comparing its :attr:`code` attribute with :samp:`errors.codes[errors.XML_ERROR_{CONSTANT_NAME}]`.
The ``errors`` module has the following attributes: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
36e7eb50-805b-4283-8bd5-e42a51630b32 | CPython Docs | file://datasets/cpython/Doc/library/pyexpat.rst | unknown | 26f8cd3a-9210-4f86-a486-04153a46d615 | 45,070 | supabase-export-v2 | 97c7e57dfb673e36 | .. warning::
Implementing a handler that accesses local files and/or the network
may create a vulnerability to
`external entity attacks <https://en.wikipedia.org/wiki/XML_external_entity_attack>`_
if :class:`xmlparser` is used with user-provided XML content. Please reflect on your `threat model <https://en.wikipedia... | trusted_official_docs | CPython Docs | .. warning::
Implementing a handler that accesses local files and/or the network
may create a vulnerability to
`external entity attacks <https://en.wikipedia.org/wiki/XML_external_entity_attack>`_
if :class:`xmlparser` is used with user-provided XML content. Please reflect on your `threat model <https://en.wikipedia... | .. warning::
Implementing a handler that accesses local files and/or the network
may create a vulnerability to
`external entity attacks <https://en.wikipedia.org/wiki/XML_external_entity_attack>`_
if :class:`xmlparser` is used with user-provided XML content. Please reflect on your `threat model <https://en.wikipedia... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3d2d7f30-7ede-49b2-8c08-e452c86b7232 | CPython Docs | file://datasets/cpython/Doc/library/pyexpat.rst | unknown | 26f8cd3a-9210-4f86-a486-04153a46d615 | 45,020 | supabase-export-v2 | 249e6b2e328f1360 | Line number at which an error occurred.
The following attributes contain values relating to the current parse location
in an :class:`xmlparser` object. During a callback reporting a parse event they
indicate the location of the first of the sequence of characters that generated
the event. When called outside of a callb... | trusted_official_docs | CPython Docs | Line number at which an error occurred.
The following attributes contain values relating to the current parse location
in an :class:`xmlparser` object. During a callback reporting a parse event they
indicate the location of the first of the sequence of characters that generated
the event. When called outside of a callb... | Line number at which an error occurred.
The following attributes contain values relating to the current parse location
in an :class:`xmlparser` object. During a callback reporting a parse event they
indicate the location of the first of the sequence of characters that generated
the event. When called outside of a callb... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3d903833-8297-49eb-bf5d-ede912e57ce4 | CPython Docs | file://datasets/cpython/Doc/library/pyexpat.rst | unknown | 26f8cd3a-9210-4f86-a486-04153a46d615 | 45,047 | supabase-export-v2 | e6bf9036b3fed477 | .. method:: xmlparser.UnparsedEntityDeclHandler(entityName, base, systemId, publicId, notationName)
Called for unparsed (NDATA) entity declarations. This is only present for
version 1.2 of the Expat library; for more recent versions, use
:attr:`EntityDeclHandler` instead. (The underlying function in the Expat
librar... | trusted_official_docs | CPython Docs | .. method:: xmlparser.UnparsedEntityDeclHandler(entityName, base, systemId, publicId, notationName)
Called for unparsed (NDATA) entity declarations. This is only present for
version 1.2 of the Expat library; for more recent versions, use
:attr:`EntityDeclHandler` instead. (The underlying function in the Expat
librar... | .. method:: xmlparser.UnparsedEntityDeclHandler(entityName, base, systemId, publicId, notationName)
Called for unparsed (NDATA) entity declarations. This is only present for
version 1.2 of the Expat library; for more recent versions, use
:attr:`EntityDeclHandler` instead. (The underlying function in the Expat
librar... | python, official-docs, cpython, P0 | Local_Trusted_Corpus |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.