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

Error: warnings has no attribute DeprecationWarning #75

Closed
nicoddemus opened this issue Aug 30, 2017 · 6 comments
Closed

Error: warnings has no attribute DeprecationWarning #75

nicoddemus opened this issue Aug 30, 2017 · 6 comments
Assignees
Labels

Comments

@nicoddemus
Copy link
Member

While testing pluggy off the branch from #72, I came across this error:

        if '__multicall__' in hookimpl.argnames:
            warnings.warn(
                "Support for __multicall__ is now deprecated and will be"
                "removed in an upcoming release.",
>               warnings.DeprecationWarning
            )
E           AttributeError: module 'warnings' has no attribute 'DeprecationWarning'

pluggy/pluggy/__init__.py

Lines 656 to 661 in 557cd3f

if '__multicall__' in hookimpl.argnames:
warnings.warn(
"Support for __multicall__ is now deprecated and will be"
"removed in an upcoming release.",
warnings.DeprecationWarning
)

And indeed warnings module doesn't have a DeprecationWarning.

We should add a test to catch this warnings (and any others we might have).

@goodboy
Copy link
Contributor

goodboy commented Aug 30, 2017

@nicoddemus wow yeah not sure how that slipped through.
Looks like DeprecationWarning is a built-in. Does it exist in py26?

@goodboy
Copy link
Contributor

goodboy commented Aug 30, 2017

@nicoddemus you ok if I just fix this in #72 or should I do a separate PR?

@nicoddemus
Copy link
Member Author

I'm running pytest's test suite right now and fixing the __multicall__ usages to see if there are other problems related to pluggy still, but after that I will push a PR fixing this particular issue. 😉

@nicoddemus
Copy link
Member Author

you ok if I just fix this in #72 or should I do a separate PR?

You replied a few seconds before me hehehe.

If you want to take a stab please go ahead, I just think we should do a separate PR because we also need to include a proper test for it.

@goodboy
Copy link
Contributor

goodboy commented Aug 30, 2017

@nicoddemus ok great I'm cool with you taking it ;)
I mean since you probably have your head in it already.

@nicoddemus
Copy link
Member Author

OK sounds good.

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

No branches or pull requests

2 participants