Is Archetypes compatible with Python 3?

Hi everyone,

yes, I haven't tested this so far, but I'm curious if someone ever tried it or what the state of the art is at the moment.

Any sharing of experience appreciated, thanks
Ramon

There is no life for Archetypes under Python 3.
Amen.

Archetypes is dead dead dead. RIP.

Okay, thanks.

According to your answers I assume, that each instance must be 100% AT-free before even thinking about moving to Python 3?

Just to get me right, we're not trying to use AT based contents in the future (or reincarnate them to new glory), but rather be able to switch to Python 3 with a partly migrated Plone 5.2.x system, where more complex AT based contents with custom fields and widgets are not fully migrated yet.

Thanks again,
Ramon

This is not possible. Get rid of all AT stuff before migrating to Python 3.

Thanks @pbauer for your answer.

Just one question to you, because as far as I have seen you did a lot of the migration work of Plone to Python 3 (thanks for all of your efforts at this point!).
What is the technical reason why AT cannot be ported like e.g. the usage of six etc.? I haven't yet gathered too much experience with the whole migration story, this is why I'm asking (not because I love AT so much;).

Thanks, Ramon

Why? Possibly because Dexterity is around for a decade or so and for obvious reasons nobody has any interest in working with the Archetypes code cruft which is almost two decades old. Dexterity has conceptually some flaws - after a decade - but AT is truly something that nobody wants to maintain anymore...it could be a hobbist project porting AT to Python3 but you are likely on your own here :slight_smile:

1 Like

What @zopyx said. It is also very likely much more work to port AT to Python 3 that migrating the remaining types, fields and widgets.

By the way: The community might benefit from publishing custom fields and widgets for zc3.form (i.e. dexterity). Do you have specs for your custom fields and widgets?

Probably these fields and widgets do not make too much sense out of the LIMS context we're using it:

We have currently quite often the RecordsField in use, which was originally located here:

and this is how we use it to define e.g. analysis specifications:

A custom UID reference field, which make extensive usage of the uid_catalog to provide a lightweight way to reference other objects, like e.g. here:

and widgets that display our ReactJS listing component, like e.g.:

and this is the ReactJS listing component that is used inside the widget:

Although each field/widget isn't rocket-science in complexity, it is a lot of work to get them all ported to z3c.form, that's the reason I tried to figure out if it is quicker to port Archetypes to Python 3 or rewrite + migrate our existing contents to Dexterity.

I think the latter option came out now more clear to me.

Thanks again for taking the time for your answers, much appreciated
Ramon

Just a quick braindump: In a recent migration-projects we replaced all recordfields with datagrid-fields:

old: pcp.contenttypes/common.py at feature/plone52 · EUDAT-DPMT/pcp.contenttypes · GitHub
new: pcp.contenttypes/common.py at feature/plone52 · EUDAT-DPMT/pcp.contenttypes · GitHub

1 Like