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 .github/workflows/test-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,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 Down
17 changes: 6 additions & 11 deletions .meta.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# See the inline comments on how to expand/tweak this configuration file
[meta]
template = "default"
commit-id = "2.3.1"
commit-id = "2.5.1"

[pre_commit]
codespell_extra_lines = """
Expand Down Expand Up @@ -46,8 +46,7 @@ constrain_package_deps = True
package = editable
allowlist_externals =
mkdir
extras =
tests
extras = {[base]extras}
deps =
-r requirements-docs.txt
commands =
Expand All @@ -60,8 +59,7 @@ commands =
basepython = python3.11
skip_install = False
constrain_package_deps = True
extras =
tests
extras = {[base]extras}
deps =
-r requirements-docs.txt
commands =
Expand All @@ -74,8 +72,7 @@ skip_install = False
usedevelop = True
allowlist_externals =
mkdir
extras =
tests
extras = {[base]extras}

deps =
-r requirements-docs.txt
Expand All @@ -95,8 +92,7 @@ constrain_package_deps = True
package = editable
allowlist_externals =
mkdir
extras =
{[testenv:plone6docs]extras}
extras = {[base]extras}
deps =
{[testenv:plone6docs]deps}
commands =
Expand All @@ -111,8 +107,7 @@ constrain_package_deps = True
package = editable
allowlist_externals =
mkdir
extras =
{[testenv:plone6docs]extras}
extras = {[base]extras}
deps =
{[testenv:plone6docs]deps}
commands =
Expand Down
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ ci:

repos:
- repo: https://github.com/asottile/pyupgrade
rev: v3.21.0
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.9.0
rev: 26.1.0
hooks:
- id: black
- repo: https://github.com/collective/zpretty
Expand Down Expand Up @@ -63,16 +63,16 @@ repos:
hooks:
- id: check-manifest
- repo: https://github.com/regebro/pyroma
rev: "5.0"
rev: "5.0.1"
hooks:
- id: pyroma
- repo: https://github.com/mgedmin/check-python-versions
rev: "0.23.0"
rev: "0.24.0"
hooks:
- id: check-python-versions
args: ['--only', 'setup.py,pyproject.toml']
- repo: https://github.com/collective/i18ndude
rev: "6.2.1"
rev: "6.3.0"
hooks:
- id: i18ndude

Expand Down
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import sys


project = "plone.api"
copyright = "2012, Plone Foundation"

Expand Down
1 change: 0 additions & 1 deletion fix-converted-myst.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import os
import re


logging.basicConfig()
logger = logging.getLogger("fix converted MyST documentation")
logger.setLevel(logging.INFO)
Expand Down
1 change: 1 addition & 0 deletions news/+meta.internal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update configuration files @plone
16 changes: 8 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# https://github.com/plone/meta/tree/main/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 All @@ -14,32 +14,32 @@ underlines = ["", "", ""]

[[tool.towncrier.type]]
directory = "breaking"
name = "Breaking changes:"
name = "Breaking changes"
showcontent = true

[[tool.towncrier.type]]
directory = "feature"
name = "New features:"
name = "New features"
showcontent = true

[[tool.towncrier.type]]
directory = "bugfix"
name = "Bug fixes:"
name = "Bug fixes"
showcontent = true

[[tool.towncrier.type]]
directory = "internal"
name = "Internal:"
name = "Internal"
showcontent = true

[[tool.towncrier.type]]
directory = "documentation"
name = "Documentation:"
name = "Documentation"
showcontent = true

[[tool.towncrier.type]]
directory = "tests"
name = "Tests:"
name = "Tests"
showcontent = true

##
Expand All @@ -62,7 +62,7 @@ profile = "plone"
##

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

##
# Add extra configuration options in .meta.toml:
Expand Down
1 change: 0 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.0a3.dev0"

long_description = "\n".join(
Expand Down
28 changes: 12 additions & 16 deletions src/plone/api/addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,11 @@
from plone.base.utils import get_installer
from Products.CMFPlone.controlpanel.browser.quickinstaller import InstallerView
from Products.GenericSetup import EXTENSION
from typing import Dict
from typing import List
from typing import Tuple
from zope.component import getAllUtilitiesRegisteredFor
from zope.globalrequest import getRequest

import logging


logger = logging.getLogger("plone.api.addon")


Expand All @@ -39,8 +35,8 @@
class NonInstallableAddons:
"""Set of add-ons not available for installation."""

profiles: List[str]
products: List[str]
profiles: list[str]
products: list[str]


@dataclass
Expand All @@ -52,14 +48,14 @@ class AddonInformation:
title: str
description: str

upgrade_profiles: Dict
other_profiles: List[List]
install_profile: Dict
uninstall_profile: Dict
upgrade_profiles: dict
other_profiles: list[list]
install_profile: dict
uninstall_profile: dict
profile_type: str
upgrade_info: Dict
upgrade_info: dict
valid: bool
flags: List[str]
flags: list[str]

def __repr__(self) -> str:
"""Return a string representation of this object."""
Expand Down Expand Up @@ -98,7 +94,7 @@ def _get_non_installable_addons() -> NonInstallableAddons:


@lru_cache(maxsize=1)
def _cached_addons() -> Tuple[Tuple[str, AddonInformation]]:
def _cached_addons() -> tuple[tuple[str, AddonInformation]]:
"""Return information about add-ons in this installation.

:returns: Tuple of tuples with add-on id and AddonInformation.
Expand Down Expand Up @@ -198,7 +194,7 @@ def _update_addon_info(
return addon


def _get_addons() -> List[AddonInformation]:
def _get_addons() -> list[AddonInformation]:
"""Return an updated list of add-on information.

:returns: List of AddonInformation.
Expand All @@ -212,7 +208,7 @@ def _get_addons() -> List[AddonInformation]:
return result


def get_addons(limit: str = "") -> List[AddonInformation]:
def get_addons(limit: str = "") -> list[AddonInformation]:
"""List add-ons in this Plone site.

:param limit: Limit list of add-ons.
Expand All @@ -239,7 +235,7 @@ def get_addons(limit: str = "") -> List[AddonInformation]:
return addons


def get_addon_ids(limit: str = "") -> List[str]:
def get_addon_ids(limit: str = "") -> list[str]:
"""List add-ons ids in this Plone site.

:param limit: Limit list of add-ons.
Expand Down
1 change: 0 additions & 1 deletion src/plone/api/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import transaction
import uuid


_marker = []

# Maximum number of attempts to generate a unique random ID
Expand Down
1 change: 0 additions & 1 deletion src/plone/api/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import traceback
import Zope2


IS_TEST = None


Expand Down
1 change: 0 additions & 1 deletion src/plone/api/portal.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import datetime as dtime
import re


logger = getLogger("plone.api.portal")

try:
Expand Down
1 change: 0 additions & 1 deletion src/plone/api/relation.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

import logging


try:
distribution("plone.app.iterate")
except PackageNotFoundError:
Expand Down
1 change: 0 additions & 1 deletion src/plone/api/tests/test_addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import unittest


ADDON = "plone.session"


Expand Down
1 change: 0 additions & 1 deletion src/plone/api/tests/test_doctests.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import re
import unittest


logger = getLogger(__name__)

try:
Expand Down
1 change: 0 additions & 1 deletion src/plone/api/tests/test_portal.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import DateTime
import unittest


try:
# Python 3
from email import message_from_bytes
Expand Down
Loading