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

MAINT: use collections.abc in basinhopping #8989

Merged
merged 1 commit into from
Jul 2, 2018
Merged

Conversation

andyfaff
Copy link
Contributor

@andyfaff andyfaff commented Jul 1, 2018

Deprecation warning causing CI issue for 3.7:

DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working

See at: https://travis-ci.org/scipy/scipy/jobs/398766987

@andyfaff
Copy link
Contributor Author

andyfaff commented Jul 1, 2018

This should be fairly uncontroversial.

@andyfaff
Copy link
Contributor Author

andyfaff commented Jul 1, 2018

Except collections.abc doesn't exist for 2.7. It's not clear why isinstance(obj, Callable) has to be used here, why can't is callable(obj) be used?

@rgommers
Copy link
Member

rgommers commented Jul 1, 2018

is callable(obj) seems fine and clearer. probably wasn't used earlier because in Python 3.0-3.1 it was deprecated.

@andyfaff
Copy link
Contributor Author

andyfaff commented Jul 1, 2018

Done, and rebased.

@rgommers rgommers merged commit c61e36f into scipy:master Jul 2, 2018
@rgommers
Copy link
Member

rgommers commented Jul 2, 2018

LGTM, in it goes. Thanks @andyfaff

@rgommers rgommers added this to the 1.2.0 milestone Jul 2, 2018
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

2 participants