From 7018d232c2fb68d279ff4d41c26328d431f309c6 Mon Sep 17 00:00:00 2001 From: taltal-beep Date: Wed, 21 Oct 2026 13:58:39 +0300 Subject: [PATCH 1/2] Fix --generate-missing reporting defined background steps as missing parse_feature_files() listed each background Step object once per scenario. Binding a scenario removed only one copy, and steps of unbound scenarios are dropped only if they are not background steps, so a defined background step was reported (and a stub generated for it) as soon as the feature had an unbound scenario. Keep each step object once. --- CHANGES.rst | 1 + src/pytest_bdd/generation.py | 3 +- tests/generation/test_generate_missing.py | 50 +++++++++++++++++++++++ 3 files changed, 53 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 38a02ddde..55a0a1d32 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -23,6 +23,7 @@ Removed Fixed +++++ +* ``--generate-missing`` no longer reports a defined background step as missing when the feature also has a scenario that is not bound to a test. Security ++++++++ diff --git a/src/pytest_bdd/generation.py b/src/pytest_bdd/generation.py index 69395c51d..902cee37f 100644 --- a/src/pytest_bdd/generation.py +++ b/src/pytest_bdd/generation.py @@ -156,7 +156,8 @@ def parse_feature_files( itertools.chain.from_iterable(feature.scenarios.values() for feature in features), key=lambda scenario: (scenario.feature.name or scenario.feature.filename, scenario.name), ) - steps = sorted((step for scenario in scenarios for step in scenario.steps), key=lambda step: step.name) + # Background steps are shared by every scenario of the feature (or rule), so keep each step object only once. + steps = sorted(dict.fromkeys(step for scenario in scenarios for step in scenario.steps), key=lambda step: step.name) return features, scenarios, steps diff --git a/tests/generation/test_generate_missing.py b/tests/generation/test_generate_missing.py index 898ea8dc0..c333440e4 100644 --- a/tests/generation/test_generate_missing.py +++ b/tests/generation/test_generate_missing.py @@ -89,6 +89,56 @@ def test_missing_steps(): result.stdout.fnmatch_lines(["Please place the code above to the test file(s):"]) +def test_generate_missing_defined_background_step_with_unbound_scenario(pytester): + """Test that a defined background step is not reported as missing when another scenario is not bound.""" + pytester.makefile( + ".feature", + generation=textwrap.dedent( + """\ + Feature: Missing code generation with a background + + Background: + Given I have a foobar + + Scenario: Bound scenario + Given I have a bar + + Scenario: Unbound scenario + Given I have a bar + """ + ), + ) + + pytester.makepyfile( + textwrap.dedent( + """\ + from pytest_bdd import scenario, given + + @given("I have a foobar") + def _(): + return "foobar" + + @given("I have a bar") + def _(): + return "bar" + + @scenario("generation.feature", "Bound scenario") + def test_bound(): + pass + """ + ) + ) + + result = pytester.runpytest("--generate-missing", "--feature", "generation.feature") + result.assert_outcomes(passed=0, failed=0, errors=0) + assert not result.stderr.str() + assert result.ret == 0 + + result.stdout.fnmatch_lines(['Scenario "Unbound scenario" is not bound to any test *']) + result.stdout.no_fnmatch_line("*Background step*is not defined*") + result.stdout.no_fnmatch_line("*@given('I have a foobar')*") + + def test_generate_missing_with_step_parsers(pytester): """Test that step parsers are correctly discovered and won't be part of the missing steps.""" pytester.makefile( From 56703f3d3aac9e685c70801ec91cc21bf73ada4d Mon Sep 17 00:00:00 2001 From: taltal-beep Date: Fri, 30 Oct 2026 20:27:34 +0200 Subject: [PATCH 2/2] Merge remote-tracking branch 'origin/master' into fix/generate-missing-shared-background --- .pre-commit-config.yaml | 4 +- CHANGES.rst | 1 + src/pytest_bdd/compat.py | 85 ++++++++++++++++++++++++++++++++++-- src/pytest_bdd/scenario.py | 30 ++++++------- tests/feature/test_report.py | 14 ++++-- tox.ini | 3 +- uv.lock | 28 ++++++------ 7 files changed, 126 insertions(+), 39 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 275e24a99..02a143abf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,12 +9,12 @@ repos: - id: check-yaml - id: check-added-large-files - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "38bfb07c0c64c304f47eb52090f8288150c77730" # frozen: v0.17.1 + rev: "f368fb366ff7f2f808dd324b83a6d32267799e19" # frozen: v0.17.2 hooks: - id: ruff-check args: [ --fix ] - id: ruff-format - repo: https://github.com/astral-sh/uv-pre-commit - rev: "d4acaec07ac3bc6017fba3c3b8e9810af1b615db" # frozen: 0.13.1 + rev: "eeca16c54e09b4d9a848259e46bae14737944348" # frozen: 0.13.5 hooks: - id: uv-lock diff --git a/CHANGES.rst b/CHANGES.rst index 55a0a1d32..70c9df150 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -24,6 +24,7 @@ Removed Fixed +++++ * ``--generate-missing`` no longer reports a defined background step as missing when the feature also has a scenario that is not bound to a test. +* Fixed ``AttributeError: 'FixtureManager' object has no attribute '_arg2fixturedefs'`` with pytest 9.2.0 (`#850 `_). Security ++++++++ diff --git a/src/pytest_bdd/compat.py b/src/pytest_bdd/compat.py index ea99250fe..a8ec04f82 100644 --- a/src/pytest_bdd/compat.py +++ b/src/pytest_bdd/compat.py @@ -1,6 +1,7 @@ from __future__ import annotations -from collections.abc import Sequence +import contextlib +from collections.abc import Generator, Sequence from importlib.metadata import version from _pytest.fixtures import FixtureDef, FixtureManager, FixtureRequest @@ -9,7 +10,83 @@ pytest_version = parse_version(version("pytest")) -__all__ = ["getfixturedefs", "inject_fixture"] +__all__ = ["get_fixture_names", "getfixturedefs", "inject_fixture", "inject_temporary_fixturedefs"] + +if pytest_version.release >= (9, 2): + + def get_fixture_names(fixturemanager: FixtureManager) -> list[str]: + """Return the names of all the fixtures registered in the fixture manager, regardless of their visibility. + + The result is a copy, so it is safe to iterate over it while fixtures get registered or removed. + Use `getfixturedefs` to find out which definitions of a name are visible to a given node. + """ + # pytest>=9.2 keeps the registry as `name -> {node -> [fixturedefs]}`. + # Plugins still using the deprecated nodeid-based registration API end up in a separate registry + # (`name -> {nodeid -> [fixturedefs]}`), which pytest's own `getfixturedefs` also consults, + # so we need to include its names too. A name can be in both, hence the de-duplication. + return list( + dict.fromkeys( + [ + *fixturemanager._arg2node2fixturedefs, # type: ignore + *fixturemanager._arg2nodeid2fixturedefs, # type: ignore + ] + ) + ) + + @contextlib.contextmanager + def inject_temporary_fixturedefs( + fixturemanager: FixtureManager, name: str, fixturedefs: list[FixtureDef[object]], node: Node + ) -> Generator[None]: + """Temporarily register the fixturedefs under the given name, visible to the given node. + + This is a context manager: the registration only lasts for the duration of the `with` block. + `fixturedefs` must be ordered like pytest orders the result of `getfixturedefs`: + the closest definition (highest priority) last. + """ + # We register under `node`, so that the fixture is only visible to that node and its children. + node2fixturedefs = fixturemanager._arg2node2fixturedefs.setdefault(name, {}) # type: ignore + # `FixtureManager.getfixturedefs` reverses the stored list when `bdd_name` is resolved. + # `fixturedefs` is ordered with the highest priority last, so we store it reversed to get that order back. + node2fixturedefs[node] = list(reversed(fixturedefs)) + try: + yield + finally: + # Clean up after ourselves, like `mock.patch` does. The fixture manager lives for the whole session + # (not just the current test item), so without this every item that uses a step would leave an + # entry behind (keeping the node alive) until the end of the run. + # It's not needed for correctness on pytest>=9.2: the entry is keyed by `node`, and pytest only + # looks at the requesting node and its parents, so other nodes can't see it anyway. + del fixturemanager._arg2node2fixturedefs[name] # type: ignore + +else: + + def get_fixture_names(fixturemanager: FixtureManager) -> list[str]: + """Return the names of all the fixtures registered in the fixture manager, regardless of their visibility. + + The result is a copy, so it is safe to iterate over it while fixtures get registered or removed. + Use `getfixturedefs` to find out which definitions of a name are visible to a given node. + """ + # pytest<9.2 keeps the registry as `name -> [fixturedefs]`. + return list(fixturemanager._arg2fixturedefs) # type: ignore + + @contextlib.contextmanager + def inject_temporary_fixturedefs( + fixturemanager: FixtureManager, name: str, fixturedefs: list[FixtureDef[object]], node: Node + ) -> Generator[None]: + """Temporarily register the fixturedefs under the given name. + + This is a context manager: the registration only lasts for the duration of the `with` block. + `node` is unused here, since the registry of these pytest versions isn't keyed by node: + visibility is decided by each fixturedef's `baseid`. + """ + fixturemanager._arg2fixturedefs[name] = fixturedefs # type: ignore + try: + yield + finally: + # Clean up after ourselves, like `mock.patch` does. The registry is keyed by name only (and lives for + # the whole session), so without this a stale entry would stay registered under this name. + del fixturemanager._arg2fixturedefs[name] # type: ignore + if pytest_version.release >= (8, 1): @@ -71,7 +148,7 @@ def inject_fixture(request: FixtureRequest, arg: str, value: object) -> None: add_fixturename = arg not in request.fixturenames def fin() -> None: - request._fixturemanager._arg2fixturedefs[arg].remove(fd) + request._fixturemanager._arg2fixturedefs[arg].remove(fd) # type: ignore if old_fd is not None: request._fixture_defs[arg] = old_fd @@ -82,7 +159,7 @@ def fin() -> None: request.addfinalizer(fin) # inject fixture definition - request._fixturemanager._arg2fixturedefs.setdefault(arg, []).append(fd) + request._fixturemanager._arg2fixturedefs.setdefault(arg, []).append(fd) # type: ignore # inject fixture value in request cache request._fixture_defs[arg] = fd diff --git a/src/pytest_bdd/scenario.py b/src/pytest_bdd/scenario.py index 9b7f04a4b..8140322f4 100644 --- a/src/pytest_bdd/scenario.py +++ b/src/pytest_bdd/scenario.py @@ -27,7 +27,7 @@ from _pytest.outcomes import Failed from . import exceptions -from .compat import getfixturedefs, inject_fixture +from .compat import get_fixture_names, getfixturedefs, inject_fixture, inject_temporary_fixturedefs from .feature import get_feature, get_features from .steps import StepFunctionContext, get_step_fixture_name, step_function_context_registry from .utils import ( @@ -60,11 +60,13 @@ def find_fixturedefs_for_step(step: Step, fixturemanager: FixtureManager, node: Node) -> Iterable[FixtureDef[object]]: - """Find the fixture defs that can parse a step.""" - # happens to be that _arg2fixturedefs is changed during the iteration so we use a copy - fixture_def_by_name = list(fixturemanager._arg2fixturedefs.items()) - for fixturename, fixturedefs in fixture_def_by_name: - for _, fixturedef in enumerate(fixturedefs): + """Find the fixture defs (of step definitions) that can parse a step and are visible to the given node.""" + # pytest has no public API to list the registered fixtures, so we go through all their names. + # The names are a snapshot, so we can safely iterate even if fixtures are registered meanwhile. + for fixturename in get_fixture_names(fixturemanager=fixturemanager): + # We let pytest decide which definitions are visible to `node` (scoping and overriding rules), + # instead of re-implementing that logic here. + for fixturedef in getfixturedefs(fixturemanager, fixturename, node) or []: step_func_context = step_function_context_registry.get(fixturedef.func) if step_func_context is None: continue @@ -76,10 +78,6 @@ def find_fixturedefs_for_step(step: Step, fixturemanager: FixtureManager, node: if not match: continue - fixturedefs = list(getfixturedefs(fixturemanager, fixturename, node) or []) - if fixturedef not in fixturedefs: - continue - yield fixturedef @@ -134,11 +132,14 @@ def iterparentnodeids(nodeid: str) -> Iterator[str]: def inject_fixturedefs_for_step(step: Step, fixturemanager: FixtureManager, node: Node) -> Iterator[None]: """Inject fixture definitions that can parse a step. + This is a context manager: the injected fixture only exists while the `with` block is active. + We fist iterate over all the fixturedefs that can parse the step. Then we sort them by their "path" (list of parent IDs) so that we respect the fixture scoping rules. - Finally, we inject them into the request. + Finally, we register them all under a single synthetic fixture name (see `get_step_fixture_name`), + so that `request.getfixturevalue(...)` can resolve the right step definition using pytest's own machinery. """ bdd_name = get_step_fixture_name(step=step) @@ -157,12 +158,9 @@ def get_fixture_path(fixture_def: FixtureDef) -> list[str]: return logger.debug("Adding providers for fixture %r: %r", bdd_name, fixturedefs) - fixturemanager._arg2fixturedefs[bdd_name] = fixturedefs - - try: + # The injection is removed when the block exits, so that the step fixture doesn't outlive this lookup. + with inject_temporary_fixturedefs(fixturemanager=fixturemanager, name=bdd_name, fixturedefs=fixturedefs, node=node): yield - finally: - del fixturemanager._arg2fixturedefs[bdd_name] def get_step_function(request: FixtureRequest, step: Step) -> StepFunctionContext | None: diff --git a/tests/feature/test_report.py b/tests/feature/test_report.py index 2fb3813e3..99de46b39 100644 --- a/tests/feature/test_report.py +++ b/tests/feature/test_report.py @@ -9,6 +9,14 @@ from pytest_bdd.reporting import test_report_context_registry +def match_call_report(result, name): + """Find the call report of the test with the given name (parametrization included).""" + [report] = [ + r for r in result.getreports("pytest_runtest_logreport") if r.when == "call" and r.nodeid.endswith(f"::{name}") + ] + return report + + class OfType: """Helper object comparison to which is always 'equal'.""" @@ -184,7 +192,7 @@ def _(cucumbers, left): } assert scenario == expected - report = result.matchreport("test_outlined[12-5-7]", when="call") + report = match_call_report(result, "test_outlined[12-5-7]") scenario = test_report_context_registry[report].scenario expected = { "feature": { @@ -231,7 +239,7 @@ def _(cucumbers, left): } assert scenario == expected - report = result.matchreport("test_outlined[5-4-1]", when="call") + report = match_call_report(result, "test_outlined[5-4-1]") scenario = test_report_context_registry[report].scenario expected = { "feature": { @@ -339,7 +347,7 @@ def test_complex(alien): ) ) result = pytester.inline_run("-vvl") - report = result.matchreport("test_complex[10,20-alien0]", when="call") + report = match_call_report(result, "test_complex[10,20-alien0]") assert report.passed report_context = test_report_context_registry[report] diff --git a/tox.ini b/tox.ini index cad940ac0..ee8b58c20 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] # pytest 7.0-7.2 do not support python 3.12+ envlist = py{3.10,3.11}-pytest{7.0,7.1,7.2}-gherkin_officiallatest-coverage - py{3.10,3.11,3.12,3.13,3.14}-pytest{7.3,7.4,8.0,8.1,8.2,8.3,9.0,9.1,latest}-coverage + py{3.10,3.11,3.12,3.13,3.14}-pytest{7.3,7.4,8.0,8.1,8.2,8.3,9.0,9.1,9.2,latest}-coverage py{3.10,3.11,3.12,3.13,3.14}-gherkin_official{29,30,32,33,34,35,36,37,38,39,40,41,42,latest}-coverage py3.15-coverage py3.12-pytestlatest-xdist-coverage @@ -29,6 +29,7 @@ deps = gherkin_official29: gherkin-official~=29.0.0 pytestlatest: pytest + pytest9.2: pytest~=9.2.0 pytest9.1: pytest~=9.1.0 pytest9.0: pytest~=9.0.0 pytest8.3: pytest~=8.3.0 diff --git a/uv.lock b/uv.lock index 110ce307e..b2e928bea 100644 --- a/uv.lock +++ b/uv.lock @@ -1,5 +1,5 @@ version = 1 -revision = 3 +revision = 5 requires-python = ">=3.10" resolution-markers = [ "python_full_version >= '3.15'", @@ -140,11 +140,11 @@ wheels = [ [[package]] name = "certifi" -version = "2026.7.22" +version = "2026.10.19" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/a3/c2/24167ea9858356b47a87a50d39908bfdb72ceeefe0041586e704e5376b3a/certifi-2026.7.22.tar.gz", hash = "sha256:741e2c3b351ddf169a738da9f2c048608ff7f2c5cc02f1ebc6b118bb090d5d55", size = 138112, upload-time = "2026-07-22T03:35:12.644Z" } +sdist = { url = "https://files.pythonhosted.org/packages/a6/bd/1436c50cc46699de0230fbaacc1d1de7bfec413176099949e9d5112e88f2/certifi-2026.10.19.tar.gz", hash = "sha256:035c1e85572b141bf1c3a3eff0e33a8eb74917522f2559075ff8d2fea780a1ae", size = 137598, upload-time = "2026-10-20T02:24:16.604Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/0b/a7/71ac2cff56fec219ed242bb11b8efb69fcc4bec75db06fb7bfe35de520e6/certifi-2026.7.22-py3-none-any.whl", hash = "sha256:62f22742b58a1a33014a2b6b706588a8d7e2a88ae7bd1a6ebe8c992928483775", size = 136983, upload-time = "2026-07-22T03:35:11.276Z" }, + { url = "https://files.pythonhosted.org/packages/c4/51/29046e48f693c54e5b7412216d447a1d8362c9653148d98c02cdf65fa733/certifi-2026.10.19-py3-none-any.whl", hash = "sha256:42d35340cc5b9ba78e818ddbff0c5b1c2b779de448a340fd1b989f5fa8670e1b", size = 136464, upload-time = "2026-10-20T02:24:15.072Z" }, ] [[package]] @@ -903,14 +903,14 @@ wheels = [ [[package]] name = "mako" -version = "1.4.1" +version = "1.4.2" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "markupsafe" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/2a/12/b5fa2353e2754cd67fb9f83793fa48ff42c213a5da7e719869d2301f6ab8/mako-1.4.1.tar.gz", hash = "sha256:d7904710b662996425a21627710c4777c45053146942cf8a7aebf757c92b8c27", size = 410165, upload-time = "2026-08-05T06:10:56.611Z" } +sdist = { url = "https://files.pythonhosted.org/packages/05/7f/0b891a82379ffd96d2d8cc6d435fb1055cdaed52829287f81d2a43fd71cb/mako-1.4.2.tar.gz", hash = "sha256:7227a060ee3af55a493af61d73d6beef13044b81dba9586736c13945f09464ce", size = 412231, upload-time = "2026-09-22T20:40:55.06Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/a5/54/12ed58d458474aaab5c3d180173e745a4fe131bb330370596876d19ff60f/mako-1.4.1-py3-none-any.whl", hash = "sha256:a359d9a94a541213958742b2698d0a7757bb83551767bc468a74b9905aba9617", size = 80010, upload-time = "2026-08-05T06:10:58.248Z" }, + { url = "https://files.pythonhosted.org/packages/f0/bb/0e4c30a18858adebc75496ea8a8c3fb65cbf4b36ea1c5028ed8a0a5fa196/mako-1.4.2-py3-none-any.whl", hash = "sha256:e70a2a4308952b33a21208bfd6725da79fae5a8c224578f8cfdeb60e5ace03df", size = 80163, upload-time = "2026-09-22T20:40:56.423Z" }, ] [[package]] @@ -1258,6 +1258,7 @@ wheels = [ name = "pytest-bdd" version = "9.0.0" source = { editable = "." } +default-groups = "all" dependencies = [ { name = "gherkin-official" }, { name = "mako" }, @@ -1329,14 +1330,14 @@ wheels = [ [[package]] name = "python-discovery" -version = "1.6.0" +version = "1.6.4" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "filelock" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/91/96/0f93e27c9f60a650838f2118159aa115fd5732c0716247917b7ba7ede665/python_discovery-1.6.0.tar.gz", hash = "sha256:6393b4eae1be8b2182670635e7baff89ac21cb9f8e86fd1ff40c7b1144febb4c", size = 82849, upload-time = "2026-08-28T17:30:02.366Z" } +sdist = { url = "https://files.pythonhosted.org/packages/f3/ee/cf608372c88ce2c136ee13c69ab6f667dbc0d0c1176af188b4ddc8853e66/python_discovery-1.6.4.tar.gz", hash = "sha256:bc70d31f0ec5de11eda13d4d64c16e24b3506a65984684f2b6c98cb83b2ea9df", size = 89883, upload-time = "2026-10-19T01:45:14.855Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/43/5e/21abf578182fb15006a57faf3711a1e659e29d600d19b6e557eae908c81d/python_discovery-1.6.0-py3-none-any.whl", hash = "sha256:d4e244cf17b8b29819ed78003d55fbacf86eda23425b075454fff9271b79377a", size = 38451, upload-time = "2026-08-28T17:30:01.236Z" }, + { url = "https://files.pythonhosted.org/packages/60/91/1aa70d3dfcab0dbcf88a2cbc3bce7f7c69562287a90216e617eaa4937e25/python_discovery-1.6.4-py3-none-any.whl", hash = "sha256:530179cc51a1816d512b15635b3dc931295ae12efb183783ad31190a5d425d2b", size = 39385, upload-time = "2026-10-19T01:45:13.668Z" }, ] [[package]] @@ -1805,18 +1806,19 @@ wheels = [ [[package]] name = "virtualenv" -version = "21.7.9" +version = "21.14.13" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "distlib" }, { name = "filelock" }, + { name = "packaging" }, { name = "platformdirs" }, { name = "python-discovery" }, { name = "typing-extensions", marker = "python_full_version < '3.11'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/52/5c/ba82fdd0da13ade01453fc08277a70abc79128101319549f55f2e13f8f83/virtualenv-21.7.9.tar.gz", hash = "sha256:a7e42d81d779dec8afd7dc4be71640fb959ea861bccfa5980cb4ad9f92e30675", size = 5348882, upload-time = "2026-09-09T01:03:27.752Z" } +sdist = { url = "https://files.pythonhosted.org/packages/70/aa/bff50daee0488e16d611258a9b6c5a1d0c9e128f8ca424e9f4e1c0444ef2/virtualenv-21.14.13.tar.gz", hash = "sha256:de5307ba4b9a0001d9c8ea02832d38f63ca432880f416c1bface61c4323fd905", size = 5570301, upload-time = "2026-10-22T20:10:16.952Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/85/fc/888c80b8da917bfc48a41887eca244f995d190bd3c01175727089fcaf27e/virtualenv-21.7.9-py3-none-any.whl", hash = "sha256:ba3b0bb41063c848d84d76a9fe3fb7711aaa0f2fe78708e8f3cd9714770e4eac", size = 5324667, upload-time = "2026-09-09T01:03:26.023Z" }, + { url = "https://files.pythonhosted.org/packages/bb/a9/c10d8a44a29fb94a18b43fdf11f38caca53ae7c9406f11a72b1cb8f624f1/virtualenv-21.14.13-py3-none-any.whl", hash = "sha256:5fbb04138a4861580b78ba9110d529a26bc48fcc93c8ec36bc0202eeed96a788", size = 5557094, upload-time = "2026-10-22T20:10:15.096Z" }, ] [[package]]