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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate rename_vertices parameter in disjoint_union #35907

Merged
merged 2 commits into from
Sep 10, 2023

Conversation

OP5642
Copy link
Contributor

@OP5642 OP5642 commented Jul 5, 2023

馃摎 Description

The rename_vertices parameter is not mentioned anywhere within the body of the method disjoint_union. We remove the parameter.

馃摑 Checklist

  • The title is concise, informative, and self-explanatory.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

@OP5642
Copy link
Contributor Author

OP5642 commented Jul 5, 2023

@tscrim

@tscrim
Copy link
Collaborator

tscrim commented Jul 6, 2023

You cannot simply remove it. You must first deprecate it. So set its default value to None, then check if it is not None, then print a deprecation message:

if rename_vertices is not None:
    from sage.misc.superseded import deprecation
    deprecation(35907, 'the "rename_vertices" argument is deprecated')

cc-ing @jhpalmieri in case you have an opinion on this argument.

@jhpalmieri
Copy link
Member

Since the variable has no effect, I don't think it's that important to deprecate it. I don't object to deprecating it, but it's not a big deal to me.

@tscrim
Copy link
Collaborator

tscrim commented Jul 6, 2023

Thanks. Policy is to deprecate it just case someone has code that is using it. Anyways, I wasn't sure if you had a reason this argument should actually be implemented (and hence, would be a bug instead).

@OP5642 OP5642 force-pushed the deprecate_rename_vertices branch from 5042161 to a6892d4 Compare July 9, 2023 09:23
@OP5642
Copy link
Contributor Author

OP5642 commented Jul 9, 2023

Sorry for misunderstanding, @tscrim. I think it is deprecated appropriately now.

@github-actions
Copy link

github-actions bot commented Jul 9, 2023

Documentation preview for this PR (built with commit a6892d4; changes) is ready! 馃帀

@jhpalmieri
Copy link
Member

I think this is ready to go. Any objections to changing it from "needs work" to "positive review"? (The new deprecation doesn't have a corresponding doctest, but since the parameter wasn't used in the first place, I don't think we need to add a doctest.)

Copy link
Collaborator

@tscrim tscrim left a comment

Choose a reason for hiding this comment

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

@jhpalmieri Yes, I agree that it is fine without a doctest for it. We can set it to a positive review now.

@tscrim
Copy link
Collaborator

tscrim commented Sep 8, 2023

@OP5642 Please also change this from a draft PR to a regular PR too.

@OP5642 OP5642 marked this pull request as ready for review September 8, 2023 09:12
@vbraun vbraun merged commit 5a64b7c into sagemath:develop Sep 10, 2023
13 of 14 checks passed
@mkoeppe mkoeppe added this to the sage-10.2 milestone Sep 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants