File: __init__.py

package info (click to toggle)
python-promise 2.3.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 400 kB
  • sloc: python: 2,681; sh: 13; makefile: 4
file content (38 lines) | stat: -rw-r--r-- 873 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
from .pyutils.version import get_version


try:
    # This variable is injected in the __builtins__ by the build
    # process. It used to enable importing subpackages when
    # the required packages are not installed
    __SETUP__  # type: ignore
except NameError:
    __SETUP__ = False


VERSION = (2, 3, 0, "final", 0)

__version__ = get_version(VERSION)

if not __SETUP__:
    from .promise import (
        Promise,
        promise_for_dict,
        promisify,
        is_thenable,
        async_instance,
        get_default_scheduler,
        set_default_scheduler,
    )
    from .schedulers.immediate import ImmediateScheduler

    __all__ = [
        "Promise",
        "promise_for_dict",
        "promisify",
        "is_thenable",
        "async_instance",
        "get_default_scheduler",
        "set_default_scheduler",
        "ImmediateScheduler",
    ]