Skip to content

Commit

Permalink
Update Python version support.
Browse files Browse the repository at this point in the history
  • Loading branch information
icemac committed Feb 15, 2025
1 parent 1356976 commit f0add61
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
7 changes: 3 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def read(*rnames):
setup(name='zope.proxy',
version=version,
author='Zope Foundation and Contributors',
author_email='zope-dev@zope.org',
author_email='zope-dev@zope.dev',
description='Generic Transparent Proxies',
long_description=(
read('README.rst')
Expand All @@ -98,14 +98,13 @@ def read(*rnames):
'zope.proxy/issues',
'Sources': 'https://github.com/zopefoundation/zope.proxy',
},
license='ZPL 2.1',
license='ZPL-2.1',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: Zope Public License',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
Expand All @@ -126,7 +125,7 @@ def read(*rnames):
},
headers=headers,
ext_modules=ext_modules,
python_requires='>=3.8',
python_requires='>=3.9',
install_requires=[
'zope.interface',
'setuptools',
Expand Down
4 changes: 2 additions & 2 deletions src/zope/proxy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class AbstractPyProxyBase:

def __new__(cls, value=None):
# Some subclasses (zope.security.proxy) fail to pass the object
inst = super(AbstractPyProxyBase, cls).__new__(cls)
inst = super().__new__(cls)
inst._wrapped = value
return inst

Expand Down Expand Up @@ -197,7 +197,7 @@ def __getattr__(self, name):

def __setattr__(self, name, value):
if name == '_wrapped':
return super(AbstractPyProxyBase, self).__setattr__(name, value)
return super().__setattr__(name, value)

# First, look for descriptors in this object's type
type_self = type(self)
Expand Down
6 changes: 3 additions & 3 deletions src/zope/proxy/_zope_proxy_proxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -621,9 +621,9 @@ wrap_as_sequence = {
0, /* sq_concat */
0, /* sq_repeat */
0, /* sq_item */
0, /* sq_slice, unused in PY3 */
0, /* sq_slice, unused */
0, /* sq_ass_item */
0, /* sq_ass_slice, unused in PY3 */
0, /* sq_ass_slice, unused */
wrap_contains, /* sq_contains */
};

Expand Down Expand Up @@ -658,7 +658,7 @@ ProxyType = {
sizeof(ProxyObject),
0,
wrap_dealloc, /* tp_dealloc */
0, /* reserved 3.0--3.7; tp_vectorcall_offset 3.8+ */
0, /* tp_vectorcall_offset */
0, /* tp_getattr */
0, /* tp_setattr */
0, /* tp_reserved */
Expand Down
4 changes: 2 additions & 2 deletions src/zope/proxy/tests/test_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

try:
import zope.security
except ImportError: # pragma: no cover
except ModuleNotFoundError: # pragma: no cover
_HAVE_ZOPE_SECURITY = False
else:
_HAVE_ZOPE_SECURITY = True
Expand Down Expand Up @@ -335,7 +335,7 @@ def __len__(self):
return 2

def __getitem__(self, a_slice):
# On Python 3, we basically just return what the test expects.
# We basically just return what the test expects.
# Mostly that's the computed indices (yay!) but there are
# a few special cases.
indices = a_slice.indices(len(self))
Expand Down

0 comments on commit f0add61

Please sign in to comment.