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

zopefoundation / zope.proxy / 16098813542

18 Feb 2025 08:01AM UTC coverage: 99.941% (+0.002%) from 99.939%
16098813542

push

github

web-flow
Update Python version support. (#74)

* Drop support for Python 3.8.
* Add preliminary support for Python 3.14.

---------

Co-authored-by: Jens Vagelpohl <jens@plyp.com>

213 of 213 branches covered (100.0%)

Branch coverage included in aggregate %.

1481 of 1482 relevant lines covered (99.93%)

6.99 hits per line

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

100.0
/src/zope/proxy/interfaces.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
"""Proxy-related interfaces.
7✔
15
"""
16

17
from zope.interface import Interface
7✔
18

19

20
class IProxyIntrospection(Interface):
7✔
21
    """Provides methods for indentifying proxies and extracting proxied objects
22
    """
23

24
    def isProxy(obj, proxytype=None):
7✔
25
        """Check whether the given object is a proxy
26

27
        If proxytype is not None, checkes whether the object is
28
        proxied by the given proxytype.
29
        """
30

31
    def sameProxiedObjects(ob1, ob2):
7✔
32
        """Check whether ob1 and ob2 are the same or proxies of the same object
33
        """
34

35
    def getProxiedObject(obj):
7✔
36
        """Get the proxied Object
37

38
        If the object isn't proxied, then just return the object.
39
        """
40

41
    def setProxiedObject(ob1, ob2):
7✔
42
        """Set the underlying object for ob1 to ob2, returning the old object.
43

44
        Raises TypeError if ob1 is not a proxy.
45
        """
46

47
    def removeAllProxies(obj):
7✔
48
        """Get the proxied object with no proxies
49

50
        If obj is not a proxied object, return obj.
51

52
        The returned object has no proxies.
53
        """
54

55
    def queryProxy(obj, proxytype, default=None):
7✔
56
        """Look for a proxy of the given type around the object
57

58
        If no such proxy can be found, return the default.
59
        """
60

61
    def queryInnerProxy(obj, proxytype, default=None):
7✔
62
        """Look for the inner-most proxy of the given type around the object
63

64
        If no such proxy can be found, return the default.
65

66
        If there is such a proxy, return the inner-most one.
67
        """
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