Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zope-container
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
zope-container
Commits
44912238
Commit
44912238
authored
Feb 20, 2014
by
Tres Seaver
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/NextThought/zope.container
into NextThought-master
parents
3e12e6f9
f4bc6d6f
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
478 additions
and
11 deletions
+478
-11
CHANGES.txt
CHANGES.txt
+1
-1
setup.py
setup.py
+20
-5
src/zope/container/_proxy.py
src/zope/container/_proxy.py
+450
-0
src/zope/container/_zope_proxy_proxy.c
src/zope/container/_zope_proxy_proxy.c
+1
-2
src/zope/container/contained.py
src/zope/container/contained.py
+6
-3
No files found.
CHANGES.txt
View file @
44912238
...
...
@@ -5,7 +5,7 @@ CHANGES
4.0.0a4 (unreleased)
--------------------
-
Nothing changed yet
.
-
Support PyPy
.
4.0.0a3 (2013-02-28)
...
...
setup.py
View file @
44912238
...
...
@@ -19,6 +19,8 @@
"""Setup for zope.container package
"""
import
os
import
platform
import
sys
from
setuptools
import
setup
,
find_packages
,
Extension
def
read
(
*
rnames
):
...
...
@@ -39,6 +41,22 @@ def alltests():
suites
=
list
(
zope
.
testrunner
.
find
.
find_suites
(
options
))
return
unittest
.
TestSuite
(
suites
)
# PyPy cannot correctly build the C optimizations, and even if it
# could they would be anti-optimizations (the C extension
# compatibility layer is known-slow, and defeats JIT opportunities).
py_impl
=
getattr
(
platform
,
'python_implementation'
,
lambda
:
None
)
pure_python
=
os
.
environ
.
get
(
'PURE_PYTHON'
,
False
)
is_pypy
=
py_impl
()
==
'PyPy'
if
pure_python
or
is_pypy
:
ext_modules
=
[]
else
:
ext_modules
=
[
Extension
(
"zope.container._zope_container_contained"
,
[
os
.
path
.
join
(
"src"
,
"zope"
,
"container"
,
"_zope_container_contained.c"
)
],
include_dirs
=
[
'include'
]),
]
setup
(
name
=
'zope.container'
,
version
=
'4.0.0a4.dev0'
,
author
=
'Zope Foundation and Contributors'
,
...
...
@@ -66,6 +84,7 @@ setup(name='zope.container',
'Programming Language :: Python :: 3'
,
'Programming Language :: Python :: 3.3'
,
'Programming Language :: Python :: Implementation :: CPython'
,
'Programming Language :: Python :: Implementation :: PyPy'
,
'Natural Language :: English'
,
'Operating System :: OS Independent'
,
'Topic :: Internet :: WWW/HTTP'
,
...
...
@@ -76,11 +95,7 @@ setup(name='zope.container',
packages
=
find_packages
(
'src'
),
package_dir
=
{
''
:
'src'
},
namespace_packages
=
[
'zope'
],
ext_modules
=
[
Extension
(
"zope.container._zope_container_contained"
,
[
os
.
path
.
join
(
"src"
,
"zope"
,
"container"
,
"_zope_container_contained.c"
)
],
include_dirs
=
[
'include'
]),
],
ext_modules
=
ext_modules
,
extras_require
=
dict
(
test
=
[
'zope.testing'
,
'zope.testrunner'
],
...
...
src/zope/container/_proxy.py
0 → 100644
View file @
44912238
This diff is collapsed.
Click to expand it.
src/zope/container/_zope_proxy_proxy.c
View file @
44912238
...
...
@@ -214,7 +214,7 @@ WrapperType_Lookup(PyTypeObject *type, PyObject *name)
base
=
PyTuple_GET_ITEM
(
mro
,
i
);
if
(((
PyTypeObject
*
)
base
)
!=
&
ProxyType
)
{
#if PY_MAJOR_VERSION < 3
#if PY_MAJOR_VERSION < 3
&& !defined(PYPY_VERSION)
if
(
PyClass_Check
(
base
))
dict
=
((
PyClassObject
*
)
base
)
->
cl_dict
;
else
...
...
@@ -1253,4 +1253,3 @@ MOD_INIT(_zope_proxy_proxy)
return
MOD_SUCCESS_VAL
(
m
);
}
src/zope/container/contained.py
View file @
44912238
...
...
@@ -29,8 +29,12 @@ from zope.location.interfaces import IContained
from
zope.container.interfaces
import
INameChooser
from
zope.container.interfaces
import
IReservedNames
,
NameReserved
from
zope.container.interfaces
import
IContainerModifiedEvent
from
zope.container._zope_container_contained
import
ContainedProxyBase
from
zope.container._zope_container_contained
import
getProxiedObject
try
:
from
zope.container._zope_container_contained
import
ContainedProxyBase
from
zope.container._zope_container_contained
import
getProxiedObject
except
ImportError
:
# PyPy
from
zope.container._proxy
import
py_getProxiedObject
as
getProxiedObject
from
zope.container._proxy
import
PyContainedProxyBase
as
ContainedProxyBase
from
zope.lifecycleevent
import
ObjectMovedEvent
from
zope.lifecycleevent
import
ObjectAddedEvent
...
...
@@ -956,4 +960,3 @@ class ContainedProxy(ContainedProxyBase):
DecoratedSecurityCheckerDescriptor
())
ContainedProxy
.
__provides__
=
ContainedProxyClassProvides
(
ContainedProxy
,
type
)
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