Skip to content

Commit 16bc6b3

Browse files
authored
Merge pull request #235 from mirumee/python_3_12
Python 3.12
2 parents 9c0041b + dea38b5 commit 16bc6b3

File tree

5 files changed

+10
-6
lines changed

5 files changed

+10
-6
lines changed

.github/workflows/tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
python-version: ["3.9", "3.10", "3.11"]
17+
python-version: ["3.9", "3.10", "3.11", "3.12"]
1818
steps:
1919
- uses: actions/checkout@v3
2020
- name: Set up Python ${{ matrix.python-version }}

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- Changed generated client's methods to pass `**kwargs` to base client's `execute` and `execute_ws` methods (breaking change for custom base clients).
1414
- Added `operation_definition` argument to `generate_client_method` plugin hook.
1515
- Added `ExtractOperationsPlugin` that extracts operation strings from client methods to separate module.
16+
- Added Python 3.12 to tested versions.
1617

1718

1819
## 0.9.0 (2023-09-11)

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ classifiers = [
1818
"Programming Language :: Python :: 3.9",
1919
"Programming Language :: Python :: 3.10",
2020
"Programming Language :: Python :: 3.11",
21+
"Programming Language :: Python :: 3.12",
2122
"Topic :: Software Development :: Libraries :: Python Modules",
2223
]
2324
dependencies = [

tests/main/test_main.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,11 @@ def test_main_uses_remote_schema_url_and_remote_schema_headers(
255255
package_path = project_dir / package_name
256256
assert package_path.is_dir()
257257
assert_the_same_files_in_directories(package_path, expected_package_path)
258-
assert mocked_post.called_with(
259-
url="http://test/graphql/", headers={"header1": "value1", "header2": "value2"}
260-
)
258+
assert "http://test/graphql/" in mocked_post.call_args.args
259+
assert mocked_post.call_args.kwargs["headers"] == {
260+
"header1": "value1",
261+
"header2": "value2",
262+
}
261263

262264

263265
def test_main_can_read_config_from_provided_file(tmp_path):

tests/test_schema.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ def test_introspect_remote_schema_uses_provided_headers(mocker):
373373
introspect_remote_schema("http://testserver/graphql/", headers={"test": "value"})
374374

375375
assert mocked_post.called
376-
assert mocked_post.called_with(headers={"test": "value"})
376+
assert mocked_post.call_args.kwargs["headers"] == {"test": "value"}
377377

378378

379379
@pytest.mark.parametrize("verify_ssl", [True, False])
@@ -388,7 +388,7 @@ def test_introspect_remote_schema_uses_provided_verify_ssl_flag(verify_ssl, mock
388388
introspect_remote_schema("http://testserver/graphql/", verify_ssl=verify_ssl)
389389

390390
assert mocked_post.called
391-
assert mocked_post.called_with(verify=verify_ssl)
391+
assert mocked_post.call_args.kwargs["verify"] == verify_ssl
392392

393393

394394
def test_get_graphql_queries_returns_schema_definitions_from_single_file(

0 commit comments

Comments
 (0)