Skip to content

Commit 2568499

Browse files
authored
Merge pull request #222 from collective/pep-420-native-namespace
PEP 420 native namespace
2 parents 29505bf + 8a596c5 commit 2568499

File tree

10 files changed

+53
-37
lines changed

10 files changed

+53
-37
lines changed

.github/workflows/test-matrix.yml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,30 @@ jobs:
2020
config:
2121
# [Python version, visual name, tox env]
2222
- ["3.13", "6.2 on py3.13", "py313-plone62"]
23-
- ["3.13", "6.1 on py3.13", "py313-plone61"]
24-
- ["3.9", "6.0 on py3.9", "py39-plone60"]
23+
- ["3.10", "6.2 on py3.10", "py310-plone62"]
2524

2625
runs-on: ${{ matrix.os[1] }}
2726
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
2827
name: ${{ matrix.config[1] }}
2928
steps:
30-
- uses: actions/checkout@v5
29+
- uses: actions/checkout@v6
3130
with:
3231
persist-credentials: false
3332
- name: Set up Python
3433
uses: actions/setup-python@v6
3534
with:
3635
python-version: ${{ matrix.config[0] }}
3736
allow-prereleases: true
37+
38+
##
39+
# Add extra configuration options in .meta.toml:
40+
# [github]
41+
# extra_lines_after_os_dependencies = """
42+
# _your own configuration lines_
43+
# """
44+
##
3845
- name: Pip cache
39-
uses: actions/cache@v4
46+
uses: actions/cache@v5
4047
with:
4148
path: ~/.cache/pip
4249
key: ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }}
@@ -47,5 +54,19 @@ jobs:
4754
run: |
4855
python -m pip install --upgrade pip
4956
pip install tox
57+
- name: Initialize tox
58+
# the bash one-liner below does not work on Windows
59+
if: contains(matrix.os, 'ubuntu')
60+
run: |
61+
if [ `tox list --no-desc -f init|wc -l` = 1 ]; then tox -e init;else true; fi
5062
- name: Test
5163
run: tox -e ${{ matrix.config[2] }}
64+
65+
66+
##
67+
# Add extra configuration options in .meta.toml:
68+
# [github]
69+
# extra_lines = """
70+
# _your own configuration lines_
71+
# """
72+
##

.meta.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# See the inline comments on how to expand/tweak this configuration file
44
[meta]
55
template = "default"
6-
commit-id = "2.0.1.dev0"
6+
commit-id = "2.3.1"
77

88
[pyproject]
99
codespell_skip = "*.js,*.min.js,*.min.js.map,*.css.map,yarn.lock,robot_*,test_*"
@@ -24,4 +24,4 @@ extra_lines = """
2424
"""
2525

2626
[tox]
27-
test_matrix = {"6.2" = ["3.13"], "6.1" = ["3.13"], "6.0" = ["3.9"]}
27+
test_matrix = {"6.2" = ["*"]}

.pre-commit-config.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@ ci:
77

88
repos:
99
- repo: https://github.com/asottile/pyupgrade
10-
rev: v3.19.1
10+
rev: v3.21.2
1111
hooks:
1212
- id: pyupgrade
1313
args: [--py38-plus]
1414
- repo: https://github.com/pycqa/isort
15-
rev: 6.0.1
15+
rev: 7.0.0
1616
hooks:
1717
- id: isort
18-
- repo: https://github.com/psf/black
19-
rev: 25.1.0
18+
- repo: https://github.com/psf/black-pre-commit-mirror
19+
rev: 25.11.0
2020
hooks:
2121
- id: black
2222
- repo: https://github.com/collective/zpretty
23-
rev: 3.1.0
23+
rev: 3.1.1
2424
hooks:
2525
- id: zpretty
2626

@@ -32,7 +32,7 @@ repos:
3232
# """
3333
##
3434
- repo: https://github.com/PyCQA/flake8
35-
rev: 7.1.2
35+
rev: 7.3.0
3636
hooks:
3737
- id: flake8
3838

@@ -58,20 +58,20 @@ repos:
5858
# """
5959
##
6060
- repo: https://github.com/mgedmin/check-manifest
61-
rev: "0.50"
61+
rev: "0.51"
6262
hooks:
6363
- id: check-manifest
6464
- repo: https://github.com/regebro/pyroma
65-
rev: "4.2"
65+
rev: "5.0"
6666
hooks:
6767
- id: pyroma
6868
- repo: https://github.com/mgedmin/check-python-versions
69-
rev: "0.22.1"
69+
rev: "0.24.0"
7070
hooks:
7171
- id: check-python-versions
7272
args: ['--only', 'setup.py,pyproject.toml']
7373
- repo: https://github.com/collective/i18ndude
74-
rev: "6.2.1"
74+
rev: "6.3.0"
7575
hooks:
7676
- id: i18ndude
7777

news/+meta.internal

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Update configuration files.
2+
[plone devs]

news/3928.breaking

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Replace ``pkg_resources`` namespace with PEP 420 native namespace.
2+
Support only Plone 6.2 and Python 3.10+.

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# https://github.com/plone/meta/tree/main/src/plone/meta/default
33
# See the inline comments on how to expand/tweak this configuration file
44
[build-system]
5-
requires = ["setuptools>=68.2,<=75.8.0", "wheel"]
5+
requires = ["setuptools>=68.2,<80", "wheel"]
66

77
[tool.towncrier]
88
directory = "news/"
@@ -37,7 +37,7 @@ showcontent = true
3737

3838
[[tool.towncrier.type]]
3939
directory = "tests"
40-
name = "Tests"
40+
name = "Tests:"
4141
showcontent = true
4242

4343
##

setup.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
from setuptools import find_packages
21
from setuptools import setup
32

43

5-
version = "3.0.5.dev0"
4+
version = "4.0.0.dev0"
65

76

87
setup(
@@ -20,14 +19,12 @@
2019
"Development Status :: 5 - Production/Stable",
2120
"Environment :: Web Environment",
2221
"Framework :: Plone",
22+
"Framework :: Plone :: 6.2",
2323
"Framework :: Plone :: Addon",
24-
"Framework :: Plone :: 6.0",
2524
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
2625
"Operating System :: OS Independent",
2726
"Programming Language :: JavaScript",
2827
"Programming Language :: Python",
29-
"Programming Language :: Python :: 3.8",
30-
"Programming Language :: Python :: 3.9",
3128
"Programming Language :: Python :: 3.10",
3229
"Programming Language :: Python :: 3.11",
3330
"Topic :: Software Development :: Libraries :: Python Modules",
@@ -37,12 +34,9 @@
3734
author_email="kevin@movieextras.se",
3835
url="https://github.com/collective/collective.z3cform.datagridfield",
3936
license="GPLv2",
40-
packages=find_packages("src"),
41-
package_dir={"": "src"},
42-
namespace_packages=["collective", "collective.z3cform"],
4337
include_package_data=True,
4438
zip_safe=False,
45-
python_requires=">=3.8",
39+
python_requires=">=3.10",
4640
install_requires=[
4741
"Products.GenericSetup",
4842
"plone.app.dexterity",
@@ -52,7 +46,6 @@
5246
"plone.dexterity",
5347
"plone.restapi",
5448
"plone.supermodel",
55-
"setuptools",
5649
"z3c.form >= 4.0",
5750
],
5851
extras_require={

src/collective/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/collective/z3cform/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

tox.ini

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,20 @@ envlist =
88
lint
99
test
1010
py313-plone62
11-
py313-plone61
12-
py39-plone60
11+
py312-plone62
12+
py311-plone62
13+
py310-plone62
1314
dependencies
1415

1516

1617
##
1718
# Add extra configuration options in .meta.toml:
1819
# - to specify a custom testing combination of Plone and python versions, use `test_matrix`
20+
# Use ["*"] to use all supported Python versions for this Plone version.
1921
# - to specify extra custom environments, use `envlist_lines`
2022
# - to specify extra `tox` top-level options, use `config_lines`
2123
# [tox]
22-
# test_matrix = {"6.2" = ["3.13", "3.12"], "6.1" = ["3.10", "3.9"]}
24+
# test_matrix = {"6.2" = ["3.13", "3.12"], "6.1" = ["*"]}
2325
# envlist_lines = """
2426
# my_other_environment
2527
# """
@@ -111,8 +113,6 @@ set_env =
111113
deps =
112114
{[test_runner]deps}
113115
plone62: -c https://dist.plone.org/release/6.2-dev/constraints.txt
114-
plone61: -c https://dist.plone.org/release/6.1-dev/constraints.txt
115-
plone60: -c https://dist.plone.org/release/6.0-dev/constraints.txt
116116

117117
##
118118
# Specify additional deps in .meta.toml:
@@ -153,6 +153,7 @@ set_env = {[base]set_env}
153153
deps =
154154
{[test_runner]deps}
155155
-c https://dist.plone.org/release/6.2-dev/constraints.txt
156+
156157
commands = {[test_runner]test}
157158
extras = {[base]extras}
158159

@@ -178,6 +179,7 @@ deps =
178179
{[test_runner]deps}
179180
coverage
180181
-c https://dist.plone.org/release/6.2-dev/constraints.txt
182+
181183
commands = {[test_runner]coverage}
182184
extras = {[base]extras}
183185

@@ -190,7 +192,6 @@ deps =
190192
build
191193
towncrier
192194
-c https://dist.plone.org/release/6.2-dev/constraints.txt
193-
194195
commands =
195196
# fake version to not have to install the package
196197
# we build the change log as news entries might break
@@ -221,7 +222,6 @@ deps =
221222
pipdeptree
222223
pipforester
223224
-c https://dist.plone.org/release/6.2-dev/constraints.txt
224-
225225
commands =
226226
# Generate the full dependency tree
227227
sh -c 'pipdeptree -j > forest.json'

0 commit comments

Comments
 (0)