Skip to content

Commit

Permalink
Merge tag 'v4.6.3' into cpython
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Jul 31, 2021
2 parents d916be0 + 7c74b50 commit ba30e9b
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions Lib/importlib/metadata/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import pathlib
import zipfile
import operator
import platform
import textwrap
import warnings
import functools
Expand Down Expand Up @@ -45,16 +44,6 @@
]


def _pypy_partial(val):
"""
Adjust for variable stacklevel on partial under PyPy.
Workaround for #327.
"""
is_pypy = platform.python_implementation() == 'PyPy'
return val + is_pypy


class PackageNotFoundError(ModuleNotFoundError):
"""The package was not found."""

Expand Down Expand Up @@ -251,7 +240,7 @@ class DeprecatedList(list):
warnings.warn,
"EntryPoints list interface is deprecated. Cast to list if needed.",
DeprecationWarning,
stacklevel=_pypy_partial(2),
stacklevel=2,
)

def __setitem__(self, *args, **kwargs):
Expand Down Expand Up @@ -400,7 +389,7 @@ class Deprecated:
warnings.warn,
"SelectableGroups dict interface is deprecated. Use select.",
DeprecationWarning,
stacklevel=_pypy_partial(2),
stacklevel=2,
)

def __getitem__(self, name):
Expand Down

0 comments on commit ba30e9b

Please sign in to comment.