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 is_* functions. #12824

Closed
sagetrac-JStarx mannequin opened this issue Apr 10, 2012 · 19 comments
Closed

Deprecate is_* functions. #12824

sagetrac-JStarx mannequin opened this issue Apr 10, 2012 · 19 comments

Comments

@sagetrac-JStarx
Copy link
Mannequin

sagetrac-JStarx mannequin commented Apr 10, 2012

As discussed here: http://groups.google.com/group/sage-devel/browse_thread/thread/e8c2470e270f616b/c760f4a79d28f467?lnk=gst&q=is_#, functions of the form is_SomeName(x) should be deprecated.

This patch removes 106 of them and replaces them with calls to isinstance. The patch was created by running the attached python script. It searches through the source for functions of the form

def is_SomeName(x):
    """a docstring"""
    return isinstance(x, SomeName)

where SomeName is the class of a Sage object, deletes them, and replaces any calls with calls to isinstance. After the script ran I made sure sage built, passed all its tests, and I looked through the diff to make sure nothing silly happened.

CC: @nilesjohnson

Component: misc

Keywords: is_functions

Work Issues: split patch, docs do not build

Branch/Commit: u/rws/delete_some_of_the_depreciated_is___functions_ @ 4236760

Reviewer: Dima Pasechnik

Issue created by migration from https://trac.sagemath.org/ticket/12824

@sagetrac-JStarx sagetrac-JStarx mannequin added this to the sage-5.11 milestone Apr 10, 2012
@sagetrac-JStarx sagetrac-JStarx mannequin added the p: major / 3 label Apr 10, 2012
@sagetrac-JStarx

This comment has been minimized.

@sagetrac-JStarx
Copy link
Mannequin Author

sagetrac-JStarx mannequin commented Apr 10, 2012

comment:1

Attachment: remove_is.py.gz

@sagetrac-JStarx
Copy link
Mannequin Author

sagetrac-JStarx mannequin commented Apr 10, 2012

Attachment: trac12824.patch.gz

@sagetrac-JStarx

This comment has been minimized.

@a-andre
Copy link

a-andre commented Jul 14, 2012

Work Issues: rebase

@a-andre
Copy link

a-andre commented Jul 14, 2012

comment:5

Please rebase your patch.

@jdemeyer jdemeyer modified the milestones: sage-5.11, sage-5.12 Aug 13, 2013
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.2, sage-6.3 May 6, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.3, sage-6.4 Aug 10, 2014
@rwst
Copy link

rwst commented Sep 3, 2014

@rwst
Copy link

rwst commented Sep 3, 2014

comment:11

Most hunks in this monster patch are either already applied or are failing, so I'm uploading what's left. However, docs do not build with this, something is seriously wrong.


New commits:

423676012824: Delete some deprecated is_* functions

@rwst
Copy link

rwst commented Sep 3, 2014

Changed work issues from rebase to docs do not build

@rwst
Copy link

rwst commented Sep 3, 2014

Commit: 4236760

@rwst
Copy link

rwst commented Apr 12, 2015

Changed work issues from docs do not build to split patch, docs do not build

@rwst
Copy link

rwst commented Apr 12, 2015

comment:12

This should be split up, at least in a rings/, a modular/ and a ticket for the rest.

@jdemeyer

This comment has been minimized.

@jdemeyer
Copy link

comment:13

You cannot just remove functions without deprecation first.

@jdemeyer jdemeyer changed the title Delete some of the depreciated is_* functions. Delete some of the deprecated is_* functions. Apr 13, 2015
@jdemeyer
Copy link

comment:14

I think the split up should done in a different way:

  1. stop using is_* functions in doctests.
  2. stop using is_* functions in the Sage library.
  3. deprecate is_* functions.

@jdemeyer

This comment has been minimized.

@jdemeyer jdemeyer changed the title Delete some of the deprecated is_* functions. Deprecate is_* functions. Apr 13, 2015
@mkoeppe
Copy link
Contributor

mkoeppe commented Oct 6, 2021

comment:16

superseded by Meta-ticket #32414

@mkoeppe
Copy link
Contributor

mkoeppe commented Oct 6, 2021

Changed author from Jim Stark to none

@mkoeppe mkoeppe removed this from the sage-6.4 milestone Oct 6, 2021
@dimpase
Copy link
Member

dimpase commented Dec 4, 2021

Reviewer: Dima Pasechnik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants