Skip to content

Commit

Permalink
Drop support for Python < 3.7 (#12)
Browse files Browse the repository at this point in the history
* Bumped version for breaking release.

* Drop support for Python 2.7, 3.5, 3.6.
  • Loading branch information
Michael Howitz committed Jun 29, 2023
1 parent f3e4849 commit 700dd72
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 39 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,12 @@ jobs:
config:
# [Python version, tox env]
- ["3.9", "lint"]
- ["2.7", "py27"]
- ["3.5", "py35"]
- ["3.6", "py36"]
- ["3.7", "py37"]
- ["3.8", "py38"]
- ["3.9", "py39"]
- ["3.10", "py310"]
- ["3.11", "py311"]
- ["pypy-2.7", "pypy"]
- ["pypy-3.7", "pypy3"]
- ["pypy-3.9", "pypy3"]
- ["3.9", "docs"]
- ["3.9", "coverage"]

Expand Down Expand Up @@ -60,7 +56,7 @@ jobs:
- name: Coverage
if: matrix.config[1] == 'coverage'
run: |
pip install coveralls coverage-python-version
pip install coveralls
coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 1 addition & 2 deletions .meta.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
[meta]
template = "pure-python"
commit-id = "200573eb414d2228d463da3de7d71a6d6335a704"
commit-id = "fd874ae4"

[python]
with-windows = false
with-pypy = true
with-future-python = false
with-legacy-python = true
with-docs = true
with-sphinx-doctests = false
with-macos = false
Expand Down
6 changes: 5 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
Changes
=========

4.5 (unreleased)
5.0 (unreleased)
================

- Drop support for Python 2.7, 3.5, 3.6.

- Drop support for deprecated ``python setup.py test``.

- Add support for Python 3.11.


Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
[bdist_wheel]
universal = 1
universal = 0

[flake8]
doctests = 1
Expand All @@ -16,7 +16,7 @@ ignore =
force_single_line = True
combine_as_imports = True
sections = FUTURE,STDLIB,THIRDPARTY,ZOPE,FIRSTPARTY,LOCALFOLDER
known_third_party = six, docutils, pkg_resources
known_third_party = docutils, pkg_resources, pytz
known_zope =
known_first_party =
default_section = ZOPE
Expand Down
11 changes: 3 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ def read(*rnames):

setup(
name='zope.principalannotation',
version='4.5.dev0',
version='5.0.dev0',
author='Zope Foundation and Contributors',
author_email='zope-dev@zope.org',
author_email='zope-dev@zope.dev',
description='Annotations for Zope Principals',
long_description=(
read('README.rst')
Expand All @@ -49,11 +49,7 @@ def read(*rnames):
'Intended Audience :: Developers',
'License :: OSI Approved :: Zope Public License',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
Expand All @@ -71,6 +67,7 @@ def read(*rnames):
packages=find_packages('src'),
package_dir={'': 'src'},
namespace_packages=['zope'],
python_requires='>=3.7',
extras_require={
'test': TESTS_REQUIRE,
'docs': [
Expand All @@ -89,8 +86,6 @@ def read(*rnames):
'zope.security',
'zope.site',
],
tests_require=TESTS_REQUIRE,
test_suite='zope.principalannotation.tests.test_suite',
include_package_data=True,
zip_safe=False,
)
8 changes: 1 addition & 7 deletions src/zope/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
# this is a namespace package
try:
import pkg_resources
pkg_resources.declare_namespace(__name__)
except ImportError:
import pkgutil
__path__ = pkgutil.extend_path(__path__, __name__)
__import__('pkg_resources').declare_namespace(__name__) # pragma: no cover
7 changes: 4 additions & 3 deletions src/zope/principalannotation/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@
import doctest
import unittest

import zope.principalannotation
from zope.configuration import xmlconfig
from zope.site.testing import siteSetUp
from zope.site.testing import siteTearDown

import zope.principalannotation


def setUp(test):
site = siteSetUp(site=True)
Expand All @@ -33,9 +34,9 @@ def tearDown(test):


def test_suite():
return unittest.TestSuite((
return unittest.TestSuite(
doctest.DocFileSuite(
'README.rst',
setUp=setUp, tearDown=tearDown,
optionflags=doctest.ELLIPSIS)
))
)
8 changes: 4 additions & 4 deletions src/zope/principalannotation/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
from BTrees.OOBTree import OOBTree
from persistent import Persistent
from persistent.dict import PersistentDict

from zope import component
from zope import interface
from zope.annotation.interfaces import IAnnotations
from zope.component import queryNextUtility
from zope.location import Location
from zope.location.interfaces import IContained
from zope.principalannotation.interfaces import IPrincipalAnnotationUtility
from zope.security.interfaces import IPrincipal

from zope import component
from zope import interface
from zope.principalannotation.interfaces import IPrincipalAnnotationUtility


# TODO: register utility as adapter for IAnnotations on utility activation.

Expand Down
6 changes: 0 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@
minversion = 3.18
envlist =
lint
py27
py35
py36
py37
py38
py39
py310
py311
pypy
pypy3
docs
coverage
Expand Down Expand Up @@ -64,7 +60,6 @@ allowlist_externals =
mkdir
deps =
coverage
coverage-python-version
commands =
mkdir -p {toxinidir}/parts/htmlcov
coverage run -m zope.testrunner --test-path=src {posargs:-vc}
Expand All @@ -73,7 +68,6 @@ commands =

[coverage:run]
branch = True
plugins = coverage_python_version
source = zope.principalannotation

[coverage:report]
Expand Down

0 comments on commit 700dd72

Please sign in to comment.