Skip to content

Commit

Permalink
Merge branch '7.x.x' into erral-7.x.x-site-and-navroot
Browse files Browse the repository at this point in the history
  • Loading branch information
davisagli authored Oct 14, 2023
2 parents 0bff950 + 3bdb4f5 commit 99db182
Show file tree
Hide file tree
Showing 11 changed files with 90 additions and 33 deletions.
78 changes: 54 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,8 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.7, 3.6, 2.7]
plone-version: [5.2, 5.1, 4.3]
exclude:
- python-version: 3.6
plone-version: 4.3
- python-version: 3.6
plone-version: 5.0
- python-version: 3.6
plone-version: 5.1
- python-version: 3.7
plone-version: 4.3
- python-version: 3.7
plone-version: 5.0
- python-version: 3.7
plone-version: 5.1
- python-version: 3.8
plone-version: 4.3
- python-version: 3.8
plone-version: 5.0
- python-version: 3.8
plone-version: 5.1
python-version: [3.8, 3.7]
plone-version: [5.2]

steps:
# git checkout
Expand All @@ -42,7 +23,7 @@ jobs:
- uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
Expand All @@ -64,7 +45,7 @@ jobs:

# build sphinx
- name: sphinx
run: if [ "${{ matrix.plone-version }}" == "5.2" ] && [ ${{ matrix.python-version }} == '3.7' ]; then bin/sphinxbuilder; fi
run: if [ "${{ matrix.plone-version }}" == "5.2" ] && [ ${{ matrix.python-version }} == '3.8' ]; then bin/sphinxbuilder; fi

# test
- name: test
Expand All @@ -79,4 +60,53 @@ jobs:

# test sphinx warnings
- name: sphinx
run: if [ "${{ matrix.plone-version }}" == "5.2" ] && [ ${{ matrix.python-version }} == '3.7' ]; then bin/test-no-sphinx-warnings; fi
run: if [ "${{ matrix.plone-version }}" == "5.2" ] && [ ${{ matrix.python-version }} == '3.8' ]; then bin/test-no-sphinx-warnings; fi

build-py2:
runs-on: ubuntu-20.04
container:
image: python:2.7.18-buster
strategy:
fail-fast: false
matrix:
python-version: [2.7]
plone-version: [5.2, 5.1, 4.3]

steps:
# git checkout
- uses: actions/checkout@v2

# python cache
- uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
# python install
- run: pip install virtualenv
- run: pip install wheel
- name: pip install
run: pip install -r requirements.txt

# buildout
- name: buildout
run: buildout -t 10 -c plone-${{ matrix.plone-version }}.x.cfg code-analysis:return-status-codes=True
env:
CI: true

# code analysis
- name: code analysis
run: bin/code-analysis

# test
- name: test
run: bin/test

# test no uncommited changes
- name: test no uncommited changes
run: bin/test-no-uncommitted-doc-changes
env:
PYTHON_VERSION: ${{ matrix.python-version }}
PLONE_VERSION: ${{ matrix.plone-version }}
9 changes: 9 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ Changelog
.. towncrier release notes start
7.8.3 (2023-09-21)
------------------

Bug fixes:


- Fix content serializer with an old version of an item that was renamed. @davisagli (#1651)


7.8.2 (2023-04-19)
------------------

Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ exclude docs/Makefile
prune docs/Makefile
prune src/plone/restapi/tests/images
prune news
prune performance
global-exclude *.pyc
include pyproject.toml
1 change: 0 additions & 1 deletion news/1651.bugfix

This file was deleted.

2 changes: 2 additions & 0 deletions news/1721.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
New version pins to run tests
[erral]
6 changes: 6 additions & 0 deletions plone-4.3.x.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,9 @@ six = 1.12.0

# latest version compatible with Python 2
plone.schema = 1.4.0

# latest version compatible with Python 2
sphinxcontrib-websupport = 1.1.2
stdlib-list = 0.6.0
zest.pocompile = 1.6.0
plone.rest = 3.0.2
3 changes: 3 additions & 0 deletions plone-5.1.x.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ pyparsing = 2.4.7

# Required by plone.restapi
six = 1.12.0
stdlib-list = 0.6.0
zest.pocompile= 1.6.0
plone.rest = 3.0.2
1 change: 1 addition & 0 deletions plone-5.2.x.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ importlib-metadata = 2.0.0

# latest version compatible with Python 2
flake8-print = 4.0.1
zest.pocompile= 1.6.0
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from setuptools import setup, find_packages

version = "7.8.3.dev0"
version = "7.8.4.dev0"


def read(filename):
Expand Down
14 changes: 10 additions & 4 deletions src/plone/restapi/tests/test_dxfield_serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,20 @@ def setUp(self):
]

def serialize(self, fieldname, value):
field = None
for schema in iterSchemata(self.doc1):
if fieldname in schema:
field = schema.get(fieldname)
break
dm = getMultiAdapter((self.doc1, field), IDataManager)
dm.set(value)
serializer = getMultiAdapter((field, self.doc1, self.request), IFieldSerializer)
return serializer()
if field is not None:
dm = getMultiAdapter((self.doc1, field), IDataManager)
dm.set(value)
serializer = getMultiAdapter(
(field, self.doc1, self.request), IFieldSerializer
)
return serializer()

return None

def test_ascii_field_serialization_returns_unicode(self):
value = self.serialize("test_ascii_field", "foo")
Expand Down
6 changes: 3 additions & 3 deletions test-no-uncommitted-doc-changes.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ function red {
echo "$RED $1 $RESET"
}

if [ "$PLONE_VERSION" == "5.2" ] && [ "$PYTHON_VERSION" == '3.7' ]; then
echo "Running check for undocumented changes for Plone 5.2.x on Python 3.7"
if [ "$PLONE_VERSION" == "5.2" ] && [ "$PYTHON_VERSION" == '3.8' ]; then
echo "Running check for undocumented changes for Plone 5.2.x on Python 3.8"
else
# request/response dumps have known differences for Plone 5
# => skip, we can't have the Plone 5 build fail because of those
echo "Skipping checks for undocumented changes for everything except Plone 5.2.x on Python 3.7"
echo "Skipping checks for undocumented changes for everything except Plone 5.2.x on Python 3.8"
exit 0
fi

Expand Down

0 comments on commit 99db182

Please sign in to comment.