Fix index slice in ExtensionPointChangedEvent when plugin changes#357
Merged
Conversation
Contributor
|
Do we want to try to push this through for the 5.0.0 release, or is it intended to wait like #354? |
Contributor
Author
|
I don't think this needs to wait like #354. @rahulporuri what do you think? |
Contributor
Author
|
On the other hand, if this bug has lived this long (13 years) and no one realized it, it is probably not important enough for it to block the upcoming release. |
rahulporuri
approved these changes
Nov 24, 2020
Contributor
rahulporuri
left a comment
There was a problem hiding this comment.
LGTM. Let's push this through in this release.
Contributor
|
@kitchoi sorry for the enormous delay on this PR. |
Contributor
Author
|
No problem at all. Thank you! |
Contributor
Author
|
I believe this has not gone into the maintenance branch, so I am deploying the 'need backport to 5.0' tag. |
aaronayres35
pushed a commit
that referenced
this pull request
Nov 30, 2020
aaronayres35
added a commit
that referenced
this pull request
Dec 2, 2020
* Fix index slice in ExtensionPointChangedEvent when plugin changes (#357) * Turn off macOS builds on Travis CI (#375) This PR turns off expensive macOS builds on Travis CI. We'll eventually use GitHub Actions to replace these. * update changelog with backported PRs * Make example run from any directory (#377) * Make it possible to run example scripts from anywhere. * Add a docstring for the test case * Add missing __init__.py * Import abcdefg... * Refactor documentation links to source on GitHub (#379) * Refactor external links to demo examples from extension_points.rst * Update links to github in introduction.rst * Refactor substitutions * Group substitutions * Update other references to github links * Flake8 * Remove two other links to github that point to TraitsGUI * Remove redundant newlines * Maintain all substituions in the same place * Remove two redundant lines * Contribute examples to etsdemo (#380) * remove logging from hello world and motd * remove logging from other examples * move examples into envisage * update the single URL in docs/conf.py * add examples as package_data * add entry point * flake8 * add demo folder and update package_data based off code review suggestion * Update docs/source/conf.py Co-authored-by: Kit Choi <kitchoi@users.noreply.github.com> * rename and add test for entry point * move GUI_Application example into envisage/examples * move old examples into envisage/examples/demo/legacy * Revert "move old examples into envisage/examples/demo/legacy" This reverts commit c026040. * move old examples into a new subdirectory called legacy * add a readme to reference new location for examples Co-authored-by: Kit Choi <kitchoi@users.noreply.github.com> * more changelog updates * more changes to changelog Co-authored-by: Kit Choi <kitchoi@users.noreply.github.com> Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
aaronayres35
added a commit
that referenced
this pull request
Dec 4, 2020
* Fix index slice in ExtensionPointChangedEvent when plugin changes (#357) * Turn off macOS builds on Travis CI (#375) This PR turns off expensive macOS builds on Travis CI. We'll eventually use GitHub Actions to replace these. * update changelog with backported PRs * Make example run from any directory (#377) * Make it possible to run example scripts from anywhere. * Add a docstring for the test case * Add missing __init__.py * Import abcdefg... * Refactor documentation links to source on GitHub (#379) * Refactor external links to demo examples from extension_points.rst * Update links to github in introduction.rst * Refactor substitutions * Group substitutions * Update other references to github links * Flake8 * Remove two other links to github that point to TraitsGUI * Remove redundant newlines * Maintain all substituions in the same place * Remove two redundant lines * Contribute examples to etsdemo (#380) * remove logging from hello world and motd * remove logging from other examples * move examples into envisage * update the single URL in docs/conf.py * add examples as package_data * add entry point * flake8 * add demo folder and update package_data based off code review suggestion * Update docs/source/conf.py Co-authored-by: Kit Choi <kitchoi@users.noreply.github.com> * rename and add test for entry point * move GUI_Application example into envisage/examples * move old examples into envisage/examples/demo/legacy * Revert "move old examples into envisage/examples/demo/legacy" This reverts commit c026040. * move old examples into a new subdirectory called legacy * add a readme to reference new location for examples Co-authored-by: Kit Choi <kitchoi@users.noreply.github.com> * more changelog updates * more changes to changelog Co-authored-by: Kit Choi <kitchoi@users.noreply.github.com> Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
aaronayres35
added a commit
that referenced
this pull request
Dec 4, 2020
* Backports for 5.0.0 and update changelog (#378) * Fix index slice in ExtensionPointChangedEvent when plugin changes (#357) * Turn off macOS builds on Travis CI (#375) This PR turns off expensive macOS builds on Travis CI. We'll eventually use GitHub Actions to replace these. * update changelog with backported PRs * Make example run from any directory (#377) * Make it possible to run example scripts from anywhere. * Add a docstring for the test case * Add missing __init__.py * Import abcdefg... * Refactor documentation links to source on GitHub (#379) * Refactor external links to demo examples from extension_points.rst * Update links to github in introduction.rst * Refactor substitutions * Group substitutions * Update other references to github links * Flake8 * Remove two other links to github that point to TraitsGUI * Remove redundant newlines * Maintain all substituions in the same place * Remove two redundant lines * Contribute examples to etsdemo (#380) * remove logging from hello world and motd * remove logging from other examples * move examples into envisage * update the single URL in docs/conf.py * add examples as package_data * add entry point * flake8 * add demo folder and update package_data based off code review suggestion * Update docs/source/conf.py Co-authored-by: Kit Choi <kitchoi@users.noreply.github.com> * rename and add test for entry point * move GUI_Application example into envisage/examples * move old examples into envisage/examples/demo/legacy * Revert "move old examples into envisage/examples/demo/legacy" This reverts commit c026040. * move old examples into a new subdirectory called legacy * add a readme to reference new location for examples Co-authored-by: Kit Choi <kitchoi@users.noreply.github.com> * more changelog updates * more changes to changelog Co-authored-by: Kit Choi <kitchoi@users.noreply.github.com> Co-authored-by: Mark Dickinson <mdickinson@enthought.com> * add release date Co-authored-by: Kit Choi <kitchoi@users.noreply.github.com> Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the extensions list is changed by adding or removing a plugin, the ExtensionPointChangedEvent reports a slice object as the index, but the end value is incorrect: If one uses that index to reproduce the new list from the values of the old list, they get incorrect results.
The first commit adds two assertions. The first assertion fails with master like this:
That is, if you use the index on the old values to recover the removed values, you get the wrong answer.
The second assertion fails with master like this:
That is if you use the index on the old values and assign the "added" values to it, you also don't recover the new values.
The second commit fixes both assertions, and make the necessary change to the test that asserts the slice end value.