From 4b44048f8d69288ac26f4b56b147354591ce331f Mon Sep 17 00:00:00 2001 From: nardew <28791551+nardew@users.noreply.github.com> Date: Thu, 23 Jun 2022 09:16:45 +0200 Subject: [PATCH] python 3.10 (#81) --- CHANGELOG.md | 9 ++++++++- README.md | 5 +++-- cryptoxlib/version_conversions.py | 9 +++++---- setup.py | 1 + 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cbd6cb0..23015c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ The project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html ## [Pending release] +## [5.3.0] - 2022-06-22 + +### Added + +- Python `3.10` supported + ## [5.2.3] - 2022-05-31 ### Fixed @@ -222,7 +228,8 @@ bitvavo.enums.CandelstickInterval -> bitvavo.enums.CandlestickInterval The official release of `cryptoxlib-aio`. -[Pending release]: https://github.com/nardew/cryptoxlib-aio/compare/5.2.3...HEAD +[Pending release]: https://github.com/nardew/cryptoxlib-aio/compare/5.3.0...HEAD +[5.3.0]: https://github.com/nardew/cryptoxlib-aio/compare/5.2.3...5.3.0 [5.2.3]: https://github.com/nardew/cryptoxlib-aio/compare/5.2.2...5.2.3 [5.2.2]: https://github.com/nardew/cryptoxlib-aio/compare/5.2.1...5.2.2 [5.2.1]: https://github.com/nardew/cryptoxlib-aio/compare/5.2.0...5.2.1 diff --git a/README.md b/README.md index 12a1058..58409ba 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# cryptoxlib-aio 5.2.3 +# cryptoxlib-aio 5.3.0 -![](https://img.shields.io/badge/python-3.6-blue.svg) ![](https://img.shields.io/badge/python-3.7-blue.svg) ![](https://img.shields.io/badge/python-3.8-blue.svg) ![](https://img.shields.io/badge/python-3.9-blue.svg) +![](https://img.shields.io/badge/python-3.6-blue.svg) ![](https://img.shields.io/badge/python-3.7-blue.svg) ![](https://img.shields.io/badge/python-3.8-blue.svg) ![](https://img.shields.io/badge/python-3.9-blue.svg) ![](https://img.shields.io/badge/python-3.10-blue.svg) `cryptoxlib-aio` is a compact Python library providing access to REST and WEBSOCKET API of selected crypto exchanges. @@ -8,6 +8,7 @@ ### What's been recently added +- python `3.10` supported - `coinmate` cryptoexchange added! - `bitpanda` cancellation of all orders via websockets - `binance` BSwap (liquidity pools) endpoints diff --git a/cryptoxlib/version_conversions.py b/cryptoxlib/version_conversions.py index 90fe583..6285e15 100644 --- a/cryptoxlib/version_conversions.py +++ b/cryptoxlib/version_conversions.py @@ -18,26 +18,27 @@ def is_python_version(major: int, minor: int, micro: int = None): IS_PYTHON37 = is_python_version(3, 7) IS_PYTHON38 = is_python_version(3, 8) IS_PYTHON39 = is_python_version(3, 9) +IS_PYTHON310 = is_python_version(3, 10) def async_run(f): if IS_PYTHON36: loop = asyncio.get_event_loop() return loop.run_until_complete(f) - elif IS_PYTHON37 or IS_PYTHON38 or IS_PYTHON39: + elif IS_PYTHON37 or IS_PYTHON38 or IS_PYTHON39 or IS_PYTHON310: return asyncio.run(f) - raise Exception(f'Unsupported Python version! Only versions 3.6.x, 3.7.x and 3.8.x are supported.') + raise Exception(f'Unsupported Python version! Only versions 3.6.x, 3.7.x, 3.8.x, 3.9.x and 3.10.x are supported.') def async_create_task(f): if IS_PYTHON36: loop = asyncio.get_event_loop() return loop.create_task(f) - elif IS_PYTHON37 or IS_PYTHON38 or IS_PYTHON39: + elif IS_PYTHON37 or IS_PYTHON38 or IS_PYTHON39 or IS_PYTHON310: return asyncio.create_task(f) - raise Exception(f'Unsupported Python version! Only versions 3.6.x, 3.7.x and 3.8.x are supported.') + raise Exception(f'Unsupported Python version! Only versions 3.6.x, 3.8.x, 3.9.x and 3.10.x are supported.') def get_current_time_ms(): diff --git a/setup.py b/setup.py index 65cbee4..0095e06 100644 --- a/setup.py +++ b/setup.py @@ -26,6 +26,7 @@ "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Topic :: Software Development :: Libraries",