• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

zopefoundation / zope.component / 3829079989

pending completion
3829079989

push

github

Jens Vagelpohl
- prepare release 5.1.0

467 of 489 branches covered (95.5%)

Branch coverage included in aggregate %.

4620 of 4625 relevant lines covered (99.89%)

1.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

75.0
/src/zope/component/_compat.py
1
##############################################################################
2
#
3
# Copyright (c) 2001, 2002 Zope Foundation and Contributors.
4
# All Rights Reserved.
5
#
6
# This software is subject to the provisions of the Zope Public License,
7
# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
8
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
9
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
10
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
11
# FOR A PARTICULAR PURPOSE.
12
#
13
##############################################################################
14

15
import sys
1✔
16
import types
1✔
17

18
if sys.version_info[0] < 3: #pragma NO COVER
19

20
    import cPickle as _pickle
21

22
    CLASS_TYPES = (type, types.ClassType)
23

24
    PYTHON3 = False
25
    PYTHON2 = True
26

27
else: #pragma NO COVER
28

29
    import pickle as _pickle
30

31
    CLASS_TYPES = (type,)
32

33
    PYTHON3 = True
34
    PYTHON2 = False
35

36

37
# Prior to https://github.com/zopefoundation/zope.security/issues/71
38
# zope.security cannot be imported if zope.interface is enforcing
39
# strict resolution orders. But because zope.security has a dependency
40
# on this library, and older versions of this library also have problems
41
# with strict resolution orders, we have a chicken-and-egg scenario. In the
42
# interim, our only choice is to skip it. (But we don't want a hard dependency
43
# on zope.interface 5.0, so we do a conditional import.)
44
ZOPE_SECURITY_NOT_AVAILABLE_EX = (ImportError,)
1✔
45
try:
1✔
46
    from zope.interface.ro import InconsistentResolutionOrderError
1✔
47
except ImportError:
×
48
    pass
×
49
else:
50
    ZOPE_SECURITY_NOT_AVAILABLE_EX += (InconsistentResolutionOrderError,)
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc