diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2018-06-03 09:50:25 -0400 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2018-06-03 09:50:25 -0400 |
| commit | cca86c7f1d4040834c3265ccecdd9e21b4036df5 (patch) | |
| tree | 6952f93a45a95659d36a93072e915688ca253a85 /pkg_resources/__init__.py | |
| parent | 7068f1d4c86e6d8e705a2b77da6c5dcf6a8d7bcd (diff) | |
| download | external_python_setuptools-cca86c7f1d4040834c3265ccecdd9e21b4036df5.tar.gz external_python_setuptools-cca86c7f1d4040834c3265ccecdd9e21b4036df5.tar.bz2 external_python_setuptools-cca86c7f1d4040834c3265ccecdd9e21b4036df5.zip | |
Use Python 3 syntax for new-style clasess
Diffstat (limited to 'pkg_resources/__init__.py')
| -rw-r--r-- | pkg_resources/__init__.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 91d00483..67015408 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -78,6 +78,9 @@ __import__('pkg_resources.extern.packaging.requirements') __import__('pkg_resources.extern.packaging.markers') +__metaclass__ = type + + if (3, 0) < sys.version_info < (3, 4): raise RuntimeError("Python 3.4 or later is required") @@ -537,7 +540,7 @@ class IResourceProvider(IMetadataProvider): """List of resource names in the directory (like ``os.listdir()``)""" -class WorkingSet(object): +class WorkingSet: """A collection of active distributions on sys.path (or a similar list)""" def __init__(self, entries=None): @@ -944,7 +947,7 @@ class _ReqExtras(dict): return not req.marker or any(extra_evals) -class Environment(object): +class Environment: """Searchable snapshot of distributions on a search path""" def __init__( @@ -2279,7 +2282,7 @@ EGG_NAME = re.compile( ).match -class EntryPoint(object): +class EntryPoint: """Object representing an advertised importable object""" def __init__(self, name, module_name, attrs=(), extras=(), dist=None): @@ -2433,7 +2436,7 @@ def _version_from_file(lines): return safe_version(value.strip()) or None -class Distribution(object): +class Distribution: """Wrap an actual or potential sys.path entry w/metadata""" PKG_INFO = 'PKG-INFO' |
