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

DEP: improve message for deprecated private API for sparse #19226

Merged
merged 10 commits into from
Sep 26, 2023

Conversation

hoangle96
Copy link
Contributor

@hoangle96 hoangle96 commented Sep 12, 2023

Reference issue

Solving a part of issue gh-18279
closes #19241

What does this implement/fix?

Finish #18279 for sparse

Additional information

@hoangle96 hoangle96 changed the title DEP scipy#18279 improve message for deprecated private API DEP scipy#18279 improve message for deprecated private API for sparse Sep 12, 2023
Copy link
Member

@j-bowhay j-bowhay left a comment

Choose a reason for hiding this comment

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

Thanks @hoangle96 some minor changes required

('scipy.stats.biasedurn', None),
('scipy.stats.kde', None),
('scipy.stats.morestats', None),
('scipy.stats.mstats_basic', 'mstats'),
('scipy.stats.mstats_extras', 'mstats'),
('scipy.stats.mvn', None),
('scipy.stats.stats', None)])

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change

return getattr(_bsr, name)
return _sub_module_deprecation(sub_package="sparse", module="bsr",
private_modules=["_bsr"], all=__all__,
attribute=name)
Copy link
Member

Choose a reason for hiding this comment

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

New line at end of file needed

Copy link
Member

Choose a reason for hiding this comment

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

Still missing an new line

return getattr(_data, name)
return _sub_module_deprecation(sub_package="sparse", module="data",
private_modules=["_data"], all=__all__,
attribute=name)
Copy link
Member

Choose a reason for hiding this comment

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

new line at end of file

Comment on lines 9 to 12
'ArpackError',
'ArpackNoConvergence',
'eigs',
'eigsh', 'lobpcg', 'svds', 'arpack', 'test'
Copy link
Member

Choose a reason for hiding this comment

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

can you revert the change here please

Comment on lines 9 to 23
'bicg',
'bicgstab',
'cg',
'cgs',
'gcrotmk',
'gmres',
'lgmres',
'lsmr',
'lsqr',
'minres',
'qmr',
'tfqmr',
'utils',
'iterative',
'test'
Copy link
Member

Choose a reason for hiding this comment

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

and here

Copy link
Member

Choose a reason for hiding this comment

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

again please revert this change it makes it harder to tell if anything has been removed

Comment on lines 9 to 18
'expm',
'inv',
'solve',
'solve_triangular',
'spsolve',
'is_pydata_spmatrix',
'LinearOperator',
'UPPER_TRIANGULAR',
'MatrixPowerOperator',
'ProductOperator'
Copy link
Member

Choose a reason for hiding this comment

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

and here

return _sub_module_deprecation(sub_package="sparse.linalg", module="eigen",
private_modules=["_eigen"], all=__all__,
attribute=name)

Copy link
Member

Choose a reason for hiding this comment

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

one too many lines at end of file!

@j-bowhay j-bowhay changed the title DEP scipy#18279 improve message for deprecated private API for sparse DEP: improve message for deprecated private API for sparse Sep 12, 2023
@j-bowhay j-bowhay added scipy.sparse deprecated Items related to behavior that has been deprecated labels Sep 12, 2023
Copy link
Contributor Author

@hoangle96 hoangle96 left a comment

Choose a reason for hiding this comment

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

Making sure changes are compliant with PEP 8. Removing unnecessary changes

Copy link
Member

@j-bowhay j-bowhay left a comment

Choose a reason for hiding this comment

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

Thanks @hoangle96 still a few changes required

return getattr(_bsr, name)
return _sub_module_deprecation(sub_package="sparse", module="bsr",
private_modules=["_bsr"], all=__all__,
attribute=name)
Copy link
Member

Choose a reason for hiding this comment

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

Still missing an new line

Comment on lines 9 to 23
'bicg',
'bicgstab',
'cg',
'cgs',
'gcrotmk',
'gmres',
'lgmres',
'lsmr',
'lsqr',
'minres',
'qmr',
'tfqmr',
'utils',
'iterative',
'test'
Copy link
Member

Choose a reason for hiding this comment

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

again please revert this change it makes it harder to tell if anything has been removed

@hoangle96
Copy link
Contributor Author

@j-bowhay I have updated the changes to be PEP8 complaint and revert the unnecessary changes.

Copy link
Member

@j-bowhay j-bowhay left a comment

Choose a reason for hiding this comment

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

Thanks @hoangle96! Congratulations on your first contribution to SciPy, if you are interested in doing one of the other modules from the issue that would be greatly appreciated!

@j-bowhay j-bowhay added this to the 1.12.0 milestone Sep 26, 2023
@j-bowhay j-bowhay merged commit bf77616 into scipy:main Sep 26, 2023
22 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecated Items related to behavior that has been deprecated scipy.sparse
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: utils from scipy.sparse.sputils are not available from scipy.sparse module
2 participants