From ed6f5a8a6b4f4833d290a71cf62a685ce6011df4 Mon Sep 17 00:00:00 2001
From: overcat <4catcode@gmail.com>
Date: Thu, 22 Oct 2020 23:06:33 +0800
Subject: [PATCH] pre-release: 3.0.0-beta0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
🎉🎂
---
CHANGELOG.md | 94 ++++++++++++++++++++++++++++++++++++++
README.rst | 2 +-
docs/en/install.rst | 4 +-
docs/zh_CN/install.rst | 4 +-
stellar_sdk/__version__.py | 2 +-
5 files changed, 100 insertions(+), 6 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 004e3006..9ed3f366 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,99 @@
Release History
==============
+
+### Version 3.0.0-beta0
+
+Released on Oct 22, 2020
+
+**This update include breaking changes.**
+
+**This is a pre-release version, please do not use it in production.**
+
+This release brings new XDR code generated by the new XDR generator, with type hint support, if you need to use XDR objects, this release will bring a great experience improvement.
+
+#### Breaking changes
+- The old XDR code has been completely removed, and you can find the new XDR code [here](https://github.com/StellarCN/py-stellar-base/tree/c45d0874db5feccefe7ba57b7141eb06e064e09b/.xdr). ([#383](https://github.com/StellarCN/py-stellar-base/pull/383))
+
+ The XDR Object returned by the following functions has changed:
+
+ - Asset.to_xdr_object()
+ - TransactionEnvelope.to_xdr_object()
+ - FeeBumpTransaction.to_xdr_object()
+ - TransactionEnvelope.to_xdr_object()
+ - Keypair.xdr_public_key()
+ - Keypair.xdr_account_id()
+ - Keypair.xdr_muxed_account()
+ - Keypair.sign_decorated()
+ - Memo.to_xdr_object() (All types of Memos.)
+ - ClaimPredicate.to_xdr_object()
+ - Claimant.to_xdr_object()
+ - Operation.to_xdr_object() (All types of Operations.)
+ - Price.to_xdr_object()
+ - Signer.to_xdr_object()
+ - SignerKey.to_xdr_object()
+ - TimeBounds.to_xdr_object()
+
+- Rename the field that accepts XDR Object in the `from_xdr_object` function to `xdr_object`. ([#384](https://github.com/StellarCN/py-stellar-base/pull/384))
+
+ This change affects the following functions:
+
+ - Asset.from_xdr_object(cls, asset_xdr_object: stellar_xdr.Asset)
+ - FeeBumpTransaction.from_xdr_object(cls, te_xdr_object: stellar_xdr.TransactionEnvelope, cls, te_xdr_object: stellar_xdr.TransactionEnvelope)
+ - Memo.from_xdr_object(cls, xdr_obj: stellar_xdr.Memo) (All types of Memos.)
+ - Opeartion.from_xdr_object(cls, operation_xdr_object: stellar_xdr.Operation) (All types of Operations.)
+ - Price.from_xdr_object(cls, price_xdr_object: stellar_xdr.Price)
+ - Signer.from_xdr_object(cls, signer_xdr_object: stellar_xdr.Signer)
+ - SignerKey.from_xdr_object(cls, xdr_object: stellar_xdr.SignerKey)
+ - TimeBounds.from_xdr_object(cls, time_bounds_xdr_object: stellar_xdr.TimeBounds)
+ - Transaction.from_xdr_object(cls, tx_xdr_object: Union[stellar_xdr.Transaction, stellar_xdr.TransactionV0], v1: bool = False)
+ - TransactionEnvelope.from_xdr_object(cls, te_xdr_object: stellar_xdr.TransactionEnvelope, network_passphrase: str)
+
+- Remove Operation.type_code(), and add Operation.TYPE_CODE, it returns `stellar_sdk.xdr.OperationType`. ([#390](https://github.com/StellarCN/py-stellar-base/pull/390))
+
+- Remove deprecated classes and functions. ([#389](https://github.com/StellarCN/py-stellar-base/pull/389))
+
+ The following classes and functions were marked as deprecated in v2, and now we have removed them.
+
+ Classes:
+
+ - stellar_sdk.call_builder.paths_call_builder.PathsCallBuilder
+
+ - stellar_sdk.call_builder.payments_call_builder.PaymentsCallBuilder
+
+ - stellar_sdk.operation.path_payment.PathPayment
+
+ Functions:
+
+ - stellar_sdk.call_builder.accounts_call_builder.AccountsCallBuilder.signer(self, signer: str)
+
+ - stellar_sdk.call_builder.accounts_call_builder.AccountsCallBuilder.asset(self, asset: Asset)
+
+ - stellar_sdk.call_builder.offers_call_builder.OffersCallBuilder.account(self, account_id: str)
+
+ - stellar_sdk.sep.stellar_web_authentication.verify_challenge_transaction_signed_by_client(challenge_transaction: str, server_account_id: str, domain_name: str, network_passphrase: str)
+
+ - stellar_sdk.server.Server.paths(selfsource_account: str, destination_account: str, destination_asset: Asset, destination_amount: str)
+
+ - stellar_sdk.server.Server.payments(self)
+
+ - stellar_sdk.transaction_builder.TransactionBuilder.append_path_payment_op(self, destination: str, send_code: str, send_issuer: Optional[str], send_max: Union[str, Decimal], dest_code: str, dest_issuer: Optional[str], dest_amount: Union[str, Decimal], path: List[Asset], source: str = None)
+
+#### Updated
+
+- add missing `__str__` and `__equals__` functions. ([#385](https://github.com/StellarCN/py-stellar-base/pull/385))
+
+#### Tips
+
+- Parse XDR into XDR object, the resolved object has complete type hint support, and you can also analyze it through the debug tool(such as PyCharm Debugger).
+
+ ```python
+ from stellar_sdk.xdr import TransactionEnvelope
+
+ xdr = "AAAAAgAAAAA1y7+IlEXtO3+d01lKBazo8wCpZsqsEItW7y2WHv2sOgAAAfQAD5ZNAAQJtwAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAGAQSwhD6XHfd4T2PjJc088ZwWyrfxr6Tcq7baksg1EHAAAAAlNJTEFVU0QAAAAAAAAAAABgEEsIQ+lx33eE9j4yXNPPGcFsq38a+k3Ku22pLINRBwAAAAAC+vCAAAAAAAAAAAEe/aw6AAAAQEDTXnTMoAwF7zM/dWDLAmxA02mVSXdqAbUzs1N/pJtrkOwlEk021zLnjTEo/5FeYGDaNktS8RemgQDYPxoL1QY="
+ te = TransactionEnvelope.from_xdr(xdr)
+ ...
+ ```
+
### Version 2.8.1
Released on Oct 15, 2020
diff --git a/README.rst b/README.rst
index 998a2551..d374ffc0 100644
--- a/README.rst
+++ b/README.rst
@@ -57,7 +57,7 @@ Install and update using `pipenv`_ or `pip`_:
.. code-block:: text
- pip install stellar-sdk==2.8.1
+ pip install stellar-sdk==3.0.0b0
A Simple Example
diff --git a/docs/en/install.rst b/docs/en/install.rst
index 3743c06d..30e61031 100644
--- a/docs/en/install.rst
+++ b/docs/en/install.rst
@@ -11,7 +11,7 @@ To install py-stellar-sdk, use pipenv to install the module:
.. code-block:: text
- pipenv install stellar-sdk==2.8.1
+ pipenv install stellar-sdk==3.0.0b0
If you're not using `pipenv `_, you should.
Otherwise, you can install it via plain old `pip `_. More on installing Python
@@ -29,5 +29,5 @@ You can clone `the repository `_ d
git clone https://github.com/StellarCN/py-stellar-base.git
cd py-stellar-base
- git checkout 2.8.1
+ git checkout 3.0.0-beta0
pip install .
diff --git a/docs/zh_CN/install.rst b/docs/zh_CN/install.rst
index d7c6929b..39ee36f7 100644
--- a/docs/zh_CN/install.rst
+++ b/docs/zh_CN/install.rst
@@ -11,7 +11,7 @@
.. code-block:: text
- pipenv install stellar-sdk==2.8.1
+ pipenv install stellar-sdk==3.0.0b0
我们推荐你使用 `pipenv `_ 来安装这个模块。当然你也可以使用 `pip `_。
想要更多的了解如何安装依赖,请参阅 `Hitchhiker's Guide to Python
@@ -28,5 +28,5 @@
git clone https://github.com/StellarCN/py-stellar-base.git
cd py-stellar-base
- git checkout 2.8.1
+ git checkout 3.0.0-beta0
pip install .
diff --git a/stellar_sdk/__version__.py b/stellar_sdk/__version__.py
index baad0b12..a25911e4 100644
--- a/stellar_sdk/__version__.py
+++ b/stellar_sdk/__version__.py
@@ -11,7 +11,7 @@
__description__ = "The Python Stellar SDK library provides APIs to build transactions and connect to Horizon."
__url__ = "https://github.com/StellarCN/py-stellar-base"
__issues__ = f"{__url__}/issues"
-__version__ = "3.0.0.dev"
+__version__ = "3.0.0.beta0"
__author__ = "Eno, overcat"
__author_email__ = "appweb.cn@gmail.com, 4catcode@gmail.com"
__license__ = "Apache License 2.0"