Skip to content

Error: warnings has no attribute DeprecationWarning #75

Description

@nicoddemus

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).

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions