Skip to content

Commit

Permalink
fix: avoid modifing the input dict (#903)
Browse files Browse the repository at this point in the history
Reported in rapidfuzz/RapidFuzz#397.

Signed-off-by: Henry Schreiner <[email protected]>
  • Loading branch information
henryiii authored Sep 20, 2024
1 parent ca529d6 commit e903ec9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/scikit_build_core/build/metadata.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import annotations

import copy
from typing import TYPE_CHECKING, Any

from packaging.version import Version
Expand All @@ -24,7 +25,7 @@ def get_standard_metadata(
pyproject_dict: Mapping[str, Any],
settings: ScikitBuildSettings,
) -> StandardMetadata:
new_pyproject_dict = dict(pyproject_dict)
new_pyproject_dict = copy.deepcopy(pyproject_dict)
# Handle any dynamic metadata
for field, provider, config in load_dynamic_metadata(settings.metadata):
if provider is None:
Expand Down

0 comments on commit e903ec9

Please sign in to comment.