Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.12 #235

Merged
merged 1 commit into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- Changed generated client's methods to pass `**kwargs` to base client's `execute` and `execute_ws` methods (breaking change for custom base clients).
- Added `operation_definition` argument to `generate_client_method` plugin hook.
- Added `ExtractOperationsPlugin` that extracts operation strings from client methods to separate module.
- Added Python 3.12 to tested versions.


## 0.9.0 (2023-09-11)
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
Expand Down
8 changes: 5 additions & 3 deletions tests/main/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,11 @@ def test_main_uses_remote_schema_url_and_remote_schema_headers(
package_path = project_dir / package_name
assert package_path.is_dir()
assert_the_same_files_in_directories(package_path, expected_package_path)
assert mocked_post.called_with(
url="http://test/graphql/", headers={"header1": "value1", "header2": "value2"}
)
assert "http://test/graphql/" in mocked_post.call_args.args
assert mocked_post.call_args.kwargs["headers"] == {
"header1": "value1",
"header2": "value2",
}


def test_main_can_read_config_from_provided_file(tmp_path):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ def test_introspect_remote_schema_uses_provided_headers(mocker):
introspect_remote_schema("http://testserver/graphql/", headers={"test": "value"})

assert mocked_post.called
assert mocked_post.called_with(headers={"test": "value"})
assert mocked_post.call_args.kwargs["headers"] == {"test": "value"}


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

assert mocked_post.called
assert mocked_post.called_with(verify=verify_ssl)
assert mocked_post.call_args.kwargs["verify"] == verify_ssl


def test_get_graphql_queries_returns_schema_definitions_from_single_file(
Expand Down