From 8018cb9a010f551d44e73ebc23e576de66da1cb1 Mon Sep 17 00:00:00 2001 From: mikelync <211784556+mikelync@users.noreply.github.com> Date: Fri, 30 Jan 2026 14:29:20 +0100 Subject: [PATCH] DOC: licence edits (#273) Co-authored-by: Mike Lync (cherry picked from commit 1a13015038cc3d6289c0846f93c88e3cf9107328) --- LICENSE | 11 +++++----- python/rateslib/verify.py | 42 ++++++++++++++++++------------------ python/tests/test_default.py | 2 +- 3 files changed, 27 insertions(+), 28 deletions(-) diff --git a/LICENSE b/LICENSE index fbb09b998..125397b2a 100644 --- a/LICENSE +++ b/LICENSE @@ -28,7 +28,7 @@ You may use this software only if you comply with the terms of one of these lice 1. Non-Commercial Source-Available Licence ------------------------------------------ -(Personal, Educational, and Evaluation Use Only) +(Personal and Educational Use Only) 1.1 Grant of Rights @@ -37,7 +37,6 @@ You may use this software only if you comply with the terms of one of these lice - personal use - academic or educational use - - internal evaluation or testing This licence does not grant any right to distribute, modify, or commercially exploit the software. @@ -45,7 +44,7 @@ You may use this software only if you comply with the terms of one of these lice You may not, directly or indirectly: - - Use the software for any commercial purpose + - Install or use the software for any purpose in a commercial environment - Sell, license, sublicense, rent, lease, or monetize the software - Distribute or redistribute the software, in source or binary form - Modify, adapt, translate, or create derivative works @@ -86,7 +85,7 @@ You may use this software only if you comply with the terms of one of these lice Commercial licences are offered under separate written terms and are typically provided on a subscription basis. -To obtain a Commercial Subscription Licence, visit https://rateslib.com/py/en/latest/i_licence.html +To obtain a Commercial Subscription Licence, visit https://rateslib.com/licence 3. No Implied Rights -------------------- @@ -135,7 +134,7 @@ To obtain a Commercial Subscription Licence, visit https://rateslib.com/py/en/la 9. Language ----------- -This licence is written in English. Any translations are provided for convenience only. -In the event of any inconsistency or dispute, the English version shall prevail. + This licence is written in English. Any translations are provided for convenience only. + In the event of any inconsistency or dispute, the English version shall prevail. END OF TERMS \ No newline at end of file diff --git a/python/rateslib/verify.py b/python/rateslib/verify.py index 9749b3b9a..61d88f785 100644 --- a/python/rateslib/verify.py +++ b/python/rateslib/verify.py @@ -33,34 +33,34 @@ class LicenceNotice(UserWarning): _no_licence_warning = ( - "\nRateslib {0} is source-available, not open source, software with a dual licence.\n" - "No licence is detected for this machine and therefore you may only use it in a " - "non-commercial capacity.\n" - "If you have installed this software, via any distribution source such as PyPi, " - "Conda, WebAssembly etc.:\n" - " - to any corporate machine, for any purpose,\n" - " - to any BQuant or BLab virtual environment or PyOdide browser environment,\n" - " - for any professional or commercially intended use,\n" - "please uninstall and view rateslib.com/licence for further details how to acquire " - "and/or register a licence.\n" + "\nRateslib is source-available (not open-source) software distributed under a " + "dual-licence model." + "\nNo commercial licence is registered for this installation. Use is therefore permitted " + "for non-commercial purposes only (at-home or university based academic use)." + "\nAny use in commercial, professional, or for-profit environments, including evaluation " + "or trial use, requires a valid commercial licence or an approved evaluation licence." + "\nCertain features may require a registered commercial or evaluation licence in current " + "or future versions." + "\nFor licensing information or to register a licence, please visit: " + "https://rateslib.com/licence" ) _invalid_warning = ( - "\nRateslib {0} is source-available, not open source, software with a dual licence.\n" - "An invalid licence file is detected on this machine and therefore you may only use it " - "in a non-commercial capacity.\n" - "If you have installed this software, via any distribution source such as PyPi, Conda, " - "WebAssembly etc.:\n" - " - to any corporate machine, for any purpose,\n" - " - to any BQuant or BLab virtual environment or PyOdide browser environment,\n" - " - for any professional or commercially intended use,\n" - "please uninstall and view rateslib.com/licence for further details how to acquire " - "and/or register a licence.\n" + "\nRateslib is source-available (not open-source) software distributed under a " + "dual-licence model." + "\nAn invalid licence file is detected for this installation. Use is therefore permitted " + "for non-commercial purposes only (at-home or university based academic use)." + "\nAny use in commercial, professional, or for-profit environments, including evaluation " + "or trial use, requires a valid commercial licence or an approved evaluation licence." + "\nCertain features may require a registered commercial or evaluation licence in current " + "or future versions." + "\nFor licensing information or to register a licence, please visit: " + "https://rateslib.com/licence" ) _expired_warning = ( "\nYour existing licence for rateslib {0} expired on {1}.\n" - "If you wish to extend your licence, please visit rateslib.com/licence for further " + "If you wish to extend your licence, please visit https://rateslib.com/licence for further " "details.\n" "Otherwise, please uninstall rateslib.\n" "Expired licence details:\n{2}\n" diff --git a/python/tests/test_default.py b/python/tests/test_default.py index 5892d5470..bfe812a34 100644 --- a/python/tests/test_default.py +++ b/python/tests/test_default.py @@ -134,7 +134,7 @@ def test_env_licence(self): def test_licence_no_licence_warning(self): # test just the env_licence, file_licence = collect_and_remove_licence() - with pytest.warns(LicenceNotice, match="No licence is detected"): + with pytest.warns(LicenceNotice, match="No commercial licence is registered"): Licence() replace_collected_licence(env_licence, file_licence)