Skip to content

Python 3 support (the beginning)

Ed Bartosh yocto-toaster 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest16 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/16toaster: Remove DATABASE_URL being passed around as an environment varbitbake/bin/toaster bitbake/lib/bb/ui/buildinfohelper.py bitbake/lib/toaster/toastermain/management/commands/get-dburl.py +1 more+20 -780 replies
2/16bin, toaster: Fix print and exception syntaxbitbake/bin/bitbake-diffsigs bitbake/bin/bitbake-dumpsig bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py +8 more+118 -1180 replies
3/16toaster: use force_text instead of force_bytesbitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py bitbake/lib/toaster/bldcontrol/models.py+4 -40 replies
4/16toaster: use print function in toaster scriptbitbake/bin/toaster+2 -20 replies
5/16toaster: get rid of using reducebitbake/lib/toaster/toastergui/views.py bitbake/lib/toaster/toastergui/widgets.py+57 -280 replies
6/16toaster: fix imports to work for python 3bitbake/lib/bb/utils.py bitbake/lib/toaster/orm/models.py+17 -50 replies
7/16toaster: fix local importsbitbake/lib/toaster/bldcontrol/bbcontroller.py bitbake/lib/toaster/bldcontrol/localhostbecontroller.py bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py +1 more+4 -40 replies
8/16toaster: modified list of dependenciesbitbake/toaster-requirements.txt+2 -20 replies
9/16toaster: use decode('utf-8') for binary databitbake/lib/toaster/bldcontrol/localhostbecontroller.py bitbake/lib/toaster/bldcontrol/management/commands/loadconf.py bitbake/lib/toaster/orm/models.py+3 -30 replies
10/16toaster: use items and range instead of old APIsbitbake/lib/toaster/contrib/tts/config.py bitbake/lib/toaster/orm/models.py bitbake/lib/toaster/toastergui/tablefilter.py +2 more+6 -60 replies
11/16toaster: replace map with list comprehensionsbitbake/lib/toaster/orm/models.py bitbake/lib/toaster/toastergui/tables.py bitbake/lib/toaster/toastergui/views.py+20 -300 replies
12/16toaster: use 'in' instead of has_keybitbake/lib/toaster/toastermain/settings.py bitbake/lib/toaster/toastermain/urls.py+2 -20 replies
13/16toaster: use re.sub() instead of translate()bitbake/lib/toaster/toastergui/api.py+2 -10 replies
14/16toaster: use new syntax of except statementbitbake/lib/toaster/toastergui/views.py+3 -30 replies
15/16toaster: read timezone files in binary modebitbake/lib/toaster/toastermain/settings.py+3 -40 replies
16/16toaster: moved import bb.server.xmlrpcbitbake/lib/toaster/bldcontrol/bbcontroller.py+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/16] Python 3 support (the beginning)

Hi,

This is first series of patches to make Toaster working in Python 3. The series should not break Python 2 support. The code should be able to work in both Python 2 and Python 3.

This patchset doesn't change build code as it uses bitbake from master. This means that Toaster is not able to run builds in python 3 environment yet. Build machinery will be addressed in the next series.

Test instructions:
1. fetch the branch and checkout to it: git fetch contrib ed/toaster/python3 && git checkout -b python3 contrib/ed/toaster/python3
2. Test if Toaster still works in current Python 2 setup.
3. Setup python 3 virtual environment: mkvirtualenv --python=/usr/bin/python3 toaster3
4. deactivate it as next step can't be done in python 3 environment: deactivate
5. initialize build environment: . oe-oe-init-build-env
6. switch to python3 virtual env: workon toaster3
7. move toaster database: mv toaster.sqlite toaster.sqlite.backup
7. run toaster: . ../bitbake/bin/toaster start
8. Check if toaster script starts properly, fetches the layers etc
9. Check if UI is accessible, that project can be created and basic functionality(excluding building)
is not broken.

The following changes since commit 0b717a9551d23579f5293e83655bc21e139bdaa2:

toaster: tests browser Add test for creating a project (2016-05-10 12:03:44 +0100)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib ed/toaster/python3
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/toaster/python3

Ed Bartosh (14):
toaster: use force_text instead of force_bytes
toaster: use print function in toaster script
toaster: get rid of using reduce
toaster: fix imports to work for python 3
toaster: fix local imports
toaster: modified list of dependencies
toaster: use decode('utf-8') for binary data
toaster: use items and range instead of old APIs
toaster: replace map with list comprehensions
toaster: use 'in' instead of has_key
toaster: use re.sub() instead of translate()
toaster: use new syntax of except statement
toaster: read timezone files in binary mode
toaster: moved import bb.server.xmlrpc

Michael Wood (1):
toaster: Remove DATABASE_URL being passed around as an environment var

Richard Purdie (1):
bin, toaster: Fix print and exception syntax

 bitbake/bin/bitbake-diffsigs                       |   6 +-
 bitbake/bin/bitbake-dumpsig                        |   4 +-
 bitbake/bin/toaster                                |   6 +-
 bitbake/lib/bb/ui/buildinfohelper.py               |  20 +--
 bitbake/lib/bb/utils.py                            |   6 +-
 bitbake/lib/toaster/bldcontrol/bbcontroller.py     |   4 +-
 .../toaster/bldcontrol/localhostbecontroller.py    |   4 +-
 .../management/commands/checksettings.py           |  20 +--
 .../bldcontrol/management/commands/loadconf.py     |   4 +-
 .../bldcontrol/management/commands/runbuilds.py    |   4 +-
 bitbake/lib/toaster/bldcontrol/models.py           |   4 +-
 bitbake/lib/toaster/bldcontrol/tests.py            |   4 +-
 bitbake/lib/toaster/contrib/tts/config.py          |   2 +-
 .../contrib/tts/toasteruitest/run_toastertests.py  |   4 +-
 .../tts/toasteruitest/toaster_automation_test.py   | 186 ++++++++++-----------
 bitbake/lib/toaster/orm/models.py                  |  22 ++-
 bitbake/lib/toaster/toastergui/api.py              |   3 +-
 bitbake/lib/toaster/toastergui/tablefilter.py      |   2 +-
 bitbake/lib/toaster/toastergui/tables.py           |   3 +-
 bitbake/lib/toaster/toastergui/views.py            | 119 +++++++------
 bitbake/lib/toaster/toastergui/widgets.py          |  25 +--
 .../toastermain/management/commands/builddelete.py |   2 +-
 .../toastermain/management/commands/buildslist.py  |   2 +-
 .../toastermain/management/commands/get-dburl.py   |   9 -
 .../toastermain/management/commands/perf.py        |   6 +-
 bitbake/lib/toaster/toastermain/settings.py        |  78 ++-------
 bitbake/lib/toaster/toastermain/urls.py            |   2 +-
 bitbake/toaster-requirements.txt                   |   4 +-
 28 files changed, 264 insertions(+), 291 deletions(-)
 delete mode 100644 bitbake/lib/toaster/toastermain/management/commands/get-dburl.py

--
Regards,
Ed