summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Howitz <mh@gocept.com>2023-01-18 08:35:25 +0100
committerGitHub <noreply@github.com>2023-01-18 08:35:25 +0100
commit1944eef0b8bdd4b686ff441e0210537381714a4b (patch)
treef9b6a228d3913e666d15ad1af53179d40d0e9088
parent1239c75e4e190df992bf34a88b4ead2c952afe86 (diff)
downloadzope-browser-1944eef0b8bdd4b686ff441e0210537381714a4b.tar.gz
Config with pure python template (#18)
* Drop support for Python 2.7, 3.5, 3.6. * Add support for Python 3.11.
-rw-r--r--.github/workflows/tests.yml18
-rw-r--r--.gitignore1
-rw-r--r--.meta.toml4
-rw-r--r--CHANGES.rst6
-rw-r--r--setup.cfg13
-rw-r--r--setup.py19
-rw-r--r--tox.ini30
7 files changed, 50 insertions, 41 deletions
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 927d9f3..2ca497a 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -17,32 +17,30 @@ jobs:
fail-fast: false
matrix:
os:
- - ubuntu
+ - ["ubuntu", "ubuntu-20.04"]
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"]
- - ["pypy-2.7", "pypy"]
+ - ["3.11", "py311"]
- ["pypy-3.7", "pypy3"]
- ["3.9", "docs"]
- ["3.9", "coverage"]
- runs-on: ${{ matrix.os }}-latest
+ runs-on: ${{ matrix.os[1] }}
+ if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
name: ${{ matrix.config[1] }}
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
- name: Set up Python
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v4
with:
python-version: ${{ matrix.config[0] }}
- name: Pip cache
- uses: actions/cache@v2
+ uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }}
@@ -58,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 }}
diff --git a/.gitignore b/.gitignore
index c724a76..1f321f5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,4 +28,5 @@ lib64
log/
parts/
pyvenv.cfg
+testing.log
var/
diff --git a/.meta.toml b/.meta.toml
index 5c3e8e0..e4002d6 100644
--- a/.meta.toml
+++ b/.meta.toml
@@ -2,15 +2,15 @@
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
[meta]
template = "pure-python"
-commit-id = "3b712f305ca8207e971c5bf81f2bdb5872489f2f"
+commit-id = "4f0f7596"
[python]
with-pypy = true
-with-legacy-python = true
with-docs = true
with-sphinx-doctests = false
with-windows = false
with-future-python = false
+with-macos = false
[coverage]
fail-under = 100
diff --git a/CHANGES.rst b/CHANGES.rst
index 0e28e5e..f4dd68d 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -2,10 +2,12 @@
Changelog
===========
-2.5 (unreleased)
+3.0 (unreleased)
================
-- Nothing changed yet.
+- Add support for Python 3.11.
+
+- Drop support for Python 2.7, 3.5, 3.6.
2.4 (2022-04-06)
diff --git a/setup.cfg b/setup.cfg
index 264b78c..ebb8516 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -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
@@ -11,3 +11,14 @@ ignore =
.editorconfig
.meta.toml
docs/_build/html/_sources/*
+
+[isort]
+force_single_line = True
+combine_as_imports = True
+sections = FUTURE,STDLIB,THIRDPARTY,ZOPE,FIRSTPARTY,LOCALFOLDER
+known_third_party = six, docutils, pkg_resources
+known_zope =
+known_first_party =
+default_section = ZOPE
+line_length = 79
+lines_after_imports = 2
diff --git a/setup.py b/setup.py
index 7356c7f..e2f2be8 100644
--- a/setup.py
+++ b/setup.py
@@ -14,7 +14,8 @@
"""Setup for zope.browser package"""
import os
-from setuptools import setup, find_packages
+from setuptools import find_packages
+from setuptools import setup
def read(*rnames):
@@ -24,7 +25,7 @@ def read(*rnames):
setup(
name='zope.browser',
- version='2.5.dev0',
+ version='3.0.dev0',
author='Zope Foundation and Contributors',
author_email='zope-dev@zope.org',
description='Shared Zope Toolkit browser components',
@@ -41,15 +42,12 @@ setup(
'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',
'Programming Language :: Python :: 3.10',
+ 'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Natural Language :: English',
@@ -61,14 +59,7 @@ setup(
packages=find_packages('src'),
package_dir={'': 'src'},
namespace_packages=['zope'],
- python_requires=', '.join([
- '>=2.7',
- '!=3.0.*',
- '!=3.1.*',
- '!=3.2.*',
- '!=3.3.*',
- '!=3.4.*',
- ]),
+ python_requires='>=3.7',
install_requires=[
'setuptools',
'zope.interface',
diff --git a/tox.ini b/tox.ini
index 2218f41..77a27b3 100644
--- a/tox.ini
+++ b/tox.ini
@@ -4,14 +4,11 @@
minversion = 3.18
envlist =
lint
- py27
- py35
- py36
py37
py38
py39
py310
- pypy
+ py311
pypy3
docs
coverage
@@ -27,15 +24,26 @@ extras =
[testenv:lint]
basepython = python3
skip_install = true
+commands =
+ isort --check-only --diff {toxinidir}/src {toxinidir}/setup.py
+ flake8 src setup.py
+ check-manifest
+ check-python-versions
deps =
- flake8
check-manifest
check-python-versions >= 0.19.1
wheel
+ flake8
+ isort
+
+[testenv:isort-apply]
+basepython = python3
+skip_install = true
+commands_pre =
+deps =
+ isort
commands =
- flake8 src setup.py
- check-manifest
- check-python-versions
+ isort {toxinidir}/src {toxinidir}/setup.py []
[testenv:docs]
basepython = python3
@@ -52,16 +60,14 @@ allowlist_externals =
mkdir
deps =
coverage
- coverage-python-version
commands =
mkdir -p {toxinidir}/parts/htmlcov
coverage run -m zope.testrunner --test-path=src {posargs:-vc}
- coverage html
- coverage report -m --fail-under=100
+ coverage html --ignore-errors
+ coverage report --ignore-errors --show-missing --fail-under=100
[coverage:run]
branch = True
-plugins = coverage_python_version
source = zope.browser
[coverage:report]