Skip to content

Commit

Permalink
feat: PyPy support
Browse files Browse the repository at this point in the history
  • Loading branch information
overcat committed Aug 11, 2019
1 parent 0d06248 commit 119bcb0
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 7 deletions.
25 changes: 20 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
assert sys.version_info >= (3, 6, 0), "stellar-sdk v2 requires Python 3.6+"

here = os.path.abspath(os.path.dirname(__file__))
requirements_file = 'requirements.txt'
requirements_file = "requirements.txt"

about = {}
with open(os.path.join(here, "stellar_sdk", "__version__.py"), mode="r", encoding="utf-8") as f:
with open(
os.path.join(here, "stellar_sdk", "__version__.py"), mode="r", encoding="utf-8"
) as f:
exec(f.read(), about)

with open("README.rst", mode="r", encoding="utf-8") as f:
Expand All @@ -24,11 +26,23 @@
author_email=about["__author_email__"],
url=about["__url__"],
license=about["__license__"],
keywords=["stellar-sdk", "stellar.org", "lumens", "xlm", "blockchain", "distributed exchange", "cryptocurrency",
"dex", "stellar-core", "horizon", "sdex", "trading"],
keywords=[
"stellar-sdk",
"stellar.org",
"lumens",
"xlm",
"blockchain",
"distributed exchange",
"cryptocurrency",
"dex",
"stellar-core",
"horizon",
"sdex",
"trading",
],
include_package_data=True,
install_requires=open(requirements_file).readlines(),
packages=find_packages(),
packages=find_packages(exclude=["tests", "tests.*"]),
python_requires=">=3.6.0",
classifiers=[
"Development Status :: 1 - Planning",
Expand All @@ -41,6 +55,7 @@
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Libraries :: Python Modules",
],
)
6 changes: 4 additions & 2 deletions stellar_sdk/client/simple_requests_client.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import NoReturn, Union, Dict
from typing import Union, Dict

import requests
from requests import RequestException
Expand Down Expand Up @@ -41,7 +41,9 @@ def post(self, url: str, data: Dict[str, str]) -> Response:
url=resp.url,
)

def stream(self, url: str, params: Dict[str, str] = None) -> NoReturn:
def stream(
self, url: str, params: Dict[str, str] = None
) -> None: # Here should return NoReturn, but it has not been implemented in PyPy.
raise NotImplementedError # pragma: no cover

def close(self):
Expand Down

0 comments on commit 119bcb0

Please sign in to comment.