Skip to content

Commit 7b03f5b

Browse files
authored
Merge branch 'master' into remove_unused_cgi_import
2 parents 4f21cbc + 8c2931f commit 7b03f5b

File tree

8 files changed

+30
-10
lines changed

8 files changed

+30
-10
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ jobs:
66
name: Python ${{ matrix.version }}
77
strategy:
88
matrix:
9-
version: ["3.7", "3.10"]
9+
version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
1010

1111
steps:
1212
- name: Checkout
1313
uses: actions/checkout@v2
1414
- name: Set up Python ${{ matrix.python-version }}
15-
uses: actions/setup-python@v2
15+
uses: actions/setup-python@v4
1616
with:
1717
python-version: ${{ matrix.version }}
1818
- name: Install Dependencies

.github/workflows/pre-commit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ jobs:
1212
- name: Checkout
1313
uses: actions/checkout@v2
1414
- name: Setup
15-
uses: actions/setup-python@v2
15+
uses: actions/setup-python@v4
1616
- name: Pre-commit
1717
uses: pre-commit/action@v2.0.0

CHANGELOG

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
- Remove `cgi` import to avoid triggering a `DeprecationWarning` on Python 3.11.
44

5+
== Version 12.4.0
6+
7+
- Update API version with 2023-07, 2023-10, 2024-01 releases ([#694](https://github.com/Shopify/shopify_python_api/pull/694))
8+
9+
== Version 12.3.0
10+
11+
- Update API version with 2023-04 release ([#649](https://github.com/Shopify/shopify_python_api/pull/649))
12+
513
== Version 12.2.0
614

715
- Update API version with 2023-01 release ([#631](https://github.com/Shopify/shopify_python_api/pull/631))

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,15 @@ pip install --upgrade ShopifyAPI
4646
1. We then need to supply these keys to the Shopify Session Class so that it knows how to authenticate.
4747

4848
```python
49+
import shopify
50+
4951
shopify.Session.setup(api_key=API_KEY, secret=API_SECRET)
5052
```
5153
1. In order to access a shop's data, apps need an access token from that specific shop. We need to authenticate with that shop using OAuth, which we can start in the following way:
5254

5355
```python
5456
shop_url = "SHOP_NAME.myshopify.com"
55-
api_version = '2020-10'
57+
api_version = '2024-01'
5658
state = binascii.b2a_hex(os.urandom(15)).decode("utf-8")
5759
redirect_uri = "http://myapp.com/auth/shopify/callback"
5860
scopes = ['read_products', 'read_orders']
@@ -160,6 +162,12 @@ product.destroy()
160162
# Delete the resource from the remote server (i.e. Shopify)
161163
```
162164

165+
Here is another example to retrieve a list of open orders using certain parameters:
166+
167+
```python
168+
new_orders = shopify.Order.find(status="open", limit="50")
169+
```
170+
163171
### Prefix options
164172

165173
Some resources such as `Fulfillment` are prefixed by a parent resource in the Shopify API (e.g. `orders/450789469/fulfillments/255858046`). In order to interact with these resources, you must specify the identifier of the parent resource in your request.
@@ -242,7 +250,7 @@ python setup.py test
242250
## Relative Cursor Pagination
243251
Cursor based pagination support has been added in 6.0.0.
244252

245-
```
253+
```python
246254
import shopify
247255

248256
page1 = shopify.Product.find()

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@
3939
"Operating System :: OS Independent",
4040
"Programming Language :: Python",
4141
"Programming Language :: Python :: 3",
42-
"Programming Language :: Python :: 3.4",
43-
"Programming Language :: Python :: 3.5",
44-
"Programming Language :: Python :: 3.6",
42+
"Programming Language :: Python :: 3.7",
4543
"Programming Language :: Python :: 3.8",
4644
"Programming Language :: Python :: 3.9",
45+
"Programming Language :: Python :: 3.10",
46+
"Programming Language :: Python :: 3.11",
4747
"Topic :: Software Development",
4848
"Topic :: Software Development :: Libraries",
4949
"Topic :: Software Development :: Libraries :: Python Modules",

shopify/api_version.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ def define_known_versions(cls):
3333
cls.define_version(Release("2022-07"))
3434
cls.define_version(Release("2022-10"))
3535
cls.define_version(Release("2023-01"))
36+
cls.define_version(Release("2023-04"))
37+
cls.define_version(Release("2023-07"))
38+
cls.define_version(Release("2023-10"))
39+
cls.define_version(Release("2024-01"))
3640

3741
@classmethod
3842
def clear_defined_versions(cls):

shopify/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION = "12.2.0"
1+
VERSION = "12.4.0"

test/session_token_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def test_raises_if_aud_doesnt_match_api_key(self):
7979
with self.assertRaises(session_token.SessionTokenError) as cm:
8080
session_token.decode_from_header(self.build_auth_header(), api_key=self.api_key, secret=self.secret)
8181

82-
self.assertEqual("Invalid audience", str(cm.exception))
82+
self.assertEqual("Audience doesn't match", str(cm.exception))
8383

8484
def test_raises_if_issuer_hostname_is_invalid(self):
8585
self.payload["iss"] = "bad_shop_hostname"

0 commit comments

Comments
 (0)