Avatar for the strawberry-graphql user
strawberry-graphql
strawberry
BlogDocsChangelog

Performance History

Latest Results

feat: support extension factories and deprecate instance-passing (#4392) * fix: support extension factories and deprecate instance-passing Schema extensions can now be passed as a factory callable, and the schema constructs a fresh extension per request. Passing instances is deprecated (type-rejected, runtime-tolerated with copy + DeprecationWarning). Fix #4369 * fix: address PR review feedback on factory pattern - Share ParserCache/ValidationCache LRU caches at module level keyed by maxsize so factory-created fresh instances still benefit from caching (greptile P1, copilot) - Materialize self.extensions to a tuple in Schema.__init__ so generators don't get consumed by the deprecation check (sourcery, copilot) - Compute deprecation-warning stacklevel dynamically so the federation Schema subclass attributes the warning to user code (greptile P2) - Call super().__init__() from Apollo and ApolloFederation tracing extensions to keep base-class invariants (sourcery) - Rename test_factory_called_once_per_request to test_class_constructed_per_request and add a real factory test (copilot) - Add federation-stacklevel and generator regression tests - Clarify docs that factories returning shared singletons leak state * refactor: drop test-only indirection in cache extensions - Remove _wrapped_parse and _wrapped_validate; tests already clear _caches between runs and @patch is in scope when the cache wrapper is built, so the wrapper captures the patched function directly. - Move sys/pathlib imports to module top-level in schema.py, cache the strawberry root path in a module constant. * refactor: use Path.is_relative_to for stacklevel root check * fix: drop instance copy and dynamic stacklevel per review - Stop shallow-copying deprecated instances in get_extensions; pass them through as-is. The DeprecationWarning is still emitted at Schema.__init__ and RELEASE.md/docs now make migration the explicit expected path. (patrick) - Remove the _find_user_stacklevel helper and use stacklevel=2 for the deprecation warning. The federation-stacklevel regression test is dropped along with it. (patrick) * refactor: inline _sync/_async_extensions properties and tighten release notes - Drop _sync_extensions / _async_extensions; call get_extensions(...) directly at the three sync/async/subscribe sites. The properties only existed for the previous cached path. - Rewrite RELEASE.md to lead with the API change + example, then the deprecation. Keep the runtime-instance caveat explicit. * refactor: address remaining open review threads - Cache wrappers: drop the manual _caches dict in favor of @cache on _get_parse_cache / _get_validate_cache (arfey). Tests use cache_clear() instead of dict.clear(). - ParserCache / ValidationCache docstrings: make the shared-across- schemas behavior explicit (arfey). - docs/custom-extensions: drop the stale `extensions_results` suggestion (extensions_results is request-scoped, not for cross- request state), add imports to the example, and rewrite the em- dash paragraphs (copilot). - test_isolation: call super().__init__() in the helper extensions (github-code-quality). * add RELEASE.md
main
4 days ago
add RELEASE.md
fix/4369-extensions-factory-pattern
4 days ago
deps(python)(deps-dev): bump the all-dependencies group with 9 updates (#4419) * deps(python)(deps-dev): bump the all-dependencies group with 9 updates Bumps the all-dependencies group with 9 updates: | Package | From | To | | --- | --- | --- | | [python-multipart](https://github.com/Kludex/python-multipart) | `0.0.27` | `0.0.28` | | [pydantic](https://github.com/pydantic/pydantic) | `2.13.3` | `2.13.4` | | [types-aiofiles](https://github.com/python/typeshed) | `25.1.0.20260409` | `25.1.0.20260508` | | [types-python-dateutil](https://github.com/python/typeshed) | `2.9.0.20260408` | `2.9.0.20260508` | | [types-toml](https://github.com/python/typeshed) | `0.10.8.20260408` | `0.10.8.20260508` | | [types-protobuf](https://github.com/python/typeshed) | `7.34.1.20260503` | `7.34.1.20260508` | | [types-deprecated](https://github.com/python/typeshed) | `1.3.1.20260408` | `1.3.1.20260508` | | [types-pyyaml](https://github.com/python/typeshed) | `6.0.12.20260408` | `6.0.12.20260510` | | [mypy](https://github.com/python/mypy) | `1.20.2` | `2.0.0` | Updates `python-multipart` from 0.0.27 to 0.0.28 - [Release notes](https://github.com/Kludex/python-multipart/releases) - [Changelog](https://github.com/Kludex/python-multipart/blob/main/CHANGELOG.md) - [Commits](https://github.com/Kludex/python-multipart/compare/0.0.27...0.0.28) Updates `pydantic` from 2.13.3 to 2.13.4 - [Release notes](https://github.com/pydantic/pydantic/releases) - [Changelog](https://github.com/pydantic/pydantic/blob/v2.13.4/HISTORY.md) - [Commits](https://github.com/pydantic/pydantic/compare/v2.13.3...v2.13.4) Updates `types-aiofiles` from 25.1.0.20260409 to 25.1.0.20260508 - [Commits](https://github.com/python/typeshed/commits) Updates `types-python-dateutil` from 2.9.0.20260408 to 2.9.0.20260508 - [Commits](https://github.com/python/typeshed/commits) Updates `types-toml` from 0.10.8.20260408 to 0.10.8.20260508 - [Commits](https://github.com/python/typeshed/commits) Updates `types-protobuf` from 7.34.1.20260503 to 7.34.1.20260508 - [Commits](https://github.com/python/typeshed/commits) Updates `types-deprecated` from 1.3.1.20260408 to 1.3.1.20260508 - [Commits](https://github.com/python/typeshed/commits) Updates `types-pyyaml` from 6.0.12.20260408 to 6.0.12.20260510 - [Commits](https://github.com/python/typeshed/commits) Updates `mypy` from 1.20.2 to 2.0.0 - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.20.2...v2.0.0) --- updated-dependencies: - dependency-name: python-multipart dependency-version: 0.0.28 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: all-dependencies - dependency-name: pydantic dependency-version: 2.13.4 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: all-dependencies - dependency-name: types-aiofiles dependency-version: 25.1.0.20260508 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: all-dependencies - dependency-name: types-python-dateutil dependency-version: 2.9.0.20260508 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: all-dependencies - dependency-name: types-toml dependency-version: 0.10.8.20260508 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: all-dependencies - dependency-name: types-protobuf dependency-version: 7.34.1.20260508 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: all-dependencies - dependency-name: types-deprecated dependency-version: 1.3.1.20260508 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: all-dependencies - dependency-name: types-pyyaml dependency-version: 6.0.12.20260510 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: all-dependencies - dependency-name: mypy dependency-version: 2.0.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: all-dependencies ... Signed-off-by: dependabot[bot] <support@github.com> * Update mypy lock to 2.1.0 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Patrick Arminio <patrick.arminio@gmail.com>
main
4 days ago

Latest Branches

CodSpeed Performance Gauge
0%
feat: support extension factories and deprecate instance-passing#4392
4 days ago
d25663d
fix/4369-extensions-factory-pattern
CodSpeed Performance Gauge
0%
4 days ago
15bb67b
dependabot/uv/idna-3.15
CodSpeed Performance Gauge
0%
4 days ago
6f474d3
fix-fragment-issues
© 2026 CodSpeed Technology
Home Terms Privacy Docs