Tryton - Issues

 

Issue7488

Title Update to Python 3
Priority feature Status testing
Superseder Nosy List Timitos, ced, pokoli, reviewbot
Type feature request Components tryton
Assigned To ced Keywords Python3, review
Reviews 48431002
View: 48431002

Created on 2018-06-01.14:00:32 by ced, last changed by reviewbot.

Messages
review48431002 updated at https://codereview.tryton.org/48431002/#ps200001
review48431002 updated at https://codereview.tryton.org/48431002/#ps180001
review48431002 updated at https://codereview.tryton.org/48431002/#ps160001
msg41369 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-06-12.09:57:22
While testing the latest patchset I get the following issues. 


On a treeview when clicking on a header in order to sort the column I get the following error:

Traceback (most recent call last):
  File "/home/sergi/projectes/nclone/tryton-py3/tryton/gui/window/view_form/view/list.py", line 570, in sort_model
    model.sort(ids)
  File "/home/sergi/projectes/nclone/tryton-py3/tryton/gui/window/view_form/view/list.py", line 161, in sort
    self.group.sort(lambda x, y:
TypeError: must use keyword argument for key function

If you write a " on the searcher textbox the following excpetion is raised:

Traceback (most recent call last):
  File "/home/sergi/projectes/nclone/tryton-py3/tryton/common/domain_parser.py", line 903, in parse
    return simplify(rlist(tokens))
  File "/home/sergi/projectes/nclone/tryton-py3/tryton/common/domain_parser.py", line 60, in rlist
    return [rlist(x) for x in value]
  File "/home/sergi/projectes/nclone/tryton-py3/tryton/common/domain_parser.py", line 60, in <listcomp>
    return [rlist(x) for x in value]
  File "/home/sergi/projectes/nclone/tryton-py3/tryton/common/domain_parser.py", line 1144, in parse_clause
    for clause in tokens:
  File "/home/sergi/projectes/nclone/tryton-py3/tryton/common/domain_parser.py", line 811, in operatorize
    cur = next(tokens)
  File "/home/sergi/projectes/nclone/tryton-py3/tryton/common/domain_parser.py", line 811, in operatorize
    cur = next(tokens)
  File "/home/sergi/projectes/nclone/tryton-py3/tryton/common/domain_parser.py", line 1129, in group
    for token in tokens:
  File "/home/sergi/projectes/nclone/tryton-py3/tryton/common/domain_parser.py", line 783, in parenthesize
    for token in tokens:
  File "/home/sergi/projectes/nclone/tryton-py3/tryton/common/domain_parser.py", line 84, in group_operator
    cur = next(tokens)
  File "/usr/lib/python3.5/shlex.py", line 263, in __next__
    token = self.get_token()
  File "/usr/lib/python3.5/shlex.py", line 90, in get_token
    raw = self.read_token()
  File "/usr/lib/python3.5/shlex.py", line 166, in read_token
    raise ValueError("No closing quotation")
ValueError: No closing quotation

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/sergi/projectes/nclone/tryton-py3/tryton/gui/window/view_form/view/screen_container.py", line 501, in focus_in
    self.update()
  File "/home/sergi/projectes/nclone/tryton-py3/tryton/gui/window/view_form/view/screen_container.py", line 340, in update
    res = self.screen.search_complete(self.get_text())
  File "/home/sergi/projectes/nclone/tryton-py3/tryton/gui/window/view_form/screen/screen.py", line 241, in search_complete
    return list(self.domain_parser.completion(search_string))
  File "/home/sergi/projectes/nclone/tryton-py3/tryton/common/domain_parser.py", line 996, in completion
    domain = self.parse(input_)
  File "/home/sergi/projectes/nclone/tryton-py3/tryton/common/domain_parser.py", line 905, in parse
    if exception.message == 'No closing quotation':
AttributeError: 'ValueError' object has no attribute 'message'
review48431002 updated at https://codereview.tryton.org/48431002/#ps140001
review48431002 updated at https://codereview.tryton.org/48431002/#ps120001
review48431002 updated at https://codereview.tryton.org/48431002/#ps100001
msg41297 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-06-07.10:39:57
msg41294 is not linked to Python3 changes, please report in a new issue.
msg41295 is fixed in last patch set.

It will be great before reporting an Python3 issue to test on the Python2 version if the bug does not already exists.
msg41295 (view) Author: [hidden] (Timitos) Date: 2018-06-07.09:55:47
This happens when i try to add a new note:

Traceback (most recent call last):
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/gui/window/win_form.py", line 292, in _sig_new
    self.screen.new()
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/gui/window/view_form/screen/screen.py", line 564, in new
    self.switch_view('form')
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/gui/window/view_form/screen/screen.py", line 494, in switch_view
    self.load_view_to_load()
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/gui/window/view_form/screen/screen.py", line 515, in load_view_to_load
    self.add_view_id(view_id, view_type)
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/gui/window/view_form/screen/screen.py", line 528, in add_view_id
    return self.add_view(view)
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/gui/window/view_form/screen/screen.py", line 553, in add_view
    view = View.parse(self, xml_dom, view.get('field_childs'))
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/gui/window/view_form/view/__init__.py", line 46, in parse
    return ViewForm(screen, root)
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/gui/window/view_form/view/form.py", line 172, in __init__
    container = self.parse(xml)
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/gui/window/view_form/view/form.py", line 210, in parse
    widget = parser(node, container, node_attrs)
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/gui/window/view_form/view/form.py", line 367, in _parse_field
    widget = Widget(self, attributes)
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/gui/window/view_form/view/form_gtk/calendar.py", line 133, in __init__
    self.entry = self.mnemonic_widget = DateTimeEntry()
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/common/datetime_.py", line 412, in __init__
    self.__time = Time()
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/common/datetime_.py", line 262, in __init__
    self.update_model()
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/common/datetime_.py", line 288, in update_model
    self.__format)
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/common/datetime_.py", line 499, in timelist_set_list
    time = datetime.time(hour, minute)
TypeError: integer argument expected, got float
msg41294 (view) Author: [hidden] (Timitos) Date: 2018-06-07.09:54:35
Got this when i switched the model of the client to "PDA" and tried to open the party form view.

Traceback (most recent call last):
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/gui/window/view_form/view/list.py", line 994, in __sig_switch
    if not self.screen.row_activate() and self.children_field:
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/gui/window/view_form/screen/screen.py", line 471, in default_row_activate
    self.switch_view(view_type='form')
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/gui/window/view_form/screen/screen.py", line 494, in switch_view
    self.load_view_to_load()
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/gui/window/view_form/screen/screen.py", line 515, in load_view_to_load
    self.add_view_id(view_id, view_type)
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/gui/window/view_form/screen/screen.py", line 528, in add_view_id
    return self.add_view(view)
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/gui/window/view_form/screen/screen.py", line 553, in add_view
    view = View.parse(self, xml_dom, view.get('field_childs'))
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/gui/window/view_form/view/__init__.py", line 46, in parse
    return ViewForm(screen, root)
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/gui/window/view_form/view/form.py", line 172, in __init__
    container = self.parse(xml)
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/gui/window/view_form/view/form.py", line 210, in parse
    widget = parser(node, container, node_attrs)
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/gui/window/view_form/view/form.py", line 307, in _parse_notebook
    self.parse(node, notebook)
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/gui/window/view_form/view/form.py", line 210, in parse
    widget = parser(node, container, node_attrs)
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/gui/window/view_form/view/form.py", line 339, in _parse_page
    container = self.parse(node)
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/gui/window/view_form/view/form.py", line 210, in parse
    widget = parser(node, container, node_attrs)
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/gui/window/view_form/view/form.py", line 367, in _parse_field
    widget = Widget(self, attributes)
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/gui/window/view_form/view/form_gtk/one2many.py", line 191, in __init__
    limit=None)
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/gui/window/view_form/screen/screen.py", line 140, in __init__
    self.switch_view()
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/gui/window/view_form/screen/screen.py", line 494, in switch_view
    self.load_view_to_load()
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/gui/window/view_form/screen/screen.py", line 515, in load_view_to_load
    self.add_view_id(view_id, view_type)
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/gui/window/view_form/screen/screen.py", line 528, in add_view_id
    return self.add_view(view)
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/gui/window/view_form/screen/screen.py", line 553, in add_view
    view = View.parse(self, xml_dom, view.get('field_childs'))
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/gui/window/view_form/view/__init__.py", line 46, in parse
    return ViewForm(screen, root)
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/gui/window/view_form/view/form.py", line 172, in __init__
    container = self.parse(xml)
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/gui/window/view_form/view/form.py", line 210, in parse
    widget = parser(node, container, node_attrs)
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/gui/window/view_form/view/form.py", line 250, in _parse_label
    container.add(None, attributes)
  File "/home/kpreisler/dev/tryton-client/trytondev/tryton/gui/window/view_form/view/form.py", line 140, in add
    self.table.pack_start(widget, expand=expand, fill=fill, padding=2)
  File "/usr/lib/python3/dist-packages/pygtkcompat/pygtkcompat.py", line 318, in pack_start
    orig_pack_start(self, child, expand, fill, padding)
TypeError: Argument 1 does not allow None as a value
review48431002 updated at https://codereview.tryton.org/48431002/#ps80001
msg41281 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-06-06.16:24:36
Should be fixed with last patch set.
msg41277 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-06-06.15:40:44
The client freezes when uploading a file using the binary widget. It can be reproduced by creating a new attachment on any record. 
It seems a memory leak as the process have gone up to 4GB of RAM when uploading a 4kb file.
review48431002 updated at https://codereview.tryton.org/48431002/#ps60001
review48431002 updated at https://codereview.tryton.org/48431002/#ps40001
msg41175 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-06-01.14:19:25
https://goocalendar.tryton.org/bug11 is needed to support calendar.
msg41173 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-06-01.14:03:25
Here is review48431002
I tested most of the functionality and I had to fix many small issues, more than I expected. So it will be great to have many testers.
msg41172 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-06-01.14:00:31
It is the only missing piece of code that does not run under Python3.
The plan was always to convert all the code at once and not support both python version.
History
Date User Action Args
2018-06-20 10:33:43reviewbotsetmessages: + msg41486
2018-06-19 16:27:13reviewbotsetmessages: + msg41475
2018-06-12 12:00:30reviewbotsetmessages: + msg41378
2018-06-12 09:57:23pokolisetmessages: + msg41369
2018-06-12 09:34:41reviewbotsetmessages: + msg41367
2018-06-07 13:02:29reviewbotsetmessages: + msg41302
2018-06-07 11:00:15reviewbotsetmessages: + msg41299
2018-06-07 10:39:57cedsetmessages: + msg41297
2018-06-07 09:55:47Timitossetmessages: + msg41295
2018-06-07 09:54:35Timitossetnosy: + Timitos
messages: + msg41294

Showing 10 items. Show all history (warning: this could be VERY long)