Plone 6.0.0a1 released

The first official alpha release of Plone 6 is here!
Right in time for the trainings of the Plone Conference. If any trainers run into trouble because of last minute changes, contact me, and we can see what we can do. Note that Index of /release/6.0-dev/ remains available for quick updates if needed.

Released: Friday October 22, 2021.
Buildout versions: https://dist.plone.org/release/6.0.0a1/versions.cfg
Pip constraints: https://dist.plone.org/release/6.0.0a1/constraints.txt

Highlights

Some highlights of this release are:

  • The big one: Volto as new front-end, using React, built with modern JavaScript tools.
  • The backend is now called Plone Classic. It generally works the same as Plone 5.2, so if you are not ready for Volto yet, you can just use this.
  • Removed Python 2 and Archetypes compatibility.
  • Support only for Python 3.7, 3.8 and 3.9.
  • Zope 5.3
  • Removed CMFQuickInstallerTool dependency.
  • Removed CMFFormController dependency and removed all remaining form controller scripts (cpy/vpy).
  • Removed dependency on Products.TemporaryFolder.
    Note: in your plone.recipe.zope2instance buildout part, you must set zodb-temporary-storage = off,
    otherwise you get errors when starting Plone.
  • Extensive overhaul of Plone UI elements based on Bootstrap 5 components.
  • Introduction of icon resolver with use of icon_expr definitions.
  • Barceloneta LTS theme
  • Add control panel for relations
  • Add plone.api.relation module to ease using relations.
  • Use Dexterity for the Plone Site root object.
  • Add a traverser ++api++ as an alternative to mark a request as REST request.

Expected

There are some items that we want to include during the alpha phase, but which are not ready yet:

  • Updated JavaScript for Plone Classic, using ES6 modules. No more through-the-web compiling of JavaScript.
  • Replace z3c.autoinclude with plone.autoinclude. No more includeDependencies.
  • An updated installation method to more easily combine the node frontend and Python backend.

Installation

Some documentation about installation:

There is no Docker image for Plone 6 yet, so we will have to do the backend by hand.
The links above should give you information on how to install the prerequisites, like Python, also on Windows.
Here, we will focus on Unix-like systems (Linux, Mac OSX), but Windows should work as well.

The steps are:

  • Install the Plone (Classic) backend with buildout or pip.
  • Create the Plone Site in the browser.
  • Install the Plone frontend (Volto) with node.

Install backend with buildout

Change to a new directory and put a file buildout.cfg in it:

[buildout]
extends = https://dist.plone.org/release/6.0.0a1/versions.cfg
parts = instance

[instance]
recipe = plone.recipe.zope2instance
eggs =
    Plone
    plone.volto
user = admin:admin
zodb-temporary-storage = off

Install it with:

python3.9 -m venv .
bin/pip install -r https://dist.plone.org/release/6.0.0a1/requirements.txt
bin/buildout
bin/instance fg

Install backend with pip

If you don't want to use buildout, you can install the Plone Python packages with pip.

Change to a new directory and then:

python3.9 -m venv .
bin/pip install -U pip setuptools wheel
bin/pip install Plone plone.volto -c https://dist.plone.org/release/6.0.0a1/constraints.txt --use-deprecated legacy-resolver
bin/mkwsgiinstance -u admin:admin -d .
bin/runwsgi -v etc/zope.ini

Create Plone backend

After you have installed the backend with buildout or pip, open a browser and go to http://localhost:8080/.
If you want Plone Classic, click 'Create a new Plone site'.
If instead you want to prepare for the new Volto frontend, click the Advanced button.

In the Advanced form:

  • Make sure the Path identifier is Plone. (You can change this, but then you need to change some Volto configuration as well.)
  • uncheck 'Example content'
  • check 'Plone 6 Frontend (Default content on homepage)'
  • check 'Plone 6 Frontend (plone.volto)'

Submit the form and your backend is ready.
If you want Classic Plone, you are done.
If you want the full Plone 6 with Volto, read on.

Frontend with node

You should probably read one of documentation pages linked above.
But the following gives you the general idea.
First install nvm, the Node Version Manager

  • On Linux: apt-get install nvm
  • On Mac: brew install nvm
  • Or use the installation procedure detailed in the nvm documentation

Create a Volto project:

nvm install --lts
npm install --global yarn
npm init yo @plone/volto

This will take long, and then ask for a project name.
It will create a directory with this name.
Go to that directory and start the frontend:

yarn start

In your browser go to http://localhost:3000.
You are done. Welcome to Plone 6!

14 Likes

Whopee! :tada:

Thanks for Work!

There any script to migrate content from Plone 5.2 to Plone 6 with Volto?

Thanks Plone team for your hard work on this! And Plone release manager @mauritsvanrees of course!
Huge relief for my course tomorrow.

1 Like

Installing on an older Mac

image

(2012 Mac mini, 16GB ram, Intel Core i5) on a 40-ish Mbps connection

It took less than 12 minutes to download and install all the dependencies using the pip method mentioned above

Prerequisite dependencies will need to be in place:

Step 1 - Get Xcode 11
Xcode 12 did not work with Catalina for me. It takes some searching but this link will show Xcode 11 downloads: https://developer.apple.com/download/more/?=xcode+11

Step 2 - Get Homebrew and install dependencies
note: I'm not 100% sure about this step, perhaps step 3 below is enough to resolve the issue.
You can get it from https://homebrew.sh
Once I got homebrew, the dependencies I installed were to support the installation of Pillow:
brew install jpeg zlib

Step 3 - set the CPATH properly
export CPATH=xcrun --show-sdk-path/usr/include
(you can add this to your .zshrc or .bashrc)
You can read more about the issue here :point_right: Cannot find zlib headers on macOS 10.15 Catalina

(What to do next? Maybe try pip install for add-ons?)

1 Like

Hi,

JQ does not install on FreeBSD 13.0. Seen that before trying to install plone.volto on plone.5.2 with buildout. This is what I get now installing Plone 6 the pip-methode

No .dist-info directory after successful pip install of /tmp/tmpi2l_pbk8get_dist/jq-1.2.1.tar.gz
While:
Installing instance.
Getting distribution for 'jq==1.2.1'.

An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
File "/usr/home/zope/plone6/lib/python3.9/site-packages/zc/buildout/buildout.py", line 2219, in main
getattr(buildout, command)(args)
File "/usr/home/zope/plone6/lib/python3.9/site-packages/zc/buildout/buildout.py", line 834, in install
installed_files = self[part]._call(recipe.install)
File "/usr/home/zope/plone6/lib/python3.9/site-packages/zc/buildout/buildout.py", line 1630, in _call
return f()
File "/usr/home/zope/plone6/eggs/plone.recipe.zope2instance-6.10.2-py3.9.egg/plone/recipe/zope2instance/recipe.py", line 155, in install
installed.extend(self.install_scripts())
File "/usr/home/zope/plone6/eggs/plone.recipe.zope2instance-6.10.2-py3.9.egg/plone/recipe/zope2instance/recipe.py", line 949, in install_scripts
requirements, ws = self.egg.working_set(["plone.recipe.zope2instance"])
File "/usr/home/zope/plone6/eggs/zc.recipe.egg-2.0.7-py3.9.egg/zc/recipe/egg/egg.py", line 78, in working_set
ws = self._working_set(
File "/usr/home/zope/plone6/eggs/zc.recipe.egg-2.0.7-py3.9.egg/zc/recipe/egg/egg.py", line 161, in _working_set
ws = zc.buildout.easy_install.install(
File "/usr/home/zope/plone6/lib/python3.9/site-packages/zc/buildout/easy_install.py", line 965, in install
return installer.install(specs, working_set)
File "/usr/home/zope/plone6/lib/python3.9/site-packages/zc/buildout/easy_install.py", line 738, in install
for dist in self._get_dist(req, ws):
File "/usr/home/zope/plone6/lib/python3.9/site-packages/zc/buildout/easy_install.py", line 581, in _get_dist
dists = [_move_to_eggs_dir_and_compile(dist, self._dest)]
File "/usr/home/zope/plone6/lib/python3.9/site-packages/zc/buildout/easy_install.py", line 1889, in _move_to_eggs_dir_and_compile
[tmp_loc] = call_pip_install(dist.location, tmp_dest)
File "/usr/home/zope/plone6/lib/python3.9/site-packages/zc/buildout/easy_install.py", line 1699, in call_pip_install
distinfo_dir = [
IndexError: list index out of range

Tried the commands above and got the following traceback

 bin/instance fg
Traceback (most recent call last):
  File "/Users/davidbain/Documents/code/plonetraining/bin/instance", line 12, in <module>
    import plone.recipe.zope2instance.ctl
ModuleNotFoundError: No module named 'plone.recipe'

@mauritsvanrees it would be nice to be able to use Poetry to manage Plone at some point right now, this does ot work, because of unresolvable dependencies.
For everyone who is interested in the topic, this is how a tried to convert the constraints.txt into a pyproject.yml for poetry.

mkdir plonepoetry
cd plonepoetry
poetry init
wget https://dist.plone.org/release/6.0.0a1/constraints.txt
cat constraints.txt | xargs poetry add

I fixed some versions and removed some packages from the constraint.txt, which would not work in Python 3.8 anyway: typing, typing-extensions, futures

currently this fails with some problems around plone.app.dexterity

The advantage of Poetry is, that is allows you to define more in detail the dependencies, almost like in a package.json for nodejs. Also you can have scripts defined in the pyproject.yml too. The whole setup can be released directly by Poetry on PyPi, which will result in a Python package, containing also a pyproject.yml containing all versions (constraints). Maybe in time we could provide a pyproject.yml in the release.

1 Like

BTW there are also other ways to convert requirements/constraints to pyproject.yml, I'll try one of them i used in the past soon. Maybe that works better, but i gues we still have some problems in our dependencies.

@MrTango I hope you mean pyproject.toml, not yml, otherwise I missed an update to the Python packaging infrastructure. :slight_smile:

cat constraints.txt | xargs poetry add

I assume this installs all packages mentioned in constraints.txt. You could do that if you want, and can be useful for checking, but you will get lots of packages that you do not need. For example, you get zc.buildout and zest.releaser, which are not needed to run Plone in pip.

I am definitely interested in new ways to handle our dependency pinning. My dream:

  • zc.buildout reads the constraints.txt file instead of having its own versions. Perhaps via a buildout extension.
  • Then we can treat constraints.txt as the canonical location of our version pins.
  • Have a clear separation between packages that we want a specific version of (mostly Plone and Zope packages) and their dependencies, where using the latest version is probably fine.
  • Regularly let pip or poetry or pip-tools or another already existing tool update the version pins for the dependencies. For example, I don't care which version of requests is used in Plone, and it is probably fine to update this to five major versions higher even in a Plone bugfix release.

I do occasionally call bin/checkversions or bin/versioncheck to see if there are updates, but this is tedious and error prone. If a widely used Python packaging tool can help here, that would be welcome.

I have not yet found the proper recipe/procedure for this.

1 Like

yes, indeed :wink:

I was able to install Plone without declaring any constrains, but the UI seems a bit broken.
I get an error with the icon resolver.
But even if i take the list of installed packages from a pip install, I'll end up with unresolvable dependencies in Poetry. The main problem is, we need pyproject.toml files in the package, so that they can declare there dependencies correctly, so we get can get rid of the extra versions/constrains list.
Poetry is quite powerful finding the correct dependencies and this might take of the load of the release team in the end.

installing from https://plone.org/download/releases/6.0.0a1, I miss the src folder for local egg development. A quick way to add it? Or should I create my sources.cfg and use mr.developer? Thanks for any info.

I've solved with this buildout:

[buildout]
extends =
    https://dist.plone.org/release/6.0.0a1/versions.cfg

extensions =
    mr.developer

# useful when using git
always-checkout = force
auto-checkout =
    myaddon

parts = instance

[instance]
recipe = plone.recipe.zope2instance
eggs =
    Plone
    plone.volto
    myaddon
user = admin:admin
zodb-temporary-storage = off

[sources]
cab.unipdtheme = fs myaddon path=src

next to your eggs list, you can have a
develop = src/my.addon

but the mr.developer way works too and make more sence if you have a repositor anyway.

1 Like

Plone Foundation Code of Conduct