Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ZODB
Commits
084c48a7
Commit
084c48a7
authored
Sep 24, 2005
by
Christian Theune
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- removed accidental commit of zope.proxy
parent
7775207d
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
0 additions
and
1822 deletions
+0
-1822
src/zope/proxy/DEPENDENCIES.cfg
src/zope/proxy/DEPENDENCIES.cfg
+0
-2
src/zope/proxy/SETUP.cfg
src/zope/proxy/SETUP.cfg
+0
-8
src/zope/proxy/__init__.py
src/zope/proxy/__init__.py
+0
-31
src/zope/proxy/_zope_proxy_proxy.c
src/zope/proxy/_zope_proxy_proxy.c
+0
-1098
src/zope/proxy/interfaces.py
src/zope/proxy/interfaces.py
+0
-62
src/zope/proxy/proxy.h
src/zope/proxy/proxy.h
+0
-54
src/zope/proxy/tests/__init__.py
src/zope/proxy/tests/__init__.py
+0
-2
src/zope/proxy/tests/test_proxy.py
src/zope/proxy/tests/test_proxy.py
+0
-565
No files found.
src/zope/proxy/DEPENDENCIES.cfg
deleted
100644 → 0
View file @
7775207d
zope.interface
zope.testing
src/zope/proxy/SETUP.cfg
deleted
100644 → 0
View file @
7775207d
# Packaging information for zpkg.
header proxy.h
<extension _zope_proxy_proxy>
source _zope_proxy_proxy.c
depends-on proxy.h
</extension>
src/zope/proxy/__init__.py
deleted
100644 → 0
View file @
7775207d
##############################################################################
#
# Copyright (c) 2003 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""More convenience functions for dealing with proxies.
$Id$
"""
from
zope.interface
import
moduleProvides
from
zope.proxy.interfaces
import
IProxyIntrospection
from
types
import
ClassType
from
zope.proxy._zope_proxy_proxy
import
*
from
zope.proxy._zope_proxy_proxy
import
_CAPI
moduleProvides
(
IProxyIntrospection
)
__all__
=
tuple
(
IProxyIntrospection
)
def
ProxyIterator
(
p
):
yield
p
while
isProxy
(
p
):
p
=
getProxiedObject
(
p
)
yield
p
src/zope/proxy/_zope_proxy_proxy.c
deleted
100644 → 0
View file @
7775207d
This diff is collapsed.
Click to expand it.
src/zope/proxy/interfaces.py
deleted
100644 → 0
View file @
7775207d
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
##############################################################################
"""Proxy-related interfaces.
$Id$
"""
from
zope.interface
import
Interface
class
IProxyIntrospection
(
Interface
):
"""Provides methods for indentifying proxies and extracting proxied objects
"""
def
isProxy
(
obj
,
proxytype
=
None
):
"""Check whether the given object is a proxy
If proxytype is not None, checkes whether the object is
proxied by the given proxytype.
"""
def
sameProxiedObjects
(
ob1
,
ob2
):
"""Check whether ob1 and ob2 are the same or proxies of the same object
"""
def
getProxiedObject
(
obj
):
"""Get the proxied Object
If the object isn't proxied, then just return the object.
"""
def
removeAllProxies
(
obj
):
"""Get the proxied object with no proxies
If obj is not a proxied object, return obj.
The returned object has no proxies.
"""
def
queryProxy
(
obj
,
proxytype
,
default
=
None
):
"""Look for a proxy of the given type around the object
If no such proxy can be found, return the default.
"""
def
queryInnerProxy
(
obj
,
proxytype
,
default
=
None
):
"""Look for the inner-most proxy of the given type around the object
If no such proxy can be found, return the default.
If there is such a proxy, return the inner-most one.
"""
src/zope/proxy/proxy.h
deleted
100644 → 0
View file @
7775207d
#ifndef _proxy_H_
#define _proxy_H_ 1
typedef
struct
{
PyObject_HEAD
PyObject
*
proxy_object
;
}
ProxyObject
;
#define Proxy_GET_OBJECT(ob) (((ProxyObject *)(ob))->proxy_object)
typedef
struct
{
PyTypeObject
*
proxytype
;
int
(
*
check
)(
PyObject
*
obj
);
PyObject
*
(
*
create
)(
PyObject
*
obj
);
PyObject
*
(
*
getobject
)(
PyObject
*
proxy
);
}
ProxyInterface
;
#ifndef PROXY_MODULE
/* These are only defined in the public interface, and are not
* available within the module implementation. There we use the
* classic Python/C API only.
*/
static
ProxyInterface
*
_proxy_api
=
NULL
;
static
int
Proxy_Import
(
void
)
{
if
(
_proxy_api
==
NULL
)
{
PyObject
*
m
=
PyImport_ImportModule
(
"zope.proxy"
);
if
(
m
!=
NULL
)
{
PyObject
*
tmp
=
PyObject_GetAttrString
(
m
,
"_CAPI"
);
if
(
tmp
!=
NULL
)
{
if
(
PyCObject_Check
(
tmp
))
_proxy_api
=
(
ProxyInterface
*
)
PyCObject_AsVoidPtr
(
tmp
);
Py_DECREF
(
tmp
);
}
}
}
return
(
_proxy_api
==
NULL
)
?
-
1
:
0
;
}
#define ProxyType (*_proxy_api->proxytype)
#define Proxy_Check(obj) (_proxy_api->check((obj)))
#define Proxy_CheckExact(obj) ((obj)->ob_type == ProxyType)
#define Proxy_New(obj) (_proxy_api->create((obj)))
#define Proxy_GetObject(proxy) (_proxy_api->getobject((proxy)))
#endif
/* PROXY_MODULE */
#endif
/* _proxy_H_ */
src/zope/proxy/tests/__init__.py
deleted
100644 → 0
View file @
7775207d
#
# This file is necessary to make this directory a package.
src/zope/proxy/tests/test_proxy.py
deleted
100644 → 0
View file @
7775207d
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment