Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate safeweakref and replace its uses #275

Merged
merged 14 commits into from
Feb 27, 2020
Merged

Conversation

mdickinson
Copy link
Member

@mdickinson mdickinson commented Feb 25, 2020

Some safeweakref-related cleanup, aimed at eventual removal of the safeweakref module.

  • Don't try to make safeweakref a drop-in replacement for weakref: safeweakref no longer does from weakref import *
  • Deprecate the existing safeweakref.ref
  • Replace existing uses of safeweakref with a simpler, private version that still handles bound methods specially, but doesn't do the caching that safeweakref does
  • Add tests for the deprecation of safeweakref.ref
  • Add tests to cover the uses of that simpler replacement.
  • Make safeweakref flake8-clean, and remove it from the flake8 exclusion list.

Closes #271

@codecov-io
Copy link

codecov-io commented Feb 25, 2020

Codecov Report

Merging #275 into master will increase coverage by 0.01%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #275      +/-   ##
=========================================
+ Coverage   53.78%   53.8%   +0.01%     
=========================================
  Files         135     135              
  Lines        4397    4394       -3     
  Branches      511     511              
=========================================
- Hits         2365    2364       -1     
+ Misses       1991    1989       -2     
  Partials       41      41
Impacted Files Coverage Δ
...visage/plugins/python_shell/view/namespace_view.py 0% <ø> (ø) ⬆️
envisage/ui/workbench/workbench_application.py 58.69% <ø> (-0.88%) ⬇️
envisage/ui/tasks/action/exit_action.py 0% <ø> (ø) ⬆️
envisage/plugins/event_manager/plugin.py 0% <0%> (ø) ⬆️
envisage/ui/tasks/preferences_pane.py 53.57% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2ea474b...f0b9833. Read the comment docs.

mdickinson added a commit that referenced this pull request Feb 26, 2020
mdickinson added a commit that referenced this pull request Feb 26, 2020
…st (#280)

* Exclude single_project from flake8 check; thin out flake8 'ignore' list

* Ignore safeweakref.py until #275 can be merged
@mdickinson
Copy link
Member Author

mdickinson commented Feb 26, 2020

@corranwebster I've been self-merging a good few Envisage PRs (bad Mark!), but this one could probably use a review, if you have the bandwidth.

Copy link
Contributor

@corranwebster corranwebster left a comment

Choose a reason for hiding this comment

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

LGTM

@mdickinson mdickinson merged commit 36eb4d9 into master Feb 27, 2020
@mdickinson mdickinson deleted the deprecate-safeweakref branch February 27, 2020 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get rid of (or streamline) safeweakref
3 participants