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

 
 

bug #50327: New graphics properties deprecation mechanism

Submitted by:  Pantxo Diribarne <pantxo>
Submitted on:  Thu 16 Feb 2017 01:13:49 PM UTC  
 
Category:  Plotting Severity:  1 - Wish
Priority:  5 - Normal Item Group:  Feature Request
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  dev Operating System:  Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

( Jump to the original submission)

Fri 24 Mar 2017 05:22:06 PM UTC, comment #14:

Changing status to fixed.

Avinoam Kalma <avinoam>
Project Member
Mon 13 Mar 2017 12:07:30 AM UTC, 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 12 Mar 2017 08:51:57 PM UTC, comment #12:

I attached a patch.

(file #39983)

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

Actually, it can be any toolkit.

Rik <rik5>
Project Administrator
Sun 12 Mar 2017 06:20:24 AM UTC, 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 23 Feb 2017 06:44:40 PM UTC, 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 22 Feb 2017 05:56:04 PM UTC, 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 20 Feb 2017 05:30:50 AM UTC, comment #7:

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

Rik <rik5>
Project Administrator
Sun 19 Feb 2017 08:23:59 PM UTC, 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 19 Feb 2017 06:53:43 PM UTC, 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 19 Feb 2017 01:04:05 AM UTC, 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 17 Feb 2017 12:15:53 PM UTC, comment #3:

May I push the patch?

Pantxo Diribarne <pantxo>
Project Member
Thu 16 Feb 2017 05:16:07 PM UTC, 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 16 Feb 2017 04:21:43 PM UTC, 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 16 Feb 2017 01:13:49 PM UTC, 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 Files:
   
   
Comment:
   

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

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can 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 24 Mar 2017 05:22:06 PM UTC avinoam StatusPatch Submitted => Fixed
    Sun 12 Mar 2017 08:51:57 PM UTC pantxo Attached File- => Added silence_deprecated2.patch, #39983
        StatusConfirmed => Patch Submitted
    Sun 12 Mar 2017 06:20:24 AM UTC rik5 StatusFixed => Confirmed
    Mon 20 Feb 2017 05:30:50 AM UTC rik5 StatusIn Progress => Fixed
        Open/ClosedOpen => Closed
    Sun 19 Feb 2017 08:23:59 PM UTC pantxo Attached File- => Added nodeprec.patch, #39793
    Sun 19 Feb 2017 06:53:43 PM UTC mmuetzel StatusFixed => In Progress
        Open/ClosedClosed => Open
    Sun 19 Feb 2017 01:04:05 AM UTC rik5 StatusPatch Submitted => Fixed
        Open/ClosedOpen => Closed
    Thu 16 Feb 2017 03:47:56 PM UTC pantxo Severity3 - Normal => 1 - Wish
    Thu 16 Feb 2017 01:44:20 PM UTC pantxo Attached File- => Added deprecate2.patch, #39763

    Back to the top


    Powered by Savane 3.3