Skip to content

Commit 1f8c026

Browse files
committed
entry point fix
1 parent 0f5bdf8 commit 1f8c026

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## [2.0.7] - 2017-08-06
8+
9+
### Fixes
10+
- Fixed entry point breaking pip
11+
712
## [2.0.6] - 2017-08-05
813

914
### Fixes

fs/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "2.0.6"
1+
__version__ = "2.0.7"

fs/opener/registry.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,22 @@ def __init__(self, default_opener='osfs'):
9595
9696
"""
9797
self.default_opener = default_opener
98-
self.protocols = [
99-
entry_point.name
100-
for entry_point in
101-
pkg_resources.iter_entry_points('fs.opener')
102-
]
98+
self._protocols = None
99+
103100

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

104+
@property
105+
def protocols(self):
106+
if self._protocols is None:
107+
self._protocols = [
108+
entry_point.name
109+
for entry_point in
110+
pkg_resources.iter_entry_points('fs.opener')
111+
]
112+
return self._protocols
113+
107114
def get_opener(self, protocol):
108115
"""
109116
Get the opener class associated to a given protocol.

0 commit comments

Comments
 (0)