I invest a full working day for porting my own publishing technology "Produce & Publish" to Plone 5.2 and Python 3. This included three Plone-based add-ons and three Python-only modules. After eight hours of code juggling I was able to successfully test all Plone add-ons.
Standard problems:
implements -> @implementer
conversions using unicode() or type checks against unicode -> six.text_type
cStringIO -> io module
various import fixes
getting rid of some Python 3 incompatible modules like BeautifulSoup 3 (replaced with lxml)
very few issues with reading/writing files (text vs. bytes)
fixed a few subtle programming patterns specific to my own coding style
I did not use any Python 2 to 3 conversion tools and I did not use any unittests (we have some real world examples that I used to test directly with production data in order to check the most important and most complicated code paths).
I did not encounter any serious backend related issues but again a bunch of UI issues (possibly also existent in Plone 5.1 and unrelated to the Python version).
Sorry for bringing up this thread. But the topic is exactly what I need. My question:
if i started the porting process for my addons, what is the standard way for dealing with 'bootstrap-buildout.py' in an Add-On, . Should i use the way with
bootstrap.sh and requirements.txt
or
bootstrap-buildout.py
It probably does not matter, but does anyone have a hint for me?
I wouldn't recommend to use bootstrap-buildout.py because everybody moved to use virtualenv and requirements.txt.
I moved to use Makefiles for all my projects (Plone and others). It avoids repetitive typing (like when you create your virtualenv manually) and it has everything in one file (in comparison to multiple bootstrap.sh files).
I created a self-updating Makefile that I use for all our internal projects, for Plone coredev and for all my Open Source projects:
If you have that Makefile, you just need to run "make". We use a different Makefile for JS/React projects but whatever you do, you checkout the repo and run "make". This drastically reduces the mental overhead for our devs. Feel free to use it!