Skip to content

Deprecation Warnings #476

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

Closed
meatballs opened this issue Mar 4, 2016 · 8 comments
Closed

Deprecation Warnings #476

meatballs opened this issue Mar 4, 2016 · 8 comments
Assignees

Comments

@meatballs
Copy link
Member

Running the unit tests gives the following:

axelrod/tests/unit/test_player.py:169: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() instead

axelrod/strategy_transformers.py:79: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() instead
@meatballs meatballs added the bug label Mar 4, 2016
@meatballs
Copy link
Member Author

Looks like Django dealt with exactly the same issue here: django/django#4846

@meatballs
Copy link
Member Author

And Scipy did so here: ev-br/scipy@a9843db

(With code taken from the Django solution)

@marcharper marcharper reopened this Mar 5, 2016
@marcharper marcharper removed the bug label Mar 5, 2016
@marcharper
Copy link
Member

This is a bit of a mess -- I'd suggest reading this thread on the Python issue tracker, and maybe this one.

The story is that the Python maintainers decided to deprecate this two years ago in Python 3.0 but not include a deprecation warning until 3.5. Plus it seems that inspect.signature isn't a full replacement (but for our purposes I think it's good enough). However the function isn't being removed now since people maintaining libraries compatible with 2.7 and 3+ are upset, and it's not clear if and when the deprecated functions will be removed.

We can either adopt the scipy fix or just do nothing while the Python maintainers make up their minds. If we adopt the fix now, I vote we simply import the function from scipy (but scipy isn't currently a requirement for axelrod).

@drvinceknight
Copy link
Member

I don't like the idea of making scipy a requirement just for this. I'd vote for doing nothing for now...

@meatballs
Copy link
Member Author

Yep, let's sit tight. Too much of a mess to be worth getting into!

@drvinceknight
Copy link
Member

I suggest we keep this issue open (just in case someone else wanted to raise it).

@marcharper
Copy link
Member

Looks like the function won't be removed until 2.7 end-of-life (2020). Hopefully by then there's a standard solution, and if not, we can adopt scipy's approach.

@meatballs
Copy link
Member Author

Should be fixable >= 02-Dec-2016 #605

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

No branches or pull requests

3 participants