-
-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add official support for current Python versions #353
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,8 @@ | ||
include AUTHORS.rst | ||
include CONTRIBUTING.rst | ||
include HISTORY.rst | ||
include AUTHORS.md | ||
include CONTRIBUTING.md | ||
include HISTORY.md | ||
include LICENSE | ||
include README.rst | ||
include README.md | ||
|
||
recursive-include tests * | ||
include conftest.py | ||
recursive-exclude * __pycache__ | ||
recursive-exclude * *.py[co] | ||
|
||
recursive-include docs *.rst conftest.py Makefile make.bat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,15 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
__author__ = "Daniel Greenfeld" | ||
__email__ = "[email protected]" | ||
__version__ = "1.5.2" | ||
__version__ = "2.0.0" | ||
__license__ = "BSD" | ||
|
||
from functools import wraps | ||
from time import time | ||
import threading | ||
|
||
try: | ||
import asyncio | ||
except (ImportError, SyntaxError): | ||
asyncio = None | ||
import asyncio | ||
|
||
|
||
class cached_property(object): | ||
class cached_property: | ||
""" | ||
A property that is only computed once per instance and then replaces itself | ||
with an ordinary attribute. Deleting the attribute resets the property. | ||
|
@@ -30,15 +24,14 @@ def __get__(self, obj, cls): | |
if obj is None: | ||
return self | ||
|
||
if asyncio and asyncio.iscoroutinefunction(self.func): | ||
if asyncio.iscoroutinefunction(self.func): | ||
return self._wrap_in_coroutine(obj) | ||
|
||
value = obj.__dict__[self.func.__name__] = self.func(obj) | ||
return value | ||
|
||
def _wrap_in_coroutine(self, obj): | ||
@wraps(obj) | ||
@asyncio.coroutine | ||
def wrapper(): | ||
future = asyncio.ensure_future(self.func(obj)) | ||
obj.__dict__[self.func.__name__] = future | ||
|
@@ -47,7 +40,7 @@ def wrapper(): | |
return wrapper() | ||
|
||
|
||
class threaded_cached_property(object): | ||
class threaded_cached_property: | ||
""" | ||
A cached_property version for use in environments where multiple threads | ||
might concurrently try to access the property. | ||
|
@@ -74,7 +67,7 @@ def __get__(self, obj, cls): | |
return obj_dict.setdefault(name, self.func(obj)) | ||
|
||
|
||
class cached_property_with_ttl(object): | ||
class cached_property_with_ttl: | ||
""" | ||
A property that is only computed once per instance and then replaces itself | ||
with an ordinary attribute. Setting the ttl to a number expresses how long | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Testing and deployment packages. | ||
coverage==4.4.2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ideally, all this should go into a |
||
pytest==3.8.2 | ||
pytest-cov==2.6.0 | ||
freezegun==0.3.10 | ||
coverage==7.6.1 | ||
pytest==8.3.3 | ||
pytest-cov==5.0.0 | ||
freezegun==1.5.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
[wheel] | ||
universal = 1 | ||
universal = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
# -*- coding: utf-8 -*- | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has restricted the CI run to PRs from the master branch itself, which is usually not what is wanted.