- Respect
PURE_PYTHON
environment variable set to0
.
- Declare final support for Python 3.13.
- Allow calling methods of type
<class 'builtin_method'>
by default. In particular, Python 3.12 refactored theio
module in such a way as to slightly change the types of some methods, causingzope.security
to no longer consider them callable. See zope.file#13.
- Add preliminary support for Python 3.13 as of 3.13b1.
- Drop support for Python 3.7.
- Build windows wheels on GHA.
- Make
next()
on C proxies call__next__
rather thannext
(see PEP 3114), and drop support for the Python 2next
method name from pure-Python proxies. - Drop using
setup_requires
due to constant problems on GHA. - Add support for Python 3.12.
- Remove more proxying code for names that no longer exist in Python 3. (#92)
- Remove proxying code for names that no longer exist in Python 3. (#92)
- Drop support for Python 2.7, 3.5, 3.6.
- The extra
untrustedpython
now for Python 3, too, installszope.untrustedpython
.
- Release to rebuild full set of binary wheels.
- Add support for building arm64 wheels on macOS.
- Add support for final release of Python 3.11.
- Disable unsafe math optimizations in C code. See pull request 89.
- Allow calling bound methods of some built-in objects such as
().__repr__
and{}.__repr__
by default. This worked on Python 2, but raisedForbiddenAttribute
on Python 3. See issue 75. - Remove usage of
unittest.makeSuite
as it is deprecated in Python 3.11+. See issue 83. - Add support for Python 3.11 (as of 3.11.0a7).
- Add support for Python 3.9 and 3.10.
- Ensure all objects have consistent interface resolution orders (if all dependencies are up-to-date). See issue 71.
- Let proxied interfaces be iterated on Python 3. This worked on
Python 2, but raised
ForbiddenAttribute
an Python 3. See zope.interface issue 141. - Allow to use a common Sphinx version for Python 2 and 3.
- Drop support for Python 3.4.
- Add support for Python 3.8.
- Properly declare dependency on zope.schema >= 4.2.0, introduced in zope.security 4.2.1.
- Fix dict item view iteration on PyPy3 7.x.
- Fix the decimal.Decimal checker,
__truediv__
was missing causingForbiddenAttribute
on aProxyFactory(Decimal('1')) / 1
operation
- Add the interface
ISystemPrincipal
and makezope.security.management.system_user
a regular object that implements this interface. This facilitates providing adapter registrations specifically for thesystem_user
.
- Add support for Python 3.7.
- Make the pure-Python proxy on Python 2 not check permissions for
__unicode__
just like the C implementation. Note that__str__
is checked for both implementations on both Python 2 and 3, but if there is no__unicode__
method defined, Python 2's automatic fallback to__str__
is not checked whenunicode
is called. See issue 10.
- Fix the default values for
Permission
fieldstitle
anddescription
under Python 2. See issue 48. - Change the
IPermission.id
fromText
(unicode) to aNativeStringLine
. This matches what ZCML creates and what is usually written in source code.
- Fix the extremely rare potential for a crash when the C extensions are in use. See issue 35.
- Fix issue 7: The
pure-Python proxy didn't propagate
TypeError
from__repr__
and__str__
like the C implementation did. - Fix issue 27:
iteration of
zope.interface.providedBy()
is now allowed by default on all versions of Python. Previously it only worked on Python 2. Note thatprovidedBy
returns unproxied objects for backwards compatibility. - Fix
__length_hint__
of proxied iterator objects. Previously it was ignored. - Drop support for Python 3.3.
- Enable coveralls.io for coverage measurement and run doctests on all supported Python versions.
- Fix issue 9:
iteration of
itertools.groupby
objects is now allowed by default. In addition, iteration of all the custom iterator types defined in itertools are also allowed by default. - Simplify the internal
_compat.py
module now that we only run on newer Python versions. See PR 32. - Respect
PURE_PYTHON
at runtime. At build time, always try to build the C extensions on supported platforms, ignoringPURE_PYTHON
. See issue 33. - Fix watching checkers (
ZOPE_WATCH_CHECKERS=1
) in pure-Python mode. See issue 8. - Remove unused internal files from
tests/
. - Remove
zope.security.setup
. It was unused and did not work anyway. - Fix the pure-Python proxy on Python 2 letting
__getslice__
and__setslice__
fall through to__getitem__
or__setitem__
, respectively, if it raised an error. - Fix the pure-Python proxy calling a wrapped
__getattr__
or__getattribute__
more than once in situations where the C implementation only called it one time (when it raised an AttributeError). - Reach 100% test coverage and maintain it via automated checks.
- Fix issue 23:
iteration of
collections.OrderedDict
and its various views is now allowed by default on all versions of Python. - As a further fix for issue 20, iteration of
BTree
itself is now allowed by default.
- When testing
PURE_PYTHON
environments undertox
, avoid poisoning the user's global wheel cache. - Drop support for Python 2.6 and 3.2.
- Add support for Python 3.5 and 3.6.
- Fix issue 20:
iteration of pure-Python
BTrees.items()
, and also creating a list fromBTrees.items()
on Python 3. The same applies forkeys()
andvalues()
.
- Fix iteration over security proxies in Python 3 using the pure-Python implementation.
- Fix compatibility with
zope.proxy
4.1.5 under PyPy. - Fix the very first call to
removeSecurityProxy
returning incorrect results if given a proxy under PyPy.
- Add support for Python 3.4.
- Update
boostrap.py
to version 2.2. - Bugfix: ZOPE_WATCH_CHECKERS=2 used to incorrectly suppress unauthorized/forbidden warnings.
- Bugfix: ZOPE_WATCH_CHECKERS=1 used to miss most of the checks.
- Add support for PyPy.
- Fix extension compilation on windows python 3.x
- Undo changes from 4.0.0a4. Instead,
zope.untrustedpython
is only included during Python 2 installs.
- Remove
untrustedpython
extra again, since we do not want to supportzope.untrustedpython
in ZTK 2.0. If BBB is really needed, we will create a 3.10.0 release.
- Fix test breakage in 4.0.0a2 due to deprecation strategy.
- Add back the
untrustedpython
extra: now pulls inzope.untrustedpython
. Restored deprecated backward-compatible imports forzope.security.untrustedpython.{builtins,interpreter,rcompile}
(the extra and the imports are to be removed in version 4.1).
Add support for Python 3.2 and 3.3.
Bring unit test coverage to 100%.
zope.security.untrustedpython
moved to separate project:zope.untrustedpython
Convert use of
assert
in non-test code to apprpriate error types:- Non-dict's passed to
Checker.__init__
.
- Non-dict's passed to
Remove dprecattion of
zope.security.adapter.TrustedAdapterFactory
. Although it has been marked as deprectaed since before Zope3 3.2, current versions ofzope.compoent
still rely on it.Convert doctests to Sphinx documentation in 'docs'.
Add
setup.py docs
alias (installsSphinx
and dependencies).Add
setup.py dev
alias (runssetup.py develop
plus installsnose
andcoverage
).Make non-doctest tests fully independent of
zope.testing
.Two modules,
zope.security.checker
andzope.security.management
, register cleanups withzope.testing
IFF it is importable, but the tests no longer rely on it.Enable building extensions without the
svn:external
of thezope.proxy
headers into ourinclude
dir.Bump
zope.proxy
dependency to ">= 4.1.0" to enable compilation on Py3k.Replace deprecated
zope.component.adapts
usage with equivalentzope.component.adapter
decorator.Replace deprecated
zope.interface.classProvides
usage with equivalentzope.interface.provider
decorator.Replace deprecated
zope.interface.implements
usage with equivalentzope.interface.implementer
decorator.Drop support for Python 2.4 and 2.5.
Add test convenience helper
create_interaction
andwith interaction()
.
- Pin
zope.proxy >= 4.1.0
- Ship with an included
proxy.h
header which is compatible with the 4.1.x version ovzope.proxy
.
- Ship with an included
proxy.h
header which is compatible with the supported versions ofzope.proxy
.
- Pin
zope.proxy >= 3.4.2, <4.1dev
- Fix a regression introduced in 3.8.1:
zope.location
's LocationProxy did not get a security checker ifzope.security.decorator
was not imported manually. Nowzope.security.decorator
is imported inzope.security.proxy
without re-introducing the circular import fixed in 3.8.1.
- Fix a test that failed on Python 2.7.
- Fix circular import beween
zope.security.decorator
andzope.security.proxy
which led to anImportError
when only importingzope.security.decorator
.
- Add tests for our own
configure.zcml
. - Add
zcml
extra dependencies; run related tests only ifzope.configuration
is available. - Run tests related to the
untrustedpython
functionality only ifRestrictedPython
is available.
- Prefer the standard library's
doctest
module to the one fromzope.testing
. - Ensure
PermissionIdsVocabulary
directly providesIVocabularyFactory
, even though it might be unnecessary becauseIVocabularyFactory
is provided in ZCML. - Remove the dependency on the zope.exceptions package: zope.security.checker
now imports
DuplicationError
from zope.exceptions if available, otherwise it defines a package-specificDuplicationError
class which inherits from Exception.
- Add compatibility with Python 2.6 abstract base classes.
- Fix for LP bug 181833 (from Gustavo Niemeyer). Before "visiting" a sub-object, a check should be made to ensure the object is still valid. Because garbage collection may involve loops, if you garbage collect an object, it is possible that the actions done on this object may modify the state of other objects. This may cause another round of garbage collection, eventually generating a segfault (see LP bug). The Py_VISIT macro does the necessary checks, so it is used instead of the previous code.
- Make
pytz
a soft dependency: the checker forpytz.UTC
is created / tested only if the package is already present. Runbin/test_pytz
to run the tests withpytz
on the path.
- Ensure that simple zope.schema's
VocabularyRegistry
is used forPermissionVocabulary
tests, because it's replaced implicitly in environments withzope.app.schema
installed that makes that tests fail. - Fix a bug in
DecoratedSecurityCheckerDescriptor
which made security-wrapping location proxied exception instances throw exceptions on Python 2.5. See https://bugs.launchpad.net/zope3/+bug/251848
- Add
zope.i18nmessageid.Message
to non-proxied basic types. It's okay, because messages are immutable. Done previously byzope.app.security
. - Add
__name__
and__parent__
attributes to list of available by default. Done previously byzope.app.security
. - Move
PermissionsVocabulary
andPermissionIdsVocabulary
vocabularies to thezope.security.permission
module from thezope.app.security
package. - Add zcml permission definitions for most common and useful permissions,
like
zope.View
andzope.ManageContent
, as well as for the specialzope.Public
permission. They are placed in a separatepermissions.zcml
file, so it can be easily excluded/redefined. They are selected part of permissions moved fromzope.app.security
and used by manyzope.*
packages. - Add
addCheckerPublic
helper function inzope.security.testing
module that registers the "zope.Public" permission as an IPermission utility. - Add security declarations for the
zope.security.permisson.Permission
class. - Improve test coverage.
- Use
from
imports instead ofzope.deferred
to avoid circular import problems, thus drop dependency onzope.deferredimport
. - Raise
NoInteraction
whenzope.security.checkPermission
is called without interaction being active (LP #301565). - Don't define security checkers for deprecated set types from the
"sets" module on Python 2.6. It's discouraged to use them and
set
andfrozenset
built-in types should be used instead. - Change package's mailng list address to zope-dev at zope.org as zope3-dev at zope.org is now retired.
- Remove old zpkg-related files.
- Install decorated security checker support on
LocationProxy
from the outside. - Add support to bootstrap on Jython.
- Move the
protectclass
module fromzope.app.security
to this package to reduce the number of dependencies onzope.app.security
. - Move the
<module>
directive implementation fromzope.app.security
to this package. - Move the
<class>
directive implementation fromzope.app.component
to this package.
- Make C code compatible with Python 2.5 on 64bit architectures.
- Add
frozenset
,set
,reversed
, andsorted
to the list of safe builtins.
- Changed title for
zope.security.management.system_user
to be more presentable.
- Backport a fix made by Gary Poster to the 3.4 branch:
Fix for LP bug 181833 (from Gustavo Niemeyer). Before "visiting" a
sub-object, a check should be made to ensure the object is still valid.
Because garbage collection may involve loops, if you garbage collect an
object, it is possible that the actions done on this object may modify the
state of other objects. This may cause another round of garbage collection,
eventually generating a segfault (see LP bug). The
Py_VISIT
macro does the necessary checks, so it is used instead of the previous code.
- Add dependency on
zope.thread
to setup.py; without it, the tests were failing. - Backport a fix made by Albertas Agejevas to the 3.4 branch. He fixed a bug in DecoratedSecurityCheckerDescriptor which made security-wrapping location proxied exception instances throw exceptions on Python 2.5. See https://bugs.launchpad.net/zope3/+bug/251848
- Make C code compatible with Python 2.5 on 64bit architectures.
- Update meta-data.
- Fix a circular import in the C implementation.
- Improve ugly/brittle ID of
zope.security.management.system_user
.
- Add support for Python 2.5.
- Bug:
zope.security.management.system_user
wasn't a valid principal (didn't provide IPrincipal). - Bug: Fix inclusion of doctest to use the doctest module from
zope.testing
. Now tests can be run multiple times without breaking. (#98250)
- Bug: Remove stack extraction in
newInteraction
. When using eggs this is an extremly expensive function. The publisher is now more than 10 times faster when using eggs and about twice as fast with a zope trunk checkout.
- Temporarily fixed the hidden (and accidental) dependency on zope.testing to become optional.
Note: The releases between 3.2.0 and 3.4.0b1 where not tracked as an individual package and have been documented in the Zope 3 changelog.
- Corresponds to the verison of the
zope.security
package shipped as part of the Zope 3.2.0 release. - Remove deprecated helper functions,
proxy.trustedRemoveSecurityProxy
andproxy.getProxiedObject
. - Make handling of
management.{end,restore}Interaction
more careful w.r.t. edge cases. - Make behavior of
canWrite
consistent withcanAccess
: ifcanAccess
does not raiseForbiddenAttribute
, then neither willcanWrite
. See: http://www.zope.org/Collectors/Zope3-dev/506 - Code style / documentation / test fixes.
- Add support for use of the new Python 2.4 datatypes,
set
andfrozenset
, within checked code. - Make the C security proxy depend on the
proxy.h
header from thezope.proxy
package. - XXX: the spelling of the
#include
is bizarre! It seems to be related tozpkg
-based builds, and should likely be revisited. For the moment, I have linked in thezope.proxy
package into our owninclude
directory. See the subversion checkin: http://svn.zope.org/Zope3/?rev=37882&view=rev - Update checker to avoid re-proxying objects which have and explicit
__Security_checker__
assigned. - Corresponds to the verison of the
zope.security
package shipped as part of the Zope 3.1.0 release. - Clarify contract of
IChecker
to indicate that itscheck*
methods may raise onlyForbidden
orUnauthorized
exceptions. - Add interfaces, (
IPrincipal
,IGroupAwarePrincipal
,IGroup
, andIPermission
) specifying contracts of components in the security framework. - Code style / documentation / test fixes.
- Corresponds to the version of the
zope.security
package shipped as part of the Zope X3.0.0 release.