Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
# Generated with zope.meta (https://zopemeta.readthedocs.io/) from:
# https://github.com/zopefoundation/meta/tree/master/src/zope/meta/pure-python
#
# EditorConfig Configuration file, for more details see:
# http://EditorConfig.org
# https://EditorConfig.org
# EditorConfig is a convention description, that could be interpreted
# by multiple editors to enforce common coding conventions for specific
# file types
Expand All @@ -12,7 +12,7 @@
root = true


[*] # For All Files
[*]
# Unix-style newlines with a newline ending every file
end_of_line = lf
insert_final_newline = true
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
# Generated with zope.meta (https://zopemeta.readthedocs.io/) from:
# https://github.com/zopefoundation/meta/tree/master/src/zope/meta/pure-python
name: pre-commit

on:
Expand All @@ -21,10 +21,10 @@ jobs:
name: linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: 3.x
python-version: '3.13'
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd #v3.0.1
with:
extra_args: --all-files --show-diff-on-failure
Expand Down
19 changes: 8 additions & 11 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
# Generated with zope.meta (https://zopemeta.readthedocs.io/) from:
# https://github.com/zopefoundation/meta/tree/master/src/zope/meta/pure-python
name: tests

on:
Expand All @@ -24,36 +24,33 @@ jobs:
config:
# [Python version, tox env]
- ["3.11", "release-check"]
- ["3.9", "py39"]
- ["3.10", "py310"]
- ["3.11", "py311"]
- ["3.12", "py312"]
- ["3.13", "py313"]
- ["pypy-3.10", "pypy3"]
- ["3.14", "py314"]
- ["pypy-3.11", "pypy3"]
- ["3.11", "coverage"]

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@v4
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Install uv + caching
uses: astral-sh/setup-uv@v6
# astral/setup-uv@7.5.0
uses: astral-sh/setup-uv@e06108dd0aef18192324c70427afc47652e63a82
with:
enable-cache: true
cache-dependency-glob: |
setup.*
tox.ini
python-version: ${{ matrix.matrix.config[0] }}
python-version: ${{ matrix.config[0] }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Test
if: ${{ !startsWith(runner.os, 'Mac') }}
run: uvx --with tox-uv tox -e ${{ matrix.config[1] }}
- name: Test (macOS)
if: ${{ startsWith(runner.os, 'Mac') }}
run: uvx --with tox-uv tox -e ${{ matrix.config[1] }}-universal2
- name: Coverage
if: matrix.config[1] == 'coverage'
run: |
Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
# Generated with zope.meta (https://zopemeta.readthedocs.io/) from:
# https://github.com/zopefoundation/meta/tree/master/src/zope/meta/pure-python
*.dll
*.egg-info/
*.profraw
Expand Down Expand Up @@ -28,5 +28,6 @@ lib64
log/
parts/
pyvenv.cfg
share/
testing.log
var/
7 changes: 4 additions & 3 deletions .meta.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
# Generated with zope.meta (https://zopemeta.readthedocs.io/) from:
# https://github.com/zopefoundation/meta/tree/master/src/zope/meta/pure-python
[meta]
template = "pure-python"
commit-id = "7d59ab0f"
commit-id = "9832deed"

[python]
with-macos = false
Expand All @@ -11,6 +11,7 @@ with-pypy = true
with-future-python = false
with-sphinx-doctests = false
with-docs = false
with-free-threaded-python = false

[tox]
testenv-deps = [
Expand Down
13 changes: 7 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
# Generated with zope.meta (https://zopemeta.readthedocs.io/) from:
# https://github.com/zopefoundation/meta/tree/master/src/zope/meta/pure-python
minimum_pre_commit_version: '3.6'
repos:
- repo: https://github.com/pycqa/isort
rev: "6.0.1"
rev: "7.0.0"
hooks:
- id: isort
- repo: https://github.com/hhatto/autopep8
Expand All @@ -12,16 +12,17 @@ repos:
- id: autopep8
args: [--in-place, --aggressive, --aggressive]
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.1
rev: v3.21.2
hooks:
- id: pyupgrade
args: [--py39-plus]
args: [--py310-plus]
- repo: https://github.com/isidentical/teyit
rev: 0.4.3
hooks:
- id: teyit
language_version: python3.13
- repo: https://github.com/PyCQA/flake8
rev: "7.2.0"
rev: "7.3.0"
hooks:
- id: flake8
additional_dependencies:
Expand Down
6 changes: 5 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ Changes
5.1 (unreleased)
----------------

- Nothing changed yet.
- Move package metadata from setup.py to pyproject.toml.

- Add support for Python 3.14.

- Drop support for Python 3.9.


5.0 (2025-06-18)
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!--
Generated from:
https://github.com/zopefoundation/meta/tree/master/config/pure-python
Generated with zope.meta (https://zopemeta.readthedocs.io/) from:
https://github.com/zopefoundation/meta/tree/master/src/zope/meta/pure-python
-->
# Contributing to zopefoundation projects

Expand Down
4 changes: 2 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
# Generated with zope.meta (https://zopemeta.readthedocs.io/) from:
# https://github.com/zopefoundation/meta/tree/master/src/zope/meta/pure-python
include *.md
include *.rst
include *.txt
Expand Down
67 changes: 63 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,68 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python

# Generated with zope.meta (https://zopemeta.readthedocs.io/) from:
# https://github.com/zopefoundation/meta/tree/master/src/zope/meta/pure-python
[build-system]
requires = [
"setuptools == 78.1.1",
"setuptools >= 78.1.1,< 81",
"wheel",
]
build-backend = "setuptools.build_meta"


[project]
name = "grokcore.site"
version = "5.1.dev0"
description = "Grok-like configuration for Zope local site and utilities"
license = "ZPL-2.1"
classifiers = [
"Environment :: Web Environment",
"Framework :: Zope :: 3",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Programming Language :: Python",
]
dynamic = ["readme"]
requires-python = ">=3.10"
authors = [
{name = "Grok Team",email = "zope-dev@zope.dev"},
]
maintainers = [
{name = "Plone Foundation and contributors",email = "zope-dev@zope.dev"},
]
dependencies = [
"grokcore.component >= 2.1",
"martian >= 0.13",
"persistent",
"zope.annotation",
"zope.component",
"zope.container",
"zope.event",
"zope.interface",
"zope.lifecycleevent",
"zope.schema",
"zope.site >= 4.4",
]

[project.optional-dependencies]
test = [
"zope.app.appsetup",
"zope.component",
"zope.configuration",
"zope.testing",
"grokcore.content",
]

[project.urls]
Source = "https://github.com/zopefoundation/grokcore.site"
Issues = "https://github.com/zopefoundation/grokcore.site/issues"
Changelog = "https://raw.githubusercontent.com/zopefoundation/grokcore.site/master/CHANGES.rst"

[tool.coverage.run]
branch = true
source = ["grokcore.site"]
Expand All @@ -30,3 +85,7 @@ exclude_lines = [

[tool.coverage.html]
directory = "parts/htmlcov"

[tool.setuptools.dynamic]
readme = {file = ["README.rst", "CHANGES.rst"]}

4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
# Generated with zope.meta (https://zopemeta.readthedocs.io/) from:
# https://github.com/zopefoundation/meta/tree/master/src/zope/meta/pure-python

[flake8]
doctests = 1
Expand Down
65 changes: 2 additions & 63 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,66 +1,5 @@
import os

from setuptools import setup


def read(*rnames):
return open(os.path.join(os.path.dirname(__file__), *rnames)).read()


long_description = (
read('README.rst')
+ '\n' +
read('CHANGES.rst')
)

tests_require = [
'zope.app.appsetup',
'zope.component',
'zope.configuration',
'zope.testing',
'grokcore.content',
]

setup(
name='grokcore.site',
version='5.1.dev0',
author='Grok Team',
author_email='zope-dev@zope.dev',
url='https://github.com/zopefoundation/grokcore.site',
description='Grok-like configuration for Zope local site and utilities',
long_description=long_description,
license='ZPL',
classifiers=[
'Environment :: Web Environment',
'Framework :: Zope :: 3',
'Intended Audience :: Developers',
'License :: OSI Approved :: Zope Public License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Programming Language :: Python',
],
include_package_data=True,
zip_safe=False,
python_requires='>=3.9',
install_requires=['setuptools',
'grokcore.component >= 2.1',
'martian >= 0.13',
'persistent',
'zope.annotation',
'zope.component',
'zope.container',
'zope.event',
'zope.interface',
'zope.lifecycleevent',
'zope.schema',
'zope.site >= 4.4',
],
tests_require=tests_require,
extras_require={'test': tests_require},
)
# See pyproject.toml for package metadata
setup()
16 changes: 14 additions & 2 deletions src/grokcore/site/tests/test_base.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
import doctest
import unittest

from pkg_resources import resource_listdir
from importlib import import_module
from importlib.resources import files

import zope.component.eventtesting
from zope.testing import cleanup


def resource_listdir(package_name, resource_path):
"""List resources in a package subdirectory."""
# Get the package from the module name
module = import_module(package_name)
package = module.__package__ or package_name

resource = files(package)
for part in resource_path.split('/'):
resource = resource / part
return [item.name for item in resource.iterdir()]


def setUpZope(test):
zope.component.eventtesting.setUp(test)

Expand Down
Loading
Loading