Skip to content

Fixed Python 3.8 incompatibility - #2128

Merged
HelioGuilherme66 merged 4 commits into
robotframework:masterfrom
Nyral:Nyral/python38
Feb 14, 2020
Merged

HelioGuilherme66 merged 4 commits into
robotframework:masterfrom
Nyral:Nyral/python38

Conversation

@Nyral

@Nyral Nyral commented Jan 31, 2020 •

Copy link
Copy Markdown
Contributor

I found 2 main issues:

  • set locale error
  • configobj not parsing setting.cfg correctly (updated to a newer version of the lib)

Minor issue:

  • zoom factor not initializing with correct value when opening preferences

#1975 #2039 #2060

@Nyral Nyral self-assigned this Jan 31, 2020
@Nyral Nyral added Python3.8 Observed in Python 3.8 WORK IN PROGRESS PR not ready to merge. Or Issue being worked on. labels Jan 31, 2020
@Nyral Nyral removed the WORK IN PROGRESS PR not ready to merge. Or Issue being worked on. label Jan 31, 2020
@HelioGuilherme66 HelioGuilherme66 added this to the v2.0 milestone Feb 3, 2020
@HelioGuilherme66

Copy link
Copy Markdown
Member

@Nyral Unit Tests are failing because of new configobj. Seems that there are problems with unrepr objects and ASCII writing.
This is on my Fedora 31, Python 3.7.6:

[helio@localhost RIDE]$ invoke test
............................................./usr/lib64/python3.7/unittest/case.py:573: RuntimeWarning: TestResult has no addExpectedFailure method, reporting as passes
  RuntimeWarning)
.....................................................................................................................................................................................................................................................SS....S.......S...SSS......................S...SSS.......................................................................................................................................................S...........................................................................................................................................................................................................................................................................................................................E.E..................E..EE..EE................................................................
(invoke:7836): Gtk-WARNING **: 22:28:14.023: Theme directory apps/16 of theme deepin-plus-all-light has no size field

...............................................................................................................
======================================================================
ERROR: test_initialize_settings_raises_exception_when_invalid_user_settings (settings.test_settings.TestInitializeSettings)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home2/helio/github/RIDE/src/robotide/preferences/settings.py", line 85, in __init__
    self._old_settings = ConfigObj(user_path, unrepr=True)
  File "/home2/helio/github/RIDE/src/robotide/preferences/configobj.py", line 1228, in __init__
    self._load(infile, configspec)
  File "/home2/helio/github/RIDE/src/robotide/preferences/configobj.py", line 1317, in _load
    raise error
  File "<string>", line None
robotide.preferences.configobj.UnreprError: Parse error from unrepr-ing value at line 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home2/helio/github/RIDE/src/robotide/preferences/settings.py", line 60, in _copy_or_migrate_user_settings
    SettingsMigrator(source_path, settings_path).migrate()
  File "/home2/helio/github/RIDE/src/robotide/preferences/settings.py", line 90, in __init__
    (user_path, err))
robotide.preferences.settings.ConfigurationError: Invalid config file '/home2/helio/github/RIDE/utest/settings/ride/user.cfg': Parse error from unrepr-ing value at line 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home2/helio/github/RIDE/src/robotide/preferences/settings.py", line 85, in __init__
    self._old_settings = ConfigObj(user_path, unrepr=True)
  File "/home2/helio/github/RIDE/src/robotide/preferences/configobj.py", line 1228, in __init__
    self._load(infile, configspec)
  File "/home2/helio/github/RIDE/src/robotide/preferences/configobj.py", line 1317, in _load
    raise error
  File "<string>", line None
robotide.preferences.configobj.UnreprError: Parse error from unrepr-ing value at line 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home2/helio/github/RIDE/utest/settings/test_settings.py", line 343, in test_initialize_settings_raises_exception_when_invalid_user_settings
    initialize_settings(self.settings_path, 'user.cfg')
  File "/home2/helio/github/RIDE/src/robotide/preferences/settings.py", line 38, in initialize_settings
    SETTINGS_DIRECTORY, path, dest_file_name)
  File "/home2/helio/github/RIDE/src/robotide/preferences/settings.py", line 72, in _copy_or_migrate_user_settings
    SettingsMigrator(source_path, settings_path).merge()
  File "/home2/helio/github/RIDE/src/robotide/preferences/settings.py", line 90, in __init__
    (user_path, err))
robotide.preferences.settings.ConfigurationError: Invalid config file '/home2/helio/github/RIDE/utest/settings/ride/user.cfg': Parse error from unrepr-ing value at line 1.

======================================================================
ERROR: test_invalid_settings (settings.test_settings.TestInvalidSettings)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home2/helio/github/RIDE/src/robotide/preferences/settings.py", line 417, in __init__
    _Section.__init__(self, ConfigObj(user_path, unrepr=True))
  File "/home2/helio/github/RIDE/src/robotide/preferences/configobj.py", line 1228, in __init__
    self._load(infile, configspec)
  File "/home2/helio/github/RIDE/src/robotide/preferences/configobj.py", line 1317, in _load
    raise error
  File "<string>", line None
robotide.preferences.configobj.UnreprError: Parse error from unrepr-ing value at line 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home2/helio/github/RIDE/utest/settings/test_settings.py", line 38, in test_invalid_settings
    settings = Settings(self.user_settings_path)
  File "/home2/helio/github/RIDE/src/robotide/preferences/settings.py", line 419, in __init__
    raise ConfigurationError(error)
robotide.preferences.settings.ConfigurationError: Parse error from unrepr-ing value at line 1.

======================================================================
ERROR: test_multiple_settings (settings.test_settings.TestSettingTypes)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home2/helio/github/RIDE/utest/settings/test_settings.py", line 88, in test_multiple_settings
    'int': 1, 'float': 2.4})
  File "/home2/helio/github/RIDE/utest/settings/test_settings.py", line 92, in _test_settings_types
    self.settings[key] = value
  File "/home2/helio/github/RIDE/src/robotide/preferences/settings.py", line 319, in __setitem__
    self.set(name, value)
  File "/home2/helio/github/RIDE/src/robotide/preferences/settings.py", line 377, in set
    self.save()
  File "/home2/helio/github/RIDE/src/robotide/preferences/settings.py", line 423, in save
    self._config_obj.write()
  File "/home2/helio/github/RIDE/src/robotide/preferences/configobj.py", line 2118, in write
    'ascii')
UnicodeEncodeError: 'ascii' codec can't encode character '\xe4' in position 53: ordinal not in range(128)

======================================================================
ERROR: test_writing_list_setting (settings.test_settings.TestSettingTypes)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home2/helio/github/RIDE/utest/settings/test_settings.py", line 57, in test_writing_list_setting
    {'unicode_string': [1, 'string', u'non-ascii character \xe4']})
  File "/home2/helio/github/RIDE/utest/settings/test_settings.py", line 92, in _test_settings_types
    self.settings[key] = value
  File "/home2/helio/github/RIDE/src/robotide/preferences/settings.py", line 319, in __setitem__
    self.set(name, value)
  File "/home2/helio/github/RIDE/src/robotide/preferences/settings.py", line 377, in set
    self.save()
  File "/home2/helio/github/RIDE/src/robotide/preferences/settings.py", line 423, in save
    self._config_obj.write()
  File "/home2/helio/github/RIDE/src/robotide/preferences/configobj.py", line 2118, in write
    'ascii')
UnicodeEncodeError: 'ascii' codec can't encode character '\xe4' in position 52: ordinal not in range(128)

======================================================================
ERROR: test_writing_multiline_string_setting (settings.test_settings.TestSettingTypes)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home2/helio/github/RIDE/utest/settings/test_settings.py", line 78, in test_writing_multiline_string_setting
    self._test_settings_types({'multiline': multiline})
  File "/home2/helio/github/RIDE/utest/settings/test_settings.py", line 92, in _test_settings_types
    self.settings[key] = value
  File "/home2/helio/github/RIDE/src/robotide/preferences/settings.py", line 319, in __setitem__
    self.set(name, value)
  File "/home2/helio/github/RIDE/src/robotide/preferences/settings.py", line 377, in set
    self.save()
  File "/home2/helio/github/RIDE/src/robotide/preferences/settings.py", line 423, in save
    self._config_obj.write()
  File "/home2/helio/github/RIDE/src/robotide/preferences/configobj.py", line 2118, in write
    'ascii')
UnicodeEncodeError: 'ascii' codec can't encode character '\xe4' in position 53: ordinal not in range(128)

======================================================================
ERROR: test_writing_tuple_setting (settings.test_settings.TestSettingTypes)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home2/helio/github/RIDE/utest/settings/test_settings.py", line 61, in test_writing_tuple_setting
    {'unicode_string': (1, 'string', u'non-ascii character \xe4')})
  File "/home2/helio/github/RIDE/utest/settings/test_settings.py", line 92, in _test_settings_types
    self.settings[key] = value
  File "/home2/helio/github/RIDE/src/robotide/preferences/settings.py", line 319, in __setitem__
    self.set(name, value)
  File "/home2/helio/github/RIDE/src/robotide/preferences/settings.py", line 377, in set
    self.save()
  File "/home2/helio/github/RIDE/src/robotide/preferences/settings.py", line 423, in save
    self._config_obj.write()
  File "/home2/helio/github/RIDE/src/robotide/preferences/configobj.py", line 2118, in write
    'ascii')
UnicodeEncodeError: 'ascii' codec can't encode character '\xe4' in position 52: ordinal not in range(128)

======================================================================
ERROR: test_writing_unicode_setting (settings.test_settings.TestSettingTypes)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home2/helio/github/RIDE/utest/settings/test_settings.py", line 53, in test_writing_unicode_setting
    {'unicode_string': u'non-ascii character \xe4'})
  File "/home2/helio/github/RIDE/utest/settings/test_settings.py", line 92, in _test_settings_types
    self.settings[key] = value
  File "/home2/helio/github/RIDE/src/robotide/preferences/settings.py", line 319, in __setitem__
    self.set(name, value)
  File "/home2/helio/github/RIDE/src/robotide/preferences/settings.py", line 377, in set
    self.save()
  File "/home2/helio/github/RIDE/src/robotide/preferences/settings.py", line 423, in save
    self._config_obj.write()
  File "/home2/helio/github/RIDE/src/robotide/preferences/configobj.py", line 2118, in write
    'ascii')
UnicodeEncodeError: 'ascii' codec can't encode character '\xe4' in position 38: ordinal not in range(128)

----------------------------------------------------------------------
Ran 1012 tests in 37.785s

FAILED (SKIP=12, errors=7)

@HelioGuilherme66 HelioGuilherme66 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add a new PR to make unit tests passing.

@HelioGuilherme66
HelioGuilherme66 merged commit ab9e36e into robotframework:master Feb 14, 2020
HelioGuilherme66 added a commit that referenced this pull request Feb 14, 2020
* Fixed setlocale error

* Updated configobj to version 5.0.6 (latest). Old version was causing issues when reading from settings.cfg

* Fixed small issue in preferences. Zoom factor wasn't getting set to negative values.

* Fixes triggered errors and unit tests

Co-authored-by: Nyral <[email protected]>
@Nyral

Nyral commented Feb 17, 2020 •

Copy link
Copy Markdown
Contributor Author

Thanks for fixing the unit tests!

HelioGuilherme66 added a commit that referenced this pull request Jun 29, 2020
#2086)

* Separates AppendText for MessagesLog. Adds process memory limit on MessagesLog.

* Adds psutil to requirements.

* Closes and reopens Messages Log window when process memory exceeds 80%

* Key shortcuts update.

* Fixes update notification

* Improves Help links and About

* Version 1.7.4rc1

* Update ride-1.7.4.rst

Corrected rc1 version

* Update ride-1.7.4.rst

* Release notes for 1.7.4rc1

* Update ride-1.7.4.rst

Make final version.

* Development version

* Improves release notes builder

* Update ride-1.7.4.rst

* Changes log to use unicode when on Python 2.7 (#2091)

* Moved first condition at the end of the key processing event

* Refactored structure of conditions in `OnKeyDown`

* Makes some unit test files runnable

* Version 1.7.4

* Back to development of 1.7.4.1

* Fixed shortcut in keyword tooltip. We no longer use Ctrl-M. (#2099)

* Fixed shortcut in keyword tooltip. We no longer use Ctrl-M.

* Updated implementation to use localize_shortcuts.

* Fixed SelectAll issue in Grid Editor (#2096)

* Moved first condition at the end of the key processing event

* Refactored structure of conditions in `OnKeyDown`

* Added debug prints and SelectAll shortcut when pressing Alt+A

* Revert "Fixed SelectAll issue in Grid Editor (#2096)" (#2100)

This reverts commit b7336e0.

* Fixes newlines in cell tooltip (#2101)

* Fixes newlines in cell tooltip

* Fix tooltip unit test

* Updates Maven and seleniumlibrary versions. (#2103)

* Makes Text Editor read-only if file is read-only. Visual hint is back… (#2102)

* Makes Text Editor read-only if file is read-only. Visual hint is background color change.

* Updates Maven and seleniumlibrary versions. (#2103)

* Fix named colors and update when file is read-only with focus on Text Editor

* Update Travis to ubuntu xenial, wxPython and python 3.7 (#2104)

* Corrects text update when on read-only on Text Editor (#2106)

Fix read file when on read only on Text Editor

* Fix for #1421, Repeated Resource files on Tree when on Windows (#2105)

* Fix #2107 - Avoids changes in Resource file name when content assist. (#2109)

* Removes changes to resource file name for suggestions of keywords

* Avoids RuntimeError with ContentAssist for Resource Files

* Fixes one test and reactivates other

* Updates robotframework-mavenplugin version (#2110)

* Uses unicode to calculate font name size when on Python 2.7 (#2112)

* Made shortcuts from RIDE and Parser Log tabs to unregister when they're not selected

* Removed debug prints and made Select All shortcut work (wasn't implemented) for Ride and Parser Log

* Reverted workaround in previous commits and replaced `register_shortcuts` with OnKeyDown events to prevent further conflicts

* Misc fixes (#2116)

* Corrects Mac shortcut keys

* Corrects messages for wxPython versions.

* Added back shortcut registration for Cmd-C

* Fixed SelectAll issue in Grid Editor, RIDE Log and Parser Log (#2113)

* Moved first condition at the end of the key processing event

* Refactored structure of conditions in `OnKeyDown`

* Made shortcuts from RIDE and Parser Log tabs to unregister when they're not selected

* Removed debug prints and made Select All shortcut work (wasn't implemented) for Ride and Parser Log

* Reverted workaround in previous commits and replaced `register_shortcuts` with OnKeyDown events to prevent further conflicts

* Added back shortcut registration for Cmd-C

* Fixed SelectAll issue in Grid Editor, RIDE Log and Parser Log (#2113)

* Moved first condition at the end of the key processing event

* Refactored structure of conditions in `OnKeyDown`

* Made shortcuts from RIDE and Parser Log tabs to unregister when they're not selected

* Removed debug prints and made Select All shortcut work (wasn't implemented) for Ride and Parser Log

* Reverted workaround in previous commits and replaced `register_shortcuts` with OnKeyDown events to prevent further conflicts

* Added back shortcut registration for Cmd-C

* Fixed SelectAll issue in Grid Editor, RIDE Log and Parser Log (#2113)

* Moved first condition at the end of the key processing event

* Refactored structure of conditions in `OnKeyDown`

* Made shortcuts from RIDE and Parser Log tabs to unregister when they're not selected

* Removed debug prints and made Select All shortcut work (wasn't implemented) for Ride and Parser Log

* Reverted workaround in previous commits and replaced `register_shortcuts` with OnKeyDown events to prevent further conflicts

* Added back shortcut registration for Cmd-C

* Version 1.7.4.1

* Update ride-1.7.4.rst

removed mentions to last support to python 2.7

* Update README.rest

Version 1.7.4.1.

* Back to development version - 2.0

* Replaces python 2.7 by 3.6

* Format Readme

* Cleans Invoke

* Removes python 2.7 from test_all.sh

* Cleans tasks.py

* Cleanup of wxPython/wxPhoenix version conditioning (#2121)

* Adds pycodestyle for PyCharm PEP8 analysis

* Removal of wxPython version conditions, code cleanup phase 1

* Removal of wxPython version conditions, code cleanup phase 1

* Removal of wxPython version conditions, code cleanup phase 1

* Removal of wxPython version conditions, code cleanup phase 1

* Removal of wxPython version conditions, code cleanup phase 1

* Removal of wxPython version conditions, code cleanup phase 1

* Change max line length to 90 char, for PyCharm

* Removes Python 2.7 support (#2124)

* Adds pycodestyle for PyCharm PEP8 analysis

* Removal of wxPython version conditions, code cleanup phase 1

* Removal of wxPython version conditions, code cleanup phase 1

* Removal of wxPython version conditions, code cleanup phase 1

* Removal of wxPython version conditions, code cleanup phase 1

* Removal of wxPython version conditions, code cleanup phase 1

* Removal of wxPython version conditions, code cleanup phase 1

* Change max line length to 90 char, for PyCharm

* Main removal of PY2 and PY3

* Final removal of PY2 and PY3 and basestring, unicode and unichar functions.

* wx.NewId() to wx.NewIdRef() (#2125)

* Changes wx.NewId to wx.NewIdRef

* Add AppVeyor configuration (#2131)

* Adds an autoclose timer to the Create Shortcut dialog. (#2130)

* Adds an autoclose timer to the Create Shotcut dialog.

* Changes Travis to use Ubuntu 18.04

* Appveyor (#2132)

* Add AppVeyor configuration

* Adds tox config

* Changes install to be with tox (#2133)

* Fixed Python 3.8 incompatibility (#2128)

* Fixed setlocale error

* Updated configobj to version 5.0.6 (latest). Old version was causing issues when reading from settings.cfg

* Fixed small issue in preferences. Zoom factor wasn't getting set to negative values.

* Fixes unit tests for #2128 (#2137)

* Fixed setlocale error

* Updated configobj to version 5.0.6 (latest). Old version was causing issues when reading from settings.cfg

* Fixed small issue in preferences. Zoom factor wasn't getting set to negative values.

* Fixes triggered errors and unit tests

Co-authored-by: Nyral <[email protected]>

* Fix travis (#2138)

* Removes installation of RIDE. Avoids Segmentation fault on tags test

* Fixes bad character when pressing a first key on Grid Editor

* Fixes reprocessing of %date% %time% variables on Windows (#2141)

* Inform that development branch is compatible with Python 3.8

* Cleans up unittests (#2142)

* Fix one error that was being ignored

* Restores two skipped tests.

* Fixes resources and file unit tests

* Better reason for skipped test. Removes errors of unclosed files

* Reduced to two skipped tests

* Attempt to clean C++ exceptions, only happens with Invoke

* Fixed focus issue when using F2 to edit grid cell (#2140)

* Added shortcut handling for F2 in order to set focus

* Reverted previous commit and removed StartingClick because it's redundant. Text selection breaks if SelectAll() or SetSelection() is called after SetFocus(). This commit fixes that issue for double click and F2.

* Added white color to inside the icon face (#2154)

* Fixed crash when you delete tag and more (#2155)

* Added condition to prevent event from return key from crashing RIDE

* Added fix for when tag box remains empty when you delete the text you were writing in it; Added fix for TagBox deleted error when KillFocus is called.

* Turns Test Suite Tree and File Explorer into Plugins (#2152)

* Fix one error that was being ignored

* First experiments

* Test Suite Tree panel is now a Plugin

* Changes File Explorer to be a Plugin

* Added white color to inside the icon face (#2154)

* Fixed crash when you delete tag and more (#2155)

* Added condition to prevent event from return key from crashing RIDE

* Added fix for when tag box remains empty when you delete the text you were writing in it; Added fix for TagBox deleted error when KillFocus is called.

* Fixes perspectives on Tree pane

* Fixes Perspectives and changes File Explorer to be a Plugin

Co-authored-by: Nyral <[email protected]>

* Fixes default arguments keyword help, #2134 (#2157)

* Adds requirement for Python >=3.6

* Removes Python version conditioning

* Adds APPDATA to environment and build step with Invoke.

* Adds APPDATA var to tox.ini, changes to tox test

* Adds badges for Travis and AppVeyor unit tests status

* Adds README with ASCIIDoc format, will replace exisiting

* Encloses text in Cell or selected text with certain symbols (#2158)

* Encloses text in Cell or selected text with certain symbols

* Corrects position of cursor. Fixes text selection highlight

* Fixes select text (#2160)

* Adds a flag to wx.TextControl to force selection highlight on Windows.

* Text Editor - Encloses text in Cell or selected text with certain symbols. Adds support for Ctrl-3 and Ctrl-4 (Comment/Uncomment)

* Fix comment/uncomment index range in Text Editor

* Fix enclosing text

* Fix variables creation

* Fix keys in Grid editor

* Fix keys in Grid Editor, [ and { still don't trigger

* Fix error message from TreePlugin

* Fix list selection on contextsuggestion. BREAKS enclose text in cell editor

* Disable enclose text in cell editor when in Linux

* Fixes { and [ in grid editor. Still disable in cell editor, on Linux

* Adds autoident to Text Editor

* Auto-indents, when first Task, Test or Keyword

* Fixes { and [ in grid editor. Still disable in cell editor, on Linux

* Fixes { and [ in Windows, grid editor

* Fix keys (#2178)

* Fixes { and [ in grid editor. Still disable in cell editor, on Linux

* Avoids beep on keywords suggestions when on Linux

* Adds ! to Save item on menu. Not detected when removed. (#2180)

* Indents and de-indents block of selected text (#2181)

* Experiments getting selection lines

* Indent and de-indent blocks of text

* Correct imports (#2182)

* Adds conditions for wxPython 4.1.0 (#2184)

* Upgrade wxPython to 4.1.0 (#2187)

* Adds conditions for wxPython 4.1.0

* Fixes #2186

* Update docs about v1.7.4.2

* Log misc fixes (#2198)

* Fixes syntax error

* Makes error in removing log files a byte buffer.

* Makes a test compatible with RF 3.2.1

* Better error and removal of old log files. (#2199)

* Changes code to allow starting with File Explorer or Tree plugins disabled

* Fix parsing warning of report/ log html file (#2212)

Should not show this warning message if there're report/log html file in the workspace.

Co-authored-by: Johnny Huang <[email protected]>

* Fix for 1668: Given a large test suite, selecting all tests from the root of tree, freezes RIDE for some time (#2210)

* 1668: The Select All Tests command on the root of a deeply nested test folder, freezes RIDE for several minutes.
The problem is caused by Tree.SelectAllTests strategy: expanding and collapsing all the nodes. This causes CPU waste to expand/collapse (and maybe render) and wait for the creation of the tree node handlers.
The idea of the fix is to navigate the tests using the link between controllers. In order to avoid all the dancing of the tree nodes.
In this commit:

- Changed Tree.SelectAllTests() to extract all the TestCaseController(s) and invoke TestSelectionController to change the selection for these.
- Now both _ActionHandler OnDeselectAllTests() and OnSelectAllTests() invoke Tree.SelectAllTests(), with a parameter.
- When a new TestCaseHandler is created, is registered to be notified about selection changes. It uses this notification to update the graphical node with the check.
-  RideTestSelectedForRunningChanged now also holds the controller of the test which has changed selection and whether has been selected or unselected.

* Replace Tree DeselectAllTests(node) with SelectAllTests(node,False) as it's much more efficient.

* TestSelectionController: Keep a copy of the tests to propagate in the event, rather than rebuild it everytime.

* When selecting multiple tests, from the test search, do it efficiently.

TestSelectionController: add select_all() to select multiple tests efficiently. Rewrite unselect_all() in terms of select_all()

Tree: when selecting multiple tests, no need to navigate the full tree, just use TestSelectionController.

* When deselecting multiple tests, from the test search, do it efficiently.

Tree: when deselecting multiple tests, no need to navigate the full tree, just use TestSelectionController.

* Do not expand all the tree nodes when selecting failed/passed tests.

- Keep the information of failed/passed tests in TestCaseController
- Update the information on the test execution
- When selecting only failed/passed tests navigate the controller'tree rather than the graphical tree.
- removed method _for_all_tests() as it was causing all the nodes to be loaded/rendered.

* When selecting/deselecting multiple Tests, notify a single selection change event. Rather than one for each Test.

* Restore previous behavior with "Select Failed/Passed": select only those and de-select any other test.

* keep track of the selected tests using the TestCaseController(s), instead of the list of names.

This removes the need for listen of name changes.

* No need to generate the list of names, when determining if there's any.

* Fix TestSelectionController.add_tag()

* Handle RideTestSelectedForRunningChanged event on a new wx thread stack.
This is to avoid the "Recursionerror: maximum recursion depth exceeded"

* Remove unused variable.

* Propagate the RideTestSelectedForRunningChanged event only if the selection actually changed.

Co-authored-by: Valerio Bruno <[email protected]>

* Fix tree node (#2214)

* Increase development version.

* Fixes error message on RIDE Log about missing tree_node_selected.

* Fixes error message on RIDE Log about missing clear_all. (#2215)

* Stops log when memory exceeds limit.

Co-authored-by: Helio Guilherme <[email protected]>
Co-authored-by: Nyral <[email protected]>
Co-authored-by: Nyral <[email protected]>
Co-authored-by: Johnny.H <[email protected]>
Co-authored-by: Johnny Huang <[email protected]>
Co-authored-by: Valerio <[email protected]>
Co-authored-by: Valerio Bruno <[email protected]>
jnhyperion added a commit to jnhyperion/RIDE that referenced this pull request Jul 3, 2020
* Fix parsing warning of report/ log html file (robotframework#2212)

Should not show this warning message if there're report/log html file in the workspace.

Co-authored-by: Johnny Huang <[email protected]>

* Fix for 1668: Given a large test suite, selecting all tests from the root of tree, freezes RIDE for some time (robotframework#2210)

* 1668: The Select All Tests command on the root of a deeply nested test folder, freezes RIDE for several minutes.
The problem is caused by Tree.SelectAllTests strategy: expanding and collapsing all the nodes. This causes CPU waste to expand/collapse (and maybe render) and wait for the creation of the tree node handlers.
The idea of the fix is to navigate the tests using the link between controllers. In order to avoid all the dancing of the tree nodes.
In this commit:

- Changed Tree.SelectAllTests() to extract all the TestCaseController(s) and invoke TestSelectionController to change the selection for these.
- Now both _ActionHandler OnDeselectAllTests() and OnSelectAllTests() invoke Tree.SelectAllTests(), with a parameter.
- When a new TestCaseHandler is created, is registered to be notified about selection changes. It uses this notification to update the graphical node with the check.
-  RideTestSelectedForRunningChanged now also holds the controller of the test which has changed selection and whether has been selected or unselected.

* Replace Tree DeselectAllTests(node) with SelectAllTests(node,False) as it's much more efficient.

* TestSelectionController: Keep a copy of the tests to propagate in the event, rather than rebuild it everytime.

* When selecting multiple tests, from the test search, do it efficiently.

TestSelectionController: add select_all() to select multiple tests efficiently. Rewrite unselect_all() in terms of select_all()

Tree: when selecting multiple tests, no need to navigate the full tree, just use TestSelectionController.

* When deselecting multiple tests, from the test search, do it efficiently.

Tree: when deselecting multiple tests, no need to navigate the full tree, just use TestSelectionController.

* Do not expand all the tree nodes when selecting failed/passed tests.

- Keep the information of failed/passed tests in TestCaseController
- Update the information on the test execution
- When selecting only failed/passed tests navigate the controller'tree rather than the graphical tree.
- removed method _for_all_tests() as it was causing all the nodes to be loaded/rendered.

* When selecting/deselecting multiple Tests, notify a single selection change event. Rather than one for each Test.

* Restore previous behavior with "Select Failed/Passed": select only those and de-select any other test.

* keep track of the selected tests using the TestCaseController(s), instead of the list of names.

This removes the need for listen of name changes.

* No need to generate the list of names, when determining if there's any.

* Fix TestSelectionController.add_tag()

* Handle RideTestSelectedForRunningChanged event on a new wx thread stack.
This is to avoid the "Recursionerror: maximum recursion depth exceeded"

* Remove unused variable.

* Propagate the RideTestSelectedForRunningChanged event only if the selection actually changed.

Co-authored-by: Valerio Bruno <[email protected]>

* Fix tree node (robotframework#2214)

* Increase development version.

* Fixes error message on RIDE Log about missing tree_node_selected.

* Fixes error message on RIDE Log about missing clear_all. (robotframework#2215)

* Separates AppendText for MessagesLog. Adds process memory limit on Me… (robotframework#2086)

* Separates AppendText for MessagesLog. Adds process memory limit on MessagesLog.

* Adds psutil to requirements.

* Closes and reopens Messages Log window when process memory exceeds 80%

* Key shortcuts update.

* Fixes update notification

* Improves Help links and About

* Version 1.7.4rc1

* Update ride-1.7.4.rst

Corrected rc1 version

* Update ride-1.7.4.rst

* Release notes for 1.7.4rc1

* Update ride-1.7.4.rst

Make final version.

* Development version

* Improves release notes builder

* Update ride-1.7.4.rst

* Changes log to use unicode when on Python 2.7 (robotframework#2091)

* Moved first condition at the end of the key processing event

* Refactored structure of conditions in `OnKeyDown`

* Makes some unit test files runnable

* Version 1.7.4

* Back to development of 1.7.4.1

* Fixed shortcut in keyword tooltip. We no longer use Ctrl-M. (robotframework#2099)

* Fixed shortcut in keyword tooltip. We no longer use Ctrl-M.

* Updated implementation to use localize_shortcuts.

* Fixed SelectAll issue in Grid Editor (robotframework#2096)

* Moved first condition at the end of the key processing event

* Refactored structure of conditions in `OnKeyDown`

* Added debug prints and SelectAll shortcut when pressing Alt+A

* Revert "Fixed SelectAll issue in Grid Editor (robotframework#2096)" (robotframework#2100)

This reverts commit b7336e0.

* Fixes newlines in cell tooltip (robotframework#2101)

* Fixes newlines in cell tooltip

* Fix tooltip unit test

* Updates Maven and seleniumlibrary versions. (robotframework#2103)

* Makes Text Editor read-only if file is read-only. Visual hint is back… (robotframework#2102)

* Makes Text Editor read-only if file is read-only. Visual hint is background color change.

* Updates Maven and seleniumlibrary versions. (robotframework#2103)

* Fix named colors and update when file is read-only with focus on Text Editor

* Update Travis to ubuntu xenial, wxPython and python 3.7 (robotframework#2104)

* Corrects text update when on read-only on Text Editor (robotframework#2106)

Fix read file when on read only on Text Editor

* Fix for robotframework#1421, Repeated Resource files on Tree when on Windows (robotframework#2105)

* Fix robotframework#2107 - Avoids changes in Resource file name when content assist. (robotframework#2109)

* Removes changes to resource file name for suggestions of keywords

* Avoids RuntimeError with ContentAssist for Resource Files

* Fixes one test and reactivates other

* Updates robotframework-mavenplugin version (robotframework#2110)

* Uses unicode to calculate font name size when on Python 2.7 (robotframework#2112)

* Made shortcuts from RIDE and Parser Log tabs to unregister when they're not selected

* Removed debug prints and made Select All shortcut work (wasn't implemented) for Ride and Parser Log

* Reverted workaround in previous commits and replaced `register_shortcuts` with OnKeyDown events to prevent further conflicts

* Misc fixes (robotframework#2116)

* Corrects Mac shortcut keys

* Corrects messages for wxPython versions.

* Added back shortcut registration for Cmd-C

* Fixed SelectAll issue in Grid Editor, RIDE Log and Parser Log (robotframework#2113)

* Moved first condition at the end of the key processing event

* Refactored structure of conditions in `OnKeyDown`

* Made shortcuts from RIDE and Parser Log tabs to unregister when they're not selected

* Removed debug prints and made Select All shortcut work (wasn't implemented) for Ride and Parser Log

* Reverted workaround in previous commits and replaced `register_shortcuts` with OnKeyDown events to prevent further conflicts

* Added back shortcut registration for Cmd-C

* Fixed SelectAll issue in Grid Editor, RIDE Log and Parser Log (robotframework#2113)

* Moved first condition at the end of the key processing event

* Refactored structure of conditions in `OnKeyDown`

* Made shortcuts from RIDE and Parser Log tabs to unregister when they're not selected

* Removed debug prints and made Select All shortcut work (wasn't implemented) for Ride and Parser Log

* Reverted workaround in previous commits and replaced `register_shortcuts` with OnKeyDown events to prevent further conflicts

* Added back shortcut registration for Cmd-C

* Fixed SelectAll issue in Grid Editor, RIDE Log and Parser Log (robotframework#2113)

* Moved first condition at the end of the key processing event

* Refactored structure of conditions in `OnKeyDown`

* Made shortcuts from RIDE and Parser Log tabs to unregister when they're not selected

* Removed debug prints and made Select All shortcut work (wasn't implemented) for Ride and Parser Log

* Reverted workaround in previous commits and replaced `register_shortcuts` with OnKeyDown events to prevent further conflicts

* Added back shortcut registration for Cmd-C

* Version 1.7.4.1

* Update ride-1.7.4.rst

removed mentions to last support to python 2.7

* Update README.rest

Version 1.7.4.1.

* Back to development version - 2.0

* Replaces python 2.7 by 3.6

* Format Readme

* Cleans Invoke

* Removes python 2.7 from test_all.sh

* Cleans tasks.py

* Cleanup of wxPython/wxPhoenix version conditioning (robotframework#2121)

* Adds pycodestyle for PyCharm PEP8 analysis

* Removal of wxPython version conditions, code cleanup phase 1

* Removal of wxPython version conditions, code cleanup phase 1

* Removal of wxPython version conditions, code cleanup phase 1

* Removal of wxPython version conditions, code cleanup phase 1

* Removal of wxPython version conditions, code cleanup phase 1

* Removal of wxPython version conditions, code cleanup phase 1

* Change max line length to 90 char, for PyCharm

* Removes Python 2.7 support (robotframework#2124)

* Adds pycodestyle for PyCharm PEP8 analysis

* Removal of wxPython version conditions, code cleanup phase 1

* Removal of wxPython version conditions, code cleanup phase 1

* Removal of wxPython version conditions, code cleanup phase 1

* Removal of wxPython version conditions, code cleanup phase 1

* Removal of wxPython version conditions, code cleanup phase 1

* Removal of wxPython version conditions, code cleanup phase 1

* Change max line length to 90 char, for PyCharm

* Main removal of PY2 and PY3

* Final removal of PY2 and PY3 and basestring, unicode and unichar functions.

* wx.NewId() to wx.NewIdRef() (robotframework#2125)

* Changes wx.NewId to wx.NewIdRef

* Add AppVeyor configuration (robotframework#2131)

* Adds an autoclose timer to the Create Shortcut dialog. (robotframework#2130)

* Adds an autoclose timer to the Create Shotcut dialog.

* Changes Travis to use Ubuntu 18.04

* Appveyor (robotframework#2132)

* Add AppVeyor configuration

* Adds tox config

* Changes install to be with tox (robotframework#2133)

* Fixed Python 3.8 incompatibility (robotframework#2128)

* Fixed setlocale error

* Updated configobj to version 5.0.6 (latest). Old version was causing issues when reading from settings.cfg

* Fixed small issue in preferences. Zoom factor wasn't getting set to negative values.

* Fixes unit tests for robotframework#2128 (robotframework#2137)

* Fixed setlocale error

* Updated configobj to version 5.0.6 (latest). Old version was causing issues when reading from settings.cfg

* Fixed small issue in preferences. Zoom factor wasn't getting set to negative values.

* Fixes triggered errors and unit tests

Co-authored-by: Nyral <[email protected]>

* Fix travis (robotframework#2138)

* Removes installation of RIDE. Avoids Segmentation fault on tags test

* Fixes bad character when pressing a first key on Grid Editor

* Fixes reprocessing of %date% %time% variables on Windows (robotframework#2141)

* Inform that development branch is compatible with Python 3.8

* Cleans up unittests (robotframework#2142)

* Fix one error that was being ignored

* Restores two skipped tests.

* Fixes resources and file unit tests

* Better reason for skipped test. Removes errors of unclosed files

* Reduced to two skipped tests

* Attempt to clean C++ exceptions, only happens with Invoke

* Fixed focus issue when using F2 to edit grid cell (robotframework#2140)

* Added shortcut handling for F2 in order to set focus

* Reverted previous commit and removed StartingClick because it's redundant. Text selection breaks if SelectAll() or SetSelection() is called after SetFocus(). This commit fixes that issue for double click and F2.

* Added white color to inside the icon face (robotframework#2154)

* Fixed crash when you delete tag and more (robotframework#2155)

* Added condition to prevent event from return key from crashing RIDE

* Added fix for when tag box remains empty when you delete the text you were writing in it; Added fix for TagBox deleted error when KillFocus is called.

* Turns Test Suite Tree and File Explorer into Plugins (robotframework#2152)

* Fix one error that was being ignored

* First experiments

* Test Suite Tree panel is now a Plugin

* Changes File Explorer to be a Plugin

* Added white color to inside the icon face (robotframework#2154)

* Fixed crash when you delete tag and more (robotframework#2155)

* Added condition to prevent event from return key from crashing RIDE

* Added fix for when tag box remains empty when you delete the text you were writing in it; Added fix for TagBox deleted error when KillFocus is called.

* Fixes perspectives on Tree pane

* Fixes Perspectives and changes File Explorer to be a Plugin

Co-authored-by: Nyral <[email protected]>

* Fixes default arguments keyword help, robotframework#2134 (robotframework#2157)

* Adds requirement for Python >=3.6

* Removes Python version conditioning

* Adds APPDATA to environment and build step with Invoke.

* Adds APPDATA var to tox.ini, changes to tox test

* Adds badges for Travis and AppVeyor unit tests status

* Adds README with ASCIIDoc format, will replace exisiting

* Encloses text in Cell or selected text with certain symbols (robotframework#2158)

* Encloses text in Cell or selected text with certain symbols

* Corrects position of cursor. Fixes text selection highlight

* Fixes select text (robotframework#2160)

* Adds a flag to wx.TextControl to force selection highlight on Windows.

* Text Editor - Encloses text in Cell or selected text with certain symbols. Adds support for Ctrl-3 and Ctrl-4 (Comment/Uncomment)

* Fix comment/uncomment index range in Text Editor

* Fix enclosing text

* Fix variables creation

* Fix keys in Grid editor

* Fix keys in Grid Editor, [ and { still don't trigger

* Fix error message from TreePlugin

* Fix list selection on contextsuggestion. BREAKS enclose text in cell editor

* Disable enclose text in cell editor when in Linux

* Fixes { and [ in grid editor. Still disable in cell editor, on Linux

* Adds autoident to Text Editor

* Auto-indents, when first Task, Test or Keyword

* Fixes { and [ in grid editor. Still disable in cell editor, on Linux

* Fixes { and [ in Windows, grid editor

* Fix keys (robotframework#2178)

* Fixes { and [ in grid editor. Still disable in cell editor, on Linux

* Avoids beep on keywords suggestions when on Linux

* Adds ! to Save item on menu. Not detected when removed. (robotframework#2180)

* Indents and de-indents block of selected text (robotframework#2181)

* Experiments getting selection lines

* Indent and de-indent blocks of text

* Correct imports (robotframework#2182)

* Adds conditions for wxPython 4.1.0 (robotframework#2184)

* Upgrade wxPython to 4.1.0 (robotframework#2187)

* Adds conditions for wxPython 4.1.0

* Fixes robotframework#2186

* Update docs about v1.7.4.2

* Log misc fixes (robotframework#2198)

* Fixes syntax error

* Makes error in removing log files a byte buffer.

* Makes a test compatible with RF 3.2.1

* Better error and removal of old log files. (robotframework#2199)

* Changes code to allow starting with File Explorer or Tree plugins disabled

* Fix parsing warning of report/ log html file (robotframework#2212)

Should not show this warning message if there're report/log html file in the workspace.

Co-authored-by: Johnny Huang <[email protected]>

* Fix for 1668: Given a large test suite, selecting all tests from the root of tree, freezes RIDE for some time (robotframework#2210)

* 1668: The Select All Tests command on the root of a deeply nested test folder, freezes RIDE for several minutes.
The problem is caused by Tree.SelectAllTests strategy: expanding and collapsing all the nodes. This causes CPU waste to expand/collapse (and maybe render) and wait for the creation of the tree node handlers.
The idea of the fix is to navigate the tests using the link between controllers. In order to avoid all the dancing of the tree nodes.
In this commit:

- Changed Tree.SelectAllTests() to extract all the TestCaseController(s) and invoke TestSelectionController to change the selection for these.
- Now both _ActionHandler OnDeselectAllTests() and OnSelectAllTests() invoke Tree.SelectAllTests(), with a parameter.
- When a new TestCaseHandler is created, is registered to be notified about selection changes. It uses this notification to update the graphical node with the check.
-  RideTestSelectedForRunningChanged now also holds the controller of the test which has changed selection and whether has been selected or unselected.

* Replace Tree DeselectAllTests(node) with SelectAllTests(node,False) as it's much more efficient.

* TestSelectionController: Keep a copy of the tests to propagate in the event, rather than rebuild it everytime.

* When selecting multiple tests, from the test search, do it efficiently.

TestSelectionController: add select_all() to select multiple tests efficiently. Rewrite unselect_all() in terms of select_all()

Tree: when selecting multiple tests, no need to navigate the full tree, just use TestSelectionController.

* When deselecting multiple tests, from the test search, do it efficiently.

Tree: when deselecting multiple tests, no need to navigate the full tree, just use TestSelectionController.

* Do not expand all the tree nodes when selecting failed/passed tests.

- Keep the information of failed/passed tests in TestCaseController
- Update the information on the test execution
- When selecting only failed/passed tests navigate the controller'tree rather than the graphical tree.
- removed method _for_all_tests() as it was causing all the nodes to be loaded/rendered.

* When selecting/deselecting multiple Tests, notify a single selection change event. Rather than one for each Test.

* Restore previous behavior with "Select Failed/Passed": select only those and de-select any other test.

* keep track of the selected tests using the TestCaseController(s), instead of the list of names.

This removes the need for listen of name changes.

* No need to generate the list of names, when determining if there's any.

* Fix TestSelectionController.add_tag()

* Handle RideTestSelectedForRunningChanged event on a new wx thread stack.
This is to avoid the "Recursionerror: maximum recursion depth exceeded"

* Remove unused variable.

* Propagate the RideTestSelectedForRunningChanged event only if the selection actually changed.

Co-authored-by: Valerio Bruno <[email protected]>

* Fix tree node (robotframework#2214)

* Increase development version.

* Fixes error message on RIDE Log about missing tree_node_selected.

* Fixes error message on RIDE Log about missing clear_all. (robotframework#2215)

* Stops log when memory exceeds limit.

Co-authored-by: Helio Guilherme <[email protected]>
Co-authored-by: Nyral <[email protected]>
Co-authored-by: Nyral <[email protected]>
Co-authored-by: Johnny.H <[email protected]>
Co-authored-by: Johnny Huang <[email protected]>
Co-authored-by: Valerio <[email protected]>
Co-authored-by: Valerio Bruno <[email protected]>

* Nyral/fix encodings (robotframework#2217)

* Refactored how text econding is done in _AppendText

* Separates AppendText for MessagesLog. Adds process memory limit on MessagesLog.

* Adds psutil to requirements.

* Closes and reopens Messages Log window when process memory exceeds 80%

* Windows: Log fixed, Output broken. More Debug Outputs.

* Stops log when memory exceeds limit.

* Correct output, when set PYTHONIOENCODING=utf-8 on Windows

Co-authored-by: Nyral <[email protected]>
Co-authored-by: Helio Guilherme <[email protected]>

* Correct encoding for Log (robotframework#2218)

* Fixes tree selection, because of wrong variable name. (robotframework#2219)

Co-authored-by: Johnny Huang <[email protected]>
Co-authored-by: Valerio <[email protected]>
Co-authored-by: Valerio Bruno <[email protected]>
Co-authored-by: Hélio Guilherme <[email protected]>
Co-authored-by: Helio Guilherme <[email protected]>
Co-authored-by: Nyral <[email protected]>
Co-authored-by: Nyral <[email protected]>
HelioGuilherme66 added a commit that referenced this pull request Jul 5, 2020
* Sync with upstreem (#1)

* Fix parsing warning of report/ log html file (#2212)

Should not show this warning message if there're report/log html file in the workspace.

Co-authored-by: Johnny Huang <[email protected]>

* Fix for 1668: Given a large test suite, selecting all tests from the root of tree, freezes RIDE for some time (#2210)

* 1668: The Select All Tests command on the root of a deeply nested test folder, freezes RIDE for several minutes.
The problem is caused by Tree.SelectAllTests strategy: expanding and collapsing all the nodes. This causes CPU waste to expand/collapse (and maybe render) and wait for the creation of the tree node handlers.
The idea of the fix is to navigate the tests using the link between controllers. In order to avoid all the dancing of the tree nodes.
In this commit:

- Changed Tree.SelectAllTests() to extract all the TestCaseController(s) and invoke TestSelectionController to change the selection for these.
- Now both _ActionHandler OnDeselectAllTests() and OnSelectAllTests() invoke Tree.SelectAllTests(), with a parameter.
- When a new TestCaseHandler is created, is registered to be notified about selection changes. It uses this notification to update the graphical node with the check.
-  RideTestSelectedForRunningChanged now also holds the controller of the test which has changed selection and whether has been selected or unselected.

* Replace Tree DeselectAllTests(node) with SelectAllTests(node,False) as it's much more efficient.

* TestSelectionController: Keep a copy of the tests to propagate in the event, rather than rebuild it everytime.

* When selecting multiple tests, from the test search, do it efficiently.

TestSelectionController: add select_all() to select multiple tests efficiently. Rewrite unselect_all() in terms of select_all()

Tree: when selecting multiple tests, no need to navigate the full tree, just use TestSelectionController.

* When deselecting multiple tests, from the test search, do it efficiently.

Tree: when deselecting multiple tests, no need to navigate the full tree, just use TestSelectionController.

* Do not expand all the tree nodes when selecting failed/passed tests.

- Keep the information of failed/passed tests in TestCaseController
- Update the information on the test execution
- When selecting only failed/passed tests navigate the controller'tree rather than the graphical tree.
- removed method _for_all_tests() as it was causing all the nodes to be loaded/rendered.

* When selecting/deselecting multiple Tests, notify a single selection change event. Rather than one for each Test.

* Restore previous behavior with "Select Failed/Passed": select only those and de-select any other test.

* keep track of the selected tests using the TestCaseController(s), instead of the list of names.

This removes the need for listen of name changes.

* No need to generate the list of names, when determining if there's any.

* Fix TestSelectionController.add_tag()

* Handle RideTestSelectedForRunningChanged event on a new wx thread stack.
This is to avoid the "Recursionerror: maximum recursion depth exceeded"

* Remove unused variable.

* Propagate the RideTestSelectedForRunningChanged event only if the selection actually changed.

Co-authored-by: Valerio Bruno <[email protected]>

* Fix tree node (#2214)

* Increase development version.

* Fixes error message on RIDE Log about missing tree_node_selected.

* Fixes error message on RIDE Log about missing clear_all. (#2215)

* Separates AppendText for MessagesLog. Adds process memory limit on Me… (#2086)

* Separates AppendText for MessagesLog. Adds process memory limit on MessagesLog.

* Adds psutil to requirements.

* Closes and reopens Messages Log window when process memory exceeds 80%

* Key shortcuts update.

* Fixes update notification

* Improves Help links and About

* Version 1.7.4rc1

* Update ride-1.7.4.rst

Corrected rc1 version

* Update ride-1.7.4.rst

* Release notes for 1.7.4rc1

* Update ride-1.7.4.rst

Make final version.

* Development version

* Improves release notes builder

* Update ride-1.7.4.rst

* Changes log to use unicode when on Python 2.7 (#2091)

* Moved first condition at the end of the key processing event

* Refactored structure of conditions in `OnKeyDown`

* Makes some unit test files runnable

* Version 1.7.4

* Back to development of 1.7.4.1

* Fixed shortcut in keyword tooltip. We no longer use Ctrl-M. (#2099)

* Fixed shortcut in keyword tooltip. We no longer use Ctrl-M.

* Updated implementation to use localize_shortcuts.

* Fixed SelectAll issue in Grid Editor (#2096)

* Moved first condition at the end of the key processing event

* Refactored structure of conditions in `OnKeyDown`

* Added debug prints and SelectAll shortcut when pressing Alt+A

* Revert "Fixed SelectAll issue in Grid Editor (#2096)" (#2100)

This reverts commit b7336e0.

* Fixes newlines in cell tooltip (#2101)

* Fixes newlines in cell tooltip

* Fix tooltip unit test

* Updates Maven and seleniumlibrary versions. (#2103)

* Makes Text Editor read-only if file is read-only. Visual hint is back… (#2102)

* Makes Text Editor read-only if file is read-only. Visual hint is background color change.

* Updates Maven and seleniumlibrary versions. (#2103)

* Fix named colors and update when file is read-only with focus on Text Editor

* Update Travis to ubuntu xenial, wxPython and python 3.7 (#2104)

* Corrects text update when on read-only on Text Editor (#2106)

Fix read file when on read only on Text Editor

* Fix for #1421, Repeated Resource files on Tree when on Windows (#2105)

* Fix #2107 - Avoids changes in Resource file name when content assist. (#2109)

* Removes changes to resource file name for suggestions of keywords

* Avoids RuntimeError with ContentAssist for Resource Files

* Fixes one test and reactivates other

* Updates robotframework-mavenplugin version (#2110)

* Uses unicode to calculate font name size when on Python 2.7 (#2112)

* Made shortcuts from RIDE and Parser Log tabs to unregister when they're not selected

* Removed debug prints and made Select All shortcut work (wasn't implemented) for Ride and Parser Log

* Reverted workaround in previous commits and replaced `register_shortcuts` with OnKeyDown events to prevent further conflicts

* Misc fixes (#2116)

* Corrects Mac shortcut keys

* Corrects messages for wxPython versions.

* Added back shortcut registration for Cmd-C

* Fixed SelectAll issue in Grid Editor, RIDE Log and Parser Log (#2113)

* Moved first condition at the end of the key processing event

* Refactored structure of conditions in `OnKeyDown`

* Made shortcuts from RIDE and Parser Log tabs to unregister when they're not selected

* Removed debug prints and made Select All shortcut work (wasn't implemented) for Ride and Parser Log

* Reverted workaround in previous commits and replaced `register_shortcuts` with OnKeyDown events to prevent further conflicts

* Added back shortcut registration for Cmd-C

* Fixed SelectAll issue in Grid Editor, RIDE Log and Parser Log (#2113)

* Moved first condition at the end of the key processing event

* Refactored structure of conditions in `OnKeyDown`

* Made shortcuts from RIDE and Parser Log tabs to unregister when they're not selected

* Removed debug prints and made Select All shortcut work (wasn't implemented) for Ride and Parser Log

* Reverted workaround in previous commits and replaced `register_shortcuts` with OnKeyDown events to prevent further conflicts

* Added back shortcut registration for Cmd-C

* Fixed SelectAll issue in Grid Editor, RIDE Log and Parser Log (#2113)

* Moved first condition at the end of the key processing event

* Refactored structure of conditions in `OnKeyDown`

* Made shortcuts from RIDE and Parser Log tabs to unregister when they're not selected

* Removed debug prints and made Select All shortcut work (wasn't implemented) for Ride and Parser Log

* Reverted workaround in previous commits and replaced `register_shortcuts` with OnKeyDown events to prevent further conflicts

* Added back shortcut registration for Cmd-C

* Version 1.7.4.1

* Update ride-1.7.4.rst

removed mentions to last support to python 2.7

* Update README.rest

Version 1.7.4.1.

* Back to development version - 2.0

* Replaces python 2.7 by 3.6

* Format Readme

* Cleans Invoke

* Removes python 2.7 from test_all.sh

* Cleans tasks.py

* Cleanup of wxPython/wxPhoenix version conditioning (#2121)

* Adds pycodestyle for PyCharm PEP8 analysis

* Removal of wxPython version conditions, code cleanup phase 1

* Removal of wxPython version conditions, code cleanup phase 1

* Removal of wxPython version conditions, code cleanup phase 1

* Removal of wxPython version conditions, code cleanup phase 1

* Removal of wxPython version conditions, code cleanup phase 1

* Removal of wxPython version conditions, code cleanup phase 1

* Change max line length to 90 char, for PyCharm

* Removes Python 2.7 support (#2124)

* Adds pycodestyle for PyCharm PEP8 analysis

* Removal of wxPython version conditions, code cleanup phase 1

* Removal of wxPython version conditions, code cleanup phase 1

* Removal of wxPython version conditions, code cleanup phase 1

* Removal of wxPython version conditions, code cleanup phase 1

* Removal of wxPython version conditions, code cleanup phase 1

* Removal of wxPython version conditions, code cleanup phase 1

* Change max line length to 90 char, for PyCharm

* Main removal of PY2 and PY3

* Final removal of PY2 and PY3 and basestring, unicode and unichar functions.

* wx.NewId() to wx.NewIdRef() (#2125)

* Changes wx.NewId to wx.NewIdRef

* Add AppVeyor configuration (#2131)

* Adds an autoclose timer to the Create Shortcut dialog. (#2130)

* Adds an autoclose timer to the Create Shotcut dialog.

* Changes Travis to use Ubuntu 18.04

* Appveyor (#2132)

* Add AppVeyor configuration

* Adds tox config

* Changes install to be with tox (#2133)

* Fixed Python 3.8 incompatibility (#2128)

* Fixed setlocale error

* Updated configobj to version 5.0.6 (latest). Old version was causing issues when reading from settings.cfg

* Fixed small issue in preferences. Zoom factor wasn't getting set to negative values.

* Fixes unit tests for #2128 (#2137)

* Fixed setlocale error

* Updated configobj to version 5.0.6 (latest). Old version was causing issues when reading from settings.cfg

* Fixed small issue in preferences. Zoom factor wasn't getting set to negative values.

* Fixes triggered errors and unit tests

Co-authored-by: Nyral <[email protected]>

* Fix travis (#2138)

* Removes installation of RIDE. Avoids Segmentation fault on tags test

* Fixes bad character when pressing a first key on Grid Editor

* Fixes reprocessing of %date% %time% variables on Windows (#2141)

* Inform that development branch is compatible with Python 3.8

* Cleans up unittests (#2142)

* Fix one error that was being ignored

* Restores two skipped tests.

* Fixes resources and file unit tests

* Better reason for skipped test. Removes errors of unclosed files

* Reduced to two skipped tests

* Attempt to clean C++ exceptions, only happens with Invoke

* Fixed focus issue when using F2 to edit grid cell (#2140)

* Added shortcut handling for F2 in order to set focus

* Reverted previous commit and removed StartingClick because it's redundant. Text selection breaks if SelectAll() or SetSelection() is called after SetFocus(). This commit fixes that issue for double click and F2.

* Added white color to inside the icon face (#2154)

* Fixed crash when you delete tag and more (#2155)

* Added condition to prevent event from return key from crashing RIDE

* Added fix for when tag box remains empty when you delete the text you were writing in it; Added fix for TagBox deleted error when KillFocus is called.

* Turns Test Suite Tree and File Explorer into Plugins (#2152)

* Fix one error that was being ignored

* First experiments

* Test Suite Tree panel is now a Plugin

* Changes File Explorer to be a Plugin

* Added white color to inside the icon face (#2154)

* Fixed crash when you delete tag and more (#2155)

* Added condition to prevent event from return key from crashing RIDE

* Added fix for when tag box remains empty when you delete the text you were writing in it; Added fix for TagBox deleted error when KillFocus is called.

* Fixes perspectives on Tree pane

* Fixes Perspectives and changes File Explorer to be a Plugin

Co-authored-by: Nyral <[email protected]>

* Fixes default arguments keyword help, #2134 (#2157)

* Adds requirement for Python >=3.6

* Removes Python version conditioning

* Adds APPDATA to environment and build step with Invoke.

* Adds APPDATA var to tox.ini, changes to tox test

* Adds badges for Travis and AppVeyor unit tests status

* Adds README with ASCIIDoc format, will replace exisiting

* Encloses text in Cell or selected text with certain symbols (#2158)

* Encloses text in Cell or selected text with certain symbols

* Corrects position of cursor. Fixes text selection highlight

* Fixes select text (#2160)

* Adds a flag to wx.TextControl to force selection highlight on Windows.

* Text Editor - Encloses text in Cell or selected text with certain symbols. Adds support for Ctrl-3 and Ctrl-4 (Comment/Uncomment)

* Fix comment/uncomment index range in Text Editor

* Fix enclosing text

* Fix variables creation

* Fix keys in Grid editor

* Fix keys in Grid Editor, [ and { still don't trigger

* Fix error message from TreePlugin

* Fix list selection on contextsuggestion. BREAKS enclose text in cell editor

* Disable enclose text in cell editor when in Linux

* Fixes { and [ in grid editor. Still disable in cell editor, on Linux

* Adds autoident to Text Editor

* Auto-indents, when first Task, Test or Keyword

* Fixes { and [ in grid editor. Still disable in cell editor, on Linux

* Fixes { and [ in Windows, grid editor

* Fix keys (#2178)

* Fixes { and [ in grid editor. Still disable in cell editor, on Linux

* Avoids beep on keywords suggestions when on Linux

* Adds ! to Save item on menu. Not detected when removed. (#2180)

* Indents and de-indents block of selected text (#2181)

* Experiments getting selection lines

* Indent and de-indent blocks of text

* Correct imports (#2182)

* Adds conditions for wxPython 4.1.0 (#2184)

* Upgrade wxPython to 4.1.0 (#2187)

* Adds conditions for wxPython 4.1.0

* Fixes #2186

* Update docs about v1.7.4.2

* Log misc fixes (#2198)

* Fixes syntax error

* Makes error in removing log files a byte buffer.

* Makes a test compatible with RF 3.2.1

* Better error and removal of old log files. (#2199)

* Changes code to allow starting with File Explorer or Tree plugins disabled

* Fix parsing warning of report/ log html file (#2212)

Should not show this warning message if there're report/log html file in the workspace.

Co-authored-by: Johnny Huang <[email protected]>

* Fix for 1668: Given a large test suite, selecting all tests from the root of tree, freezes RIDE for some time (#2210)

* 1668: The Select All Tests command on the root of a deeply nested test folder, freezes RIDE for several minutes.
The problem is caused by Tree.SelectAllTests strategy: expanding and collapsing all the nodes. This causes CPU waste to expand/collapse (and maybe render) and wait for the creation of the tree node handlers.
The idea of the fix is to navigate the tests using the link between controllers. In order to avoid all the dancing of the tree nodes.
In this commit:

- Changed Tree.SelectAllTests() to extract all the TestCaseController(s) and invoke TestSelectionController to change the selection for these.
- Now both _ActionHandler OnDeselectAllTests() and OnSelectAllTests() invoke Tree.SelectAllTests(), with a parameter.
- When a new TestCaseHandler is created, is registered to be notified about selection changes. It uses this notification to update the graphical node with the check.
-  RideTestSelectedForRunningChanged now also holds the controller of the test which has changed selection and whether has been selected or unselected.

* Replace Tree DeselectAllTests(node) with SelectAllTests(node,False) as it's much more efficient.

* TestSelectionController: Keep a copy of the tests to propagate in the event, rather than rebuild it everytime.

* When selecting multiple tests, from the test search, do it efficiently.

TestSelectionController: add select_all() to select multiple tests efficiently. Rewrite unselect_all() in terms of select_all()

Tree: when selecting multiple tests, no need to navigate the full tree, just use TestSelectionController.

* When deselecting multiple tests, from the test search, do it efficiently.

Tree: when deselecting multiple tests, no need to navigate the full tree, just use TestSelectionController.

* Do not expand all the tree nodes when selecting failed/passed tests.

- Keep the information of failed/passed tests in TestCaseController
- Update the information on the test execution
- When selecting only failed/passed tests navigate the controller'tree rather than the graphical tree.
- removed method _for_all_tests() as it was causing all the nodes to be loaded/rendered.

* When selecting/deselecting multiple Tests, notify a single selection change event. Rather than one for each Test.

* Restore previous behavior with "Select Failed/Passed": select only those and de-select any other test.

* keep track of the selected tests using the TestCaseController(s), instead of the list of names.

This removes the need for listen of name changes.

* No need to generate the list of names, when determining if there's any.

* Fix TestSelectionController.add_tag()

* Handle RideTestSelectedForRunningChanged event on a new wx thread stack.
This is to avoid the "Recursionerror: maximum recursion depth exceeded"

* Remove unused variable.

* Propagate the RideTestSelectedForRunningChanged event only if the selection actually changed.

Co-authored-by: Valerio Bruno <[email protected]>

* Fix tree node (#2214)

* Increase development version.

* Fixes error message on RIDE Log about missing tree_node_selected.

* Fixes error message on RIDE Log about missing clear_all. (#2215)

* Stops log when memory exceeds limit.

Co-authored-by: Helio Guilherme <[email protected]>
Co-authored-by: Nyral <[email protected]>
Co-authored-by: Nyral <[email protected]>
Co-authored-by: Johnny.H <[email protected]>
Co-authored-by: Johnny Huang <[email protected]>
Co-authored-by: Valerio <[email protected]>
Co-authored-by: Valerio Bruno <[email protected]>

* Nyral/fix encodings (#2217)

* Refactored how text econding is done in _AppendText

* Separates AppendText for MessagesLog. Adds process memory limit on MessagesLog.

* Adds psutil to requirements.

* Closes and reopens Messages Log window when process memory exceeds 80%

* Windows: Log fixed, Output broken. More Debug Outputs.

* Stops log when memory exceeds limit.

* Correct output, when set PYTHONIOENCODING=utf-8 on Windows

Co-authored-by: Nyral <[email protected]>
Co-authored-by: Helio Guilherme <[email protected]>

* Correct encoding for Log (#2218)

* Fixes tree selection, because of wrong variable name. (#2219)

Co-authored-by: Johnny Huang <[email protected]>
Co-authored-by: Valerio <[email protected]>
Co-authored-by: Valerio Bruno <[email protected]>
Co-authored-by: Hélio Guilherme <[email protected]>
Co-authored-by: Helio Guilherme <[email protected]>
Co-authored-by: Nyral <[email protected]>
Co-authored-by: Nyral <[email protected]>

* Revert "Sync with upstreem (#1)"

This reverts commit fb7ecbd.

* Fix incorrect combo box size on Mac OS.

* Fix typos.

* Fix incorrect import preference textctrl focus on Windows.

* Adjust combo box size for Linux.

Co-authored-by: Johnny Huang <[email protected]>
Co-authored-by: Valerio <[email protected]>
Co-authored-by: Valerio Bruno <[email protected]>
Co-authored-by: Hélio Guilherme <[email protected]>
Co-authored-by: Helio Guilherme <[email protected]>
Co-authored-by: Nyral <[email protected]>
Co-authored-by: Nyral <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Python3.8 Observed in Python 3.8

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants