Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Merge branch 'master' into email_interface_as_plugin
Maciej Korycinskif1f268d21153
diff --cc CHANGELOG.mdindex cee96dacf1,781341d8bb..a4942fe2d9--- a/CHANGELOG.md+++ b/CHANGELOG.md@@@ -30,7 -30,9 +30,10 @@@ All notable, unreleased changes to thi- Optimize children field on Category type - #7045 by @IKarbowiak- Added support for querying objects by metadata fields - #6683 by @LeOndaz- Avoid using `get_plugins_manager` method - #7052 by @IKarbowiak+- Add field `languageCode` to types: `AccountInput`, `AccountRegisterInput`, `CheckoutCreateInput`, `CustomerInput`, `Order`, `User`. Add field `languageCodeEnum` to `Order` type. Add new mutation `CheckoutLanguageCodeUpdate`. Deprecate field `Order.languageCode`. - #6609 by @korycins+ - Extend `Transaction` type with gateway response and `Payment` type with filter - #7062 by @IKarbowiak+ - Fix invalid tax rates for lines - #7058 by @IKarbowiak+ - Allow seeing unconfirmed orders - #7072 by @IKarbowiak### Breaking- Multichannel MVP: Multicurrency - #6242 by @fowczarek @d-wysockidiff --cc poetry.lockindex 22242249f5,d5feb271fb..7f1eaf672c--- a/poetry.lock+++ b/poetry.lock@@@ -1733,7 -1714,7 +1733,7 @@@ tests = ["pytest (>=6.0.0,<7.0.0)", "co[[package]]name = "pylint"- version = "2.7.2"-version = "2.7.3"++version = "2.7.4"description = "python code static checker"category = "dev"optional = false@@@ -2136,21 -2101,9 +2136,21 @@@ python-versions = "*[package.dependencies]botocore = ">=1.12.36,<2.0a.0"+[[package]]+name = "sendgrid"+version = "6.6.0"+description = "Twilio SendGrid library for Python"+category = "main"+optional = false+python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"++[package.dependencies]+python-http-client = ">=3.2.1"+starkbank-ecdsa = ">=1.0.0"+[[package]]name = "sentry-sdk"- version = "0.20.3"+ version = "1.0.0"description = "Python client for Sentry (https://sentry.io)"category = "main"optional = false@@@ -2578,7 -2523,7 +2578,7 @@@ multidict = ">=4.0[metadata]lock-version = "1.1"python-versions = "~3.9"- content-hash = "26140fd91355be42a65acbbaa7225e8c21268d1cc5247e03d0e62c38617e69d1"-content-hash = "eac617550371cb1428b6e3507c2caf3c5a89a7fcd8965bc61da82c6ccfc0a86a"++content-hash = "577d4cc88f37bbf67c6520ae6e5b2026111ca0759cb4ee29e252c809289e7e7e"[metadata.files]adyen = [@@@ -3532,8 -3490,8 +3531,8 @@@ pyjwt ={file = "PyJWT-2.0.1.tar.gz", hash = "sha256:a5c70a06e1f33d81ef25eecd50d50bd30e34de1ca8b2b9fa3fe0daaabcf69bf7"},]pylint = [- {file = "pylint-2.7.2-py3-none-any.whl", hash = "sha256:d09b0b07ba06bcdff463958f53f23df25e740ecd81895f7d2699ec04bbd8dc3b"},- {file = "pylint-2.7.2.tar.gz", hash = "sha256:0e21d3b80b96740909d77206d741aa3ce0b06b41be375d92e1f3244a274c1f8a"},- {file = "pylint-2.7.3-py3-none-any.whl", hash = "sha256:d29e1140d96362eb0b68fa0fb1a6192532f586886d6c52db79872a906a50be58"},- {file = "pylint-2.7.3.tar.gz", hash = "sha256:466e067526b609c1f22b97895e2a64e5fc3d897016b91ef0f4f80480e89a1ef9"},++ {file = "pylint-2.7.4-py3-none-any.whl", hash = "sha256:209d712ec870a0182df034ae19f347e725c1e615b2269519ab58a35b3fcbbe7a"},++ {file = "pylint-2.7.4.tar.gz", hash = "sha256:bd38914c7731cdc518634a8d3c5585951302b6e2b6de60fbb3f7a0220e21eeee"},]pylint-celery = [{file = "pylint-celery-0.3.tar.gz", hash = "sha256:41e32094e7408d15c044178ea828dd524beedbdbe6f83f712c5e35bde1de4beb"},@@@ -3597,12 -3552,9 +3596,12 @@@ python-dateutil ={file = "python_dateutil-2.8.1-py2.py3-none-any.whl", hash = "sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a"},]python-dotenv = [- {file = "python-dotenv-0.15.0.tar.gz", hash = "sha256:587825ed60b1711daea4832cf37524dfd404325b7db5e25ebe88c495c9f807a0"},- {file = "python_dotenv-0.15.0-py2.py3-none-any.whl", hash = "sha256:0c8d1b80d1a1e91717ea7d526178e3882732420b03f08afea0406db6402e220e"},+ {file = "python-dotenv-0.16.0.tar.gz", hash = "sha256:9fa413c37d4652d3fa02fea0ff465c384f5db75eab259c4fc5d0c5b8bf20edd4"},+ {file = "python_dotenv-0.16.0-py2.py3-none-any.whl", hash = "sha256:31d752f5b748f4e292448c9a0cac6a08ed5e6f4cefab85044462dcad56905cec"},]+python-http-client = [+ {file = "python_http_client-3.3.2.tar.gz", hash = "sha256:67e6a7bea19b03e14dc971480d3531b80becfc203d6c69478561bf7844d52661"},+]python-json-logger = [{file = "python-json-logger-2.0.1.tar.gz", hash = "sha256:f26eea7898db40609563bed0a7ca11af12e2a79858632706d835a0f961b7d398"},]@@@ -3722,13 -3682,9 +3721,13 @@@ s3transfer ={file = "s3transfer-0.3.6-py2.py3-none-any.whl", hash = "sha256:5d48b1fd2232141a9d5fb279709117aaba506cacea7f86f11bc392f06bfa8fc2"},{file = "s3transfer-0.3.6.tar.gz", hash = "sha256:c5dadf598762899d8cfaecf68eba649cd25b0ce93b6c954b156aaa3eed160547"},]+sendgrid = [+ {file = "sendgrid-6.6.0-py3-none-any.whl", hash = "sha256:e422c8263563ac7d664066d2f87b90bcb005b067eb7c33a9b1396442b2ed285b"},+ {file = "sendgrid-6.6.0.tar.gz", hash = "sha256:2eb1dcb1f7d8656eed4db586e428c2c86f347590b8511d7f92993882d0e4fab9"},+]sentry-sdk = [- {file = "sentry-sdk-0.20.3.tar.gz", hash = "sha256:4ae8d1ced6c67f1c8ea51d82a16721c166c489b76876c9f2c202b8a50334b237"},- {file = "sentry_sdk-0.20.3-py2.py3-none-any.whl", hash = "sha256:e75c8c58932bda8cd293ea8e4b242527129e1caaec91433d21b8b2f20fee030b"},+ {file = "sentry-sdk-1.0.0.tar.gz", hash = "sha256:71de00c9711926816f750bc0f57ef2abbcb1bfbdf5378c601df7ec978f44857a"},+ {file = "sentry_sdk-1.0.0-py2.py3-none-any.whl", hash = "sha256:9221e985f425913204989d0e0e1cbb719e8b7fa10540f1bc509f660c06a34e66"},]singledispatch = [{file = "singledispatch-3.6.1-py2.py3-none-any.whl", hash = "sha256:85c97f94c8957fa4e6dab113156c182fb346d56d059af78aad710bced15f16fb"},diff --cc requirements.txtindex 30d83dc597,af3be14227..884f90e662--- a/requirements.txt+++ b/requirements.txt@@@ -64,10 -64,9 +64,10 @@@ graphql-core==2.3.graphql-relay==2.0.1grpc-google-iam-v1==0.12.3; python_version >= "3.6"grpcio==1.36.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.6"- gunicorn==20.0.4; python_version >= "3.4"+ gunicorn==20.1.0; python_version >= "3.5"h11==0.12.0; python_version >= "3.6"html-to-draftjs==1.0.1+html2text==2020.1.16; python_version >= "3.5"html5lib==1.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"httptools==0.1.1; sys_platform != "win32" and sys_platform != "cygwin" and platform_python_implementation != "PyPy"idna==2.10; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"@@@ -106,8 -103,7 +106,8 @@@ pymeta3==0.5.pyparsing==2.4.7; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.6"pyphen==0.10.0; python_version >= "3.6"python-dateutil==2.8.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.6"- python-dotenv==0.15.0+ python-dotenv==0.16.0+python-http-client==3.3.2; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"python-json-logger==2.0.1; python_version >= "3.4"python-magic-bin==0.4.14; sys_platform == "win32"python-magic==0.4.22; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"@@@ -121,8 -117,7 +121,8 @@@ requests==2.25.1; (python_version >= "2rsa==4.7.2; python_version >= "3.5" and python_version < "4" and (python_version >= "3.6" and python_full_version < "3.0.0" or python_version >= "3.6" and python_full_version >= "3.6.0")rx==1.6.1s3transfer==0.3.6; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0"+sendgrid==6.6.0; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.5.0")- sentry-sdk==0.20.3+ sentry-sdk==1.0.0singledispatch==3.6.1; python_version >= "2.6"six==1.15.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.6"soupsieve==2.2.1; python_version >= "3.6"diff --cc requirements_dev.txtindex f125b2eecd,9a46b83c83..d8897bab5c--- a/requirements_dev.txt+++ b/requirements_dev.txt@@@ -85,13 -85,12 +85,13 @@@ graphql-core==2.3.graphql-relay==2.0.1grpc-google-iam-v1==0.12.3; python_version >= "3.6"grpcio==1.36.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.6"- gunicorn==20.0.4; python_version >= "3.4"+ gunicorn==20.1.0; python_version >= "3.5"h11==0.12.0; python_version >= "3.6"html-to-draftjs==1.0.1+html2text==2020.1.16; python_version >= "3.5"html5lib==1.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"httptools==0.1.1; sys_platform != "win32" and sys_platform != "cygwin" and platform_python_implementation != "PyPy"- identify==2.2.1; python_full_version >= "3.6.1"+ identify==2.2.2; python_full_version >= "3.6.1"idna==2.10; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"iniconfig==1.1.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"isort==5.8.0; python_version >= "3.6" and python_version < "4.0"@@@ -143,8 -141,7 +143,8 @@@ pyjwt==2.0.1; python_version >= "3.6pylint-celery==0.3pylint-django==2.4.2pylint-plugin-utils==0.6- pylint==2.7.2; python_version >= "3.6" and python_version < "4.0"-pylint==2.7.3; python_version >= "3.6" and python_version < "4.0"++pylint==2.7.4; python_version >= "3.6" and python_version < "4.0"+pymeta3==0.5.1pyparsing==2.4.7; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6"pyphen==0.10.0; python_version >= "3.6"pytest-celery==0.0.0a1@@@ -157,8 -154,7 +157,8 @@@ pytest-vcr==1.0.pytest-xdist==2.2.1; python_version >= "3.5"pytest==6.2.2; python_version >= "3.6"python-dateutil==2.8.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.6"- python-dotenv==0.15.0+ python-dotenv==0.16.0+python-http-client==3.3.2; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"python-json-logger==2.0.1; python_version >= "3.4"python-magic-bin==0.4.14; sys_platform == "win32"python-magic==0.4.22; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"@@@ -175,11 -171,10 +175,11 @@@ requests==2.25.1; (python_version >= "2rsa==4.7.2; python_version >= "3.5" and python_version < "4" and (python_version >= "3.6" and python_full_version < "3.0.0" or python_version >= "3.6" and python_full_version >= "3.6.0")rx==1.6.1s3transfer==0.3.6; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0"+sendgrid==6.6.0; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.5.0")- sentry-sdk==0.20.3+ sentry-sdk==1.0.0singledispatch==3.6.1; python_version >= "2.6"six==1.15.0; python_full_version >= "3.6.1" and python_version < "3.10" and python_version >= "3.6" and (python_version >= "3.5" and python_full_version < "3.0.0" or python_full_version >= "3.3.0" and python_version >= "3.5") and (python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.3.0") and (python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.6")- smmap==3.0.5; python_version >= "3.4" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version < "3.10" and python_version >= "3.4"+ smmap==4.0.0; python_version >= "3.5" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version < "3.10" and python_version >= "3.5"snowballstemmer==2.1.0; python_version >= "3.6"soupsieve==2.2.1; python_version >= "3.6"sqlparse==0.4.1; python_version >= "3.6"diff --cc saleor/graphql/account/tests/test_account.pyindex 76c0b2332f,370a905a20..d92c154482--- a/saleor/graphql/account/tests/test_account.py+++ b/saleor/graphql/account/tests/test_account.py@@@ -17,12 -17,10 +17,13 @@@ from freezegun import freeze_timfrom ....account import events as account_eventsfrom ....account.error_codes import AccountErrorCodefrom ....account.models import Address, User+from ....account.notifications import get_default_user_payloadfrom ....checkout import AddressTypefrom ....core.jwt import create_token+from ....core.notify_events import NotifyEventTypefrom ....core.permissions import AccountPermissions, OrderPermissions+from ....core.utils.url import prepare_url+ from ....order import OrderStatusfrom ....order.models import FulfillmentStatus, Orderfrom ....product.tests.utils import create_imagefrom ...core.utils import str_to_enum@@@ -88,10 -86,14 +89,15 @@@ FULL_USER_QUERY = ""isDefaultShippingAddressisDefaultBillingAddress}- orders {+ orders(first: 10) {totalCount+ edges {+ node {+ id+ }+ }}+ languageCodedateJoinedlastLogindefaultShippingAddress {