| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| | |
Simplify getting the char* in get/setattro for clarity and performance
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Under Python 2, we were doing
PyUnicode_check->PyUnicode_AsEncodedString->PyString_Check->PyString_ASSTRING.
This can be simplified to PyString_AsString(). Internally it does the
same unicode check if needed. It produces a better error message if
the object is not a string or unicode. It is able to use the *cached*
byte string, and it doesn't allocate a new object. Because we don't
allocate a new object (sometimes) anymore, the extra INCREF/DECREF can
go away. We're also able to drop one type check.
Under Python 3, we were doing PyUnicode_Check->PyUnicode_AsUTF8String ->
PyBytes_AS_STRING. This can be simified to PyUnicode_AsUTF8. This
avoids an intermediate object and can use the cached byte string. We
can also drop the extra INCREF/DECREF since we don't ever have a new
object.
Python 2 docs claimed that the underlying tp_getattro slots need a
string object, but the unicode->string handling is done internally in
Python's PyObject_GetAttr now, AFAICS. (It's difficult to get a
unicode object in to these methods in the first place; someone must be
explicitly calling the __getattribute__ dunder method.)
|
| |
|
|
|
|
| |
Needed for #24.
|
| |
|
| |
|
|\
| |
| | |
Untrack self when deallocating.
|
|/
|
|
| |
Fixes #20
|
|\
| |
| | |
Fix indexing pure-Python proxies on Py3, and restore __getslice__ on Py2
|
|/
|
|
|
|
|
|
|
| |
Fixes #21.
This removes the special cases for lists and tuples in the C code (but
requires an #if Python 2 block). Tests are added (and generalized for
Python 3). I verified that this fixes the issues observed in the
zope.security tests.
|
|\
| |
| | |
100% coverage, run doctests everywhere, drop 'setup.py test' and Py 3.3
|
| |
| |
| |
| | |
This fixes the failure in test_security_proxy.
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
Enable coveralls to report on this.
Coverage reports showed two test classes that weren't subclassing the
correct base class, so we weren't actually testing the C
implementation of `removeAllProxies` and `queryInnerProxy`. Fixing
this revealed a probably bug in the implementation of
`removeAllProxies`; right now that test is skipped.
Also remove the `test_suite` for 'python setup.py test' since it
usually doesn't work anymore. See #18.
|
| |
|
| |
|
| |
|
|\
| |
| | |
Add support for Python 3.6
|
| |
| |
| |
| | |
See https://travis-ci.org/zopefoundation/zope.proxy/jobs/224707855
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also convert to zope.testrunner in tox.ini and .travis.yml because of
the namespace package issue:
```
$ tox -e py36
GLOB sdist-make: //zope.proxy/setup.py
py36 create: //zope.proxy/.tox/py36
py36 installdeps: .[test]
py36 inst: //zope.proxy/.tox/dist/zope.proxy-4.2.1.dev0.zip
py36 installed: appdirs==1.4.3,packaging==16.8,pyparsing==2.2.0,six==1.10.0,zope.component==4.3.0,zope.event==4.2.0,zope.i18nmessageid==4.0.3,zope.interface==4.4.0,zope.location==4.0.3,zope.proxy==4.2.1.dev0,zope.schema==4.4.2,zope.security==4.0.3
py36 runtests: PYTHONHASHSEED='770288004'
py36 runtests: commands[0] | python setup.py -q test -q
warning: no previously-included files matching '*.dll' found anywhere in distribution
warning: no previously-included files matching '*.pyo' found anywhere in distribution
E
======================================================================
ERROR: proxy (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: proxy
Traceback (most recent call last):
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/unittest/loader.py", line 153, in loadTestsFromName
module = __import__(module_name)
File "//zope.proxy/src/zope/proxy/__init__.py", line 21, in <module>
from zope.interface import moduleProvides
ModuleNotFoundError: No module named 'zope.interface'
```
Also enable travis pip cache.
|
|\
| |
| | |
Make py_sameProxiedObjects handle zope.security proxies
|
|/
|
|
|
|
| |
By effectively bypassing them to access `_wrapped`.
Fixes #15.
|
|\
| |
| | |
Fix tests w/o zope security
|
| |
| |
| |
| |
| | |
Add a new testrunner, 'test-wo-zope-security', to exercise the 'skipUnless'
added in d910979.
|
|/ |
|
| |
|
| |
|
|\
| |
| |
| |
| | |
zopefoundation/fix-removeAllProxies-for-securityproxies
Fix removing pure python security proxies
|
| | |
|
|/
|
|
| |
The test is simple but requires zope.security to be installed.
I chose that over writing the test in zope.security
|
| |
|
|\
| |
| |
| |
| | |
zopefoundation/avoid-poisoning-wheel-cache-python-pure
Don't use/poison global wheel cache when building w/ PURE_PYTHON.
|
|/ |
|
|\
| |
| | |
Drop support for Python 2.6 and 3.2.
|
|/ |
|
|\
| |
| | |
Use shields.io for PyPI badge
|
| | |
|
| | |
|
|\ \
| |/
| | |
Note explicit support for Python 3.5
|
|/ |
|
| |
|
| |
|
| |
|
|
|
|
| |
correctly hashed.
|
|
|
|
| |
types (in pure-Python.).
|
|
|
|
| |
fix differences between the C and Python implementations in handling __module__, whether or not a subclass is involved.
|
| |
|
| |
|
| |
|
|\
| |
| |
| | |
NextThought-int-and-float
|