Skip to content

Commit

Permalink
entry point fix
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Aug 6, 2017
1 parent 0f5bdf8 commit 1f8c026
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [2.0.7] - 2017-08-06

### Fixes
- Fixed entry point breaking pip

## [2.0.6] - 2017-08-05

### Fixes
Expand Down
2 changes: 1 addition & 1 deletion fs/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.0.6"
__version__ = "2.0.7"
17 changes: 12 additions & 5 deletions fs/opener/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,22 @@ def __init__(self, default_opener='osfs'):
"""
self.default_opener = default_opener
self.protocols = [
entry_point.name
for entry_point in
pkg_resources.iter_entry_points('fs.opener')
]
self._protocols = None


def __repr__(self):
return "<fs-registry {!r}>".format(self.protocols)

@property
def protocols(self):
if self._protocols is None:
self._protocols = [
entry_point.name
for entry_point in
pkg_resources.iter_entry_points('fs.opener')
]
return self._protocols

def get_opener(self, protocol):
"""
Get the opener class associated to a given protocol.
Expand Down

0 comments on commit 1f8c026

Please sign in to comment.