bugGNU Octave - Bugs: bug #50327, New graphics properties...

 
 

bug #50327: New graphics properties deprecation mechanism

Submitted by:  Pantxo Diribarne <pantxo>
Submitted on:  Thu Feb 16 13:13:49 2017  
 
Category: PlottingSeverity: 1 - Wish
Priority: 5 - NormalItem Group: Feature Request
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: Any

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Fri Mar 24 17:22:06 2017, comment #14:

Changing status to fixed.

Avinoam Kalma <avinoam>
Project Member
Mon Mar 13 00:07:30 2017, comment #13:

Great. I pushed your patch here http://hg.savannah.gnu.org/hgweb/octave/rev/a921b6b772f3.

In the process I found a bug with clf ("reset") and FLTK which I will file separately.

Rik <rik5>
Project Administrator
Sun Mar 12 20:51:57 2017, comment #12:

I attached a patch.

(file #39983)

Pantxo Diribarne <pantxo>
Project Member
Sun Mar 12 06:22:25 2017, comment #11:

Actually, it can be any toolkit.

Rik <rik5>
Project Administrator
Sun Mar 12 06:20:24 2017, comment #10:

I'm re-opening the bug report. With the gnuplot toolkit I get warnings whenever reset is used explicitly.

Sample Code:

Here is another example.

Rik <rik5>
Project Administrator
Thu Feb 23 18:44:40 2017, comment #9:

I finally opted for disabling warnings directly in F__get__:

http://hg.savannah.gnu.org/hgweb/octave/rev/a88575e87481

Pantxo Diribarne <pantxo>
Project Member
Wed Feb 22 17:56:04 2017, comment #8:

I just noticed that when using gnuplot graphics toolkit we get a warning each time an axes is redrawn:

This is because _gnuplot_draw_axes_ uses the special "__get__" function to obtain hidden properties, which triggers the warning.
It seems to be in one place only so silencing the warning there should be enough. I'll prepare a cset ASAP

Pantxo Diribarne <pantxo>
Project Member
Mon Feb 20 05:30:50 2017, comment #7:

I pushed the patch here http://hg.savannah.gnu.org/hgweb/octave/rev/5d9d756724cc. Re-closing report.

Rik <rik5>
Project Administrator
Sun Feb 19 20:23:59 2017, comment #6:

Confirmed. I attached a patch in which I disabled the warning as suggested by Markus.

(file #39793)

Pantxo Diribarne <pantxo>
Project Member
Sun Feb 19 18:53:43 2017, comment #5:

"test imshow" now fails. The actual issue originates in reset where the deprecated properties raise a warning when they are set to their default value (graphics.cc @ line 5001).
Maybe that could be solved by turning that particular warning off at the beginning of the reset function and re-setting it to its previous setting afterwards (@ around line 10228).
Re-opening for this issue.

Markus M├╝tzel <mmuetzel>
Project Member
Sun Feb 19 01:04:05 2017, comment #4:

I pushed your patch here (http://hg.savannah.gnu.org/hgweb/octave/rev/239a9fed80de). Only two small changes, in the .tst file I used '##' rather than '%%' to start comment lines and I found there were some lines that were missing semicolons.

Thanks. Marking as fixed and closing report.

Rik <rik5>
Project Administrator
Fri Feb 17 12:15:53 2017, comment #3:

May I push the patch?

Pantxo Diribarne <pantxo>
Project Member
Thu Feb 16 17:16:07 2017, comment #2:

>> How does Matlab handle this?


I don't really know but I am under the impression (see comments in bug #50227) that they first hide the property, eventually announce the change in the release notes (not sure), and remove it later if needed.

I think the addition of a warning is much cle

Pantxo Diribarne <pantxo>
Project Member
Thu Feb 16 16:21:43 2017, comment #1:

Deprecation is definitely a nice way to handle obsolescence. How does Matlab handle this? Do they just remove properties, and then people fix their scripts when Matlab produces an error?

Rik <rik5>
Project Administrator
Thu Feb 16 13:13:49 2017, original submission:

We currently don't have a way to deprecate properties as we do for built-in functions.

The attached patch is a first attempt to do so:

  • add a way to mark a property as deprecated (new "d" flag for genprop.awk) so that users are automatically warned when they us it
  • add a .tst file in which we can check that a given property has disappeared from a given version.
Pantxo Diribarne <pantxo>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #39983:  silence_deprecated2.patch added by pantxo (4kB - text/x-patch)
file #39793:  nodeprec.patch added by pantxo (3kB - application/x-download)
file #39763:  deprecate2.patch added by pantxo (10kB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by avinoam (Posted a comment)
  • -unavailable- added by mmuetzel (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by pantxo (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 13 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri Mar 24 17:22:06 2017avinoamStatusPatch Submitted=>Fixed
    Sun Mar 12 20:51:57 2017pantxoAttached File-=>Added silence_deprecated2.patch, #39983
      StatusConfirmed=>Patch Submitted
    Sun Mar 12 06:20:24 2017rik5StatusFixed=>Confirmed
    Mon Feb 20 05:30:50 2017rik5StatusIn Progress=>Fixed
      Open/ClosedOpen=>Closed
    Sun Feb 19 20:23:59 2017pantxoAttached File-=>Added nodeprec.patch, #39793
    Sun Feb 19 18:53:43 2017mmuetzelStatusFixed=>In Progress
      Open/ClosedClosed=>Open
    Sun Feb 19 01:04:05 2017rik5StatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
    Thu Feb 16 15:47:56 2017pantxoSeverity3 - Normal=>1 - Wish
    Thu Feb 16 13:44:20 2017pantxoAttached File-=>Added deprecate2.patch, #39763

    Back to the top


    Powered by Savane 3.1-cleanup1