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
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Generated from:
# https://github.com/plone/meta/tree/main/src/plone/meta/default
# https://github.com/plone/meta/tree/2.x/src/plone/meta/default
# See the inline comments on how to expand/tweak this configuration file
#
# EditorConfig Configuration file, for more details see:
Expand Down
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Generated from:
# https://github.com/plone/meta/tree/main/src/plone/meta/default
# https://github.com/plone/meta/tree/2.x/src/plone/meta/default
# See the inline comments on how to expand/tweak this configuration file
[flake8]
doctests = 1
Expand Down
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Generated from:
# https://github.com/plone/meta/tree/main/src/plone/meta/default
# https://github.com/plone/meta/tree/2.x/src/plone/meta/default
# See the inline comments on how to expand/tweak this configuration file
version: 2
updates:
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/meta.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
# Generated from:
# https://github.com/plone/meta/tree/main/src/plone/meta/default
# https://github.com/plone/meta/tree/2.x/src/plone/meta/default
# See the inline comments on how to expand/tweak this configuration file
name: Meta

on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
workflow_dispatch:

##
Expand Down
31 changes: 12 additions & 19 deletions .github/workflows/test-matrix.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Generated from:
# https://github.com/plone/meta/tree/main/src/plone/meta/default
# https://github.com/plone/meta/tree/2.x/src/plone/meta/default
# See the inline comments on how to expand/tweak this configuration file
name: Tests

on:
push:
workflow_dispatch:

jobs:
build:
Expand All @@ -19,7 +20,7 @@ jobs:
- ["ubuntu", "ubuntu-latest"]
config:
# [Python version, visual name, tox env]
- ["3.13", "6.2 on py3.13", "py313-plone62"]
- ["3.14", "6.2 on py3.14", "py314-plone62"]
- ["3.10", "6.2 on py3.10", "py310-plone62"]

runs-on: ${{ matrix.os[1] }}
Expand All @@ -29,11 +30,15 @@ jobs:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v6
- name: Install uv + caching
uses: astral-sh/setup-uv@v8.0.0
with:
enable-cache: true
cache-dependency-glob: |
setup.*
tox.ini
pyproject.toml
python-version: ${{ matrix.config[0] }}
allow-prereleases: true

##
# Add extra configuration options in .meta.toml:
Expand All @@ -42,25 +47,13 @@ jobs:
# _your own configuration lines_
# """
##
- name: Pip cache
uses: actions/cache@v5
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.config[0] }}-
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Initialize tox
# the bash one-liner below does not work on Windows
if: contains(matrix.os, 'ubuntu')
run: |
if [ `tox list --no-desc -f init|wc -l` = 1 ]; then tox -e init;else true; fi
if [ `uvx tox list --no-desc -f init|wc -l` = 1 ]; then uvx --with tox-uv tox -e init;else true; fi
- name: Test
run: tox -e ${{ matrix.config[2] }}
run: uvx --with tox-uv tox -e ${{ matrix.config[2] }}


##
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Generated from:
# https://github.com/plone/meta/tree/main/src/plone/meta/default
# https://github.com/plone/meta/tree/2.x/src/plone/meta/default
# See the inline comments on how to expand/tweak this configuration file
# python related
*.egg-info
Expand Down
4 changes: 2 additions & 2 deletions .meta.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Generated from:
# https://github.com/plone/meta/tree/main/src/plone/meta/default
# https://github.com/plone/meta/tree/2.x/src/plone/meta/default
# See the inline comments on how to expand/tweak this configuration file
[meta]
template = "default"
commit-id = "2.2.0"
commit-id = "2.8.0"

[tox]
test_matrix = {"6.2" = ["*"]}
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Generated from:
# https://github.com/plone/meta/tree/main/src/plone/meta/default
# https://github.com/plone/meta/tree/2.x/src/plone/meta/default
# See the inline comments on how to expand/tweak this configuration file
ci:
autofix_prs: false
Expand All @@ -10,13 +10,13 @@ repos:
rev: v3.21.2
hooks:
- id: pyupgrade
args: [--py38-plus]
args: [--py310-plus]
- repo: https://github.com/pycqa/isort
rev: 7.0.0
rev: 8.0.1
hooks:
- id: isort
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 25.12.0
rev: 26.3.1
hooks:
- id: black
- repo: https://github.com/collective/zpretty
Expand Down Expand Up @@ -44,7 +44,7 @@ repos:
# """
##
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
rev: v2.4.2
hooks:
- id: codespell
additional_dependencies:
Expand All @@ -69,7 +69,7 @@ repos:
rev: "0.24.0"
hooks:
- id: check-python-versions
args: ['--only', 'setup.py,pyproject.toml']
args: ['--only', 'setup.py,tox.ini']
- repo: https://github.com/collective/i18ndude
rev: "6.3.0"
hooks:
Expand Down
8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Generated from:
# https://github.com/plone/meta/tree/main/src/plone/meta/default
# https://github.com/plone/meta/tree/2.x/src/plone/meta/default
# See the inline comments on how to expand/tweak this configuration file
[build-system]
requires = ["setuptools>=68.2,<80", "wheel"]
requires = ["setuptools>=68.2,<83", "wheel"]



[tool.towncrier]
directory = "news/"
Expand Down Expand Up @@ -60,7 +62,7 @@ profile = "plone"
##

[tool.black]
target-version = ["py38"]
target-version = ["py310"]

##
# Add extra configuration options in .meta.toml:
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from pathlib import Path
from setuptools import setup


version = "3.0.0a2.dev0"

long_description = (
Expand All @@ -25,6 +24,9 @@
"Programming Language :: Python",
"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",
],
keywords="Plone calendar calendaring event recurring",
author="Plone Foundation",
Expand Down
1 change: 0 additions & 1 deletion src/plone/event/recurrence.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import datetime
import re


# TODO: make me configurable
MAXCOUNT = 1000 # Maximum number of occurrences

Expand Down
1 change: 0 additions & 1 deletion src/plone/event/tests/test_doctest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import os.path
import unittest


OPTIONFLAGS = doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS
DOCFILES = [
"recurrence.rst",
Expand Down
9 changes: 2 additions & 7 deletions src/plone/event/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import pytz
import time


DSTADJUST = "adjust"
DSTKEEP = "keep"
DSTAUTO = "auto"
Expand Down Expand Up @@ -556,12 +555,8 @@ def dt2int(dt):
# TODO: unit test me
if value > MAX32:
# value must be integer fitting in the 32bit range
raise OverflowError(
"""{} is not within the range of indexable dates,<<
exceeding 32bit range.""".format(
dt
)
)
raise OverflowError("""{} is not within the range of indexable dates,<<
exceeding 32bit range.""".format(dt))
return value


Expand Down
9 changes: 6 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Generated from:
# https://github.com/plone/meta/tree/main/src/plone/meta/default
# https://github.com/plone/meta/tree/2.x/src/plone/meta/default
# See the inline comments on how to expand/tweak this configuration file
[tox]
# We need 4.4.0 for constrain_package_deps.
min_version = 4.4.0
envlist =
lint
test
py314-plone62
py313-plone62
py312-plone62
py311-plone62
Expand All @@ -18,6 +19,7 @@ envlist =
# Add extra configuration options in .meta.toml:
# - to specify a custom testing combination of Plone and python versions, use `test_matrix`
# Use ["*"] to use all supported Python versions for this Plone version.
# - to disable the test matrix entirely, set `use_test_matrix = false`
# - to specify extra custom environments, use `envlist_lines`
# - to specify extra `tox` top-level options, use `config_lines`
# [tox]
Expand Down Expand Up @@ -62,9 +64,9 @@ description = check if the package defines all its dependencies
skip_install = true
deps =
build
z3c.dependencychecker==2.14.3
z3c.dependencychecker==3.0
commands =
python -m build --sdist
python -m build --wheel
dependencychecker

[testenv:dependencies-graph]
Expand Down Expand Up @@ -130,6 +132,7 @@ extras =
##
# Add extra configuration options in .meta.toml:
# [tox]
# skip_test_extra = true
# test_extras = """
# tests
# widgets
Expand Down