✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ beluga.o2switch.net ​🇻​♯➤ 4.18.0-553.123.2.lve.el8.x86_64 #1 SMP 🇾​♯➤ 2026

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 185.154.139.77 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.84
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ 𝗔𝗟𝗟 𝗪𝗢𝗥𝗞𝗜𝗡𝗚....
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /opt/alt/python39/lib64/python3.9/test/test_importlib//test_locks.py
from . import util as test_util

init = test_util.import_importlib('importlib')

import sys
import threading
import unittest
import weakref

from test import support
from test import lock_tests


class ModuleLockAsRLockTests:
    locktype = classmethod(lambda cls: cls.LockType("some_lock"))

    # _is_owned() unsupported
    test__is_owned = None
    # acquire(blocking=False) unsupported
    test_try_acquire = None
    test_try_acquire_contended = None
    # `with` unsupported
    test_with = None
    # acquire(timeout=...) unsupported
    test_timeout = None
    # _release_save() unsupported
    test_release_save_unacquired = None
    # lock status in repr unsupported
    test_repr = None
    test_locked_repr = None

LOCK_TYPES = {kind: splitinit._bootstrap._ModuleLock
              for kind, splitinit in init.items()}

(Frozen_ModuleLockAsRLockTests,
 Source_ModuleLockAsRLockTests
 ) = test_util.test_both(ModuleLockAsRLockTests, lock_tests.RLockTests,
                         LockType=LOCK_TYPES)


class DeadlockAvoidanceTests:

    def setUp(self):
        try:
            self.old_switchinterval = sys.getswitchinterval()
            support.setswitchinterval(0.000001)
        except AttributeError:
            self.old_switchinterval = None

    def tearDown(self):
        if self.old_switchinterval is not None:
            sys.setswitchinterval(self.old_switchinterval)

    def run_deadlock_avoidance_test(self, create_deadlock):
        NLOCKS = 10
        locks = [self.LockType(str(i)) for i in range(NLOCKS)]
        pairs = [(locks[i], locks[(i+1)%NLOCKS]) for i in range(NLOCKS)]
        if create_deadlock:
            NTHREADS = NLOCKS
        else:
            NTHREADS = NLOCKS - 1
        barrier = threading.Barrier(NTHREADS)
        results = []

        def _acquire(lock):
            """Try to acquire the lock. Return True on success,
            False on deadlock."""
            try:
                lock.acquire()
            except self.DeadlockError:
                return False
            else:
                return True

        def f():
            a, b = pairs.pop()
            ra = _acquire(a)
            barrier.wait()
            rb = _acquire(b)
            results.append((ra, rb))
            if rb:
                b.release()
            if ra:
                a.release()
        lock_tests.Bunch(f, NTHREADS).wait_for_finished()
        self.assertEqual(len(results), NTHREADS)
        return results

    def test_deadlock(self):
        results = self.run_deadlock_avoidance_test(True)
        # At least one of the threads detected a potential deadlock on its
        # second acquire() call.  It may be several of them, because the
        # deadlock avoidance mechanism is conservative.
        nb_deadlocks = results.count((True, False))
        self.assertGreaterEqual(nb_deadlocks, 1)
        self.assertEqual(results.count((True, True)), len(results) - nb_deadlocks)

    def test_no_deadlock(self):
        results = self.run_deadlock_avoidance_test(False)
        self.assertEqual(results.count((True, False)), 0)
        self.assertEqual(results.count((True, True)), len(results))


DEADLOCK_ERRORS = {kind: splitinit._bootstrap._DeadlockError
                   for kind, splitinit in init.items()}

(Frozen_DeadlockAvoidanceTests,
 Source_DeadlockAvoidanceTests
 ) = test_util.test_both(DeadlockAvoidanceTests,
                         LockType=LOCK_TYPES,
                         DeadlockError=DEADLOCK_ERRORS)


class LifetimeTests:

    @property
    def bootstrap(self):
        return self.init._bootstrap

    def test_lock_lifetime(self):
        name = "xyzzy"
        self.assertNotIn(name, self.bootstrap._module_locks)
        lock = self.bootstrap._get_module_lock(name)
        self.assertIn(name, self.bootstrap._module_locks)
        wr = weakref.ref(lock)
        del lock
        support.gc_collect()
        self.assertNotIn(name, self.bootstrap._module_locks)
        self.assertIsNone(wr())

    def test_all_locks(self):
        support.gc_collect()
        self.assertEqual(0, len(self.bootstrap._module_locks),
                         self.bootstrap._module_locks)


(Frozen_LifetimeTests,
 Source_LifetimeTests
 ) = test_util.test_both(LifetimeTests, init=init)


def setUpModule():
    thread_info = support.threading_setup()
    unittest.addModuleCleanup(support.threading_cleanup, *thread_info)


if __name__ == '__main__':
    unittets.main()

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

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


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
22 Jul 2025 4.13 AM
root / linksafe
0755
__pycache__
--
22 Jul 2025 4.13 AM
root / linksafe
0755
builtin
--
22 Jul 2025 4.13 AM
root / linksafe
0755
data
--
22 Jul 2025 4.13 AM
root / linksafe
0755
data01
--
22 Jul 2025 4.13 AM
root / linksafe
0755
data02
--
22 Jul 2025 4.13 AM
root / linksafe
0755
data03
--
22 Jul 2025 4.13 AM
root / linksafe
0755
extension
--
22 Jul 2025 4.13 AM
root / linksafe
0755
frozen
--
22 Jul 2025 4.13 AM
root / linksafe
0755
import_
--
22 Jul 2025 4.13 AM
root / linksafe
0755
namespace_pkgs
--
22 Jul 2025 4.13 AM
root / linksafe
0755
partial
--
22 Jul 2025 4.13 AM
root / linksafe
0755
source
--
22 Jul 2025 4.13 AM
root / linksafe
0755
zipdata01
--
22 Jul 2025 4.13 AM
root / linksafe
0755
zipdata02
--
22 Jul 2025 4.13 AM
root / linksafe
0755
__init__.py
0.139 KB
3 Jun 2025 6.47 PM
root / linksafe
0644
__main__.py
0.057 KB
3 Jun 2025 6.47 PM
root / linksafe
0644
abc.py
2.219 KB
3 Jun 2025 6.47 PM
root / linksafe
0644
fixtures.py
5.762 KB
3 Jun 2025 6.47 PM
root / linksafe
0644
stubs.py
0.228 KB
3 Jun 2025 6.47 PM
root / linksafe
0644
test_abc.py
33.461 KB
3 Jun 2025 6.47 PM
root / linksafe
0644
test_api.py
18.362 KB
3 Jun 2025 6.47 PM
root / linksafe
0644
test_files.py
0.976 KB
3 Jun 2025 6.47 PM
root / linksafe
0644
test_lazy.py
4.813 KB
3 Jun 2025 6.47 PM
root / linksafe
0644
test_locks.py
4.353 KB
3 Jun 2025 6.47 PM
root / linksafe
0644
test_main.py
8.201 KB
3 Jun 2025 6.47 PM
root / linksafe
0644
test_metadata_api.py
5.425 KB
3 Jun 2025 6.47 PM
root / linksafe
0644
test_namespace_pkgs.py
11.958 KB
3 Jun 2025 6.47 PM
root / linksafe
0644
test_open.py
2.199 KB
3 Jun 2025 6.47 PM
root / linksafe
0644
test_path.py
1.221 KB
3 Jun 2025 6.47 PM
root / linksafe
0644
test_pkg_import.py
2.665 KB
3 Jun 2025 6.47 PM
root / linksafe
0644
test_read.py
1.985 KB
3 Jun 2025 6.47 PM
root / linksafe
0644
test_resource.py
8.364 KB
3 Jun 2025 6.47 PM
root / linksafe
0644
test_spec.py
30.385 KB
3 Jun 2025 6.47 PM
root / linksafe
0644
test_threaded_import.py
9.434 KB
3 Jun 2025 6.47 PM
root / linksafe
0644
test_util.py
34.671 KB
3 Jun 2025 6.47 PM
root / linksafe
0644
test_windows.py
6.313 KB
3 Jun 2025 6.47 PM
root / linksafe
0644
test_zip.py
2.471 KB
3 Jun 2025 6.47 PM
root / linksafe
0644
threaded_import_hangers.py
1.449 KB
3 Jun 2025 6.47 PM
root / linksafe
0644
util.py
18.044 KB
3 Jun 2025 6.47 PM
root / linksafe
0644

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