Conversation
81236ff to
58f81f6
Compare
Current coverage is 62.11% (diff: 42.85%)@@ master #7771 diff @@
==========================================
Files 174 174
Lines 56028 55984 -44
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
- Hits 34803 34777 -26
+ Misses 21225 21207 -18
Partials 0 0
|
lib/matplotlib/backend_bases.py
Outdated
| """ | ||
| return self._joinstyle | ||
|
|
||
| def get_linestyle(self, style): |
There was a problem hiding this comment.
These need to go through a deprecation cycle.
There was a problem hiding this comment.
In #7730 (comment), you were fine changing the signature of get_linestyle (which would be a breaking change for anyone (hem) relying on this method) without a deprecation cycle, is it clear that removing the method is any different?
There was a problem hiding this comment.
That is a fair point. Currently considering my inconsistencies 😜 .
| Affine2D(), paths, transforms, [], Affine2D())) | ||
|
|
||
|
|
||
| def _define_deprecated_functions(ns): |
| gc.set_capstyle(cap) | ||
| gc.set_dashes(self._dashOffset, self._dashSeq) | ||
|
|
||
| funcname = self._lineStyles.get(self._linestyle, '_draw_nothing') |
There was a problem hiding this comment.
This will now raise on non-valid self._linestyle. Do the git logs provide any clue why was this coded this way?
There was a problem hiding this comment.
set_linestyle (the class here inherits it from lines.Line2D) now has extensive validation before setting _linestyle, which means invalid _linestyle should never happen. The same code in lines was committed by jdh as far back as 2004, whereas the history of set_linestyle is a bit difficult to unwind but I'd guess the checking came later.
| else: | ||
| self.set_linestyle((0, seq)) | ||
|
|
||
| def _draw_solid(self, renderer, gc, path, trans): |
There was a problem hiding this comment.
I do not think we want to remove setting these with out a deprecation cycle.
There was a problem hiding this comment.
butbutbut they're private :/
There was a problem hiding this comment.
I do not mind removing the methods, it the inner call to gc.set_linestyle that I am worried about.
There was a problem hiding this comment.
(I meant to click on the line below and apparently missed).
There was a problem hiding this comment.
The whole point is that graphics contexts don't have that property anymore.
58f81f6 to
f513ac5
Compare
| self.set_linewidth(1) | ||
|
|
||
| self._pen.SetStyle(self._style) | ||
| self.gfx_ctx.SetPen(self._pen) |
There was a problem hiding this comment.
Does this pen setting just get replaced elsewhere, or do we never use a pen?
There was a problem hiding this comment.
We never use set_linestyle. Pens are set in other parts of the code though.
| 'miter': wx.JOIN_MITER, | ||
| 'round': wx.JOIN_ROUND} | ||
|
|
||
| _dashd_wx = wxc.dashd_wx |
There was a problem hiding this comment.
Should we deprecate dashd_wx as well?
There was a problem hiding this comment.
There's a bunch of other entries in wx_compat.py which are not used (e.g. StockCursor) so I think that would belong to a (separate) cleanup of wx_compat.
|
I am still concerned about pulling the (unused by us) public method off of the |
Also simplify linestyle handling by Line2D.
f513ac5 to
cd54509
Compare
|
Turned the removal into a deprecation. |
|
Ping @tacaswell? |
Alternative to #7730 (see #7730 (comment) in particular).