components/python/psutil/patches/01-remove-non-solaris.patch
author Devjani Ray <devjani.ray@oracle.com>
Fri, 05 Feb 2016 17:54:17 -0500
changeset 5405 66fd59fecd68
permissions -rw-r--r--
PSARC 2015/535 OpenStack service updates for Kilo PSARC 2015/458 aioeventlet - asyncio event loop scheduling callbacks in eventlet PSARC 2015/460 msgpack - C/Python bindings for MessagePack (de)serializer data PSARC 2015/466 openstackclient - OpenStack Command-line Client PSARC 2015/467 oslo.versionedobjects - Oslo Versioned Objects library PSARC 2015/468 pint - A physical quantities module PSARC 2015/469 pysaml2 - A pure Python implementation of SAML2 PSARC 2015/471 semantic_version - A library implementing the 'SemVer' scheme PSARC 2015/472 testresources - PyUnit extension for managing expensive test resources PSARC 2015/473 testscenarios - Extensions to Python unittest to support scenarios PSARC 2015/474 trollius - Port of the Tulip project (asyncio module, PEP 3156) on Python 2 PSARC 2015/475 urllib3 - HTTP library with thread-safe connection pooling, file post, and more PSARC 2015/520 oslo.concurrency - Oslo Concurrency library PSARC 2015/521 oslo.log - Oslo Logging Configuration library PSARC 2015/529 oslo.policy - Oslo Policy library PSARC 2015/530 psutil - Python system and process utilities PSARC 2015/538 fixtures - Python module to support reusable state for writing clean tests PSARC 2015/539 sqlparse - An SQL parser module for Python PSARC 2016/017 extras - Useful extra utilities for Python PSARC 2016/018 linecache2 - Port of the standard linecache module PSARC 2016/019 python-mimeparse - Basic functions for parsing mime-types PSARC 2016/020 testtools - Extensions to the Python unit testing framework PSARC 2016/021 traceback2 - Port of the standard traceback module PSARC 2016/014 OpenStack Cinder NFS driver for Solaris 22384068 OpenStack service updates for Kilo (Umbrella) 21974208 The Python module msgpack should be added to Userland 22010630 The Python trollius module should be added to Userland 22011755 The Python module pint should be added to Userland 22012256 The Python aioeventlet module should be added to Userland 22012282 The Python oslo.versionedobjects module should be added to Userland 22012317 The Python semantic_version module should be added to Userland 22012321 The Python testresources module should be added to Userland 22012329 The Python testscenarios module should be added to Userland 22012336 The Python urllib3 module should be added to Userland 22012343 The Python openstackclient module should be added to Userland 22299389 The Python oslo.concurrency module should be added to Userland 22299409 The Python oslo.log module should be added to Userland 22299418 The Python oslo.policy module should be added to Userland 22299469 The Python psutil module should be added to Userland 22337793 The Python sqlparse module should be added to Userland 22338325 The Python fixtures module should be added to Userland 22535728 The Python testtools module should be added to Userland 22535739 The Python extras module should be added to Userland 22535748 The Python linecache2 module should be added to Userland 22535753 The Python traceback2 module should be added to Userland 22535760 The Python python-mimeparse module should be added to Userland 18961001 Image filtering does not function as expected 21678935 NFS for Cinder in Solaris OpenStack 22548630 derived manifest should not enforce presence of global when installing from UAR 22629795 problem in SERVICE/KEYSTONE
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5405
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
     1
Patch to remove imports from non-Solaris platforms.  This patch will
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
     2
not be submitted upstream.
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
     3
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
     4
--- psutil-1.2.1/psutil/__init__.py.orig 2015-03-30 13:46:25.317089988 -0600
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
     5
+++ psutil-1.2.1/psutil/__init__.py 2015-03-30 13:47:05.416389522 -0600
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
     6
@@ -84,76 +84,8 @@ from psutil._common import (CONN_ESTABLI
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
     7
                             CONN_CLOSING,
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
     8
                             CONN_NONE)
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
     9
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    10
-if sys.platform.startswith("linux"):
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    11
-    import psutil._pslinux as _psplatform
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    12
-    from psutil._pslinux import (phymem_buffers,
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    13
-                                 cached_phymem)
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    14
-
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    15
-    from psutil._pslinux import (IOPRIO_CLASS_NONE,
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    16
-                                 IOPRIO_CLASS_RT,
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    17
-                                 IOPRIO_CLASS_BE,
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    18
-                                 IOPRIO_CLASS_IDLE)
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    19
-    # Linux >= 2.6.36
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    20
-    if _psplatform.HAS_PRLIMIT:
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    21
-        from psutil._pslinux import (RLIM_INFINITY,
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    22
-                                     RLIMIT_AS,
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    23
-                                     RLIMIT_CORE,
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    24
-                                     RLIMIT_CPU,
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    25
-                                     RLIMIT_DATA,
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    26
-                                     RLIMIT_FSIZE,
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    27
-                                     RLIMIT_LOCKS,
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    28
-                                     RLIMIT_MEMLOCK,
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    29
-                                     RLIMIT_NOFILE,
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    30
-                                     RLIMIT_NPROC,
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    31
-                                     RLIMIT_RSS,
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    32
-                                     RLIMIT_STACK)
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    33
-        # Kinda ugly but considerably faster than using hasattr() and
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    34
-        # setattr() against the module object (we are at import time
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    35
-        # and we demand speed).
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    36
-        try:
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    37
-            RLIMIT_MSGQUEUE = _psplatform.RLIMIT_MSGQUEUE
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    38
-        except AttributeError:
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    39
-            pass
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    40
-        try:
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    41
-            RLIMIT_NICE = _psplatform.RLIMIT_NICE
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    42
-        except AttributeError:
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    43
-            pass
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    44
-        try:
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    45
-            RLIMIT_RTPRIO = _psplatform.RLIMIT_RTPRIO
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    46
-        except AttributeError:
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    47
-            pass
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    48
-        try:
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    49
-            RLIMIT_RTTIME = _psplatform.RLIMIT_RTTIME
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    50
-        except AttributeError:
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    51
-            pass
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    52
-        try:
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    53
-            RLIMIT_SIGPENDING = _psplatform.RLIMIT_SIGPENDING
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    54
-        except AttributeError:
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    55
-            pass
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    56
-
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    57
-elif sys.platform.startswith("win32"):
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    58
-    import psutil._psmswindows as _psplatform
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    59
-    from psutil._psmswindows import (ABOVE_NORMAL_PRIORITY_CLASS,
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    60
-                                     BELOW_NORMAL_PRIORITY_CLASS,
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    61
-                                     HIGH_PRIORITY_CLASS,
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    62
-                                     IDLE_PRIORITY_CLASS,
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    63
-                                     NORMAL_PRIORITY_CLASS,
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    64
-                                     REALTIME_PRIORITY_CLASS,
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    65
-                                     CONN_DELETE_TCB)
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    66
-
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    67
-elif sys.platform.startswith("darwin"):
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    68
-    import psutil._psosx as _psplatform
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    69
-
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    70
-elif sys.platform.startswith("freebsd"):
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    71
-    import psutil._psbsd as _psplatform
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    72
-
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    73
-elif sys.platform.startswith("sunos"):
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    74
-    import psutil._pssunos as _psplatform
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    75
-    from psutil._pssunos import (CONN_IDLE,
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    76
-                                 CONN_BOUND)
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    77
-
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    78
-else:
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    79
-    raise NotImplementedError('platform %s is not supported' % sys.platform)
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    80
+import psutil._pssunos as _psplatform
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    81
+from psutil._pssunos import (CONN_IDLE, CONN_BOUND)
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    82
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    83
 __all__.extend(_psplatform.__extra__all__)
66fd59fecd68 PSARC 2015/535 OpenStack service updates for Kilo
Devjani Ray <devjani.ray@oracle.com>
parents:
diff changeset
    84