✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ premium290.web-hosting.com ​🇻​♯➤ 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP 🇾​♯➤ 2025

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 63.250.38.37 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.224
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ 𝗔𝗟𝗟 𝗪𝗢𝗥𝗞𝗜𝗡𝗚....

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /opt/cloudlinux/venv/lib/python3.11/site-packages/pyfakefs//fake_legacy_modules.py
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import warnings


from pyfakefs.fake_pathlib import FakePathlibModule
from pyfakefs.fake_scandir import scandir, walk


def legacy_warning(module_name):
    msg = (
        f"You are using the legacy package '{module_name}' instead of the "
        f"built-in module."
        "Patching this package will no longer be supported in pyfakefs >= 6"
    )
    warnings.warn(msg, category=DeprecationWarning)


class FakePathlib2Module(FakePathlibModule):
    """Uses FakeFilesystem to provide a fake pathlib module replacement.
    for the `pathlib2` package available on PyPi.
    The usage of `pathlib2` is deprecated and will no longer be supported
    in future pyfakefs versions.
    """

    has_warned = False

    def __getattribute__(self, name):
        attr = object.__getattribute__(self, name)
        if hasattr(attr, "__call__") and not FakePathlib2Module.has_warned:
            FakePathlib2Module.has_warned = True
            legacy_warning("pathlib2")
        return attr


class FakeScanDirModule:
    """Uses FakeFilesystem to provide a fake module replacement
    for the `scandir` package available on PyPi.

    The usage of the `scandir` package is deprecated and will no longer be supported
    in future pyfakefs versions.

    You need a fake_filesystem to use this:
    `filesystem = fake_filesystem.FakeFilesystem()`
    `fake_scandir_module = fake_filesystem.FakeScanDirModule(filesystem)`
    """

    @staticmethod
    def dir():
        """Return the list of patched function names. Used for patching
        functions imported from the module.
        """
        return "scandir", "walk"

    def __init__(self, filesystem):
        self.filesystem = filesystem

    has_warned = False

    def scandir(self, path="."):
        """Return an iterator of DirEntry objects corresponding to the entries
        in the directory given by path.

        Args:
            path: Path to the target directory within the fake filesystem.

        Returns:
            an iterator to an unsorted list of os.DirEntry objects for
            each entry in path.

        Raises:
            OSError: if the target is not a directory.
        """
        if not self.has_warned:
            self.__class__.has_warned = True
            legacy_warning("scandir")
        return scandir(self.filesystem, path)

    def walk(self, top, topdown=True, onerror=None, followlinks=False):
        """Perform a walk operation over the fake filesystem.

        Args:
            top: The root directory from which to begin walk.
            topdown: Determines whether to return the tuples with the root as
                the first entry (`True`) or as the last, after all the child
                directory tuples (`False`).
            onerror: If not `None`, function which will be called to handle the
                `os.error` instance provided when `os.listdir()` fails.
            followlinks: If `True`, symbolic links are followed.

        Yields:
            (path, directories, nondirectories) for top and each of its
            subdirectories.  See the documentation for the builtin os module
            for further details.
        """
        if not self.has_warned:
            self.__class__.has_warned = True
            legacy_warning("scandir")

        return walk(self.filesystem, top, topdown, onerror, followlinks)


Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
25 Jun 2026 7.01 AM
root / root
0755
__pycache__
--
11 Feb 2026 8.05 AM
root / root
0755
pytest_tests
--
11 Feb 2026 8.04 AM
root / root
0755
tests
--
11 Feb 2026 8.04 AM
root / root
0755
__init__.py
0.055 KB
20 Jan 2026 1.01 PM
root / root
0644
_version.py
0.022 KB
20 Jan 2026 1.01 PM
root / root
0644
fake_file.py
49.826 KB
20 Jan 2026 1.01 PM
root / root
0644
fake_filesystem.py
127.073 KB
20 Jan 2026 1.01 PM
root / root
0644
fake_filesystem_shutil.py
6.636 KB
20 Jan 2026 1.01 PM
root / root
0644
fake_filesystem_unittest.py
52.166 KB
20 Jan 2026 1.01 PM
root / root
0644
fake_io.py
6.306 KB
20 Jan 2026 1.01 PM
root / root
0644
fake_legacy_modules.py
3.81 KB
20 Jan 2026 1.01 PM
root / root
0644
fake_open.py
14.952 KB
20 Jan 2026 1.01 PM
root / root
0644
fake_os.py
54.217 KB
20 Jan 2026 1.01 PM
root / root
0644
fake_path.py
20.329 KB
20 Jan 2026 1.01 PM
root / root
0644
fake_pathlib.py
41.795 KB
20 Jan 2026 1.01 PM
root / root
0644
fake_scandir.py
8.772 KB
20 Jan 2026 1.01 PM
root / root
0644
helpers.py
16.716 KB
20 Jan 2026 1.01 PM
root / root
0644
legacy_packages.py
0.877 KB
20 Jan 2026 1.01 PM
root / root
0644
mox3_stubout.py
5.267 KB
20 Jan 2026 1.01 PM
root / root
0644
patched_packages.py
6.439 KB
20 Jan 2026 1.01 PM
root / root
0644
py.typed
0.066 KB
20 Jan 2026 1.01 PM
root / root
0644
pytest_plugin.py
2.659 KB
20 Jan 2026 1.01 PM
root / root
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF